Gateway Route Table Attachment Args
data class GatewayRouteTableAttachmentArgs(val dryRun: Output<Boolean>? = null, val ipv4GatewayId: Output<String>? = null, val routeTableId: Output<String>? = null) : ConvertibleToJava<GatewayRouteTableAttachmentArgs>
Provides a VPC Gateway Route Table Attachment resource. For information about VPC Gateway Route Table Attachment and how to use it, see What is Gateway Route Table Attachment.
NOTE: Available in v1.194.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.RouteTable;
import com.pulumi.alicloud.vpc.RouteTableArgs;
import com.pulumi.alicloud.vpc.Ipv4Gateway;
import com.pulumi.alicloud.vpc.Ipv4GatewayArgs;
import com.pulumi.alicloud.vpc.GatewayRouteTableAttachment;
import com.pulumi.alicloud.vpc.GatewayRouteTableAttachmentArgs;
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 exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
.cidrBlock("172.16.0.0/12")
.vpcName("terraform-example")
.build());
var exampleRouteTable = new RouteTable("exampleRouteTable", RouteTableArgs.builder()
.vpcId(exampleNetwork.id())
.routeTableName("terraform-example")
.description("terraform-example")
.associateType("Gateway")
.build());
var exampleIpv4Gateway = new Ipv4Gateway("exampleIpv4Gateway", Ipv4GatewayArgs.builder()
.ipv4GatewayName("terraform-example")
.vpcId(exampleNetwork.id())
.enabled("true")
.build());
var exampleGatewayRouteTableAttachment = new GatewayRouteTableAttachment("exampleGatewayRouteTableAttachment", GatewayRouteTableAttachmentArgs.builder()
.ipv4GatewayId(exampleIpv4Gateway.id())
.routeTableId(exampleRouteTable.id())
.build());
}
}
Content copied to clipboard
Import
VPC Gateway Route Table Attachment can be imported using the id, e.g.
$ pulumi import alicloud:vpc/gatewayRouteTableAttachment:GatewayRouteTableAttachment example <route_table_id>:<ipv4_gateway_id>
Content copied to clipboard
Constructors
Link copied to clipboard
fun GatewayRouteTableAttachmentArgs(dryRun: Output<Boolean>? = null, ipv4GatewayId: Output<String>? = null, routeTableId: Output<String>? = null)