Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: resource github_repository_tag_protection not working anymore with provider version 6.4.0 #2477

Open
1 task done
vkanproton opened this issue Nov 26, 2024 · 2 comments · May be fixed by #2478
Open
1 task done
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@vkanproton
Copy link

vkanproton commented Nov 26, 2024

Expected Behavior

Resource github_repository_tag_protection should be available to use as with older versions

Actual Behavior

│ Error: Invalid resource type

│ on main.tf line 184, in resource "github_repository_tag_protection" "this":
│ 184: resource "github_repository_tag_protection" "this" {

│ The provider integrations/github does not support resource type
│ "github_repository_tag_protection".

Terraform Version

$ tofu -v
OpenTofu v1.8.5
on darwin_amd64

  • provider registry.opentofu.org/hashicorp/google v6.12.0
  • provider registry.opentofu.org/hashicorp/tls v4.0.6
  • provider registry.opentofu.org/hashicorp/vault v4.4.0
  • provider registry.opentofu.org/integrations/github v6.4.0
  • provider registry.opentofu.org/taiidani/jenkins v0.10.2

$ terragrunt -v
terragrunt version 0.68.15

Affected Resource(s)

  • github_repository_tag_protection

Terraform Configuration Files

resource "github_repository_tag_protection" "this" {
  count = var.has_tag_protection ? 1 : 0
  repository = github_repository.repository.id
  pattern    = var.tag_protection_pattern
}

Steps to Reproduce

tofu plan/tofu apply

Debug Output

No response

Panic Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@vkanproton vkanproton added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Nov 26, 2024
@reed-hanger
Copy link

reed-hanger commented Nov 26, 2024

I just ran into this issue as well. I think the documentation for this resource needs to mention that this feature is no longer available as Issue #2348 mentions that this feature has been discontinued on GitHub's API. I'm not really sure what older versions of the github provider are doing under the hood now when they attempt to create these resources, but I found that we only implemented this as an optional feature in our code and never actually used it. Looks like the fix is to migrate to github_repository_ruleset.

@ViacheslavKudinov
Copy link
Contributor

ViacheslavKudinov commented Nov 27, 2024

If GitHub API doesn't support it anymore, probably, it just needs to be removed from documentation, but not 100% sure it is enough in this situation or not.

PS Created PR with removed documentation for github_repository_tag_protection resource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented
Projects
None yet
3 participants