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

aws.vpclattice.ServiceNetworkVpcAssociation

Explore with Pulumi AI

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

    Resource for managing an AWS VPC Lattice Service Network VPC Association.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.vpclattice.ServiceNetworkVpcAssociation("example", {
        vpcIdentifier: exampleAwsVpc.id,
        serviceNetworkIdentifier: exampleAwsVpclatticeServiceNetwork.id,
        securityGroupIds: [exampleAwsSecurityGroup.id],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.vpclattice.ServiceNetworkVpcAssociation("example",
        vpc_identifier=example_aws_vpc["id"],
        service_network_identifier=example_aws_vpclattice_service_network["id"],
        security_group_ids=[example_aws_security_group["id"]])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vpclattice.NewServiceNetworkVpcAssociation(ctx, "example", &vpclattice.ServiceNetworkVpcAssociationArgs{
    			VpcIdentifier:            pulumi.Any(exampleAwsVpc.Id),
    			ServiceNetworkIdentifier: pulumi.Any(exampleAwsVpclatticeServiceNetwork.Id),
    			SecurityGroupIds: pulumi.StringArray{
    				exampleAwsSecurityGroup.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.VpcLattice.ServiceNetworkVpcAssociation("example", new()
        {
            VpcIdentifier = exampleAwsVpc.Id,
            ServiceNetworkIdentifier = exampleAwsVpclatticeServiceNetwork.Id,
            SecurityGroupIds = new[]
            {
                exampleAwsSecurityGroup.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.vpclattice.ServiceNetworkVpcAssociation;
    import com.pulumi.aws.vpclattice.ServiceNetworkVpcAssociationArgs;
    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 ServiceNetworkVpcAssociation("example", ServiceNetworkVpcAssociationArgs.builder()
                .vpcIdentifier(exampleAwsVpc.id())
                .serviceNetworkIdentifier(exampleAwsVpclatticeServiceNetwork.id())
                .securityGroupIds(exampleAwsSecurityGroup.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:vpclattice:ServiceNetworkVpcAssociation
        properties:
          vpcIdentifier: ${exampleAwsVpc.id}
          serviceNetworkIdentifier: ${exampleAwsVpclatticeServiceNetwork.id}
          securityGroupIds:
            - ${exampleAwsSecurityGroup.id}
    

    Create ServiceNetworkVpcAssociation Resource

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

    Constructor syntax

    new ServiceNetworkVpcAssociation(name: string, args: ServiceNetworkVpcAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceNetworkVpcAssociation(resource_name: str,
                                     args: ServiceNetworkVpcAssociationArgs,
                                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceNetworkVpcAssociation(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     service_network_identifier: Optional[str] = None,
                                     vpc_identifier: Optional[str] = None,
                                     security_group_ids: Optional[Sequence[str]] = None,
                                     tags: Optional[Mapping[str, str]] = None)
    func NewServiceNetworkVpcAssociation(ctx *Context, name string, args ServiceNetworkVpcAssociationArgs, opts ...ResourceOption) (*ServiceNetworkVpcAssociation, error)
    public ServiceNetworkVpcAssociation(string name, ServiceNetworkVpcAssociationArgs args, CustomResourceOptions? opts = null)
    public ServiceNetworkVpcAssociation(String name, ServiceNetworkVpcAssociationArgs args)
    public ServiceNetworkVpcAssociation(String name, ServiceNetworkVpcAssociationArgs args, CustomResourceOptions options)
    
    type: aws:vpclattice:ServiceNetworkVpcAssociation
    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 ServiceNetworkVpcAssociationArgs
    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 ServiceNetworkVpcAssociationArgs
    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 ServiceNetworkVpcAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceNetworkVpcAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceNetworkVpcAssociationArgs
    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 serviceNetworkVpcAssociationResource = new Aws.VpcLattice.ServiceNetworkVpcAssociation("serviceNetworkVpcAssociationResource", new()
    {
        ServiceNetworkIdentifier = "string",
        VpcIdentifier = "string",
        SecurityGroupIds = new[]
        {
            "string",
        },
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := vpclattice.NewServiceNetworkVpcAssociation(ctx, "serviceNetworkVpcAssociationResource", &vpclattice.ServiceNetworkVpcAssociationArgs{
    	ServiceNetworkIdentifier: pulumi.String("string"),
    	VpcIdentifier:            pulumi.String("string"),
    	SecurityGroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var serviceNetworkVpcAssociationResource = new ServiceNetworkVpcAssociation("serviceNetworkVpcAssociationResource", ServiceNetworkVpcAssociationArgs.builder()
        .serviceNetworkIdentifier("string")
        .vpcIdentifier("string")
        .securityGroupIds("string")
        .tags(Map.of("string", "string"))
        .build());
    
    service_network_vpc_association_resource = aws.vpclattice.ServiceNetworkVpcAssociation("serviceNetworkVpcAssociationResource",
        service_network_identifier="string",
        vpc_identifier="string",
        security_group_ids=["string"],
        tags={
            "string": "string",
        })
    
    const serviceNetworkVpcAssociationResource = new aws.vpclattice.ServiceNetworkVpcAssociation("serviceNetworkVpcAssociationResource", {
        serviceNetworkIdentifier: "string",
        vpcIdentifier: "string",
        securityGroupIds: ["string"],
        tags: {
            string: "string",
        },
    });
    
    type: aws:vpclattice:ServiceNetworkVpcAssociation
    properties:
        securityGroupIds:
            - string
        serviceNetworkIdentifier: string
        tags:
            string: string
        vpcIdentifier: string
    

    ServiceNetworkVpcAssociation 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 ServiceNetworkVpcAssociation resource accepts the following input properties:

    ServiceNetworkIdentifier string
    The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts. The following arguments are optional:
    VpcIdentifier string
    The ID of the VPC.
    SecurityGroupIds List<string>
    The IDs of the security groups.
    Tags Dictionary<string, string>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    ServiceNetworkIdentifier string
    The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts. The following arguments are optional:
    VpcIdentifier string
    The ID of the VPC.
    SecurityGroupIds []string
    The IDs of the security groups.
    Tags map[string]string
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    serviceNetworkIdentifier String
    The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts. The following arguments are optional:
    vpcIdentifier String
    The ID of the VPC.
    securityGroupIds List<String>
    The IDs of the security groups.
    tags Map<String,String>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    serviceNetworkIdentifier string
    The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts. The following arguments are optional:
    vpcIdentifier string
    The ID of the VPC.
    securityGroupIds string[]
    The IDs of the security groups.
    tags {[key: string]: string}
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    service_network_identifier str
    The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts. The following arguments are optional:
    vpc_identifier str
    The ID of the VPC.
    security_group_ids Sequence[str]
    The IDs of the security groups.
    tags Mapping[str, str]
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    serviceNetworkIdentifier String
    The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts. The following arguments are optional:
    vpcIdentifier String
    The ID of the VPC.
    securityGroupIds List<String>
    The IDs of the security groups.
    tags Map<String>
    Key-value mapping of resource tags. 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 ServiceNetworkVpcAssociation resource produces the following output properties:

    Arn string
    The ARN of the Association.
    CreatedBy string
    The account that created the association.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The operations status. Valid Values are CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED
    TagsAll Dictionary<string, string>
    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 Association.
    CreatedBy string
    The account that created the association.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The operations status. Valid Values are CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED
    TagsAll map[string]string
    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 Association.
    createdBy String
    The account that created the association.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The operations status. Valid Values are CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED
    tagsAll Map<String,String>
    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 Association.
    createdBy string
    The account that created the association.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The operations status. Valid Values are CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED
    tagsAll {[key: string]: string}
    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 Association.
    created_by str
    The account that created the association.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The operations status. Valid Values are CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED
    tags_all Mapping[str, str]
    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 Association.
    createdBy String
    The account that created the association.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The operations status. Valid Values are CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED
    tagsAll Map<String>
    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 ServiceNetworkVpcAssociation Resource

    Get an existing ServiceNetworkVpcAssociation 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?: ServiceNetworkVpcAssociationState, opts?: CustomResourceOptions): ServiceNetworkVpcAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            created_by: Optional[str] = None,
            security_group_ids: Optional[Sequence[str]] = None,
            service_network_identifier: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            vpc_identifier: Optional[str] = None) -> ServiceNetworkVpcAssociation
    func GetServiceNetworkVpcAssociation(ctx *Context, name string, id IDInput, state *ServiceNetworkVpcAssociationState, opts ...ResourceOption) (*ServiceNetworkVpcAssociation, error)
    public static ServiceNetworkVpcAssociation Get(string name, Input<string> id, ServiceNetworkVpcAssociationState? state, CustomResourceOptions? opts = null)
    public static ServiceNetworkVpcAssociation get(String name, Output<String> id, ServiceNetworkVpcAssociationState 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 Association.
    CreatedBy string
    The account that created the association.
    SecurityGroupIds List<string>
    The IDs of the security groups.
    ServiceNetworkIdentifier string
    The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts. The following arguments are optional:
    Status string
    The operations status. Valid Values are CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED
    Tags Dictionary<string, string>
    Key-value mapping of resource tags. 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>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    VpcIdentifier string
    The ID of the VPC.
    Arn string
    The ARN of the Association.
    CreatedBy string
    The account that created the association.
    SecurityGroupIds []string
    The IDs of the security groups.
    ServiceNetworkIdentifier string
    The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts. The following arguments are optional:
    Status string
    The operations status. Valid Values are CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED
    Tags map[string]string
    Key-value mapping of resource tags. 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
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    VpcIdentifier string
    The ID of the VPC.
    arn String
    The ARN of the Association.
    createdBy String
    The account that created the association.
    securityGroupIds List<String>
    The IDs of the security groups.
    serviceNetworkIdentifier String
    The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts. The following arguments are optional:
    status String
    The operations status. Valid Values are CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED
    tags Map<String,String>
    Key-value mapping of resource tags. 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>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpcIdentifier String
    The ID of the VPC.
    arn string
    The ARN of the Association.
    createdBy string
    The account that created the association.
    securityGroupIds string[]
    The IDs of the security groups.
    serviceNetworkIdentifier string
    The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts. The following arguments are optional:
    status string
    The operations status. Valid Values are CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED
    tags {[key: string]: string}
    Key-value mapping of resource tags. 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}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpcIdentifier string
    The ID of the VPC.
    arn str
    The ARN of the Association.
    created_by str
    The account that created the association.
    security_group_ids Sequence[str]
    The IDs of the security groups.
    service_network_identifier str
    The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts. The following arguments are optional:
    status str
    The operations status. Valid Values are CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED
    tags Mapping[str, str]
    Key-value mapping of resource tags. 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]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpc_identifier str
    The ID of the VPC.
    arn String
    The ARN of the Association.
    createdBy String
    The account that created the association.
    securityGroupIds List<String>
    The IDs of the security groups.
    serviceNetworkIdentifier String
    The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts. The following arguments are optional:
    status String
    The operations status. Valid Values are CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED
    tags Map<String>
    Key-value mapping of resource tags. 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>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpcIdentifier String
    The ID of the VPC.

    Import

    Using pulumi import, import VPC Lattice Service Network VPC Association using the id. For example:

    $ pulumi import aws:vpclattice/serviceNetworkVpcAssociation:ServiceNetworkVpcAssociation example snsa-05e2474658a88f6ba
    

    To learn more about importing existing cloud resources, see Importing resources.

    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