Service Network Vpc Association Args
data class ServiceNetworkVpcAssociationArgs(val securityGroupIds: Output<List<String>>? = null, val serviceNetworkIdentifier: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val vpcIdentifier: Output<String>? = null) : ConvertibleToJava<ServiceNetworkVpcAssociationArgs>
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],
});Content copied to clipboard
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"]])Content copied to clipboard
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,
},
});
});Content copied to clipboard
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
})
}Content copied to clipboard
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());
}
}Content copied to clipboard
resources:
example:
type: aws:vpclattice:ServiceNetworkVpcAssociation
properties:
vpcIdentifier: ${exampleAwsVpc.id}
serviceNetworkIdentifier: ${exampleAwsVpclatticeServiceNetwork.id}
securityGroupIds:
- ${exampleAwsSecurityGroup.id}Content copied to clipboard
Import
Using pulumi import, import VPC Lattice Service Network VPC Association using the id. For example:
$ pulumi import aws:vpclattice/serviceNetworkVpcAssociation:ServiceNetworkVpcAssociation example snsa-05e2474658a88f6baContent copied to clipboard