Repository navigation
Closed
Labels
Status: Up for grabsIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documented
Description
Expected Behaviour
Terraform state has information about an attribute required_workflows of the github_organization_rulesett resource.
Actual Behaviour
State DOES NOT include information about required_workflows attribute of github_organization_ruleset resource.
Terraform Version
Terraform v1.7.0 on linux_amd64
GH Provider registry.terraform.io/integrations/github v5.45.0
Affected Resource(s)
- github_organization_ruleset
Terraform Configuration Files
resource "github_organization_ruleset" "required-workflow-depricated-actions" {
name = "Required workflow for Deprecated Actions"
target = "branch"
enforcement = "evaluate"
conditions {
ref_name {
include = ["~DEFAULT_BRANCH"]
exclude = []
}
repository_name {
include = [
"test-repo"
]
exclude = []
}
}
rules {
required_workflows {
required_workflow {
repository_id = 123456 # change to real repo_id or use "data"
path = ".github/workflows/deprecated_actions.yaml"
ref = "master"
}
}
}
}Steps to Reproduce
terraform apply
terraform plan
terraform state show 'github_organization_ruleset.required-workflow-depricated-actions'
output of plan (tries to add required_workflow again)
~ resource "github_organization_ruleset" "required-workflow-depricated-actions" {
id = "CENSORED"
name = "Required workflow for Deprecated Actions"
# (5 unchanged attributes hidden)
~ rules {
# (6 unchanged attributes hidden)
+ required_workflows {
+ required_workflow {
+ path = ".github/workflows/deprecated_actions.yaml"
+ ref = "master"
+ repository_id = CENSORED
}
}
}
# (1 unchanged block hidden)
}
output of state (empty rules object)
# github_organization_ruleset.required-workflow-depricated-actions:
resource "github_organization_ruleset" "required-workflow-depricated-actions" {
enforcement = "evaluate"
etag = "CENSORED"
id = "CENSORED"
name = "Required workflow for Deprecated Actions"
node_id = "CENSORED"
ruleset_id = CENSORED
target = "branch"
conditions {
repository_id = []
ref_name {
exclude = []
include = [
"~DEFAULT_BRANCH",
]
}
repository_name {
exclude = []
include = [
"test-repo"
]
protected = false
}
}
rules {
}
}
Debug Output
No response
Panic Output
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Reacted by Igor Kliushnikov, Tim Harrison, Maxim Ivanov, nbentfeld, Matthew Hou, Aitor and James Roller, Jr.
Reacted by selhuberb
Metadata
Metadata
Assignees
Labels
Status: Up for grabsIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documented
Type
Projects
- StatusShow more project fieldsDone
Activity
o-sama commentedon Jan 22, 2024
Hey @ViacheslavKudinov, I'll try looking into this within the next couple of days, it's likely an issue with how the object is serialized. Thanks for bringing this up 🙂
[-][BUG]: Resource `github_organization_ruleset ` knows nothing about attribute resource after creation of the Rule(s)[/-][+][BUG]: Resource `github_organization_ruleset ` knows nothing about attribute `required_workflows ` after creation of the Rule(s)[/+][-][BUG]: Resource `github_organization_ruleset ` knows nothing about attribute `required_workflows ` after creation of the Rule(s)[/-][+][BUG]: Resource `github_organization_ruleset ` knows nothing about attribute `required_workflows` after creation of the Rule(s)[/+]ViacheslavKudinov commentedon Jan 22, 2024
Thank you @o-sama, it will be great if you could fix it quickly.
ViacheslavKudinov commentedon Mar 12, 2024
Is not reproducible on v6.0.1.
kfcampbell commentedon Mar 12, 2024
@ViacheslavKudinov feel free to close the issue if this has been fixed!
ViacheslavKudinov commentedon Mar 13, 2024
Thanks for the fix.
13 remaining items
ViacheslavKudinov commentedon Jun 16, 2025
Still valid issue
Noamshmueli commentedon Jun 18, 2025
Still experience the issue with provider version
v6.6.0mbelang commentedon Jul 21, 2025
There is a similar problem with
bypass_mode. Terraform doesn't store if you specifypull_request.Netkracker commentedon Aug 20, 2025
We at @swisspost miss the feature to create organization rulesets without having permanent drift on the workspace this code runs on.
Still happening on 6.4.0 (we needed to pin due to #2542 )
builtroller commentedon Sep 23, 2025
Bump on this.