Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.ec2transitgateway.kotlin.VpcAttachmentArgs.kt Maven / Gradle / Ivy
Go to download
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.ec2transitgateway.kotlin
import com.pulumi.aws.ec2transitgateway.VpcAttachmentArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages an EC2 Transit Gateway VPC Attachment. For examples of custom route table association and propagation, see the EC2 Transit Gateway Networking Examples Guide.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.ec2transitgateway.VpcAttachment("example", {
* subnetIds: [exampleAwsSubnet.id],
* transitGatewayId: exampleAwsEc2TransitGateway.id,
* vpcId: exampleAwsVpc.id,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.ec2transitgateway.VpcAttachment("example",
* subnet_ids=[example_aws_subnet["id"]],
* transit_gateway_id=example_aws_ec2_transit_gateway["id"],
* vpc_id=example_aws_vpc["id"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Ec2TransitGateway.VpcAttachment("example", new()
* {
* SubnetIds = new[]
* {
* exampleAwsSubnet.Id,
* },
* TransitGatewayId = exampleAwsEc2TransitGateway.Id,
* VpcId = exampleAwsVpc.Id,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := ec2transitgateway.NewVpcAttachment(ctx, "example", &ec2transitgateway.VpcAttachmentArgs{
* SubnetIds: pulumi.StringArray{
* exampleAwsSubnet.Id,
* },
* TransitGatewayId: pulumi.Any(exampleAwsEc2TransitGateway.Id),
* VpcId: pulumi.Any(exampleAwsVpc.Id),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.ec2transitgateway.VpcAttachment;
* import com.pulumi.aws.ec2transitgateway.VpcAttachmentArgs;
* 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 VpcAttachment("example", VpcAttachmentArgs.builder()
* .subnetIds(exampleAwsSubnet.id())
* .transitGatewayId(exampleAwsEc2TransitGateway.id())
* .vpcId(exampleAwsVpc.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:ec2transitgateway:VpcAttachment
* properties:
* subnetIds:
* - ${exampleAwsSubnet.id}
* transitGatewayId: ${exampleAwsEc2TransitGateway.id}
* vpcId: ${exampleAwsVpc.id}
* ```
*
* ## Import
* Using `pulumi import`, import `aws_ec2_transit_gateway_vpc_attachment` using the EC2 Transit Gateway Attachment identifier. For example:
* ```sh
* $ pulumi import aws:ec2transitgateway/vpcAttachment:VpcAttachment example tgw-attach-12345678
* ```
* @property applianceModeSupport Whether Appliance Mode support is enabled. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. Valid values: `disable`, `enable`. Default value: `disable`.
* @property dnsSupport Whether DNS support is enabled. Valid values: `disable`, `enable`. Default value: `enable`.
* @property ipv6Support Whether IPv6 support is enabled. Valid values: `disable`, `enable`. Default value: `disable`.
* @property securityGroupReferencingSupport Whether Security Group Referencing Support is enabled. Valid values: `disable`, `enable`.
* @property subnetIds Identifiers of EC2 Subnets.
* @property tags Key-value tags for the EC2 Transit Gateway VPC Attachment. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
* @property transitGatewayDefaultRouteTableAssociation Boolean whether the VPC Attachment should be associated with the EC2 Transit Gateway association default route table. This cannot be configured or perform drift detection with Resource Access Manager shared EC2 Transit Gateways. Default value: `true`.
* @property transitGatewayDefaultRouteTablePropagation Boolean whether the VPC Attachment should propagate routes with the EC2 Transit Gateway propagation default route table. This cannot be configured or perform drift detection with Resource Access Manager shared EC2 Transit Gateways. Default value: `true`.
* @property transitGatewayId Identifier of EC2 Transit Gateway.
* @property vpcId Identifier of EC2 VPC.
*/
public data class VpcAttachmentArgs(
public val applianceModeSupport: Output? = null,
public val dnsSupport: Output? = null,
public val ipv6Support: Output? = null,
public val securityGroupReferencingSupport: Output? = null,
public val subnetIds: Output>? = null,
public val tags: Output>? = null,
public val transitGatewayDefaultRouteTableAssociation: Output? = null,
public val transitGatewayDefaultRouteTablePropagation: Output? = null,
public val transitGatewayId: Output? = null,
public val vpcId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.ec2transitgateway.VpcAttachmentArgs =
com.pulumi.aws.ec2transitgateway.VpcAttachmentArgs.builder()
.applianceModeSupport(applianceModeSupport?.applyValue({ args0 -> args0 }))
.dnsSupport(dnsSupport?.applyValue({ args0 -> args0 }))
.ipv6Support(ipv6Support?.applyValue({ args0 -> args0 }))
.securityGroupReferencingSupport(securityGroupReferencingSupport?.applyValue({ args0 -> args0 }))
.subnetIds(subnetIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.transitGatewayDefaultRouteTableAssociation(
transitGatewayDefaultRouteTableAssociation?.applyValue({ args0 ->
args0
}),
)
.transitGatewayDefaultRouteTablePropagation(
transitGatewayDefaultRouteTablePropagation?.applyValue({ args0 ->
args0
}),
)
.transitGatewayId(transitGatewayId?.applyValue({ args0 -> args0 }))
.vpcId(vpcId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [VpcAttachmentArgs].
*/
@PulumiTagMarker
public class VpcAttachmentArgsBuilder internal constructor() {
private var applianceModeSupport: Output? = null
private var dnsSupport: Output? = null
private var ipv6Support: Output? = null
private var securityGroupReferencingSupport: Output? = null
private var subnetIds: Output>? = null
private var tags: Output>? = null
private var transitGatewayDefaultRouteTableAssociation: Output? = null
private var transitGatewayDefaultRouteTablePropagation: Output? = null
private var transitGatewayId: Output? = null
private var vpcId: Output? = null
/**
* @param value Whether Appliance Mode support is enabled. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. Valid values: `disable`, `enable`. Default value: `disable`.
*/
@JvmName("nkbcxqdhoqexrihe")
public suspend fun applianceModeSupport(`value`: Output) {
this.applianceModeSupport = value
}
/**
* @param value Whether DNS support is enabled. Valid values: `disable`, `enable`. Default value: `enable`.
*/
@JvmName("mhuvxeijwmwbnarp")
public suspend fun dnsSupport(`value`: Output) {
this.dnsSupport = value
}
/**
* @param value Whether IPv6 support is enabled. Valid values: `disable`, `enable`. Default value: `disable`.
*/
@JvmName("kgugmdsyyrdiwhqi")
public suspend fun ipv6Support(`value`: Output) {
this.ipv6Support = value
}
/**
* @param value Whether Security Group Referencing Support is enabled. Valid values: `disable`, `enable`.
*/
@JvmName("fnihhkimhvuhxvgy")
public suspend fun securityGroupReferencingSupport(`value`: Output) {
this.securityGroupReferencingSupport = value
}
/**
* @param value Identifiers of EC2 Subnets.
*/
@JvmName("jlnwqdqgmgjfcbeg")
public suspend fun subnetIds(`value`: Output>) {
this.subnetIds = value
}
@JvmName("hcffpwdbesifutuo")
public suspend fun subnetIds(vararg values: Output) {
this.subnetIds = Output.all(values.asList())
}
/**
* @param values Identifiers of EC2 Subnets.
*/
@JvmName("oioivijxvtrmmcah")
public suspend fun subnetIds(values: List>) {
this.subnetIds = Output.all(values)
}
/**
* @param value Key-value tags for the EC2 Transit Gateway VPC Attachment. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("mcbogclxlsdtydgi")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Boolean whether the VPC Attachment should be associated with the EC2 Transit Gateway association default route table. This cannot be configured or perform drift detection with Resource Access Manager shared EC2 Transit Gateways. Default value: `true`.
*/
@JvmName("lhvacuvphywakcog")
public suspend fun transitGatewayDefaultRouteTableAssociation(`value`: Output) {
this.transitGatewayDefaultRouteTableAssociation = value
}
/**
* @param value Boolean whether the VPC Attachment should propagate routes with the EC2 Transit Gateway propagation default route table. This cannot be configured or perform drift detection with Resource Access Manager shared EC2 Transit Gateways. Default value: `true`.
*/
@JvmName("xidhuiupyjotmfdb")
public suspend fun transitGatewayDefaultRouteTablePropagation(`value`: Output) {
this.transitGatewayDefaultRouteTablePropagation = value
}
/**
* @param value Identifier of EC2 Transit Gateway.
*/
@JvmName("ytvlkwvabpycisjl")
public suspend fun transitGatewayId(`value`: Output) {
this.transitGatewayId = value
}
/**
* @param value Identifier of EC2 VPC.
*/
@JvmName("biimsbqpgdlgeobe")
public suspend fun vpcId(`value`: Output) {
this.vpcId = value
}
/**
* @param value Whether Appliance Mode support is enabled. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. Valid values: `disable`, `enable`. Default value: `disable`.
*/
@JvmName("desdqsuucgyernlw")
public suspend fun applianceModeSupport(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.applianceModeSupport = mapped
}
/**
* @param value Whether DNS support is enabled. Valid values: `disable`, `enable`. Default value: `enable`.
*/
@JvmName("fhxvwqmwedhlreuf")
public suspend fun dnsSupport(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.dnsSupport = mapped
}
/**
* @param value Whether IPv6 support is enabled. Valid values: `disable`, `enable`. Default value: `disable`.
*/
@JvmName("csiwjpsmhqgcpxlb")
public suspend fun ipv6Support(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ipv6Support = mapped
}
/**
* @param value Whether Security Group Referencing Support is enabled. Valid values: `disable`, `enable`.
*/
@JvmName("kuxsebvkqtrwudgf")
public suspend fun securityGroupReferencingSupport(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.securityGroupReferencingSupport = mapped
}
/**
* @param value Identifiers of EC2 Subnets.
*/
@JvmName("addwtvpnlsoncxwa")
public suspend fun subnetIds(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.subnetIds = mapped
}
/**
* @param values Identifiers of EC2 Subnets.
*/
@JvmName("xyxytuonbeldcxpl")
public suspend fun subnetIds(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.subnetIds = mapped
}
/**
* @param value Key-value tags for the EC2 Transit Gateway VPC Attachment. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("sldgmbypjdytjbog")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Key-value tags for the EC2 Transit Gateway VPC Attachment. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("ngahgobwpwdfqwhw")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value Boolean whether the VPC Attachment should be associated with the EC2 Transit Gateway association default route table. This cannot be configured or perform drift detection with Resource Access Manager shared EC2 Transit Gateways. Default value: `true`.
*/
@JvmName("mlfsvjklixvmvbdu")
public suspend fun transitGatewayDefaultRouteTableAssociation(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.transitGatewayDefaultRouteTableAssociation = mapped
}
/**
* @param value Boolean whether the VPC Attachment should propagate routes with the EC2 Transit Gateway propagation default route table. This cannot be configured or perform drift detection with Resource Access Manager shared EC2 Transit Gateways. Default value: `true`.
*/
@JvmName("evikribyphumgywx")
public suspend fun transitGatewayDefaultRouteTablePropagation(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.transitGatewayDefaultRouteTablePropagation = mapped
}
/**
* @param value Identifier of EC2 Transit Gateway.
*/
@JvmName("oybavqkvlmmjnjoo")
public suspend fun transitGatewayId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.transitGatewayId = mapped
}
/**
* @param value Identifier of EC2 VPC.
*/
@JvmName("obumwjfcxklhmpoa")
public suspend fun vpcId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.vpcId = mapped
}
internal fun build(): VpcAttachmentArgs = VpcAttachmentArgs(
applianceModeSupport = applianceModeSupport,
dnsSupport = dnsSupport,
ipv6Support = ipv6Support,
securityGroupReferencingSupport = securityGroupReferencingSupport,
subnetIds = subnetIds,
tags = tags,
transitGatewayDefaultRouteTableAssociation = transitGatewayDefaultRouteTableAssociation,
transitGatewayDefaultRouteTablePropagation = transitGatewayDefaultRouteTablePropagation,
transitGatewayId = transitGatewayId,
vpcId = vpcId,
)
}