AWS::VpcLattice::ServiceNetworkVpcAssociation - AWS CloudFormation

AWS::VpcLattice::ServiceNetworkVpcAssociation

Associates 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 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.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::VpcLattice::ServiceNetworkVpcAssociation", "Properties" : { "SecurityGroupIds" : [ String, ... ], "ServiceNetworkIdentifier" : String, "Tags" : [ Tag, ... ], "VpcIdentifier" : String } }

YAML

Type: AWS::VpcLattice::ServiceNetworkVpcAssociation Properties: SecurityGroupIds: - String ServiceNetworkIdentifier: String Tags: - Tag VpcIdentifier: String

Properties

SecurityGroupIds

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 in the Amazon VPC User Guide.

Required: No

Type: Array of String

Minimum: 0

Maximum: 200

Update requires: No interruption

ServiceNetworkIdentifier

The ID or Amazon Resource Name (ARN) of the service network. You must use the ARN when the resources specified in the operation are in different accounts.

Required: No

Type: String

Pattern: ^((sn-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:servicenetwork/sn-[0-9a-z]{17}))$

Minimum: 20

Maximum: 2048

Update requires: Replacement

Tags

The tags for the association.

Required: No

Type: Array of Tag

Minimum: 0

Maximum: 50

Update requires: No interruption

VpcIdentifier

The ID of the VPC.

Required: No

Type: String

Pattern: ^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$

Minimum: 5

Maximum: 2048

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Amazon Resource Name (ARN) of the association.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

The Amazon Resource Name (ARN) of the association between the service network and the VPC.

CreatedAt

The date and time that the association was created, specified in ISO-8601 format.

Id

The ID of the specified association between the service network and the VPC.

ServiceNetworkArn

The Amazon Resource Name (ARN) of the service network.

ServiceNetworkId

The ID of the service network.

ServiceNetworkName

The name of the service network.

Status

The status of the association.

VpcId

The ID of the VPC.