Open
Description
When trying to use cdk migrate
with an IpAddressType attribute the migration fails with the following error:
❌ Migrate failed for `[Name]`: [Name]Stack could not be generated because IpAddressType is not a valid property for resource ApiGatewayV2Api of type AWS::ApiGatewayV2::Api
CDK's CfnApi supports IpAddressType.
When deleting this attribute, the migration is successful
My CloudFormation template was generate by CloudFormation IaC Generator, and contains the following:
ApiGatewayV2Api:
UpdateReplacePolicy: "Retain"
Type: "AWS::ApiGatewayV2::Api"
DeletionPolicy: "Retain"
Properties:
IpAddressType: "ipv4"
RouteSelectionExpression: "$request.method $request.path"
CorsConfiguration:
MaxAge: 300
AllowOrigins:
- "*"
AllowCredentials: false
ExposeHeaders: []
AllowMethods:
- "OPTIONS"
- "GET"
AllowHeaders:
- "content-type"
ProtocolType: "HTTP"
DisableExecuteApiEndpoint: false
Tags:
Project: "Resume-Site"
Environment: "dev"
ManagedBy: "Terraform"
Name: "resume-site-dev-api"
ApiGatewayV2Deployment:
UpdateReplacePolicy: "Retain"
Type: "AWS::ApiGatewayV2::Deployment"
DeletionPolicy: "Retain"
Properties:
ApiId:
Ref: "ApiGatewayV2Api"
Description: "Automatic deployment triggered by changes to the Api configuration"