1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. PublicAdvertisedPrefix
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi

gcp.compute.PublicAdvertisedPrefix

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 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

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const prefixes = new gcp.compute.PublicAdvertisedPrefix("prefixes", {
        name: "my-prefix",
        description: "description",
        dnsVerificationIp: "127.127.0.0",
        ipCidrRange: "127.127.0.0/16",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    prefixes = gcp.compute.PublicAdvertisedPrefix("prefixes",
        name="my-prefix",
        description="description",
        dns_verification_ip="127.127.0.0",
        ip_cidr_range="127.127.0.0/16")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/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{
    			Name:              pulumi.String("my-prefix"),
    			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
    	})
    }
    
    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()
        {
            Name = "my-prefix",
            Description = "description",
            DnsVerificationIp = "127.127.0.0",
            IpCidrRange = "127.127.0.0/16",
        });
    
    });
    
    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()
                .name("my-prefix")
                .description("description")
                .dnsVerificationIp("127.127.0.0")
                .ipCidrRange("127.127.0.0/16")
                .build());
    
        }
    }
    
    resources:
      prefixes:
        type: gcp:compute:PublicAdvertisedPrefix
        properties:
          name: my-prefix
          description: description
          dnsVerificationIp: 127.127.0.0
          ipCidrRange: 127.127.0.0/16
    

    Create PublicAdvertisedPrefix Resource

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

    Constructor syntax

    new PublicAdvertisedPrefix(name: string, args: PublicAdvertisedPrefixArgs, opts?: CustomResourceOptions);
    @overload
    def PublicAdvertisedPrefix(resource_name: str,
                               args: PublicAdvertisedPrefixArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def PublicAdvertisedPrefix(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               dns_verification_ip: Optional[str] = None,
                               ip_cidr_range: Optional[str] = None,
                               description: Optional[str] = None,
                               name: Optional[str] = None,
                               project: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

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

    var publicAdvertisedPrefixResource = new Gcp.Compute.PublicAdvertisedPrefix("publicAdvertisedPrefixResource", new()
    {
        DnsVerificationIp = "string",
        IpCidrRange = "string",
        Description = "string",
        Name = "string",
        Project = "string",
    });
    
    example, err := compute.NewPublicAdvertisedPrefix(ctx, "publicAdvertisedPrefixResource", &compute.PublicAdvertisedPrefixArgs{
    	DnsVerificationIp: pulumi.String("string"),
    	IpCidrRange:       pulumi.String("string"),
    	Description:       pulumi.String("string"),
    	Name:              pulumi.String("string"),
    	Project:           pulumi.String("string"),
    })
    
    var publicAdvertisedPrefixResource = new PublicAdvertisedPrefix("publicAdvertisedPrefixResource", PublicAdvertisedPrefixArgs.builder()
        .dnsVerificationIp("string")
        .ipCidrRange("string")
        .description("string")
        .name("string")
        .project("string")
        .build());
    
    public_advertised_prefix_resource = gcp.compute.PublicAdvertisedPrefix("publicAdvertisedPrefixResource",
        dns_verification_ip="string",
        ip_cidr_range="string",
        description="string",
        name="string",
        project="string")
    
    const publicAdvertisedPrefixResource = new gcp.compute.PublicAdvertisedPrefix("publicAdvertisedPrefixResource", {
        dnsVerificationIp: "string",
        ipCidrRange: "string",
        description: "string",
        name: "string",
        project: "string",
    });
    
    type: gcp:compute:PublicAdvertisedPrefix
    properties:
        description: string
        dnsVerificationIp: string
        ipCidrRange: string
        name: string
        project: string
    

    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.
    SharedSecret string
    Output Only. The shared secret to be used for reverse DNS verification.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    The URI of the created resource.
    SharedSecret string
    Output Only. The shared secret to be used for reverse DNS verification.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.
    sharedSecret String
    Output Only. The shared secret to be used for reverse DNS verification.
    id string
    The provider-assigned unique ID for this managed resource.
    selfLink string
    The URI of the created resource.
    sharedSecret string
    Output Only. The shared secret to be used for reverse DNS verification.
    id str
    The provider-assigned unique ID for this managed resource.
    self_link str
    The URI of the created resource.
    shared_secret str
    Output Only. The shared secret to be used for reverse DNS verification.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.
    sharedSecret String
    Output Only. The shared secret to be used for reverse DNS verification.

    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,
            shared_secret: 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.
    SharedSecret string
    Output Only. The shared secret to be used for reverse DNS verification.
    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.
    SharedSecret string
    Output Only. The shared secret to be used for reverse DNS verification.
    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.
    sharedSecret String
    Output Only. The shared secret to be used for reverse DNS verification.
    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.
    sharedSecret string
    Output Only. The shared secret to be used for reverse DNS verification.
    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.
    shared_secret str
    Output Only. The shared secret to be used for reverse DNS verification.
    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.
    sharedSecret String
    Output Only. The shared secret to be used for reverse DNS verification.

    Import

    PublicAdvertisedPrefix can be imported using any of these accepted formats:

    • projects/{{project}}/global/publicAdvertisedPrefixes/{{name}}

    • {{project}}/{{name}}

    • {{name}}

    When using the pulumi import command, 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}}
    

    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.3.1 published on Wednesday, Sep 25, 2024 by Pulumi