integrations / integrations/terraform-provider-github
[BUG]: github_organization_custom_properties of type `true_false` detects drift on `default_value` indefinitely
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 8
Description
### Expected Behavior
With following configuration planned and applied.
```
resource "github_organization_custom_properties" "foo" {
property_name = "foo"
value_type = "true_false"
required = true
default_value = "true"
}
```
any additional plan results in no drift detected.
### Actual Behavior
An additional plan will result in following drift:
```
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# github_organization_custom_properties.stedisentry_enabled will be updated in-place
~ resource "github_organization_custom_properties" "foo" {
+ default_value = "true"
id = "foo"
# (6 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
```
### Terraform Version
Terraform: `1.15.7`
GitHub provider: `6.12.1`
### GitHub Installation Type
- [x] GitHub.com (Free, Pro, or Team)
- [ ] GitHub Enterprise Server (on-premises)
- [ ] GitHub Enterprise Cloud with Personal Accounts (github.com)
- [ ] GitHub Enterprise Cloud with Managed Users/EMU (github.com)
- [ ] GitHub Enterprise Cloud with Data Residency (*.ghe.com)
- [ ] I don't know
### Affected Resource(s)
- github_organization_custom_properties
### Terraform Configuration Files
```hcl
resource "github_organization_custom_properties" "foo" {
property_name = "foo"
value_type = "true_false"
required = true
default_value = "true"
}
```
### Steps to Reproduce
_No response_
### Debug Output
```shell
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Start with the github_organization_custom_properties resource and reproduce the configuration in the issue using Terraform 1.15.7 and provider 6.12.1. Compare the state after apply with the next plan for a true_false property; done means default_value="true" no longer appears as an in-place drift.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, terraform
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100