Try AWS Native preview for resources not in the classic version.
aws.vpclattice.ServiceNetworkVpcAssociation
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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
The ServiceNetworkVpcAssociation resource accepts the following input properties:
- Service
Network stringIdentifier - 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 string - The ID of the VPC.
- Security
Group List<string>Ids - The IDs of the security groups.
- 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.
- Service
Network stringIdentifier - 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 string - The ID of the VPC.
- Security
Group []stringIds - The IDs of the security groups.
- 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.
- service
Network StringIdentifier - 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 String - The ID of the VPC.
- security
Group List<String>Ids - The IDs of the security groups.
- 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.
- service
Network stringIdentifier - 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 string - The ID of the VPC.
- security
Group string[]Ids - The IDs of the security groups.
- {[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_ stridentifier - 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_ Sequence[str]ids - The IDs of the security groups.
- 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.
- service
Network StringIdentifier - 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 String - The ID of the VPC.
- security
Group List<String>Ids - The IDs of the security groups.
- 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.
- Created
By 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
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- The ARN of the Association.
- Created
By 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
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the Association.
- created
By 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
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The ARN of the Association.
- created
By 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
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- 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
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the Association.
- created
By 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
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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.
- Arn string
- The ARN of the Association.
- Created
By string - The account that created the association.
- Security
Group List<string>Ids - The IDs of the security groups.
- Service
Network stringIdentifier - 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
- 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. - Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Vpc
Identifier string - The ID of the VPC.
- Arn string
- The ARN of the Association.
- Created
By string - The account that created the association.
- Security
Group []stringIds - The IDs of the security groups.
- Service
Network stringIdentifier - 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
- 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. - map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Vpc
Identifier string - The ID of the VPC.
- arn String
- The ARN of the Association.
- created
By String - The account that created the association.
- security
Group List<String>Ids - The IDs of the security groups.
- service
Network StringIdentifier - 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
- 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. - Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Identifier String - The ID of the VPC.
- arn string
- The ARN of the Association.
- created
By string - The account that created the association.
- security
Group string[]Ids - The IDs of the security groups.
- service
Network stringIdentifier - 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
- {[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. - {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Identifier string - The ID of the VPC.
- arn str
- The ARN of the Association.
- created_
by str - The account that created the association.
- security_
group_ Sequence[str]ids - The IDs of the security groups.
- service_
network_ stridentifier - 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
- 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. - Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc_
identifier str - The ID of the VPC.
- arn String
- The ARN of the Association.
- created
By String - The account that created the association.
- security
Group List<String>Ids - The IDs of the security groups.
- service
Network StringIdentifier - 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
- 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. - Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Identifier 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.
Try AWS Native preview for resources not in the classic version.