1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. PublicAdvertisedPrefix
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

gcp.compute.PublicAdvertisedPrefix

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

    Represents a PublicAdvertisedPrefix for use with bring your own IP addresses (BYOIP).

    To get more information about PublicAdvertisedPrefix, see:

    Example Usage

    Public Advertised Prefixes Basic

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var prefixes = new Gcp.Compute.PublicAdvertisedPrefix("prefixes", new()
        {
            Description = "description",
            DnsVerificationIp = "127.127.0.0",
            IpCidrRange = "127.127.0.0/16",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewPublicAdvertisedPrefix(ctx, "prefixes", &compute.PublicAdvertisedPrefixArgs{
    			Description:       pulumi.String("description"),
    			DnsVerificationIp: pulumi.String("127.127.0.0"),
    			IpCidrRange:       pulumi.String("127.127.0.0/16"),
    		})
    		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.PublicAdvertisedPrefix;
    import com.pulumi.gcp.compute.PublicAdvertisedPrefixArgs;
    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 prefixes = new PublicAdvertisedPrefix("prefixes", PublicAdvertisedPrefixArgs.builder()        
                .description("description")
                .dnsVerificationIp("127.127.0.0")
                .ipCidrRange("127.127.0.0/16")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    prefixes = gcp.compute.PublicAdvertisedPrefix("prefixes",
        description="description",
        dns_verification_ip="127.127.0.0",
        ip_cidr_range="127.127.0.0/16")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const prefixes = new gcp.compute.PublicAdvertisedPrefix("prefixes", {
        description: "description",
        dnsVerificationIp: "127.127.0.0",
        ipCidrRange: "127.127.0.0/16",
    });
    
    resources:
      prefixes:
        type: gcp:compute:PublicAdvertisedPrefix
        properties:
          description: description
          dnsVerificationIp: 127.127.0.0
          ipCidrRange: 127.127.0.0/16
    

    Create PublicAdvertisedPrefix Resource

    new PublicAdvertisedPrefix(name: string, args: PublicAdvertisedPrefixArgs, opts?: CustomResourceOptions);
    @overload
    def PublicAdvertisedPrefix(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               description: Optional[str] = None,
                               dns_verification_ip: Optional[str] = None,
                               ip_cidr_range: Optional[str] = None,
                               name: Optional[str] = None,
                               project: Optional[str] = None)
    @overload
    def PublicAdvertisedPrefix(resource_name: str,
                               args: PublicAdvertisedPrefixArgs,
                               opts: Optional[ResourceOptions] = None)
    func NewPublicAdvertisedPrefix(ctx *Context, name string, args PublicAdvertisedPrefixArgs, opts ...ResourceOption) (*PublicAdvertisedPrefix, error)
    public PublicAdvertisedPrefix(string name, PublicAdvertisedPrefixArgs args, CustomResourceOptions? opts = null)
    public PublicAdvertisedPrefix(String name, PublicAdvertisedPrefixArgs args)
    public PublicAdvertisedPrefix(String name, PublicAdvertisedPrefixArgs args, CustomResourceOptions options)
    
    type: gcp:compute:PublicAdvertisedPrefix
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args PublicAdvertisedPrefixArgs
    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 PublicAdvertisedPrefixArgs
    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 PublicAdvertisedPrefixArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PublicAdvertisedPrefixArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PublicAdvertisedPrefixArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    PublicAdvertisedPrefix 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 PublicAdvertisedPrefix resource accepts the following input properties:

    DnsVerificationIp string

    The IPv4 address to be used for reverse DNS verification.

    IpCidrRange string

    The IPv4 address range, in CIDR format, represented by this public advertised prefix.


    Description string

    An optional description of this resource.

    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.

    Project string

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

    DnsVerificationIp string

    The IPv4 address to be used for reverse DNS verification.

    IpCidrRange string

    The IPv4 address range, in CIDR format, represented by this public advertised prefix.


    Description string

    An optional description of this resource.

    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.

    Project string

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

    dnsVerificationIp String

    The IPv4 address to be used for reverse DNS verification.

    ipCidrRange String

    The IPv4 address range, in CIDR format, represented by this public advertised prefix.


    description String

    An optional description of this resource.

    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.

    project String

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

    dnsVerificationIp string

    The IPv4 address to be used for reverse DNS verification.

    ipCidrRange string

    The IPv4 address range, in CIDR format, represented by this public advertised prefix.


    description string

    An optional description of this resource.

    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.

    project string

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

    dns_verification_ip str

    The IPv4 address to be used for reverse DNS verification.

    ip_cidr_range str

    The IPv4 address range, in CIDR format, represented by this public advertised prefix.


    description str

    An optional description of this resource.

    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.

    project str

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

    dnsVerificationIp String

    The IPv4 address to be used for reverse DNS verification.

    ipCidrRange String

    The IPv4 address range, in CIDR format, represented by this public advertised prefix.


    description String

    An optional description of this resource.

    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.

    project String

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

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    SelfLink string

    The URI of the created resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    SelfLink string

    The URI of the created resource.

    id String

    The provider-assigned unique ID for this managed resource.

    selfLink String

    The URI of the created resource.

    id string

    The provider-assigned unique ID for this managed resource.

    selfLink string

    The URI of the created resource.

    id str

    The provider-assigned unique ID for this managed resource.

    self_link str

    The URI of the created resource.

    id String

    The provider-assigned unique ID for this managed resource.

    selfLink String

    The URI of the created resource.

    Look up Existing PublicAdvertisedPrefix Resource

    Get an existing PublicAdvertisedPrefix 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?: PublicAdvertisedPrefixState, opts?: CustomResourceOptions): PublicAdvertisedPrefix
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            dns_verification_ip: Optional[str] = None,
            ip_cidr_range: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            self_link: Optional[str] = None) -> PublicAdvertisedPrefix
    func GetPublicAdvertisedPrefix(ctx *Context, name string, id IDInput, state *PublicAdvertisedPrefixState, opts ...ResourceOption) (*PublicAdvertisedPrefix, error)
    public static PublicAdvertisedPrefix Get(string name, Input<string> id, PublicAdvertisedPrefixState? state, CustomResourceOptions? opts = null)
    public static PublicAdvertisedPrefix get(String name, Output<String> id, PublicAdvertisedPrefixState 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:
    Description string

    An optional description of this resource.

    DnsVerificationIp string

    The IPv4 address to be used for reverse DNS verification.

    IpCidrRange string

    The IPv4 address range, in CIDR format, represented by this public advertised prefix.


    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.

    Project string

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

    SelfLink string

    The URI of the created resource.

    Description string

    An optional description of this resource.

    DnsVerificationIp string

    The IPv4 address to be used for reverse DNS verification.

    IpCidrRange string

    The IPv4 address range, in CIDR format, represented by this public advertised prefix.


    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.

    Project string

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

    SelfLink string

    The URI of the created resource.

    description String

    An optional description of this resource.

    dnsVerificationIp String

    The IPv4 address to be used for reverse DNS verification.

    ipCidrRange String

    The IPv4 address range, in CIDR format, represented by this public advertised prefix.


    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.

    project String

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

    selfLink String

    The URI of the created resource.

    description string

    An optional description of this resource.

    dnsVerificationIp string

    The IPv4 address to be used for reverse DNS verification.

    ipCidrRange string

    The IPv4 address range, in CIDR format, represented by this public advertised prefix.


    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.

    project string

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

    selfLink string

    The URI of the created resource.

    description str

    An optional description of this resource.

    dns_verification_ip str

    The IPv4 address to be used for reverse DNS verification.

    ip_cidr_range str

    The IPv4 address range, in CIDR format, represented by this public advertised prefix.


    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.

    project str

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

    self_link str

    The URI of the created resource.

    description String

    An optional description of this resource.

    dnsVerificationIp String

    The IPv4 address to be used for reverse DNS verification.

    ipCidrRange String

    The IPv4 address range, in CIDR format, represented by this public advertised prefix.


    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.

    project String

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

    selfLink String

    The URI of the created resource.

    Import

    PublicAdvertisedPrefix can be imported using any of these accepted formats* projects/{{project}}/global/publicAdvertisedPrefixes/{{name}} * {{project}}/{{name}} * {{name}} In Terraform v1.5.0 and later, use an import block to import PublicAdvertisedPrefix using one of the formats above. For exampletf import {

    id = “projects/{{project}}/global/publicAdvertisedPrefixes/{{name}}”

    to = google_compute_public_advertised_prefix.default }

     $ pulumi import gcp:compute/publicAdvertisedPrefix:PublicAdvertisedPrefix When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), PublicAdvertisedPrefix can be imported using one of the formats above. For example
    
     $ pulumi import gcp:compute/publicAdvertisedPrefix:PublicAdvertisedPrefix default projects/{{project}}/global/publicAdvertisedPrefixes/{{name}}
    
     $ pulumi import gcp:compute/publicAdvertisedPrefix:PublicAdvertisedPrefix default {{project}}/{{name}}
    
     $ pulumi import gcp:compute/publicAdvertisedPrefix:PublicAdvertisedPrefix 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.

    gcp logo
    Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi