integrations / terraform-provider-github

Terraform GitHub provider
https://www.terraform.io/docs/providers/github/
MIT License
870 stars 708 forks source link

fix(github_repository_tag_protection): Handle non-existent tag protections in state refresh #2217

Open fixe opened 3 months ago

fixe commented 3 months ago

This commit updates the resourceGithubRepositoryTagProtectionRead function to remove tag protections from Terraform's state if they no longer exist in GitHub. This ensures that the state accurately reflects the actual infrastructure and that Terraform will recreate the tag protections if necessary.