#github #terraform-provider-aws #aws-codebuild #github-webhook
Вопрос:
Я использую github, terraform и AWS. С помощью terraform мне нужно создать кодовую сборку, веб-крючок и т. Д. Я получаю эту ошибку, когда делаю «применить терраформирование».:
Error: error creating CodeBuild Webhook: ResourceNotFoundException: Could not find access token for server type github
Мой aws_codebuild_webhook в terraform выглядит так:
resource "aws_codebuild_webhook" "build_hook" { project_name = aws_codebuild_project.plan_build_proj.name build_type = "BUILD" filter_group { filter { type = "EVENT" pattern = "PULL_REQUEST_CREATED,PULL_REQUEST_UPDATED" } } }
И мой aws_codebuild_проект выглядит так:
resource "aws_codebuild_project" "plan_build_proj" { badge_enabled = false build_timeout = 60 name = "${var.plan_build_name}_${var.stage}" queued_timeout = 480 service_role = aws_iam_role.build_role.arn tags = { Environment = var.stage } artifacts { type = "NO_ARTIFACTS" } environment { compute_type = "BUILD_GENERAL1_SMALL" image = "aws/codebuild/amazonlinux2-x86_64-standard:2.0" image_pull_credentials_type = "CODEBUILD" privileged_mode = false type = "LINUX_CONTAINER" } source { buildspec = data.template_file.buildspec_plan.rendered location = "${var.repository_name_fullpath}" git_clone_depth = 0 insecure_ssl = false report_build_status = false type = "GITHUB" } }