Open riastrad opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
I went digging in the AWS API documentation and realized that this isn't necessarily a bug in the provider, but due to the fact that AWS's UpdateDomainName endpoint doesn't support replace
operations for the endpointConfiguration
[^1]:
I'll leave this ticket open because it would be nice if the CLI caught this in the terraform plan
or terraform apply
commands before trying to make an invalid patch. A "updating this resource is not possible because x" could potentially save folks a lot of time when they try to implement in the future.
[^1]: image is a screenshot from these docs
Terraform Core Version
v1.3.5
AWS Provider Version
4.34.0
Affected Resource(s)
Expected Behavior
I am attempting to update an API Gateway that has previously been deployed with an endpoint configuration type
EDGE
(by default). I want to update this API Gateway to instead be typeREGIONAL
.I expect changing the following configuration details to result in successfully updating the API Gateway instance:
endpoint_configuration: { types = ["REGIONAL"] }
to myaws_api_gateway_rest_api
&aws_api_gateway_domain_name
resourcesActual Behavior
The changes mentioned above result in an AWS API error instead.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Relevant API Gateway resources
Other potentially relevant resources
Steps to Reproduce
terraform apply
Debug Output
tf_debug.txt
Panic Output
No response
Important Factoids
The API Gateway has previously been deployed as an "EDGE-OPTIMIZED" type and this error appears when attempting to update the resource to be "REGIONAL" instead.
The original error I encountered was due to the fact that the
regional_domain_name
andregional_zone_id
fields do not populate for theaws_api_gateway_domain_name
resource after switching it toendpoint_configuration: { types = ["REGIONAL"] }
.When I hard code the values in my Route53 record resource instead of referencing them the
domain_name
resource (as shown in the configuration above) I receive the AWS error that's shared here and I believe this to be closer to the root cause of the issue.References
No response
Would you like to implement a fix?
No response