Expected Behavior
Applying the Terraform plan for a new github_repository with vulnerability_alerts = true should create the repository without producing an error.
This is running in an GitHub Enterprise Cloud account.
It works fine with provider version 6.6.0 but fails with 6.7.0 to 6.9.0 (error below).
Possibly related to #2501.
Actual Behavior
Terraform errors, creates the repository but the state is broken with some attributes missing. Just applying Terraform again does not fix the issues.
Error: DELETE https://api.github.com/repos/lessonnine/jts-test.test/vulnerability-alerts: 422 An enforced security configuration prevented modifying dependabot alerts enablement. Contact your organization owner for details. []
│
│ with github_repository.lessonnine-jts-test-test,
│ on generated.tf line 50028, in resource "github_repository" "lessonnine-jts-test-test":
│ 50028: resource "github_repository" "lessonnine-jts-test-test" {
Terraform Version
Terraform version 1.11.4 on linux_amd64.
Affected Resource(s)
Terraform Configuration Files
resource "github_repository" "lessonnine-jts-test-test" {
name = "jts-test.test"
description = "Just for testing GitHub api (Infrastructure)"
topics = [
"infrastructure",
]
has_issues = false
has_projects = true
has_wiki = false
allow_rebase_merge = false
allow_squash_merge = false
visibility = "private"
vulnerability_alerts = true # test adding this attribute
auto_init = true
delete_branch_on_merge = true
allow_update_branch = true
allow_auto_merge = true
lifecycle {
prevent_destroy = true
ignore_changes = [
# vulnerability alerts are managed via org-wide settings
vulnerability_alerts,
]
}
}
with provider version:
github = {
source = "integrations/github"
version = "6.7.0"
}
Steps to Reproduce
Debug Output
Error: DELETE https://api.github.com/repos/lessonnine/jts-test.test/vulnerability-alerts: 422 An enforced security configuration prevented modifying dependabot alerts enablement. Contact your organization owner for details. []
│
│ with github_repository.lessonnine-jts-test-test,
│ on generated.tf line 50028, in resource "github_repository" "lessonnine-jts-test-test":
│ 50028: resource "github_repository" "lessonnine-jts-test-test" {
Panic Output
Code of Conduct
Expected Behavior
Applying the Terraform plan for a new
github_repositorywithvulnerability_alerts = trueshould create the repository without producing an error.This is running in an GitHub Enterprise Cloud account.
It works fine with provider version
6.6.0but fails with6.7.0to6.9.0(error below).Possibly related to #2501.
Actual Behavior
Terraform errors, creates the repository but the state is broken with some attributes missing. Just applying Terraform again does not fix the issues.
Terraform Version
Terraform version
1.11.4onlinux_amd64.Affected Resource(s)
github_repositoryTerraform Configuration Files
Steps to Reproduce
Debug Output
Panic Output
Code of Conduct