Closed kurtislamb closed 3 months ago
Found out that min_size
is marked as writeOnlyProperties:
aws cloudformation describe-type --type RESOURCE --type-name AWS::GameLift::GameServerGroup | jq -r ".Schema" | jq ".writeOnlyProperties"
[
"/properties/DeleteOption",
"/properties/LaunchTemplate",
"/properties/MinSize",
"/properties/MaxSize",
"/properties/AutoScalingPolicy",
"/properties/VpcSubnets",
"/properties/Tags"
]
As per: https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-writeonlyproperties , this attribute is not returned by read / list request.
I believe this is an upstream AWS issue
relates to #1149
Community Note
Terraform CLI and Terraform AWS Cloud Control Provider Version
Terraform v1.6.5 on linux_amd64 awscc 0.68.0
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/kurtislamb/23f5581e6b2b572e62d2a8c61ffee2a3
Expected Behavior
When we change values like
min_size
terraform sees this as an update and updates the resource in AWS. I expect the update to work as AWS confirm the Cloud Control API supports update. This should update the GameServer Group and the underlying Auto Scaling Group with the values that have changed.Actual Behavior
When the above action is taken the following error occurs;
As a side note, if only the name changes the resource update completes but the change does not take effect in AWS, thus every subsequent apply wants to change the name again.
Steps to Reproduce
terraform apply
to create the resources, all applies correctlyterraform apply
terraform detects change and tries to update, error occursImportant Factoids
We use a mixture of AWSCC and AWS Providers with 99% of the code base on the AWS Provider
References
https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/supported-resources.html