terraform-provider-github
terraform-provider-github copied to clipboard
[BUG]: `github_actions_organization_permissions` does not pick up failed plan and allows apply
Expected Behavior
When running the github_actions_organization_permissions with a mis-configuration like the below the plan should pick up on the error.
The plan run should fail with the same reason the apply errors before the apply attempts to run.
Actual Behavior
The plan successfully runs but the subsequent apply fails.
Terraform Version
Terraform Cloud v1.8.0
Affected Resource(s)
github_actions_organization_permissions
Terraform Configuration Files
resource "github_actions_organization_permissions" "test" {
allowed_actions = "all"
enabled_repositories = "selected"
allowed_actions_config { // Incorrect, should be `enabled_repositories` and different arguments.
github_owned_allowed = true
patterns_allowed = []
verified_allowed = false
}
}
Steps to Reproduce
terraform plan terraform apply
Debug Output
Plan Finished
Apply Errored
Error: the enabled_repositories_config {} block must be specified if enabled_repositories == 'selected'
with github_actions_organization_permissions.test
on main.tf line 29, in resource "github_actions_organization_permissions" "test":
resource "github_actions_organization_permissions" "test" {
Panic Output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct