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]: github_actions_organization_permissions does not pick up failed plan and allows apply #2251

Open
1 task done
mattgrul opened this issue May 3, 2024 · 0 comments
Open
1 task done
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@mattgrul
Copy link

mattgrul commented May 3, 2024

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

  • I agree to follow this project's Code of Conduct
@mattgrul mattgrul added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels May 3, 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