You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How should I choose the correct network firewall endpoint for a subnet by using the AZ?
I'm using the golang version of the CDK
Here's what I have tried so far
endpoints:=fw.AttrEndpointIds()
// We asign the enpoint in the same AZ as the subnetfor_, tgwSubnet:=range*isolatedSubnets {
fori:=0; i<4; i++ { // I have 4 subnets mapped to the firewallendpointData:=awscdk.Fn_Split(jsii.String(":"), awscdk.Fn_Select(jsii.Number(i), endpoints), jsii.Number(2))
az:=awscdk.Fn_Select(jsii.Number(0), endpointData)
id:=awscdk.Fn_Select(jsii.Number(1), endpointData)
// This is not workingifawscdk.Token_AsString(az, &awscdk.EncodingOptions{}) ==tgwSubnet.AvailabilityZone() {
// Create new route// tgwSubnet.(awsec2.Subnet).AddRoute(jsii.String("tgw-fw-route"), &awsec2.AddRouteOptions{// RouterType: awsec2.RouterType_VPC_ENDPOINT,// DestinationCidrBlock: jsii.String("0.0.0.0/0"),// RouterId: id,// })break
}
ifawscdk.Token_CompareStrings(az, tgwSubnet.AvailabilityZone()) ==awscdk.TokenComparison_SAME() {
// This is not working either
}
}
}
I have also tried creating a map from the endpoints array but no luck either
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
How should I choose the correct network firewall endpoint for a subnet by using the AZ?
I'm using the golang version of the CDK
Here's what I have tried so far
I have also tried creating a map from the endpoints array but no luck either
Then tried this, but I get a nasty memory access error
Help please 🙏🏼
thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions