Hello do you know why this code is taking 536 seco...
# getting-started
a
Hello do you know why this code is taking 536 seconds to deploy. I have tried several different options but it looks like there is a flaw somewhere i don't understand
Copy code
# Create the EC2 Client VPN Endpoint
vpn_endpoint = aws.ec2clientvpn.Endpoint("myVpnEndpoint",
                                         vpc_id=vpc_id,
                                         client_cidr_block="10.2.0.0/16",
                                         server_certificate_arn=server_acm_certificate.arn,
                                         connection_log_options=connection_log_options,
                                         authentication_options=authentication_options
                                         )

def create_associations(subnet_ids):
    associations = []
    for i, subnet_id in enumerate(subnet_ids):
        association = aws.ec2clientvpn.NetworkAssociation(
            f"association-{i}",
            client_vpn_endpoint_id=vpn_endpoint.id,
            subnet_id=subnet_id,
            opts=pulumi.ResourceOptions(parent=vpn_endpoint, delete_before_replace=True)
        )
        associations.append(association)
    return associations

associations = private_subnet_ids.apply(create_associations)
pulumi.export("vpn_associations", associations.apply(lambda a: [assoc.id for assoc in a]))


# Export the Client VPN Endpoint ID for external use
return vpn_endpoint
w
I’m not deeply familiar with EC2 client VPN NetworkAssociations. But do you have reason to believe it’s not “normal” for them to take on the order of 10 minutes to create? Nothing appears unusual about the code above, so most likely this is just how long it takes AWS to create and wait for readiness on this resource?