【问题标题】:Terraform gitlab provider changes commit messageTerraform gitlab 提供者更改提交消息
【发布时间】:2022-06-10 21:03:43
【问题描述】:

如果先前的提交消息在您的 tf 代码中发生更改,那么 terraform 上的 gitlab 提供程序是否会添加 [DELETE] 的预期行为?

例如我有一个 tf 文件

resource "gitlab-repository-files_gitlab_repository_file" "this" {
    project        = gitlab_project.foo.id
    file_path      = "meow.txt"
    branch         = "main"
    content        = base64encode("hello world")
    author_email   = "meow@catnip.com"
    author_name    = "Meow Meowington"
    commit_message = "feature: add meow file*"
}

然后改成

    commit_message = "[ci skip] terraform templating commit\n\nJob URL: ${local.gitlab_configuration_details.pipeline_job_url}"

修改后我在 gitlab 上的提交信息是 [DELETE]: feature: add meow file

如果这是预期的行为,有什么办法可以阻止提供者添加 cmets?

因为我希望在 git 上将提交更改为“[ci skip] terraform templating commit\n\nJob URL: https:url.com”

谢谢!

【问题讨论】:

  • 嗯,看来您没有使用官方提供程序,所以除非您知道如何修复提供程序的源代码,否则任何人都可以猜测。 :)
  • 不是官方的吗?我使用的是TF页面registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/…中的一个
  • 嗯,那是官方的,但是如果你看一下资源名称gitlab-repository-files_gitlab_repository_file,当我搜索它时,它链接到:registry.terraform.io/providers/timofurrer/…。
  • 提供者似乎不支持这个,但是The provider provider.gitlab.local does not support resource type "gitlab-repository-files_gitlab_repository_file".
  • 您可以将您的required_providers 块添加到问题中吗?

标签: gitlab terraform


猜你喜欢
  • 1970-01-01
  • 2019-07-08
  • 2021-07-17
  • 1970-01-01
  • 2021-03-08
  • 2012-05-09
  • 1970-01-01
  • 1970-01-01
  • 2011-05-02
相关资源
最近更新 更多