[Bug]: aws_api_gateway_domain_name: unable to convert an EDGE type to REGIONAL #28059
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
service/apigateway
Issues and PRs that pertain to the apigateway service.
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
The text was updated successfully, but these errors were encountered: