Open
Description
Expected Behavior
On importing a repository custom property, it should include the type, and the resource should not be replaced where the resource configuration is correct.
Actual Behavior
The property_type
is set to null, which causes the configuration to trigger a forced replacement of the resource.
Terraform Version
Terraform v1.10.4
on darwin_arm64
- provider registry.terraform.io/integrations/github v6.6.0
Affected Resource(s)
- github_repository_custom_property
Terraform Configuration Files
resource "github_repository_custom_property" "test" {
repository = "test_repo"
property_name = "test_property"
property_type = "string"
property_value = ["test_value"]
}
import {
to = github_repository_custom_property.test
id = "test_org:test_repo:test_property"
}
Steps to Reproduce
Import an existing custom property with the config like the above, it will force recreation due to the difference in types.
Debug Output
# Warning: this will destroy the imported resource
-/+ resource "github_repository_custom_property" "project" {
~ id = "REDACTED" -> (known after apply)
property_name = "Project"
+ property_type = "string" # forces replacement
property_value = [
"REDACTED",
]
repository = "REDACTED"
}
Panic Output
Code of Conduct
- I agree to follow this project's Code of Conduct