# AWS::EC2::TransitGatewayVpcAttachment Resource Type definition for AWS::EC2::TransitGatewayVpcAttachment ## Syntax To declare this entity in your AWS CloudFormation template, use the following syntax: ### JSON
{
    "Type" : "AWS::EC2::TransitGatewayVpcAttachment",
    "Properties" : {
        "TransitGatewayId" : String,
        "VpcId" : String,
        "SubnetIds" : [ String, ... ],
        "AddSubnetIds" : [ String, ... ],
        "RemoveSubnetIds" : [ String, ... ],
        "Tags" : [ Tag, ... ],
        "Options" : Options
    }
}
### YAML
Type: AWS::EC2::TransitGatewayVpcAttachment
Properties:
    TransitGatewayId: String
    VpcId: String
    SubnetIds: 
      - String
    AddSubnetIds: 
      - String
    RemoveSubnetIds: 
      - String
    Tags: 
      - Tag
    Options: Options
## Properties #### TransitGatewayId _Required_: No _Type_: String _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### VpcId _Required_: No _Type_: String _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### SubnetIds _Required_: No _Type_: List of String _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### AddSubnetIds _Required_: No _Type_: List of String _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### RemoveSubnetIds _Required_: No _Type_: List of String _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### Tags _Required_: No _Type_: List of Tag _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### Options The options for the transit gateway vpc attachment. _Required_: No _Type_: Options _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) ## Return Values ### Ref When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the Id. ### 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html). #### Id Returns the Id value.