1. Packages
  2. AWS
  3. API Docs
  4. ec2transitgateway
  5. MulticastDomainAssociation
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.ec2transitgateway.MulticastDomainAssociation

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ec2transitgateway.TransitGateway("example", {multicastSupport: "enable"});
    const exampleVpcAttachment = new aws.ec2transitgateway.VpcAttachment("example", {
        subnetIds: [exampleAwsSubnet.id],
        transitGatewayId: example.id,
        vpcId: exampleAwsVpc.id,
    });
    const exampleMulticastDomain = new aws.ec2transitgateway.MulticastDomain("example", {transitGatewayId: example.id});
    const exampleMulticastDomainAssociation = new aws.ec2transitgateway.MulticastDomainAssociation("example", {
        subnetId: exampleAwsSubnet.id,
        transitGatewayAttachmentId: exampleVpcAttachment.id,
        transitGatewayMulticastDomainId: exampleMulticastDomain.id,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ec2transitgateway.TransitGateway("example", multicast_support="enable")
    example_vpc_attachment = aws.ec2transitgateway.VpcAttachment("example",
        subnet_ids=[example_aws_subnet["id"]],
        transit_gateway_id=example.id,
        vpc_id=example_aws_vpc["id"])
    example_multicast_domain = aws.ec2transitgateway.MulticastDomain("example", transit_gateway_id=example.id)
    example_multicast_domain_association = aws.ec2transitgateway.MulticastDomainAssociation("example",
        subnet_id=example_aws_subnet["id"],
        transit_gateway_attachment_id=example_vpc_attachment.id,
        transit_gateway_multicast_domain_id=example_multicast_domain.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := ec2transitgateway.NewTransitGateway(ctx, "example", &ec2transitgateway.TransitGatewayArgs{
    			MulticastSupport: pulumi.String("enable"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVpcAttachment, err := ec2transitgateway.NewVpcAttachment(ctx, "example", &ec2transitgateway.VpcAttachmentArgs{
    			SubnetIds: pulumi.StringArray{
    				exampleAwsSubnet.Id,
    			},
    			TransitGatewayId: example.ID(),
    			VpcId:            pulumi.Any(exampleAwsVpc.Id),
    		})
    		if err != nil {
    			return err
    		}
    		exampleMulticastDomain, err := ec2transitgateway.NewMulticastDomain(ctx, "example", &ec2transitgateway.MulticastDomainArgs{
    			TransitGatewayId: example.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ec2transitgateway.NewMulticastDomainAssociation(ctx, "example", &ec2transitgateway.MulticastDomainAssociationArgs{
    			SubnetId:                        pulumi.Any(exampleAwsSubnet.Id),
    			TransitGatewayAttachmentId:      exampleVpcAttachment.ID(),
    			TransitGatewayMulticastDomainId: exampleMulticastDomain.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Ec2TransitGateway.TransitGateway("example", new()
        {
            MulticastSupport = "enable",
        });
    
        var exampleVpcAttachment = new Aws.Ec2TransitGateway.VpcAttachment("example", new()
        {
            SubnetIds = new[]
            {
                exampleAwsSubnet.Id,
            },
            TransitGatewayId = example.Id,
            VpcId = exampleAwsVpc.Id,
        });
    
        var exampleMulticastDomain = new Aws.Ec2TransitGateway.MulticastDomain("example", new()
        {
            TransitGatewayId = example.Id,
        });
    
        var exampleMulticastDomainAssociation = new Aws.Ec2TransitGateway.MulticastDomainAssociation("example", new()
        {
            SubnetId = exampleAwsSubnet.Id,
            TransitGatewayAttachmentId = exampleVpcAttachment.Id,
            TransitGatewayMulticastDomainId = exampleMulticastDomain.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2transitgateway.TransitGateway;
    import com.pulumi.aws.ec2transitgateway.TransitGatewayArgs;
    import com.pulumi.aws.ec2transitgateway.VpcAttachment;
    import com.pulumi.aws.ec2transitgateway.VpcAttachmentArgs;
    import com.pulumi.aws.ec2transitgateway.MulticastDomain;
    import com.pulumi.aws.ec2transitgateway.MulticastDomainArgs;
    import com.pulumi.aws.ec2transitgateway.MulticastDomainAssociation;
    import com.pulumi.aws.ec2transitgateway.MulticastDomainAssociationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new TransitGateway("example", TransitGatewayArgs.builder()
                .multicastSupport("enable")
                .build());
    
            var exampleVpcAttachment = new VpcAttachment("exampleVpcAttachment", VpcAttachmentArgs.builder()
                .subnetIds(exampleAwsSubnet.id())
                .transitGatewayId(example.id())
                .vpcId(exampleAwsVpc.id())
                .build());
    
            var exampleMulticastDomain = new MulticastDomain("exampleMulticastDomain", MulticastDomainArgs.builder()
                .transitGatewayId(example.id())
                .build());
    
            var exampleMulticastDomainAssociation = new MulticastDomainAssociation("exampleMulticastDomainAssociation", MulticastDomainAssociationArgs.builder()
                .subnetId(exampleAwsSubnet.id())
                .transitGatewayAttachmentId(exampleVpcAttachment.id())
                .transitGatewayMulticastDomainId(exampleMulticastDomain.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2transitgateway:TransitGateway
        properties:
          multicastSupport: enable
      exampleVpcAttachment:
        type: aws:ec2transitgateway:VpcAttachment
        name: example
        properties:
          subnetIds:
            - ${exampleAwsSubnet.id}
          transitGatewayId: ${example.id}
          vpcId: ${exampleAwsVpc.id}
      exampleMulticastDomain:
        type: aws:ec2transitgateway:MulticastDomain
        name: example
        properties:
          transitGatewayId: ${example.id}
      exampleMulticastDomainAssociation:
        type: aws:ec2transitgateway:MulticastDomainAssociation
        name: example
        properties:
          subnetId: ${exampleAwsSubnet.id}
          transitGatewayAttachmentId: ${exampleVpcAttachment.id}
          transitGatewayMulticastDomainId: ${exampleMulticastDomain.id}
    

    Create MulticastDomainAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MulticastDomainAssociation(name: string, args: MulticastDomainAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def MulticastDomainAssociation(resource_name: str,
                                   args: MulticastDomainAssociationArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def MulticastDomainAssociation(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   subnet_id: Optional[str] = None,
                                   transit_gateway_attachment_id: Optional[str] = None,
                                   transit_gateway_multicast_domain_id: Optional[str] = None)
    func NewMulticastDomainAssociation(ctx *Context, name string, args MulticastDomainAssociationArgs, opts ...ResourceOption) (*MulticastDomainAssociation, error)
    public MulticastDomainAssociation(string name, MulticastDomainAssociationArgs args, CustomResourceOptions? opts = null)
    public MulticastDomainAssociation(String name, MulticastDomainAssociationArgs args)
    public MulticastDomainAssociation(String name, MulticastDomainAssociationArgs args, CustomResourceOptions options)
    
    type: aws:ec2transitgateway:MulticastDomainAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args MulticastDomainAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args MulticastDomainAssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args MulticastDomainAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MulticastDomainAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MulticastDomainAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var multicastDomainAssociationResource = new Aws.Ec2TransitGateway.MulticastDomainAssociation("multicastDomainAssociationResource", new()
    {
        SubnetId = "string",
        TransitGatewayAttachmentId = "string",
        TransitGatewayMulticastDomainId = "string",
    });
    
    example, err := ec2transitgateway.NewMulticastDomainAssociation(ctx, "multicastDomainAssociationResource", &ec2transitgateway.MulticastDomainAssociationArgs{
    	SubnetId:                        pulumi.String("string"),
    	TransitGatewayAttachmentId:      pulumi.String("string"),
    	TransitGatewayMulticastDomainId: pulumi.String("string"),
    })
    
    var multicastDomainAssociationResource = new MulticastDomainAssociation("multicastDomainAssociationResource", MulticastDomainAssociationArgs.builder()
        .subnetId("string")
        .transitGatewayAttachmentId("string")
        .transitGatewayMulticastDomainId("string")
        .build());
    
    multicast_domain_association_resource = aws.ec2transitgateway.MulticastDomainAssociation("multicastDomainAssociationResource",
        subnet_id="string",
        transit_gateway_attachment_id="string",
        transit_gateway_multicast_domain_id="string")
    
    const multicastDomainAssociationResource = new aws.ec2transitgateway.MulticastDomainAssociation("multicastDomainAssociationResource", {
        subnetId: "string",
        transitGatewayAttachmentId: "string",
        transitGatewayMulticastDomainId: "string",
    });
    
    type: aws:ec2transitgateway:MulticastDomainAssociation
    properties:
        subnetId: string
        transitGatewayAttachmentId: string
        transitGatewayMulticastDomainId: string
    

    MulticastDomainAssociation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The MulticastDomainAssociation resource accepts the following input properties:

    SubnetId string
    The ID of the subnet to associate with the transit gateway multicast domain.
    TransitGatewayAttachmentId string
    The ID of the transit gateway attachment.
    TransitGatewayMulticastDomainId string
    The ID of the transit gateway multicast domain.
    SubnetId string
    The ID of the subnet to associate with the transit gateway multicast domain.
    TransitGatewayAttachmentId string
    The ID of the transit gateway attachment.
    TransitGatewayMulticastDomainId string
    The ID of the transit gateway multicast domain.
    subnetId String
    The ID of the subnet to associate with the transit gateway multicast domain.
    transitGatewayAttachmentId String
    The ID of the transit gateway attachment.
    transitGatewayMulticastDomainId String
    The ID of the transit gateway multicast domain.
    subnetId string
    The ID of the subnet to associate with the transit gateway multicast domain.
    transitGatewayAttachmentId string
    The ID of the transit gateway attachment.
    transitGatewayMulticastDomainId string
    The ID of the transit gateway multicast domain.
    subnet_id str
    The ID of the subnet to associate with the transit gateway multicast domain.
    transit_gateway_attachment_id str
    The ID of the transit gateway attachment.
    transit_gateway_multicast_domain_id str
    The ID of the transit gateway multicast domain.
    subnetId String
    The ID of the subnet to associate with the transit gateway multicast domain.
    transitGatewayAttachmentId String
    The ID of the transit gateway attachment.
    transitGatewayMulticastDomainId String
    The ID of the transit gateway multicast domain.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MulticastDomainAssociation resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MulticastDomainAssociation Resource

    Get an existing MulticastDomainAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: MulticastDomainAssociationState, opts?: CustomResourceOptions): MulticastDomainAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            subnet_id: Optional[str] = None,
            transit_gateway_attachment_id: Optional[str] = None,
            transit_gateway_multicast_domain_id: Optional[str] = None) -> MulticastDomainAssociation
    func GetMulticastDomainAssociation(ctx *Context, name string, id IDInput, state *MulticastDomainAssociationState, opts ...ResourceOption) (*MulticastDomainAssociation, error)
    public static MulticastDomainAssociation Get(string name, Input<string> id, MulticastDomainAssociationState? state, CustomResourceOptions? opts = null)
    public static MulticastDomainAssociation get(String name, Output<String> id, MulticastDomainAssociationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    SubnetId string
    The ID of the subnet to associate with the transit gateway multicast domain.
    TransitGatewayAttachmentId string
    The ID of the transit gateway attachment.
    TransitGatewayMulticastDomainId string
    The ID of the transit gateway multicast domain.
    SubnetId string
    The ID of the subnet to associate with the transit gateway multicast domain.
    TransitGatewayAttachmentId string
    The ID of the transit gateway attachment.
    TransitGatewayMulticastDomainId string
    The ID of the transit gateway multicast domain.
    subnetId String
    The ID of the subnet to associate with the transit gateway multicast domain.
    transitGatewayAttachmentId String
    The ID of the transit gateway attachment.
    transitGatewayMulticastDomainId String
    The ID of the transit gateway multicast domain.
    subnetId string
    The ID of the subnet to associate with the transit gateway multicast domain.
    transitGatewayAttachmentId string
    The ID of the transit gateway attachment.
    transitGatewayMulticastDomainId string
    The ID of the transit gateway multicast domain.
    subnet_id str
    The ID of the subnet to associate with the transit gateway multicast domain.
    transit_gateway_attachment_id str
    The ID of the transit gateway attachment.
    transit_gateway_multicast_domain_id str
    The ID of the transit gateway multicast domain.
    subnetId String
    The ID of the subnet to associate with the transit gateway multicast domain.
    transitGatewayAttachmentId String
    The ID of the transit gateway attachment.
    transitGatewayMulticastDomainId String
    The ID of the transit gateway multicast domain.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi