AWS::VpcLattice::ServiceNetworkVpcAssociationAssociates a VPC with a service network. When you associate a VPC with the service network, it enables all the resources within that VPC to be clients and communicate with other services in the service network. For more information, see [Manage VPC associations](https://docs.aws.amazon.com/vpc-lattice/latest/ug/service-network-associations.html#service-network-vpc-associations) in the *Amazon VPC Lattice User Guide* . You can't use this operation if there is a disassociation in progress. If the association fails, retry by deleting the association and recreating it. As a result of this operation, the association gets created in the service network account and the VPC owner account. If you add a security group to the service network and VPC association, the association must continue to always have at least one security group. You can add or edit security groups at any time. However, to remove all security groups, you must first delete the association and recreate it without security groups.
import { CfnServiceNetworkVpcAssociation } from 'aws-cdk-lib/aws-vpclattice';Or use the module namespace:
import * as vpclattice from 'aws-cdk-lib/aws-vpclattice';
// vpclattice.CfnServiceNetworkVpcAssociationConfiguration passed to the constructor as CfnServiceNetworkVpcAssociationProps.
dnsOptionsOptionalIResolvable | DnsOptionsPropertyThe DNS options for the service network VPC association.
privateDnsEnabledOptionalboolean | IResolvableIndicates if private DNS is enabled for the service network VPC association.
securityGroupIdsOptionalstring[]The IDs of the security groups. Security groups aren't added by default. You can add a security group to apply network level controls to control which resources in a VPC are allowed to access the service network and its services. For more information, see [Control traffic to resources using security groups](https://docs.aws.amazon.com//vpc/latest/userguide/VPC_SecurityGroups.html) in the *Amazon VPC User Guide* .
serviceNetworkIdentifierOptionalstringThe ID or ARN of the service network. You must use an ARN if the resources are in different accounts.
tagsOptionalCfnTag[]The tags for the association.
vpcIdentifierOptionalstringThe ID of the VPC.
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-vpclatticeAWS::VpcLattice::ServiceNetworkVpcAssociation