1. Packages
  2. AWS Classic
  3. API Docs
  4. networkmanager
  5. VpcAttachment

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi

aws.networkmanager.VpcAttachment

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi

    Resource for managing an AWS Network Manager VPC Attachment.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.networkmanager.VpcAttachment("example", {
        subnetArns: [exampleAwsSubnet.arn],
        coreNetworkId: exampleAwsccNetworkmanagerCoreNetwork.id,
        vpcArn: exampleAwsVpc.arn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.networkmanager.VpcAttachment("example",
        subnet_arns=[example_aws_subnet["arn"]],
        core_network_id=example_awscc_networkmanager_core_network["id"],
        vpc_arn=example_aws_vpc["arn"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networkmanager.NewVpcAttachment(ctx, "example", &networkmanager.VpcAttachmentArgs{
    			SubnetArns: pulumi.StringArray{
    				exampleAwsSubnet.Arn,
    			},
    			CoreNetworkId: pulumi.Any(exampleAwsccNetworkmanagerCoreNetwork.Id),
    			VpcArn:        pulumi.Any(exampleAwsVpc.Arn),
    		})
    		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.NetworkManager.VpcAttachment("example", new()
        {
            SubnetArns = new[]
            {
                exampleAwsSubnet.Arn,
            },
            CoreNetworkId = exampleAwsccNetworkmanagerCoreNetwork.Id,
            VpcArn = exampleAwsVpc.Arn,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.networkmanager.VpcAttachment;
    import com.pulumi.aws.networkmanager.VpcAttachmentArgs;
    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 VpcAttachment("example", VpcAttachmentArgs.builder()        
                .subnetArns(exampleAwsSubnet.arn())
                .coreNetworkId(exampleAwsccNetworkmanagerCoreNetwork.id())
                .vpcArn(exampleAwsVpc.arn())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:networkmanager:VpcAttachment
        properties:
          subnetArns:
            - ${exampleAwsSubnet.arn}
          coreNetworkId: ${exampleAwsccNetworkmanagerCoreNetwork.id}
          vpcArn: ${exampleAwsVpc.arn}
    

    Create VpcAttachment Resource

    new VpcAttachment(name: string, args: VpcAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def VpcAttachment(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      core_network_id: Optional[str] = None,
                      options: Optional[VpcAttachmentOptionsArgs] = None,
                      subnet_arns: Optional[Sequence[str]] = None,
                      tags: Optional[Mapping[str, str]] = None,
                      vpc_arn: Optional[str] = None)
    @overload
    def VpcAttachment(resource_name: str,
                      args: VpcAttachmentArgs,
                      opts: Optional[ResourceOptions] = None)
    func NewVpcAttachment(ctx *Context, name string, args VpcAttachmentArgs, opts ...ResourceOption) (*VpcAttachment, error)
    public VpcAttachment(string name, VpcAttachmentArgs args, CustomResourceOptions? opts = null)
    public VpcAttachment(String name, VpcAttachmentArgs args)
    public VpcAttachment(String name, VpcAttachmentArgs args, CustomResourceOptions options)
    
    type: aws:networkmanager:VpcAttachment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args VpcAttachmentArgs
    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 VpcAttachmentArgs
    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 VpcAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcAttachmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    VpcAttachment Resource Properties

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

    Inputs

    The VpcAttachment resource accepts the following input properties:

    CoreNetworkId string
    The ID of a core network for the VPC attachment.
    SubnetArns List<string>
    The subnet ARN of the VPC attachment.
    VpcArn string

    The ARN of the VPC.

    The following arguments are optional:

    Options VpcAttachmentOptions
    Options for the VPC attachment.
    Tags Dictionary<string, string>
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    CoreNetworkId string
    The ID of a core network for the VPC attachment.
    SubnetArns []string
    The subnet ARN of the VPC attachment.
    VpcArn string

    The ARN of the VPC.

    The following arguments are optional:

    Options VpcAttachmentOptionsArgs
    Options for the VPC attachment.
    Tags map[string]string
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    coreNetworkId String
    The ID of a core network for the VPC attachment.
    subnetArns List<String>
    The subnet ARN of the VPC attachment.
    vpcArn String

    The ARN of the VPC.

    The following arguments are optional:

    options VpcAttachmentOptions
    Options for the VPC attachment.
    tags Map<String,String>
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    coreNetworkId string
    The ID of a core network for the VPC attachment.
    subnetArns string[]
    The subnet ARN of the VPC attachment.
    vpcArn string

    The ARN of the VPC.

    The following arguments are optional:

    options VpcAttachmentOptions
    Options for the VPC attachment.
    tags {[key: string]: string}
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    core_network_id str
    The ID of a core network for the VPC attachment.
    subnet_arns Sequence[str]
    The subnet ARN of the VPC attachment.
    vpc_arn str

    The ARN of the VPC.

    The following arguments are optional:

    options VpcAttachmentOptionsArgs
    Options for the VPC attachment.
    tags Mapping[str, str]
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    coreNetworkId String
    The ID of a core network for the VPC attachment.
    subnetArns List<String>
    The subnet ARN of the VPC attachment.
    vpcArn String

    The ARN of the VPC.

    The following arguments are optional:

    options Property Map
    Options for the VPC attachment.
    tags Map<String>
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    The ARN of the attachment.
    AttachmentPolicyRuleNumber int
    The policy rule number associated with the attachment.
    AttachmentType string
    The type of attachment.
    CoreNetworkArn string
    The ARN of a core network.
    EdgeLocation string
    The Region where the edge is located.
    Id string
    The provider-assigned unique ID for this managed resource.
    OwnerAccountId string
    The ID of the attachment account owner.
    ResourceArn string
    The attachment resource ARN.
    SegmentName string
    The name of the segment attachment.
    State string
    The state of the attachment.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Arn string
    The ARN of the attachment.
    AttachmentPolicyRuleNumber int
    The policy rule number associated with the attachment.
    AttachmentType string
    The type of attachment.
    CoreNetworkArn string
    The ARN of a core network.
    EdgeLocation string
    The Region where the edge is located.
    Id string
    The provider-assigned unique ID for this managed resource.
    OwnerAccountId string
    The ID of the attachment account owner.
    ResourceArn string
    The attachment resource ARN.
    SegmentName string
    The name of the segment attachment.
    State string
    The state of the attachment.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    The ARN of the attachment.
    attachmentPolicyRuleNumber Integer
    The policy rule number associated with the attachment.
    attachmentType String
    The type of attachment.
    coreNetworkArn String
    The ARN of a core network.
    edgeLocation String
    The Region where the edge is located.
    id String
    The provider-assigned unique ID for this managed resource.
    ownerAccountId String
    The ID of the attachment account owner.
    resourceArn String
    The attachment resource ARN.
    segmentName String
    The name of the segment attachment.
    state String
    The state of the attachment.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn string
    The ARN of the attachment.
    attachmentPolicyRuleNumber number
    The policy rule number associated with the attachment.
    attachmentType string
    The type of attachment.
    coreNetworkArn string
    The ARN of a core network.
    edgeLocation string
    The Region where the edge is located.
    id string
    The provider-assigned unique ID for this managed resource.
    ownerAccountId string
    The ID of the attachment account owner.
    resourceArn string
    The attachment resource ARN.
    segmentName string
    The name of the segment attachment.
    state string
    The state of the attachment.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn str
    The ARN of the attachment.
    attachment_policy_rule_number int
    The policy rule number associated with the attachment.
    attachment_type str
    The type of attachment.
    core_network_arn str
    The ARN of a core network.
    edge_location str
    The Region where the edge is located.
    id str
    The provider-assigned unique ID for this managed resource.
    owner_account_id str
    The ID of the attachment account owner.
    resource_arn str
    The attachment resource ARN.
    segment_name str
    The name of the segment attachment.
    state str
    The state of the attachment.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    The ARN of the attachment.
    attachmentPolicyRuleNumber Number
    The policy rule number associated with the attachment.
    attachmentType String
    The type of attachment.
    coreNetworkArn String
    The ARN of a core network.
    edgeLocation String
    The Region where the edge is located.
    id String
    The provider-assigned unique ID for this managed resource.
    ownerAccountId String
    The ID of the attachment account owner.
    resourceArn String
    The attachment resource ARN.
    segmentName String
    The name of the segment attachment.
    state String
    The state of the attachment.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Look up Existing VpcAttachment Resource

    Get an existing VpcAttachment 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?: VpcAttachmentState, opts?: CustomResourceOptions): VpcAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            attachment_policy_rule_number: Optional[int] = None,
            attachment_type: Optional[str] = None,
            core_network_arn: Optional[str] = None,
            core_network_id: Optional[str] = None,
            edge_location: Optional[str] = None,
            options: Optional[VpcAttachmentOptionsArgs] = None,
            owner_account_id: Optional[str] = None,
            resource_arn: Optional[str] = None,
            segment_name: Optional[str] = None,
            state: Optional[str] = None,
            subnet_arns: Optional[Sequence[str]] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            vpc_arn: Optional[str] = None) -> VpcAttachment
    func GetVpcAttachment(ctx *Context, name string, id IDInput, state *VpcAttachmentState, opts ...ResourceOption) (*VpcAttachment, error)
    public static VpcAttachment Get(string name, Input<string> id, VpcAttachmentState? state, CustomResourceOptions? opts = null)
    public static VpcAttachment get(String name, Output<String> id, VpcAttachmentState 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:
    Arn string
    The ARN of the attachment.
    AttachmentPolicyRuleNumber int
    The policy rule number associated with the attachment.
    AttachmentType string
    The type of attachment.
    CoreNetworkArn string
    The ARN of a core network.
    CoreNetworkId string
    The ID of a core network for the VPC attachment.
    EdgeLocation string
    The Region where the edge is located.
    Options VpcAttachmentOptions
    Options for the VPC attachment.
    OwnerAccountId string
    The ID of the attachment account owner.
    ResourceArn string
    The attachment resource ARN.
    SegmentName string
    The name of the segment attachment.
    State string
    The state of the attachment.
    SubnetArns List<string>
    The subnet ARN of the VPC attachment.
    Tags Dictionary<string, string>
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    VpcArn string

    The ARN of the VPC.

    The following arguments are optional:

    Arn string
    The ARN of the attachment.
    AttachmentPolicyRuleNumber int
    The policy rule number associated with the attachment.
    AttachmentType string
    The type of attachment.
    CoreNetworkArn string
    The ARN of a core network.
    CoreNetworkId string
    The ID of a core network for the VPC attachment.
    EdgeLocation string
    The Region where the edge is located.
    Options VpcAttachmentOptionsArgs
    Options for the VPC attachment.
    OwnerAccountId string
    The ID of the attachment account owner.
    ResourceArn string
    The attachment resource ARN.
    SegmentName string
    The name of the segment attachment.
    State string
    The state of the attachment.
    SubnetArns []string
    The subnet ARN of the VPC attachment.
    Tags map[string]string
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    VpcArn string

    The ARN of the VPC.

    The following arguments are optional:

    arn String
    The ARN of the attachment.
    attachmentPolicyRuleNumber Integer
    The policy rule number associated with the attachment.
    attachmentType String
    The type of attachment.
    coreNetworkArn String
    The ARN of a core network.
    coreNetworkId String
    The ID of a core network for the VPC attachment.
    edgeLocation String
    The Region where the edge is located.
    options VpcAttachmentOptions
    Options for the VPC attachment.
    ownerAccountId String
    The ID of the attachment account owner.
    resourceArn String
    The attachment resource ARN.
    segmentName String
    The name of the segment attachment.
    state String
    The state of the attachment.
    subnetArns List<String>
    The subnet ARN of the VPC attachment.
    tags Map<String,String>
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    vpcArn String

    The ARN of the VPC.

    The following arguments are optional:

    arn string
    The ARN of the attachment.
    attachmentPolicyRuleNumber number
    The policy rule number associated with the attachment.
    attachmentType string
    The type of attachment.
    coreNetworkArn string
    The ARN of a core network.
    coreNetworkId string
    The ID of a core network for the VPC attachment.
    edgeLocation string
    The Region where the edge is located.
    options VpcAttachmentOptions
    Options for the VPC attachment.
    ownerAccountId string
    The ID of the attachment account owner.
    resourceArn string
    The attachment resource ARN.
    segmentName string
    The name of the segment attachment.
    state string
    The state of the attachment.
    subnetArns string[]
    The subnet ARN of the VPC attachment.
    tags {[key: string]: string}
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    vpcArn string

    The ARN of the VPC.

    The following arguments are optional:

    arn str
    The ARN of the attachment.
    attachment_policy_rule_number int
    The policy rule number associated with the attachment.
    attachment_type str
    The type of attachment.
    core_network_arn str
    The ARN of a core network.
    core_network_id str
    The ID of a core network for the VPC attachment.
    edge_location str
    The Region where the edge is located.
    options VpcAttachmentOptionsArgs
    Options for the VPC attachment.
    owner_account_id str
    The ID of the attachment account owner.
    resource_arn str
    The attachment resource ARN.
    segment_name str
    The name of the segment attachment.
    state str
    The state of the attachment.
    subnet_arns Sequence[str]
    The subnet ARN of the VPC attachment.
    tags Mapping[str, str]
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    vpc_arn str

    The ARN of the VPC.

    The following arguments are optional:

    arn String
    The ARN of the attachment.
    attachmentPolicyRuleNumber Number
    The policy rule number associated with the attachment.
    attachmentType String
    The type of attachment.
    coreNetworkArn String
    The ARN of a core network.
    coreNetworkId String
    The ID of a core network for the VPC attachment.
    edgeLocation String
    The Region where the edge is located.
    options Property Map
    Options for the VPC attachment.
    ownerAccountId String
    The ID of the attachment account owner.
    resourceArn String
    The attachment resource ARN.
    segmentName String
    The name of the segment attachment.
    state String
    The state of the attachment.
    subnetArns List<String>
    The subnet ARN of the VPC attachment.
    tags Map<String>
    Key-value tags for the attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    vpcArn String

    The ARN of the VPC.

    The following arguments are optional:

    Supporting Types

    VpcAttachmentOptions, VpcAttachmentOptionsArgs

    ApplianceModeSupport bool
    Indicates whether appliance mode is supported. If enabled, traffic flow between a source and destination use the same Availability Zone for the VPC attachment for the lifetime of that flow. If the VPC attachment is pending acceptance, changing this value will recreate the resource.
    Ipv6Support bool
    Indicates whether IPv6 is supported. If the VPC attachment is pending acceptance, changing this value will recreate the resource.
    ApplianceModeSupport bool
    Indicates whether appliance mode is supported. If enabled, traffic flow between a source and destination use the same Availability Zone for the VPC attachment for the lifetime of that flow. If the VPC attachment is pending acceptance, changing this value will recreate the resource.
    Ipv6Support bool
    Indicates whether IPv6 is supported. If the VPC attachment is pending acceptance, changing this value will recreate the resource.
    applianceModeSupport Boolean
    Indicates whether appliance mode is supported. If enabled, traffic flow between a source and destination use the same Availability Zone for the VPC attachment for the lifetime of that flow. If the VPC attachment is pending acceptance, changing this value will recreate the resource.
    ipv6Support Boolean
    Indicates whether IPv6 is supported. If the VPC attachment is pending acceptance, changing this value will recreate the resource.
    applianceModeSupport boolean
    Indicates whether appliance mode is supported. If enabled, traffic flow between a source and destination use the same Availability Zone for the VPC attachment for the lifetime of that flow. If the VPC attachment is pending acceptance, changing this value will recreate the resource.
    ipv6Support boolean
    Indicates whether IPv6 is supported. If the VPC attachment is pending acceptance, changing this value will recreate the resource.
    appliance_mode_support bool
    Indicates whether appliance mode is supported. If enabled, traffic flow between a source and destination use the same Availability Zone for the VPC attachment for the lifetime of that flow. If the VPC attachment is pending acceptance, changing this value will recreate the resource.
    ipv6_support bool
    Indicates whether IPv6 is supported. If the VPC attachment is pending acceptance, changing this value will recreate the resource.
    applianceModeSupport Boolean
    Indicates whether appliance mode is supported. If enabled, traffic flow between a source and destination use the same Availability Zone for the VPC attachment for the lifetime of that flow. If the VPC attachment is pending acceptance, changing this value will recreate the resource.
    ipv6Support Boolean
    Indicates whether IPv6 is supported. If the VPC attachment is pending acceptance, changing this value will recreate the resource.

    Import

    Using pulumi import, import aws_networkmanager_vpc_attachment using the attachment ID. For example:

    $ pulumi import aws:networkmanager/vpcAttachment:VpcAttachment example attachment-0f8fa60d2238d1bd8
    

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi