1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. RouterNatAddress
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.compute.RouterNatAddress

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    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:

    Example Usage

    Create RouterNatAddress Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RouterNatAddress(name: string, args: RouterNatAddressArgs, opts?: CustomResourceOptions);
    @overload
    def RouterNatAddress(resource_name: str,
                         args: RouterNatAddressArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def RouterNatAddress(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         nat_ips: Optional[Sequence[str]] = None,
                         router: Optional[str] = None,
                         router_nat: Optional[str] = None,
                         drain_nat_ips: Optional[Sequence[str]] = None,
                         project: Optional[str] = None,
                         region: Optional[str] = None)
    func NewRouterNatAddress(ctx *Context, name string, args RouterNatAddressArgs, opts ...ResourceOption) (*RouterNatAddress, error)
    public RouterNatAddress(string name, RouterNatAddressArgs args, CustomResourceOptions? opts = null)
    public RouterNatAddress(String name, RouterNatAddressArgs args)
    public RouterNatAddress(String name, RouterNatAddressArgs args, CustomResourceOptions options)
    
    type: gcp:compute:RouterNatAddress
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RouterNatAddressArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RouterNatAddressArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RouterNatAddressArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RouterNatAddressArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RouterNatAddressArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var routerNatAddressResource = new Gcp.Compute.RouterNatAddress("routerNatAddressResource", new()
    {
        NatIps = new[]
        {
            "string",
        },
        Router = "string",
        RouterNat = "string",
        DrainNatIps = new[]
        {
            "string",
        },
        Project = "string",
        Region = "string",
    });
    
    example, err := compute.NewRouterNatAddress(ctx, "routerNatAddressResource", &compute.RouterNatAddressArgs{
    	NatIps: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Router:    pulumi.String("string"),
    	RouterNat: pulumi.String("string"),
    	DrainNatIps: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Project: pulumi.String("string"),
    	Region:  pulumi.String("string"),
    })
    
    var routerNatAddressResource = new RouterNatAddress("routerNatAddressResource", RouterNatAddressArgs.builder()
        .natIps("string")
        .router("string")
        .routerNat("string")
        .drainNatIps("string")
        .project("string")
        .region("string")
        .build());
    
    router_nat_address_resource = gcp.compute.RouterNatAddress("routerNatAddressResource",
        nat_ips=["string"],
        router="string",
        router_nat="string",
        drain_nat_ips=["string"],
        project="string",
        region="string")
    
    const routerNatAddressResource = new gcp.compute.RouterNatAddress("routerNatAddressResource", {
        natIps: ["string"],
        router: "string",
        routerNat: "string",
        drainNatIps: ["string"],
        project: "string",
        region: "string",
    });
    
    type: gcp:compute:RouterNatAddress
    properties:
        drainNatIps:
            - string
        natIps:
            - string
        project: string
        region: string
        router: string
        routerNat: string
    

    RouterNatAddress Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The RouterNatAddress resource accepts the following input properties:

    NatIps List<string>
    Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat natIpAllocateOption is set to MANUAL_ONLY.
    Router string
    The name of the Cloud Router in which the referenced NAT service is configured.
    RouterNat string
    The name of the Nat service in which this address will be configured.


    DrainNatIps List<string>
    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.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Region string
    Region where the NAT service reside.
    NatIps []string
    Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat natIpAllocateOption is set to MANUAL_ONLY.
    Router string
    The name of the Cloud Router in which the referenced NAT service is configured.
    RouterNat string
    The name of the Nat service in which this address will be configured.


    DrainNatIps []string
    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.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Region string
    Region where the NAT service reside.
    natIps List<String>
    Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat natIpAllocateOption is set to MANUAL_ONLY.
    router String
    The name of the Cloud Router in which the referenced NAT service is configured.
    routerNat String
    The name of the Nat service in which this address will be configured.


    drainNatIps List<String>
    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.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    Region where the NAT service reside.
    natIps string[]
    Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat natIpAllocateOption is set to MANUAL_ONLY.
    router string
    The name of the Cloud Router in which the referenced NAT service is configured.
    routerNat string
    The name of the Nat service in which this address will be configured.


    drainNatIps string[]
    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.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region string
    Region where the NAT service reside.
    nat_ips Sequence[str]
    Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat natIpAllocateOption is set to MANUAL_ONLY.
    router str
    The name of the Cloud Router in which the referenced NAT service is configured.
    router_nat str
    The name of the Nat service in which this address will be configured.


    drain_nat_ips Sequence[str]
    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.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region str
    Region where the NAT service reside.
    natIps List<String>
    Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat natIpAllocateOption is set to MANUAL_ONLY.
    router String
    The name of the Cloud Router in which the referenced NAT service is configured.
    routerNat String
    The name of the Nat service in which this address will be configured.


    drainNatIps List<String>
    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.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    Region where the NAT service reside.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RouterNatAddress resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RouterNatAddress Resource

    Get an existing RouterNatAddress resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RouterNatAddressState, opts?: CustomResourceOptions): RouterNatAddress
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            drain_nat_ips: Optional[Sequence[str]] = None,
            nat_ips: Optional[Sequence[str]] = None,
            project: Optional[str] = None,
            region: Optional[str] = None,
            router: Optional[str] = None,
            router_nat: Optional[str] = None) -> RouterNatAddress
    func GetRouterNatAddress(ctx *Context, name string, id IDInput, state *RouterNatAddressState, opts ...ResourceOption) (*RouterNatAddress, error)
    public static RouterNatAddress Get(string name, Input<string> id, RouterNatAddressState? state, CustomResourceOptions? opts = null)
    public static RouterNatAddress get(String name, Output<String> id, RouterNatAddressState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DrainNatIps List<string>
    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.
    NatIps List<string>
    Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat natIpAllocateOption is set to MANUAL_ONLY.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Region string
    Region where the NAT service reside.
    Router string
    The name of the Cloud Router in which the referenced NAT service is configured.
    RouterNat string
    The name of the Nat service in which this address will be configured.


    DrainNatIps []string
    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.
    NatIps []string
    Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat natIpAllocateOption is set to MANUAL_ONLY.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Region string
    Region where the NAT service reside.
    Router string
    The name of the Cloud Router in which the referenced NAT service is configured.
    RouterNat string
    The name of the Nat service in which this address will be configured.


    drainNatIps List<String>
    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.
    natIps List<String>
    Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat natIpAllocateOption is set to MANUAL_ONLY.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    Region where the NAT service reside.
    router String
    The name of the Cloud Router in which the referenced NAT service is configured.
    routerNat String
    The name of the Nat service in which this address will be configured.


    drainNatIps string[]
    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.
    natIps string[]
    Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat natIpAllocateOption is set to MANUAL_ONLY.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region string
    Region where the NAT service reside.
    router string
    The name of the Cloud Router in which the referenced NAT service is configured.
    routerNat string
    The name of the Nat service in which this address will be configured.


    drain_nat_ips Sequence[str]
    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.
    nat_ips Sequence[str]
    Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat natIpAllocateOption is set to MANUAL_ONLY.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region str
    Region where the NAT service reside.
    router str
    The name of the Cloud Router in which the referenced NAT service is configured.
    router_nat str
    The name of the Nat service in which this address will be configured.


    drainNatIps List<String>
    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.
    natIps List<String>
    Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat natIpAllocateOption is set to MANUAL_ONLY.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    Region where the NAT service reside.
    router String
    The name of the Cloud Router in which the referenced NAT service is configured.
    routerNat String
    The name of the Nat service in which this address will be configured.


    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:

    $ pulumi import gcp:compute/routerNatAddress:RouterNatAddress default projects/{{project}}/regions/{{region}}/routers/{{router}}/{{router_nat}}
    
    $ pulumi import gcp:compute/routerNatAddress:RouterNatAddress default {{project}}/{{region}}/{{router}}/{{router_nat}}
    
    $ pulumi import gcp:compute/routerNatAddress:RouterNatAddress default {{region}}/{{router}}/{{router_nat}}
    
    $ pulumi import gcp:compute/routerNatAddress:RouterNatAddress default {{router}}/{{router_nat}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi