Skip to content

Resource: awsEc2TransitGatewayMulticastDomainAssociation

Associates the specified subnet and transit gateway attachment with the specified transit gateway multicast domain.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsEc2TransitGatewayExample = new aws.ec2TransitGateway.Ec2TransitGateway(
  this,
  "example",
  {
    multicastSupport: "enable",
  }
);
const awsEc2TransitGatewayMulticastDomainExample =
  new aws.ec2TransitGatewayMulticastDomain.Ec2TransitGatewayMulticastDomain(
    this,
    "example_1",
    {
      transitGatewayId: awsEc2TransitGatewayExample.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsEc2TransitGatewayMulticastDomainExample.overrideLogicalId("example");
const awsEc2TransitGatewayVpcAttachmentExample =
  new aws.ec2TransitGatewayVpcAttachment.Ec2TransitGatewayVpcAttachment(
    this,
    "example_2",
    {
      subnetIds: ["${aws_subnet.example.id}"],
      transitGatewayId: awsEc2TransitGatewayExample.id,
      vpcId: "${aws_vpc.example.id}",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsEc2TransitGatewayVpcAttachmentExample.overrideLogicalId("example");
const awsEc2TransitGatewayMulticastDomainAssociationExample =
  new aws.ec2TransitGatewayMulticastDomainAssociation.Ec2TransitGatewayMulticastDomainAssociation(
    this,
    "example_3",
    {
      subnetId: "${aws_subnet.example.id}",
      transitGatewayAttachmentId: awsEc2TransitGatewayVpcAttachmentExample.id,
      transitGatewayMulticastDomainId:
        awsEc2TransitGatewayMulticastDomainExample.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsEc2TransitGatewayMulticastDomainAssociationExample.overrideLogicalId(
  "example"
);

Argument Reference

The following arguments are supported:

  • subnetId - (Required) The ID of the subnet to associate with the transit gateway multicast domain.
  • transitGatewayAttachmentId - (Required) The ID of the transit gateway attachment.
  • transitGatewayMulticastDomainId - (Required) The ID of the transit gateway multicast domain.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - EC2 Transit Gateway Multicast Domain Association identifier.

Timeouts

Configuration options:

  • create - (Default 10M)
  • delete - (Default 10M)