小编Ale*_*son的帖子

404 使用 Terraform 创建 github_repository_webhook 时

我们升级为使用integrations/github提供程序源,从那时起,当我们尝试使用 Terraform 创建 github_repository_webhook 时,我们就开始收到 404 错误。我相信我们已经拥有基于文档所需的所有必要部分,但日志中的 API uri 缺少 org. 注意:真实的组织和存储库名称已被编辑。

主.tf

resource "aws_codepipeline_webhook" "codepipeline_webhook" {
  name            = "test-github-webhook"
  authentication  = "GITHUB_HMAC"
  target_action   = "CC"
  target_pipeline = aws_codepipeline.pipeline.name

  authentication_configuration {
    secret_token = data.aws_secretsmanager_secret_version.github_token.secret_string
  }

  filter {
    json_path    = "$.ref"
    match_equals = "refs/heads/{Branch}"
  }

  tags = merge(var.tags, {
    Name = "test-github-webhook"
  })
}

# Wire the CodePipeline webhook into a GitHub repository.
resource "github_repository_webhook" "github_webhook" {
  repository = "my_repo"

  configuration {
    url          = aws_codepipeline_webhook.codepipeline_webhook.url
    content_type = "json"
    insecure_ssl …
Run Code Online (Sandbox Code Playgroud)

terraform terraform-provider-github

6
推荐指数
1
解决办法
2550
查看次数