GatewayEndpointRouteTableAttachmentArgs

data class GatewayEndpointRouteTableAttachmentArgs(val gatewayEndpointId: Output<String>? = null, val routeTableId: Output<String>? = null) : ConvertibleToJava<GatewayEndpointRouteTableAttachmentArgs>

Provides a VPC Gateway Endpoint Route Table Attachment resource. VPC gateway node association route. For information about VPC Gateway Endpoint Route Table Attachment and how to use it, see What is Gateway Endpoint Route Table Attachment.

NOTE: Available since v1.208.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.GatewayEndpoint;
import com.pulumi.alicloud.vpc.GatewayEndpointArgs;
import com.pulumi.alicloud.vpc.RouteTable;
import com.pulumi.alicloud.vpc.RouteTableArgs;
import com.pulumi.alicloud.vpc.GatewayEndpointRouteTableAttachment;
import com.pulumi.alicloud.vpc.GatewayEndpointRouteTableAttachmentArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var defaulteVpc = new Network("defaulteVpc", NetworkArgs.builder()
.description("test")
.build());
var defaultGE = new GatewayEndpoint("defaultGE", GatewayEndpointArgs.builder()
.serviceName("com.aliyun.cn-hangzhou.oss")
.policyDocument("{ \"Version\" : \"1\", \"Statement\" : [ { \"Effect\" : \"Allow\", \"Resource\" : [ \"*\" ], \"Action\" : [ \"*\" ], \"Principal\" : [ \"*\" ] } ] }")
.vpcId(defaulteVpc.id())
.gatewayEndpointDescrption("test-gateway-endpoint")
.gatewayEndpointName(String.format("%s1", name))
.build());
var defaultRT = new RouteTable("defaultRT", RouteTableArgs.builder()
.vpcId(defaulteVpc.id())
.routeTableName(String.format("%s2", name))
.build());
var default_ = new GatewayEndpointRouteTableAttachment("default", GatewayEndpointRouteTableAttachmentArgs.builder()
.gatewayEndpointId(defaultGE.id())
.routeTableId(defaultRT.id())
.build());
}
}

Import

VPC Gateway Endpoint Route Table Attachment can be imported using the id, e.g.

$ pulumi import alicloud:vpc/gatewayEndpointRouteTableAttachment:GatewayEndpointRouteTableAttachment example <gateway_endpoint_id>:<route_table_id>

Constructors

Link copied to clipboard
fun GatewayEndpointRouteTableAttachmentArgs(gatewayEndpointId: Output<String>? = null, routeTableId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): GatewayEndpointRouteTableAttachmentArgs

Properties

Link copied to clipboard
val gatewayEndpointId: Output<String>? = null

The ID of the gateway endpoint instance to which you want to associate the route table.

Link copied to clipboard
val routeTableId: Output<String>? = null

Routing table ID.