gcp logo
Google Cloud Classic v6.56.0, May 18 23

gcp.compute.Address

Explore with Pulumi AI

Represents an Address resource.

Each virtual machine instance has an ephemeral internal IP address and, optionally, an external IP address. To communicate between instances on the same network, you can use an instance’s internal IP address. To communicate with the Internet and instances outside of the same network, you must specify the instance’s external IP address.

Internal IP addresses are ephemeral and only belong to an instance for the lifetime of the instance; if the instance is deleted and recreated, the instance is assigned a new internal IP address, either by Compute Engine or by you. External IP addresses can be either ephemeral or static.

To get more information about Address, see:

Example Usage

Address Basic

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var ipAddress = new Gcp.Compute.Address("ipAddress");

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := compute.NewAddress(ctx, "ipAddress", nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Address;
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 ipAddress = new Address("ipAddress");

    }
}
import pulumi
import pulumi_gcp as gcp

ip_address = gcp.compute.Address("ipAddress")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const ipAddress = new gcp.compute.Address("ipAddress", {});
resources:
  ipAddress:
    type: gcp:compute:Address

Address With Subnetwork

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var defaultNetwork = new Gcp.Compute.Network("defaultNetwork");

    var defaultSubnetwork = new Gcp.Compute.Subnetwork("defaultSubnetwork", new()
    {
        IpCidrRange = "10.0.0.0/16",
        Region = "us-central1",
        Network = defaultNetwork.Id,
    });

    var internalWithSubnetAndAddress = new Gcp.Compute.Address("internalWithSubnetAndAddress", new()
    {
        Subnetwork = defaultSubnetwork.Id,
        AddressType = "INTERNAL",
        IPAddress = "10.0.42.42",
        Region = "us-central1",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultNetwork, err := compute.NewNetwork(ctx, "defaultNetwork", nil)
		if err != nil {
			return err
		}
		defaultSubnetwork, err := compute.NewSubnetwork(ctx, "defaultSubnetwork", &compute.SubnetworkArgs{
			IpCidrRange: pulumi.String("10.0.0.0/16"),
			Region:      pulumi.String("us-central1"),
			Network:     defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		_, err = compute.NewAddress(ctx, "internalWithSubnetAndAddress", &compute.AddressArgs{
			Subnetwork:  defaultSubnetwork.ID(),
			AddressType: pulumi.String("INTERNAL"),
			Address:     pulumi.String("10.0.42.42"),
			Region:      pulumi.String("us-central1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import com.pulumi.gcp.compute.Address;
import com.pulumi.gcp.compute.AddressArgs;
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 defaultNetwork = new Network("defaultNetwork");

        var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()        
            .ipCidrRange("10.0.0.0/16")
            .region("us-central1")
            .network(defaultNetwork.id())
            .build());

        var internalWithSubnetAndAddress = new Address("internalWithSubnetAndAddress", AddressArgs.builder()        
            .subnetwork(defaultSubnetwork.id())
            .addressType("INTERNAL")
            .address("10.0.42.42")
            .region("us-central1")
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

default_network = gcp.compute.Network("defaultNetwork")
default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork",
    ip_cidr_range="10.0.0.0/16",
    region="us-central1",
    network=default_network.id)
internal_with_subnet_and_address = gcp.compute.Address("internalWithSubnetAndAddress",
    subnetwork=default_subnetwork.id,
    address_type="INTERNAL",
    address="10.0.42.42",
    region="us-central1")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultNetwork = new gcp.compute.Network("defaultNetwork", {});
const defaultSubnetwork = new gcp.compute.Subnetwork("defaultSubnetwork", {
    ipCidrRange: "10.0.0.0/16",
    region: "us-central1",
    network: defaultNetwork.id,
});
const internalWithSubnetAndAddress = new gcp.compute.Address("internalWithSubnetAndAddress", {
    subnetwork: defaultSubnetwork.id,
    addressType: "INTERNAL",
    address: "10.0.42.42",
    region: "us-central1",
});
resources:
  defaultNetwork:
    type: gcp:compute:Network
  defaultSubnetwork:
    type: gcp:compute:Subnetwork
    properties:
      ipCidrRange: 10.0.0.0/16
      region: us-central1
      network: ${defaultNetwork.id}
  internalWithSubnetAndAddress:
    type: gcp:compute:Address
    properties:
      subnetwork: ${defaultSubnetwork.id}
      addressType: INTERNAL
      address: 10.0.42.42
      region: us-central1

Address With Gce Endpoint

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var internalWithGceEndpoint = new Gcp.Compute.Address("internalWithGceEndpoint", new()
    {
        AddressType = "INTERNAL",
        Purpose = "GCE_ENDPOINT",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := compute.NewAddress(ctx, "internalWithGceEndpoint", &compute.AddressArgs{
			AddressType: pulumi.String("INTERNAL"),
			Purpose:     pulumi.String("GCE_ENDPOINT"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Address;
import com.pulumi.gcp.compute.AddressArgs;
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 internalWithGceEndpoint = new Address("internalWithGceEndpoint", AddressArgs.builder()        
            .addressType("INTERNAL")
            .purpose("GCE_ENDPOINT")
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

internal_with_gce_endpoint = gcp.compute.Address("internalWithGceEndpoint",
    address_type="INTERNAL",
    purpose="GCE_ENDPOINT")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const internalWithGceEndpoint = new gcp.compute.Address("internalWithGceEndpoint", {
    addressType: "INTERNAL",
    purpose: "GCE_ENDPOINT",
});
resources:
  internalWithGceEndpoint:
    type: gcp:compute:Address
    properties:
      addressType: INTERNAL
      purpose: GCE_ENDPOINT

Instance With Ip

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @static = new Gcp.Compute.Address("static");

    var debianImage = Gcp.Compute.GetImage.Invoke(new()
    {
        Family = "debian-11",
        Project = "debian-cloud",
    });

    var instanceWithIp = new Gcp.Compute.Instance("instanceWithIp", new()
    {
        MachineType = "f1-micro",
        Zone = "us-central1-a",
        BootDisk = new Gcp.Compute.Inputs.InstanceBootDiskArgs
        {
            InitializeParams = new Gcp.Compute.Inputs.InstanceBootDiskInitializeParamsArgs
            {
                Image = debianImage.Apply(getImageResult => getImageResult.SelfLink),
            },
        },
        NetworkInterfaces = new[]
        {
            new Gcp.Compute.Inputs.InstanceNetworkInterfaceArgs
            {
                Network = "default",
                AccessConfigs = new[]
                {
                    new Gcp.Compute.Inputs.InstanceNetworkInterfaceAccessConfigArgs
                    {
                        NatIp = @static.IPAddress,
                    },
                },
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		static, err := compute.NewAddress(ctx, "static", nil)
		if err != nil {
			return err
		}
		debianImage, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
			Family:  pulumi.StringRef("debian-11"),
			Project: pulumi.StringRef("debian-cloud"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = compute.NewInstance(ctx, "instanceWithIp", &compute.InstanceArgs{
			MachineType: pulumi.String("f1-micro"),
			Zone:        pulumi.String("us-central1-a"),
			BootDisk: &compute.InstanceBootDiskArgs{
				InitializeParams: &compute.InstanceBootDiskInitializeParamsArgs{
					Image: *pulumi.String(debianImage.SelfLink),
				},
			},
			NetworkInterfaces: compute.InstanceNetworkInterfaceArray{
				&compute.InstanceNetworkInterfaceArgs{
					Network: pulumi.String("default"),
					AccessConfigs: compute.InstanceNetworkInterfaceAccessConfigArray{
						&compute.InstanceNetworkInterfaceAccessConfigArgs{
							NatIp: static.Address,
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Address;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetImageArgs;
import com.pulumi.gcp.compute.Instance;
import com.pulumi.gcp.compute.InstanceArgs;
import com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs;
import com.pulumi.gcp.compute.inputs.InstanceBootDiskInitializeParamsArgs;
import com.pulumi.gcp.compute.inputs.InstanceNetworkInterfaceArgs;
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 static_ = new Address("static");

        final var debianImage = ComputeFunctions.getImage(GetImageArgs.builder()
            .family("debian-11")
            .project("debian-cloud")
            .build());

        var instanceWithIp = new Instance("instanceWithIp", InstanceArgs.builder()        
            .machineType("f1-micro")
            .zone("us-central1-a")
            .bootDisk(InstanceBootDiskArgs.builder()
                .initializeParams(InstanceBootDiskInitializeParamsArgs.builder()
                    .image(debianImage.applyValue(getImageResult -> getImageResult.selfLink()))
                    .build())
                .build())
            .networkInterfaces(InstanceNetworkInterfaceArgs.builder()
                .network("default")
                .accessConfigs(InstanceNetworkInterfaceAccessConfigArgs.builder()
                    .natIp(static_.address())
                    .build())
                .build())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

static = gcp.compute.Address("static")
debian_image = gcp.compute.get_image(family="debian-11",
    project="debian-cloud")
instance_with_ip = gcp.compute.Instance("instanceWithIp",
    machine_type="f1-micro",
    zone="us-central1-a",
    boot_disk=gcp.compute.InstanceBootDiskArgs(
        initialize_params=gcp.compute.InstanceBootDiskInitializeParamsArgs(
            image=debian_image.self_link,
        ),
    ),
    network_interfaces=[gcp.compute.InstanceNetworkInterfaceArgs(
        network="default",
        access_configs=[gcp.compute.InstanceNetworkInterfaceAccessConfigArgs(
            nat_ip=static.address,
        )],
    )])
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const static = new gcp.compute.Address("static", {});
const debianImage = gcp.compute.getImage({
    family: "debian-11",
    project: "debian-cloud",
});
const instanceWithIp = new gcp.compute.Instance("instanceWithIp", {
    machineType: "f1-micro",
    zone: "us-central1-a",
    bootDisk: {
        initializeParams: {
            image: debianImage.then(debianImage => debianImage.selfLink),
        },
    },
    networkInterfaces: [{
        network: "default",
        accessConfigs: [{
            natIp: static.address,
        }],
    }],
});
resources:
  static:
    type: gcp:compute:Address
  instanceWithIp:
    type: gcp:compute:Instance
    properties:
      machineType: f1-micro
      zone: us-central1-a
      bootDisk:
        initializeParams:
          image: ${debianImage.selfLink}
      networkInterfaces:
        - network: default
          accessConfigs:
            - natIp: ${static.address}
variables:
  debianImage:
    fn::invoke:
      Function: gcp:compute:getImage
      Arguments:
        family: debian-11
        project: debian-cloud

Compute Address Ipsec Interconnect

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var network = new Gcp.Compute.Network("network", new()
    {
        AutoCreateSubnetworks = false,
    });

    var ipsec_interconnect_address = new Gcp.Compute.Address("ipsec-interconnect-address", new()
    {
        AddressType = "INTERNAL",
        Purpose = "IPSEC_INTERCONNECT",
        IPAddress = "192.168.1.0",
        PrefixLength = 29,
        Network = network.SelfLink,
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
			AutoCreateSubnetworks: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		_, err = compute.NewAddress(ctx, "ipsec-interconnect-address", &compute.AddressArgs{
			AddressType:  pulumi.String("INTERNAL"),
			Purpose:      pulumi.String("IPSEC_INTERCONNECT"),
			Address:      pulumi.String("192.168.1.0"),
			PrefixLength: pulumi.Int(29),
			Network:      network.SelfLink,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Address;
import com.pulumi.gcp.compute.AddressArgs;
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 network = new Network("network", NetworkArgs.builder()        
            .autoCreateSubnetworks(false)
            .build());

        var ipsec_interconnect_address = new Address("ipsec-interconnect-address", AddressArgs.builder()        
            .addressType("INTERNAL")
            .purpose("IPSEC_INTERCONNECT")
            .address("192.168.1.0")
            .prefixLength(29)
            .network(network.selfLink())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

network = gcp.compute.Network("network", auto_create_subnetworks=False)
ipsec_interconnect_address = gcp.compute.Address("ipsec-interconnect-address",
    address_type="INTERNAL",
    purpose="IPSEC_INTERCONNECT",
    address="192.168.1.0",
    prefix_length=29,
    network=network.self_link)
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const network = new gcp.compute.Network("network", {autoCreateSubnetworks: false});
const ipsec_interconnect_address = new gcp.compute.Address("ipsec-interconnect-address", {
    addressType: "INTERNAL",
    purpose: "IPSEC_INTERCONNECT",
    address: "192.168.1.0",
    prefixLength: 29,
    network: network.selfLink,
});
resources:
  ipsec-interconnect-address:
    type: gcp:compute:Address
    properties:
      addressType: INTERNAL
      purpose: IPSEC_INTERCONNECT
      address: 192.168.1.0
      prefixLength: 29
      network: ${network.selfLink}
  network:
    type: gcp:compute:Network
    properties:
      autoCreateSubnetworks: false

Create Address Resource

new Address(name: string, args?: AddressArgs, opts?: CustomResourceOptions);
@overload
def Address(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            address: Optional[str] = None,
            address_type: Optional[str] = None,
            description: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            network: Optional[str] = None,
            network_tier: Optional[str] = None,
            prefix_length: Optional[int] = None,
            project: Optional[str] = None,
            purpose: Optional[str] = None,
            region: Optional[str] = None,
            subnetwork: Optional[str] = None)
@overload
def Address(resource_name: str,
            args: Optional[AddressArgs] = None,
            opts: Optional[ResourceOptions] = None)
func NewAddress(ctx *Context, name string, args *AddressArgs, opts ...ResourceOption) (*Address, error)
public Address(string name, AddressArgs? args = null, CustomResourceOptions? opts = null)
public Address(String name, AddressArgs args)
public Address(String name, AddressArgs args, CustomResourceOptions options)
type: gcp:compute:Address
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AddressArgs
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 AddressArgs
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 AddressArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AddressArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AddressArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Address Resource Properties

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

Inputs

The Address resource accepts the following input properties:

AddressType string

The type of address to reserve. Note: if you set this argument's value as INTERNAL you need to leave the network_tier argument unset in that resource block. Default value is EXTERNAL. Possible values are: INTERNAL, EXTERNAL.

Description string

An optional description of this resource.

IPAddress string

The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. Set by the API if undefined.

Labels Dictionary<string, string>

Labels to apply to this address. A list of key->value pairs.

Name string

Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Network string

The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING and IPSEC_INTERCONNECT purposes.

NetworkTier string

The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. This argument should not be used when configuring Internal addresses, because network tier cannot be set for internal traffic; it's always Premium. Possible values are: PREMIUM, STANDARD.

PrefixLength int

The prefix length if the resource represents an IP range.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Purpose string

The purpose of this resource, which can be one of the following values.

  • GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources.
  • SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers.
  • VPC_PEERING for addresses that are reserved for VPC peer networks.
  • IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an HA VPN over Cloud Interconnect configuration. These addresses are regional resources.
  • PRIVATE_SERVICE_CONNECT for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
Region string

The Region in which the created address should reside. If it is not provided, the provider region is used.

Subnetwork string

The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.

Address string

The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. Set by the API if undefined.

AddressType string

The type of address to reserve. Note: if you set this argument's value as INTERNAL you need to leave the network_tier argument unset in that resource block. Default value is EXTERNAL. Possible values are: INTERNAL, EXTERNAL.

Description string

An optional description of this resource.

Labels map[string]string

Labels to apply to this address. A list of key->value pairs.

Name string

Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Network string

The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING and IPSEC_INTERCONNECT purposes.

NetworkTier string

The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. This argument should not be used when configuring Internal addresses, because network tier cannot be set for internal traffic; it's always Premium. Possible values are: PREMIUM, STANDARD.

PrefixLength int

The prefix length if the resource represents an IP range.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Purpose string

The purpose of this resource, which can be one of the following values.

  • GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources.
  • SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers.
  • VPC_PEERING for addresses that are reserved for VPC peer networks.
  • IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an HA VPN over Cloud Interconnect configuration. These addresses are regional resources.
  • PRIVATE_SERVICE_CONNECT for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
Region string

The Region in which the created address should reside. If it is not provided, the provider region is used.

Subnetwork string

The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.

address String

The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. Set by the API if undefined.

addressType String

The type of address to reserve. Note: if you set this argument's value as INTERNAL you need to leave the network_tier argument unset in that resource block. Default value is EXTERNAL. Possible values are: INTERNAL, EXTERNAL.

description String

An optional description of this resource.

labels Map<String,String>

Labels to apply to this address. A list of key->value pairs.

name String

Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

network String

The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING and IPSEC_INTERCONNECT purposes.

networkTier String

The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. This argument should not be used when configuring Internal addresses, because network tier cannot be set for internal traffic; it's always Premium. Possible values are: PREMIUM, STANDARD.

prefixLength Integer

The prefix length if the resource represents an IP range.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

purpose String

The purpose of this resource, which can be one of the following values.

  • GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources.
  • SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers.
  • VPC_PEERING for addresses that are reserved for VPC peer networks.
  • IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an HA VPN over Cloud Interconnect configuration. These addresses are regional resources.
  • PRIVATE_SERVICE_CONNECT for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
region String

The Region in which the created address should reside. If it is not provided, the provider region is used.

subnetwork String

The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.

address string

The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. Set by the API if undefined.

addressType string

The type of address to reserve. Note: if you set this argument's value as INTERNAL you need to leave the network_tier argument unset in that resource block. Default value is EXTERNAL. Possible values are: INTERNAL, EXTERNAL.

description string

An optional description of this resource.

labels {[key: string]: string}

Labels to apply to this address. A list of key->value pairs.

name string

Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

network string

The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING and IPSEC_INTERCONNECT purposes.

networkTier string

The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. This argument should not be used when configuring Internal addresses, because network tier cannot be set for internal traffic; it's always Premium. Possible values are: PREMIUM, STANDARD.

prefixLength number

The prefix length if the resource represents an IP range.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

purpose string

The purpose of this resource, which can be one of the following values.

  • GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources.
  • SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers.
  • VPC_PEERING for addresses that are reserved for VPC peer networks.
  • IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an HA VPN over Cloud Interconnect configuration. These addresses are regional resources.
  • PRIVATE_SERVICE_CONNECT for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
region string

The Region in which the created address should reside. If it is not provided, the provider region is used.

subnetwork string

The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.

address str

The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. Set by the API if undefined.

address_type str

The type of address to reserve. Note: if you set this argument's value as INTERNAL you need to leave the network_tier argument unset in that resource block. Default value is EXTERNAL. Possible values are: INTERNAL, EXTERNAL.

description str

An optional description of this resource.

labels Mapping[str, str]

Labels to apply to this address. A list of key->value pairs.

name str

Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

network str

The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING and IPSEC_INTERCONNECT purposes.

network_tier str

The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. This argument should not be used when configuring Internal addresses, because network tier cannot be set for internal traffic; it's always Premium. Possible values are: PREMIUM, STANDARD.

prefix_length int

The prefix length if the resource represents an IP range.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

purpose str

The purpose of this resource, which can be one of the following values.

  • GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources.
  • SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers.
  • VPC_PEERING for addresses that are reserved for VPC peer networks.
  • IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an HA VPN over Cloud Interconnect configuration. These addresses are regional resources.
  • PRIVATE_SERVICE_CONNECT for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
region str

The Region in which the created address should reside. If it is not provided, the provider region is used.

subnetwork str

The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.

address String

The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. Set by the API if undefined.

addressType String

The type of address to reserve. Note: if you set this argument's value as INTERNAL you need to leave the network_tier argument unset in that resource block. Default value is EXTERNAL. Possible values are: INTERNAL, EXTERNAL.

description String

An optional description of this resource.

labels Map<String>

Labels to apply to this address. A list of key->value pairs.

name String

Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

network String

The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING and IPSEC_INTERCONNECT purposes.

networkTier String

The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. This argument should not be used when configuring Internal addresses, because network tier cannot be set for internal traffic; it's always Premium. Possible values are: PREMIUM, STANDARD.

prefixLength Number

The prefix length if the resource represents an IP range.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

purpose String

The purpose of this resource, which can be one of the following values.

  • GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources.
  • SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers.
  • VPC_PEERING for addresses that are reserved for VPC peer networks.
  • IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an HA VPN over Cloud Interconnect configuration. These addresses are regional resources.
  • PRIVATE_SERVICE_CONNECT for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
region String

The Region in which the created address should reside. If it is not provided, the provider region is used.

subnetwork String

The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.

Outputs

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

CreationTimestamp string

Creation timestamp in RFC3339 text format.

Id string

The provider-assigned unique ID for this managed resource.

LabelFingerprint string

The fingerprint used for optimistic locking of this resource. Used internally during updates.

SelfLink string

The URI of the created resource.

Users List<string>

The URLs of the resources that are using this address.

CreationTimestamp string

Creation timestamp in RFC3339 text format.

Id string

The provider-assigned unique ID for this managed resource.

LabelFingerprint string

The fingerprint used for optimistic locking of this resource. Used internally during updates.

SelfLink string

The URI of the created resource.

Users []string

The URLs of the resources that are using this address.

creationTimestamp String

Creation timestamp in RFC3339 text format.

id String

The provider-assigned unique ID for this managed resource.

labelFingerprint String

The fingerprint used for optimistic locking of this resource. Used internally during updates.

selfLink String

The URI of the created resource.

users List<String>

The URLs of the resources that are using this address.

creationTimestamp string

Creation timestamp in RFC3339 text format.

id string

The provider-assigned unique ID for this managed resource.

labelFingerprint string

The fingerprint used for optimistic locking of this resource. Used internally during updates.

selfLink string

The URI of the created resource.

users string[]

The URLs of the resources that are using this address.

creation_timestamp str

Creation timestamp in RFC3339 text format.

id str

The provider-assigned unique ID for this managed resource.

label_fingerprint str

The fingerprint used for optimistic locking of this resource. Used internally during updates.

self_link str

The URI of the created resource.

users Sequence[str]

The URLs of the resources that are using this address.

creationTimestamp String

Creation timestamp in RFC3339 text format.

id String

The provider-assigned unique ID for this managed resource.

labelFingerprint String

The fingerprint used for optimistic locking of this resource. Used internally during updates.

selfLink String

The URI of the created resource.

users List<String>

The URLs of the resources that are using this address.

Look up Existing Address Resource

Get an existing Address 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?: AddressState, opts?: CustomResourceOptions): Address
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        address: Optional[str] = None,
        address_type: Optional[str] = None,
        creation_timestamp: Optional[str] = None,
        description: Optional[str] = None,
        label_fingerprint: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        network: Optional[str] = None,
        network_tier: Optional[str] = None,
        prefix_length: Optional[int] = None,
        project: Optional[str] = None,
        purpose: Optional[str] = None,
        region: Optional[str] = None,
        self_link: Optional[str] = None,
        subnetwork: Optional[str] = None,
        users: Optional[Sequence[str]] = None) -> Address
func GetAddress(ctx *Context, name string, id IDInput, state *AddressState, opts ...ResourceOption) (*Address, error)
public static Address Get(string name, Input<string> id, AddressState? state, CustomResourceOptions? opts = null)
public static Address get(String name, Output<String> id, AddressState 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:
AddressType string

The type of address to reserve. Note: if you set this argument's value as INTERNAL you need to leave the network_tier argument unset in that resource block. Default value is EXTERNAL. Possible values are: INTERNAL, EXTERNAL.

CreationTimestamp string

Creation timestamp in RFC3339 text format.

Description string

An optional description of this resource.

IPAddress string

The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. Set by the API if undefined.

LabelFingerprint string

The fingerprint used for optimistic locking of this resource. Used internally during updates.

Labels Dictionary<string, string>

Labels to apply to this address. A list of key->value pairs.

Name string

Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Network string

The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING and IPSEC_INTERCONNECT purposes.

NetworkTier string

The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. This argument should not be used when configuring Internal addresses, because network tier cannot be set for internal traffic; it's always Premium. Possible values are: PREMIUM, STANDARD.

PrefixLength int

The prefix length if the resource represents an IP range.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Purpose string

The purpose of this resource, which can be one of the following values.

  • GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources.
  • SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers.
  • VPC_PEERING for addresses that are reserved for VPC peer networks.
  • IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an HA VPN over Cloud Interconnect configuration. These addresses are regional resources.
  • PRIVATE_SERVICE_CONNECT for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
Region string

The Region in which the created address should reside. If it is not provided, the provider region is used.

SelfLink string

The URI of the created resource.

Subnetwork string

The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.

Users List<string>

The URLs of the resources that are using this address.

Address string

The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. Set by the API if undefined.

AddressType string

The type of address to reserve. Note: if you set this argument's value as INTERNAL you need to leave the network_tier argument unset in that resource block. Default value is EXTERNAL. Possible values are: INTERNAL, EXTERNAL.

CreationTimestamp string

Creation timestamp in RFC3339 text format.

Description string

An optional description of this resource.

LabelFingerprint string

The fingerprint used for optimistic locking of this resource. Used internally during updates.

Labels map[string]string

Labels to apply to this address. A list of key->value pairs.

Name string

Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Network string

The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING and IPSEC_INTERCONNECT purposes.

NetworkTier string

The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. This argument should not be used when configuring Internal addresses, because network tier cannot be set for internal traffic; it's always Premium. Possible values are: PREMIUM, STANDARD.

PrefixLength int

The prefix length if the resource represents an IP range.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Purpose string

The purpose of this resource, which can be one of the following values.

  • GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources.
  • SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers.
  • VPC_PEERING for addresses that are reserved for VPC peer networks.
  • IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an HA VPN over Cloud Interconnect configuration. These addresses are regional resources.
  • PRIVATE_SERVICE_CONNECT for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
Region string

The Region in which the created address should reside. If it is not provided, the provider region is used.

SelfLink string

The URI of the created resource.

Subnetwork string

The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.

Users []string

The URLs of the resources that are using this address.

address String

The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. Set by the API if undefined.

addressType String

The type of address to reserve. Note: if you set this argument's value as INTERNAL you need to leave the network_tier argument unset in that resource block. Default value is EXTERNAL. Possible values are: INTERNAL, EXTERNAL.

creationTimestamp String

Creation timestamp in RFC3339 text format.

description String

An optional description of this resource.

labelFingerprint String

The fingerprint used for optimistic locking of this resource. Used internally during updates.

labels Map<String,String>

Labels to apply to this address. A list of key->value pairs.

name String

Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

network String

The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING and IPSEC_INTERCONNECT purposes.

networkTier String

The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. This argument should not be used when configuring Internal addresses, because network tier cannot be set for internal traffic; it's always Premium. Possible values are: PREMIUM, STANDARD.

prefixLength Integer

The prefix length if the resource represents an IP range.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

purpose String

The purpose of this resource, which can be one of the following values.

  • GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources.
  • SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers.
  • VPC_PEERING for addresses that are reserved for VPC peer networks.
  • IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an HA VPN over Cloud Interconnect configuration. These addresses are regional resources.
  • PRIVATE_SERVICE_CONNECT for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
region String

The Region in which the created address should reside. If it is not provided, the provider region is used.

selfLink String

The URI of the created resource.

subnetwork String

The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.

users List<String>

The URLs of the resources that are using this address.

address string

The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. Set by the API if undefined.

addressType string

The type of address to reserve. Note: if you set this argument's value as INTERNAL you need to leave the network_tier argument unset in that resource block. Default value is EXTERNAL. Possible values are: INTERNAL, EXTERNAL.

creationTimestamp string

Creation timestamp in RFC3339 text format.

description string

An optional description of this resource.

labelFingerprint string

The fingerprint used for optimistic locking of this resource. Used internally during updates.

labels {[key: string]: string}

Labels to apply to this address. A list of key->value pairs.

name string

Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

network string

The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING and IPSEC_INTERCONNECT purposes.

networkTier string

The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. This argument should not be used when configuring Internal addresses, because network tier cannot be set for internal traffic; it's always Premium. Possible values are: PREMIUM, STANDARD.

prefixLength number

The prefix length if the resource represents an IP range.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

purpose string

The purpose of this resource, which can be one of the following values.

  • GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources.
  • SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers.
  • VPC_PEERING for addresses that are reserved for VPC peer networks.
  • IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an HA VPN over Cloud Interconnect configuration. These addresses are regional resources.
  • PRIVATE_SERVICE_CONNECT for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
region string

The Region in which the created address should reside. If it is not provided, the provider region is used.

selfLink string

The URI of the created resource.

subnetwork string

The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.

users string[]

The URLs of the resources that are using this address.

address str

The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. Set by the API if undefined.

address_type str

The type of address to reserve. Note: if you set this argument's value as INTERNAL you need to leave the network_tier argument unset in that resource block. Default value is EXTERNAL. Possible values are: INTERNAL, EXTERNAL.

creation_timestamp str

Creation timestamp in RFC3339 text format.

description str

An optional description of this resource.

label_fingerprint str

The fingerprint used for optimistic locking of this resource. Used internally during updates.

labels Mapping[str, str]

Labels to apply to this address. A list of key->value pairs.

name str

Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

network str

The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING and IPSEC_INTERCONNECT purposes.

network_tier str

The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. This argument should not be used when configuring Internal addresses, because network tier cannot be set for internal traffic; it's always Premium. Possible values are: PREMIUM, STANDARD.

prefix_length int

The prefix length if the resource represents an IP range.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

purpose str

The purpose of this resource, which can be one of the following values.

  • GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources.
  • SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers.
  • VPC_PEERING for addresses that are reserved for VPC peer networks.
  • IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an HA VPN over Cloud Interconnect configuration. These addresses are regional resources.
  • PRIVATE_SERVICE_CONNECT for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
region str

The Region in which the created address should reside. If it is not provided, the provider region is used.

self_link str

The URI of the created resource.

subnetwork str

The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.

users Sequence[str]

The URLs of the resources that are using this address.

address String

The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. Set by the API if undefined.

addressType String

The type of address to reserve. Note: if you set this argument's value as INTERNAL you need to leave the network_tier argument unset in that resource block. Default value is EXTERNAL. Possible values are: INTERNAL, EXTERNAL.

creationTimestamp String

Creation timestamp in RFC3339 text format.

description String

An optional description of this resource.

labelFingerprint String

The fingerprint used for optimistic locking of this resource. Used internally during updates.

labels Map<String>

Labels to apply to this address. A list of key->value pairs.

name String

Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

network String

The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING and IPSEC_INTERCONNECT purposes.

networkTier String

The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. This argument should not be used when configuring Internal addresses, because network tier cannot be set for internal traffic; it's always Premium. Possible values are: PREMIUM, STANDARD.

prefixLength Number

The prefix length if the resource represents an IP range.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

purpose String

The purpose of this resource, which can be one of the following values.

  • GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources.
  • SHARED_LOADBALANCER_VIP for an address that can be used by multiple internal load balancers.
  • VPC_PEERING for addresses that are reserved for VPC peer networks.
  • IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an HA VPN over Cloud Interconnect configuration. These addresses are regional resources.
  • PRIVATE_SERVICE_CONNECT for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.
region String

The Region in which the created address should reside. If it is not provided, the provider region is used.

selfLink String

The URI of the created resource.

subnetwork String

The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.

users List<String>

The URLs of the resources that are using this address.

Import

Address can be imported using any of these accepted formats

 $ pulumi import gcp:compute/address:Address default projects/{{project}}/regions/{{region}}/addresses/{{name}}
 $ pulumi import gcp:compute/address:Address default {{project}}/{{region}}/{{name}}
 $ pulumi import gcp:compute/address:Address default {{region}}/{{name}}
 $ pulumi import gcp:compute/address:Address default {{name}}

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.