Open
Description
Not sure is it bug or feature
This is not working
const resolverEndpoint = new Route53ResolverEndpoint(this, "resolver_endpoint", <Route53ResolverEndpointConfig>{
provider: config.provider,
direction: "INBOUND",
securityGroupIds: [this.resolverSecurityGroup.id],
ipAddress: subnetIdsIterator.dynamic(<Route53ResolverEndpointIpAddress>{
subnetId: subnetIdsIterator.key
}),
tags: {
Name: "vpn-resolver"
}
})
│ Error: Extraneous JSON object property
│
│ on cdk.tf.json line 1859, in resource.aws_route53_resolver_endpoint.vpn_endpoint_resolver_endpoint_61EF1F6A.dynamic.ip_address.content:
│ 1859: "subnetId": "${each.key}"
│
│ No argument or block type is named "subnetId". Did you mean "subnet_id"?
╵
╷
│ Error: Missing required argument
│
│ on cdk.tf.json line 1860, in resource.aws_route53_resolver_endpoint.vpn_endpoint_resolver_endpoint_61EF1F6A.dynamic.ip_address.content:
│ 1860: },
│
│ The argument "subnet_id" is required, but no definition was found.
But this works ok (but my perfectionism suffers at this point due to the use of an untyped struct)
const resolverEndpoint = new Route53ResolverEndpoint(this, "resolver_endpoint", <Route53ResolverEndpointConfig>{
provider: config.provider,
direction: "INBOUND",
securityGroupIds: [this.resolverSecurityGroup.id],
ipAddress: subnetIdsIterator.dynamic({
subnet_id: subnetIdsIterator.key
}),
tags: {
Name: "vpn-resolver"
}
})