Skip to content

[BUG]: Push rulesets terraform validation fail #3023

@abhi833

Description

@abhi833

Expected Behavior

For a push ruleset, ref_name tag is not required in conditions for selecting targeted resources to apply the rule

Actual Behavior

Terraform plan

Image
Image

gives error: Insufficient ref_name blocks. At least 1 "ref_name" blocks are required.

This is not supported for creating the push rule as per the GitHub APIs documentation.

Terraform Version

Terraform v1.14.3

Affected Resource(s)

https://docs.github.com/en/rest/orgs/rules?apiVersion=2022-11-28

https://registry.terraform.io/providers/integrations/github/latest/docs/resources/organization_ruleset

Terraform Configuration Files

Steps to Reproduce

Use the terraform script github_organization_ruleset from terraform registry documentation, focus on the push ruleset part.

Execute terraform scripts
terraform init
terraform plan
terraform apply

Debug Output

Panic Output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is being looked at and prioritizedType: BugSomething isn't working as documented

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions