ResourceGateway class

Resource for managing an AWS VPC Lattice Resource Gateway.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.vpclattice.ResourceGateway("example", {
    name: "Example",
    vpcId: exampleAwsVpc.id,
    subnetIds: [exampleAwsSubnet.id],
    tags: {
        Environment: "Example",
    },
});
import pulumi
import pulumi_aws as aws

example = aws.vpclattice.ResourceGateway("example",
    name="Example",
    vpc_id=example_aws_vpc["id"],
    subnet_ids=[example_aws_subnet["id"]],
    tags={
        "Environment": "Example",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.VpcLattice.ResourceGateway("example", new()
    {
        Name = "Example",
        VpcId = exampleAwsVpc.Id,
        SubnetIds = new[]
        {
            exampleAwsSubnet.Id,
        },
        Tags =
        {
            { "Environment", "Example" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/vpclattice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vpclattice.NewResourceGateway(ctx, "example", &vpclattice.ResourceGatewayArgs{
			Name:  pulumi.String("Example"),
			VpcId: pulumi.Any(exampleAwsVpc.Id),
			SubnetIds: pulumi.StringArray{
				exampleAwsSubnet.Id,
			},
			Tags: pulumi.StringMap{
				"Environment": pulumi.String("Example"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_vpclattice_resourcegateway" "example" {
  name       = "Example"
  vpc_id     = exampleAwsVpc.id
  subnet_ids = [exampleAwsSubnet.id]
  tags = {
    "Environment" = "Example"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.vpclattice.ResourceGateway;
import com.pulumi.aws.vpclattice.ResourceGatewayArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 ResourceGateway("example", ResourceGatewayArgs.builder()
            .name("Example")
            .vpcId(exampleAwsVpc.id())
            .subnetIds(exampleAwsSubnet.id())
            .tags(Map.of("Environment", "Example"))
            .build());

    }
}
resources:
  example:
    type: aws:vpclattice:ResourceGateway
    properties:
      name: Example
      vpcId: ${exampleAwsVpc.id}
      subnetIds:
        - ${exampleAwsSubnet.id}
      tags:
        Environment: Example

Specifying IP address type

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.vpclattice.ResourceGateway("example", {
    name: "Example",
    vpcId: exampleAwsVpc.id,
    subnetIds: [exampleAwsSubnet.id],
    ipAddressType: "DUALSTACK",
    tags: {
        Environment: "Example",
    },
});
import pulumi
import pulumi_aws as aws

example = aws.vpclattice.ResourceGateway("example",
    name="Example",
    vpc_id=example_aws_vpc["id"],
    subnet_ids=[example_aws_subnet["id"]],
    ip_address_type="DUALSTACK",
    tags={
        "Environment": "Example",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.VpcLattice.ResourceGateway("example", new()
    {
        Name = "Example",
        VpcId = exampleAwsVpc.Id,
        SubnetIds = new[]
        {
            exampleAwsSubnet.Id,
        },
        IpAddressType = "DUALSTACK",
        Tags =
        {
            { "Environment", "Example" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/vpclattice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vpclattice.NewResourceGateway(ctx, "example", &vpclattice.ResourceGatewayArgs{
			Name:  pulumi.String("Example"),
			VpcId: pulumi.Any(exampleAwsVpc.Id),
			SubnetIds: pulumi.StringArray{
				exampleAwsSubnet.Id,
			},
			IpAddressType: pulumi.String("DUALSTACK"),
			Tags: pulumi.StringMap{
				"Environment": pulumi.String("Example"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_vpclattice_resourcegateway" "example" {
  name            = "Example"
  vpc_id          = exampleAwsVpc.id
  subnet_ids      = [exampleAwsSubnet.id]
  ip_address_type = "DUALSTACK"
  tags = {
    "Environment" = "Example"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.vpclattice.ResourceGateway;
import com.pulumi.aws.vpclattice.ResourceGatewayArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 ResourceGateway("example", ResourceGatewayArgs.builder()
            .name("Example")
            .vpcId(exampleAwsVpc.id())
            .subnetIds(exampleAwsSubnet.id())
            .ipAddressType("DUALSTACK")
            .tags(Map.of("Environment", "Example"))
            .build());

    }
}
resources:
  example:
    type: aws:vpclattice:ResourceGateway
    properties:
      name: Example
      vpcId: ${exampleAwsVpc.id}
      subnetIds:
        - ${exampleAwsSubnet.id}
      ipAddressType: DUALSTACK
      tags:
        Environment: Example

With security groups

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.vpclattice.ResourceGateway("example", {
    name: "Example",
    vpcId: exampleAwsVpc.id,
    securityGroupIds: [test.id],
    subnetIds: [exampleAwsSubnet.id],
});
import pulumi
import pulumi_aws as aws

example = aws.vpclattice.ResourceGateway("example",
    name="Example",
    vpc_id=example_aws_vpc["id"],
    security_group_ids=[test["id"]],
    subnet_ids=[example_aws_subnet["id"]])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.VpcLattice.ResourceGateway("example", new()
    {
        Name = "Example",
        VpcId = exampleAwsVpc.Id,
        SecurityGroupIds = new[]
        {
            test.Id,
        },
        SubnetIds = new[]
        {
            exampleAwsSubnet.Id,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/vpclattice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vpclattice.NewResourceGateway(ctx, "example", &vpclattice.ResourceGatewayArgs{
			Name:  pulumi.String("Example"),
			VpcId: pulumi.Any(exampleAwsVpc.Id),
			SecurityGroupIds: pulumi.StringArray{
				test.Id,
			},
			SubnetIds: pulumi.StringArray{
				exampleAwsSubnet.Id,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_vpclattice_resourcegateway" "example" {
  name               = "Example"
  vpc_id             = exampleAwsVpc.id
  security_group_ids = [test.id]
  subnet_ids         = [exampleAwsSubnet.id]
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.vpclattice.ResourceGateway;
import com.pulumi.aws.vpclattice.ResourceGatewayArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 ResourceGateway("example", ResourceGatewayArgs.builder()
            .name("Example")
            .vpcId(exampleAwsVpc.id())
            .securityGroupIds(test.id())
            .subnetIds(exampleAwsSubnet.id())
            .build());

    }
}
resources:
  example:
    type: aws:vpclattice:ResourceGateway
    properties:
      name: Example
      vpcId: ${exampleAwsVpc.id}
      securityGroupIds:
        - ${test.id}
      subnetIds:
        - ${exampleAwsSubnet.id}

Import

Using pulumi import, import VPC Lattice Resource Gateway using the id. For example:

$ pulumi import aws:vpclattice/resourceGateway:ResourceGateway example rgw-0a1b2c3d4e5f

Constructors

ResourceGateway(String name, {ResourceGatewayArgs? args, CustomResourceOptions? options})
Creates a new ResourceGateway. name The Pulumi resource name. args Arguments used to configure this ResourceGateway. The set of arguments for ResourceGateway. options Resource options controlling this resource's behavior.
ResourceGateway.reference(String urn)
Creates a typed reference to an existing ResourceGateway resource.

Properties

arn ↔ Output<String>
ARN of the resource gateway.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
ipAddressType ↔ Output<String>
IP address type used by the resource gateway. Valid values are IPV4, IPV6, and DUALSTACK. The IP address type of a resource gateway must be compatible with the subnets of the resource gateway and the IP address type of the resource.
latefinal
ipv4AddressesPerEni ↔ Output<int>
Number of IPv4 addresses per ENI for your resource. This argument is only applicable to IPV4 and DUALSTACK IP address types. Defaults to 16.
latefinal
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
name ↔ Output<String>
Name of the resource gateway.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceConfigDnsResolution ↔ Output<String>
How DNS is resolved for resource configurations associated to this resource gateway. Valid values are IN_VPC and PUBLIC. Defaults to PUBLIC. Changing this value will trigger a resource replacement.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
securityGroupIds ↔ Output<List<String>>
Security group IDs associated with the resource gateway. The security groups must be in the same VPC.
latefinal
status ↔ Output<String>
Status of the resource gateway.
latefinal
subnetIds ↔ Output<List<String>>
IDs of the VPC subnets in which to create the resource gateway.
latefinal
tags ↔ Output<Map<String, String>?>
Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
timeouts ↔ Output<ResourceGatewayTimeouts?>
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
vpcId ↔ Output<String>
ID of the VPC for the resource gateway.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {ResourceGatewayState? state, CustomResourceOptions? options}) → ResourceGateway
Gets an existing ResourceGateway resource's state with the given name and id.