pulumi_wasm_providers_gcp_mini::compute

Module public_delegated_prefix

source
Expand description

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

To get more information about PublicDelegatedPrefix, see:

§Example Usage

§Public Delegated Prefixes Basic

use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
    let advertised = public_advertised_prefix::create(
        "advertised",
        PublicAdvertisedPrefixArgs::builder()
            .description("description")
            .dns_verification_ip("127.127.0.0")
            .ip_cidr_range("127.127.0.0/16")
            .name("my-prefix")
            .build_struct(),
    );
    let prefixes = public_delegated_prefix::create(
        "prefixes",
        PublicDelegatedPrefixArgs::builder()
            .description("my description")
            .ip_cidr_range("127.127.0.0/24")
            .name("my-prefix")
            .parent_prefix("${advertised.id}")
            .region("us-central1")
            .build_struct(),
    );
}

§Import

PublicDelegatedPrefix can be imported using any of these accepted formats:

  • projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes/{{name}}

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

  • {{region}}/{{name}}

  • {{name}}

When using the pulumi import command, PublicDelegatedPrefix can be imported using one of the formats above. For example:

$ pulumi import gcp:compute/publicDelegatedPrefix:PublicDelegatedPrefix default projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes/{{name}}
$ pulumi import gcp:compute/publicDelegatedPrefix:PublicDelegatedPrefix default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/publicDelegatedPrefix:PublicDelegatedPrefix default {{region}}/{{name}}
$ pulumi import gcp:compute/publicDelegatedPrefix:PublicDelegatedPrefix default {{name}}

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments