I've recently been migrating my existing AWS architecture to Terraform, and thanks to the Terraformer tool, which saved a lot of time. However, I encountered some issues while using Terraformer to import the API Gateway. For instance, when I run the following command:
nearly all resources are imported into the state and generate HCL, except for api_gateway_resource.
After a brief code debug, I found that when refreshing api_gateway_resources, it always results in a resource not found error. Error as follow:
2024/10/28 15:58:11 Refreshing state... aws_api_gateway_resource.tfer--xxxxxxxxxx2024/10/28 15:58:13 ERROR: Read resource response is null for resource aws_api_gateway_resource.tfer--xxxxxxxxx......ERROR: Unable to refresh resource tfer--xxxxxxxxxxx
Hi,
I've recently been migrating my existing AWS architecture to Terraform, and thanks to the Terraformer tool, which saved a lot of time. However, I encountered some issues while using Terraformer to import the API Gateway. For instance, when I run the following command:
terraformer import aws --resources=api_gateway --regions=eu-central-1
nearly all resources are imported into the state and generate HCL, except for api_gateway_resource. After a brief code debug, I found that when refreshing api_gateway_resources, it always results in a resource not found error. Error as follow:
2024/10/28 15:58:11 Refreshing state... aws_api_gateway_resource.tfer--xxxxxxxxxx
2024/10/28 15:58:13 ERROR: Read resource response is null for resource aws_api_gateway_resource.tfer--xxxxxxxxx
......
ERROR: Unable to refresh resource tfer--xxxxxxxxxxx
Could you please explain why this is happening?