Thanks alot for this Wayne. It looks like when you have more than 1 firewall endpoint, this resource is still problematic. The sync states look something like this:
As you can see it’s un ordered so getting the endpoint id by index isn’t really great. I’ve tried something like:
let vpcEndpointId: string | null = null;
for (let i = 0; i < 2; i++) {
const syncState = this.nonProdFirewall.firewallStatus.get(0).syncStates.get(i);
// Using the lookup function to get availability_zone
const syncStateAZ = Fn.lookup(syncState.toString(), "availability_zone", "");
if (syncStateAZ === this.prodFirewallSubnets[index].availabilityZone) {
// Extract the endpoint_id when a match is found
vpcEndpointId = Fn.lookup(Fn.element(syncState.attachment.toString(), 0), 'endpoint_id', '');
break; // Exit the loop once you've found the match
}
}
No luck, any chance you’ve solved for this as well?