
com.pulumi.gcp.compute.kotlin.RouterNatAddressArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
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.gcp.compute.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.RouterNatAddressArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* A resource used to set the list of IP addresses to be used in a NAT service and manage the draining of destroyed IPs.
* > **Note:** This resource is to be used alongside a `gcp.compute.RouterNat` resource,
* the router nat resource must have no defined `nat_ips` or `drain_nat_ips` parameters,
* instead using the `initial_nat_ips` parameter to set at least one IP for the creation of the resource.
* To get more information about RouterNatAddress, see:
* * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/routers)
* * How-to Guides
* * [Google Cloud Router](https://cloud.google.com/router/docs/)
* ## Example Usage
* ## Import
* RouterNatAddress can be imported using any of these accepted formats:
* * `projects/{{project}}/regions/{{region}}/routers/{{router}}/{{router_nat}}`
* * `{{project}}/{{region}}/{{router}}/{{router_nat}}`
* * `{{region}}/{{router}}/{{router_nat}}`
* * `{{router}}/{{router_nat}}`
* When using the `pulumi import` command, RouterNatAddress can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:compute/routerNatAddress:RouterNatAddress default projects/{{project}}/regions/{{region}}/routers/{{router}}/{{router_nat}}
* ```
* ```sh
* $ pulumi import gcp:compute/routerNatAddress:RouterNatAddress default {{project}}/{{region}}/{{router}}/{{router_nat}}
* ```
* ```sh
* $ pulumi import gcp:compute/routerNatAddress:RouterNatAddress default {{region}}/{{router}}/{{router_nat}}
* ```
* ```sh
* $ pulumi import gcp:compute/routerNatAddress:RouterNatAddress default {{router}}/{{router_nat}}
* ```
* @property drainNatIps A list of URLs of the IP resources to be drained. These IPs must be
* valid static external IPs that have been assigned to the NAT.
* @property natIps Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat
* natIpAllocateOption is set to MANUAL_ONLY.
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property region Region where the NAT service reside.
* @property router The name of the Cloud Router in which the referenced NAT service is configured.
* @property routerNat The name of the Nat service in which this address will be configured.
* - - -
*/
public data class RouterNatAddressArgs(
public val drainNatIps: Output>? = null,
public val natIps: Output>? = null,
public val project: Output? = null,
public val region: Output? = null,
public val router: Output? = null,
public val routerNat: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.RouterNatAddressArgs =
com.pulumi.gcp.compute.RouterNatAddressArgs.builder()
.drainNatIps(drainNatIps?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.natIps(natIps?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.project(project?.applyValue({ args0 -> args0 }))
.region(region?.applyValue({ args0 -> args0 }))
.router(router?.applyValue({ args0 -> args0 }))
.routerNat(routerNat?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RouterNatAddressArgs].
*/
@PulumiTagMarker
public class RouterNatAddressArgsBuilder internal constructor() {
private var drainNatIps: Output>? = null
private var natIps: Output>? = null
private var project: Output? = null
private var region: Output? = null
private var router: Output? = null
private var routerNat: Output? = null
/**
* @param value A list of URLs of the IP resources to be drained. These IPs must be
* valid static external IPs that have been assigned to the NAT.
*/
@JvmName("mvhbranvvuneildt")
public suspend fun drainNatIps(`value`: Output>) {
this.drainNatIps = value
}
@JvmName("ycqygjjqnuydjvcx")
public suspend fun drainNatIps(vararg values: Output) {
this.drainNatIps = Output.all(values.asList())
}
/**
* @param values A list of URLs of the IP resources to be drained. These IPs must be
* valid static external IPs that have been assigned to the NAT.
*/
@JvmName("pxuomnnjxpcyprfj")
public suspend fun drainNatIps(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy