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

gcp.servicenetworking.PeeredDnsDomain

Explore with Pulumi AI

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

    Allows management of a single peered DNS domain for an existing Google Cloud Platform project.

    When using Google Cloud DNS to manage internal DNS, create peered DNS domains to make your DNS available to services like Google Cloud Build.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const name = new gcp.servicenetworking.PeeredDnsDomain("name", {
        project: "10000000",
        name: "example-com",
        network: "default",
        dnsSuffix: "example.com.",
        service: "peering-service",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    name = gcp.servicenetworking.PeeredDnsDomain("name",
        project="10000000",
        name="example-com",
        network="default",
        dns_suffix="example.com.",
        service="peering-service")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/servicenetworking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := servicenetworking.NewPeeredDnsDomain(ctx, "name", &servicenetworking.PeeredDnsDomainArgs{
    			Project:   pulumi.String("10000000"),
    			Name:      pulumi.String("example-com"),
    			Network:   pulumi.String("default"),
    			DnsSuffix: pulumi.String("example.com."),
    			Service:   pulumi.String("peering-service"),
    		})
    		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 name = new Gcp.ServiceNetworking.PeeredDnsDomain("name", new()
        {
            Project = "10000000",
            Name = "example-com",
            Network = "default",
            DnsSuffix = "example.com.",
            Service = "peering-service",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.servicenetworking.PeeredDnsDomain;
    import com.pulumi.gcp.servicenetworking.PeeredDnsDomainArgs;
    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 name = new PeeredDnsDomain("name", PeeredDnsDomainArgs.builder()
                .project(10000000)
                .name("example-com")
                .network("default")
                .dnsSuffix("example.com.")
                .service("peering-service")
                .build());
    
        }
    }
    
    resources:
      name:
        type: gcp:servicenetworking:PeeredDnsDomain
        properties:
          project: 1e+07
          name: example-com
          network: default
          dnsSuffix: example.com.
          service: peering-service
    

    Create PeeredDnsDomain Resource

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

    Constructor syntax

    new PeeredDnsDomain(name: string, args: PeeredDnsDomainArgs, opts?: CustomResourceOptions);
    @overload
    def PeeredDnsDomain(resource_name: str,
                        args: PeeredDnsDomainArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def PeeredDnsDomain(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        dns_suffix: Optional[str] = None,
                        network: Optional[str] = None,
                        name: Optional[str] = None,
                        project: Optional[str] = None,
                        service: Optional[str] = None)
    func NewPeeredDnsDomain(ctx *Context, name string, args PeeredDnsDomainArgs, opts ...ResourceOption) (*PeeredDnsDomain, error)
    public PeeredDnsDomain(string name, PeeredDnsDomainArgs args, CustomResourceOptions? opts = null)
    public PeeredDnsDomain(String name, PeeredDnsDomainArgs args)
    public PeeredDnsDomain(String name, PeeredDnsDomainArgs args, CustomResourceOptions options)
    
    type: gcp:servicenetworking:PeeredDnsDomain
    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 PeeredDnsDomainArgs
    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 PeeredDnsDomainArgs
    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 PeeredDnsDomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PeeredDnsDomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PeeredDnsDomainArgs
    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 peeredDnsDomainResource = new Gcp.ServiceNetworking.PeeredDnsDomain("peeredDnsDomainResource", new()
    {
        DnsSuffix = "string",
        Network = "string",
        Name = "string",
        Project = "string",
        Service = "string",
    });
    
    example, err := servicenetworking.NewPeeredDnsDomain(ctx, "peeredDnsDomainResource", &servicenetworking.PeeredDnsDomainArgs{
    	DnsSuffix: pulumi.String("string"),
    	Network:   pulumi.String("string"),
    	Name:      pulumi.String("string"),
    	Project:   pulumi.String("string"),
    	Service:   pulumi.String("string"),
    })
    
    var peeredDnsDomainResource = new PeeredDnsDomain("peeredDnsDomainResource", PeeredDnsDomainArgs.builder()
        .dnsSuffix("string")
        .network("string")
        .name("string")
        .project("string")
        .service("string")
        .build());
    
    peered_dns_domain_resource = gcp.servicenetworking.PeeredDnsDomain("peeredDnsDomainResource",
        dns_suffix="string",
        network="string",
        name="string",
        project="string",
        service="string")
    
    const peeredDnsDomainResource = new gcp.servicenetworking.PeeredDnsDomain("peeredDnsDomainResource", {
        dnsSuffix: "string",
        network: "string",
        name: "string",
        project: "string",
        service: "string",
    });
    
    type: gcp:servicenetworking:PeeredDnsDomain
    properties:
        dnsSuffix: string
        name: string
        network: string
        project: string
        service: string
    

    PeeredDnsDomain Resource Properties

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

    Inputs

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

    The PeeredDnsDomain resource accepts the following input properties:

    DnsSuffix string
    The DNS domain suffix of the peered DNS domain. Make sure to suffix with a . (dot).
    Network string
    The network in the consumer project.
    Name string
    Internal name used for the peered DNS domain.
    Project string
    The producer project number. If not provided, the provider project is used.
    Service string
    Private service connection between service and consumer network, defaults to servicenetworking.googleapis.com
    DnsSuffix string
    The DNS domain suffix of the peered DNS domain. Make sure to suffix with a . (dot).
    Network string
    The network in the consumer project.
    Name string
    Internal name used for the peered DNS domain.
    Project string
    The producer project number. If not provided, the provider project is used.
    Service string
    Private service connection between service and consumer network, defaults to servicenetworking.googleapis.com
    dnsSuffix String
    The DNS domain suffix of the peered DNS domain. Make sure to suffix with a . (dot).
    network String
    The network in the consumer project.
    name String
    Internal name used for the peered DNS domain.
    project String
    The producer project number. If not provided, the provider project is used.
    service String
    Private service connection between service and consumer network, defaults to servicenetworking.googleapis.com
    dnsSuffix string
    The DNS domain suffix of the peered DNS domain. Make sure to suffix with a . (dot).
    network string
    The network in the consumer project.
    name string
    Internal name used for the peered DNS domain.
    project string
    The producer project number. If not provided, the provider project is used.
    service string
    Private service connection between service and consumer network, defaults to servicenetworking.googleapis.com
    dns_suffix str
    The DNS domain suffix of the peered DNS domain. Make sure to suffix with a . (dot).
    network str
    The network in the consumer project.
    name str
    Internal name used for the peered DNS domain.
    project str
    The producer project number. If not provided, the provider project is used.
    service str
    Private service connection between service and consumer network, defaults to servicenetworking.googleapis.com
    dnsSuffix String
    The DNS domain suffix of the peered DNS domain. Make sure to suffix with a . (dot).
    network String
    The network in the consumer project.
    name String
    Internal name used for the peered DNS domain.
    project String
    The producer project number. If not provided, the provider project is used.
    service String
    Private service connection between service and consumer network, defaults to servicenetworking.googleapis.com

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Parent string
    an identifier for the resource with format services/{{service}}/projects/{{project}}/global/networks/{{network}}
    Id string
    The provider-assigned unique ID for this managed resource.
    Parent string
    an identifier for the resource with format services/{{service}}/projects/{{project}}/global/networks/{{network}}
    id String
    The provider-assigned unique ID for this managed resource.
    parent String
    an identifier for the resource with format services/{{service}}/projects/{{project}}/global/networks/{{network}}
    id string
    The provider-assigned unique ID for this managed resource.
    parent string
    an identifier for the resource with format services/{{service}}/projects/{{project}}/global/networks/{{network}}
    id str
    The provider-assigned unique ID for this managed resource.
    parent str
    an identifier for the resource with format services/{{service}}/projects/{{project}}/global/networks/{{network}}
    id String
    The provider-assigned unique ID for this managed resource.
    parent String
    an identifier for the resource with format services/{{service}}/projects/{{project}}/global/networks/{{network}}

    Look up Existing PeeredDnsDomain Resource

    Get an existing PeeredDnsDomain 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?: PeeredDnsDomainState, opts?: CustomResourceOptions): PeeredDnsDomain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dns_suffix: Optional[str] = None,
            name: Optional[str] = None,
            network: Optional[str] = None,
            parent: Optional[str] = None,
            project: Optional[str] = None,
            service: Optional[str] = None) -> PeeredDnsDomain
    func GetPeeredDnsDomain(ctx *Context, name string, id IDInput, state *PeeredDnsDomainState, opts ...ResourceOption) (*PeeredDnsDomain, error)
    public static PeeredDnsDomain Get(string name, Input<string> id, PeeredDnsDomainState? state, CustomResourceOptions? opts = null)
    public static PeeredDnsDomain get(String name, Output<String> id, PeeredDnsDomainState 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:
    DnsSuffix string
    The DNS domain suffix of the peered DNS domain. Make sure to suffix with a . (dot).
    Name string
    Internal name used for the peered DNS domain.
    Network string
    The network in the consumer project.
    Parent string
    an identifier for the resource with format services/{{service}}/projects/{{project}}/global/networks/{{network}}
    Project string
    The producer project number. If not provided, the provider project is used.
    Service string
    Private service connection between service and consumer network, defaults to servicenetworking.googleapis.com
    DnsSuffix string
    The DNS domain suffix of the peered DNS domain. Make sure to suffix with a . (dot).
    Name string
    Internal name used for the peered DNS domain.
    Network string
    The network in the consumer project.
    Parent string
    an identifier for the resource with format services/{{service}}/projects/{{project}}/global/networks/{{network}}
    Project string
    The producer project number. If not provided, the provider project is used.
    Service string
    Private service connection between service and consumer network, defaults to servicenetworking.googleapis.com
    dnsSuffix String
    The DNS domain suffix of the peered DNS domain. Make sure to suffix with a . (dot).
    name String
    Internal name used for the peered DNS domain.
    network String
    The network in the consumer project.
    parent String
    an identifier for the resource with format services/{{service}}/projects/{{project}}/global/networks/{{network}}
    project String
    The producer project number. If not provided, the provider project is used.
    service String
    Private service connection between service and consumer network, defaults to servicenetworking.googleapis.com
    dnsSuffix string
    The DNS domain suffix of the peered DNS domain. Make sure to suffix with a . (dot).
    name string
    Internal name used for the peered DNS domain.
    network string
    The network in the consumer project.
    parent string
    an identifier for the resource with format services/{{service}}/projects/{{project}}/global/networks/{{network}}
    project string
    The producer project number. If not provided, the provider project is used.
    service string
    Private service connection between service and consumer network, defaults to servicenetworking.googleapis.com
    dns_suffix str
    The DNS domain suffix of the peered DNS domain. Make sure to suffix with a . (dot).
    name str
    Internal name used for the peered DNS domain.
    network str
    The network in the consumer project.
    parent str
    an identifier for the resource with format services/{{service}}/projects/{{project}}/global/networks/{{network}}
    project str
    The producer project number. If not provided, the provider project is used.
    service str
    Private service connection between service and consumer network, defaults to servicenetworking.googleapis.com
    dnsSuffix String
    The DNS domain suffix of the peered DNS domain. Make sure to suffix with a . (dot).
    name String
    Internal name used for the peered DNS domain.
    network String
    The network in the consumer project.
    parent String
    an identifier for the resource with format services/{{service}}/projects/{{project}}/global/networks/{{network}}
    project String
    The producer project number. If not provided, the provider project is used.
    service String
    Private service connection between service and consumer network, defaults to servicenetworking.googleapis.com

    Import

    Project peered DNS domains can be imported using the service, project, network and name, where:

    • service is the service connection, defaults to servicenetworking.googleapis.com.

    • project is the producer project name.

    • network is the consumer network name.

    • name is the name of your peered DNS domain.

    • services/{service}/projects/{project}/global/networks/{network}/peeredDnsDomains/{name}

    When using the pulumi import command, project peered DNS domains can be imported using one of the formats above. For example:

    $ pulumi import gcp:servicenetworking/peeredDnsDomain:PeeredDnsDomain default services/{service}/projects/{project}/global/networks/{network}/peeredDnsDomains/{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.9.3 published on Monday, Nov 18, 2024 by Pulumi