Expected Behavior
- Generate a Terraform plan to destroy a
github_repository resource with the archive_on_destory flag set to true in an org with a GitHub Advanced Security policy requiring code scanning to be enabled on all repos.
- Apply the plan.
terraform plan does not fail.
- The repository is archived.
Actual Behavior
terraform plan fails with:
Error: PATCH https://api.github.com/repos/MY_ORG/MY_REPO: 422 An enforced security configuration prevented modifying secret scanning enablement. Contact your organization owner for details.
Terraform Version
Terraform v1.11.4
on darwin_arm64
+ provider registry.terraform.io/integrations/github v6.6.0
Affected Resource(s)
Terraform Configuration Files
Steps to Reproduce
- Generate a Terraform plan to destroy a
github_repository resource with the archive_on_destory flag set to true in an org with a GitHub Advanced Security policy requiring code scanning to be enabled on all repos.
- Apply the plan.
terraform plan fails with:
Error: PATCH https://api.github.com/repos/MY_ORG/MY_REPO: 422 An enforced security configuration prevented modifying secret scanning enablement. Contact your organization owner for details.
Debug Output
Panic Output
Code of Conduct
Expected Behavior
github_repositoryresource with thearchive_on_destoryflag set totruein an org with a GitHub Advanced Security policy requiring code scanning to be enabled on all repos.terraform plandoes not fail.Actual Behavior
terraform planfails with:Terraform Version
Affected Resource(s)
Terraform Configuration Files
Steps to Reproduce
github_repositoryresource with thearchive_on_destoryflag set totruein an org with a GitHub Advanced Security policy requiring code scanning to be enabled on all repos.terraform planfails with:Debug Output
Panic Output
Code of Conduct