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]: lifecycle prevent_destroy is ignored completely #2521

Closed
1 task done
jhonkan opened this issue Dec 19, 2024 · 1 comment
Closed
1 task done

[BUG]: lifecycle prevent_destroy is ignored completely #2521

jhonkan opened this issue Dec 19, 2024 · 1 comment
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@jhonkan
Copy link

jhonkan commented Dec 19, 2024

Expected Behavior

  • Adding lifecycle prevent_destroy to a github_repository resource is shown in the plan
  • Edits to lifecycle prevent_destroy in a github_repository resource is shown in the plan
  • Removing a github_repository resource with lifecycle prevent_destroy set to true throws an error

Actual Behavior

  • If lifecycle prevent_destroy is the only change, the plan outputs "No changes. Your infrastructure matches the configuration."
  • Removing a github_repository resource with lifecycle prevent_destroy set to true is flagged with the action - destroy

Terraform Version

  • Terraform version: 1.10.3
  • Provider details: terraform/providers/registry.terraform.io/integrations/github/6.4.0/linux_amd64/terraform-provider-github_v6.4.0
  • Github hosted runner ubuntu-22.04

Affected Resource(s)

  • github_repository
  • did not test with other resource types, but a closed issue mentions github_branch_protection

Terraform Configuration Files

terraform {
  required_version = "~> 1.10.0"
  required_providers {
    github = {
      source  = "integrations/github"
      version = "~> 6.4.0"
    }
  }
}

Steps to Reproduce

  • Add or edit lifecycle prevent_destroy to a github_repository resource
  • Run terraform plan

Debug Output

No response

Panic Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jhonkan jhonkan added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Dec 19, 2024
@jhonkan
Copy link
Author

jhonkan commented Dec 19, 2024

nevermind, looks like it's a terraform issue hashicorp/terraform#17599

@jhonkan jhonkan closed this as completed Dec 19, 2024
@github-project-automation github-project-automation bot moved this from 🆕 Triage to ✅ Done in 🧰 Octokit Active Dec 19, 2024
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
Development

No branches or pull requests

1 participant