1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. certificatemanager
  5. DnsAuthorization
Google Cloud Classic v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi

gcp.certificatemanager.DnsAuthorization

Explore with Pulumi AI

gcp logo
Google Cloud Classic v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi

    DnsAuthorization represents a HTTP-reachable backend for a DnsAuthorization.

    Example Usage

    Certificate Manager Dns Authorization Basic

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Gcp.CertificateManager.DnsAuthorization("default", new()
        {
            Description = "The default dnss",
            Domain = "subdomain.hashicorptest.com",
        });
    
        return new Dictionary<string, object?>
        {
            ["recordNameToInsert"] = @default.DnsResourceRecords.Apply(dnsResourceRecords => dnsResourceRecords[0].Name),
            ["recordTypeToInsert"] = @default.DnsResourceRecords.Apply(dnsResourceRecords => dnsResourceRecords[0].Type),
            ["recordDataToInsert"] = @default.DnsResourceRecords.Apply(dnsResourceRecords => dnsResourceRecords[0].Data),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/certificatemanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := certificatemanager.NewDnsAuthorization(ctx, "default", &certificatemanager.DnsAuthorizationArgs{
    			Description: pulumi.String("The default dnss"),
    			Domain:      pulumi.String("subdomain.hashicorptest.com"),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("recordNameToInsert", _default.DnsResourceRecords.ApplyT(func(dnsResourceRecords []certificatemanager.DnsAuthorizationDnsResourceRecord) (*string, error) {
    			return &dnsResourceRecords[0].Name, nil
    		}).(pulumi.StringPtrOutput))
    		ctx.Export("recordTypeToInsert", _default.DnsResourceRecords.ApplyT(func(dnsResourceRecords []certificatemanager.DnsAuthorizationDnsResourceRecord) (*string, error) {
    			return &dnsResourceRecords[0].Type, nil
    		}).(pulumi.StringPtrOutput))
    		ctx.Export("recordDataToInsert", _default.DnsResourceRecords.ApplyT(func(dnsResourceRecords []certificatemanager.DnsAuthorizationDnsResourceRecord) (*string, error) {
    			return &dnsResourceRecords[0].Data, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.certificatemanager.DnsAuthorization;
    import com.pulumi.gcp.certificatemanager.DnsAuthorizationArgs;
    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 default_ = new DnsAuthorization("default", DnsAuthorizationArgs.builder()        
                .description("The default dnss")
                .domain("subdomain.hashicorptest.com")
                .build());
    
            ctx.export("recordNameToInsert", default_.dnsResourceRecords().applyValue(dnsResourceRecords -> dnsResourceRecords[0].name()));
            ctx.export("recordTypeToInsert", default_.dnsResourceRecords().applyValue(dnsResourceRecords -> dnsResourceRecords[0].type()));
            ctx.export("recordDataToInsert", default_.dnsResourceRecords().applyValue(dnsResourceRecords -> dnsResourceRecords[0].data()));
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.certificatemanager.DnsAuthorization("default",
        description="The default dnss",
        domain="subdomain.hashicorptest.com")
    pulumi.export("recordNameToInsert", default.dns_resource_records[0].name)
    pulumi.export("recordTypeToInsert", default.dns_resource_records[0].type)
    pulumi.export("recordDataToInsert", default.dns_resource_records[0].data)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const _default = new gcp.certificatemanager.DnsAuthorization("default", {
        description: "The default dnss",
        domain: "subdomain.hashicorptest.com",
    });
    export const recordNameToInsert = _default.dnsResourceRecords.apply(dnsResourceRecords => dnsResourceRecords[0].name);
    export const recordTypeToInsert = _default.dnsResourceRecords.apply(dnsResourceRecords => dnsResourceRecords[0].type);
    export const recordDataToInsert = _default.dnsResourceRecords.apply(dnsResourceRecords => dnsResourceRecords[0].data);
    
    resources:
      default:
        type: gcp:certificatemanager:DnsAuthorization
        properties:
          description: The default dnss
          domain: subdomain.hashicorptest.com
    outputs:
      recordNameToInsert: ${default.dnsResourceRecords[0].name}
      recordTypeToInsert: ${default.dnsResourceRecords[0].type}
      recordDataToInsert: ${default.dnsResourceRecords[0].data}
    

    Create DnsAuthorization Resource

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

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

    Domain string

    A domain which is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for "example.com" can be used to issue certificates for "example.com" and "*.example.com".

    Description string

    A human-readable description of the resource.

    Labels Dictionary<string, string>

    Set of label tags associated with the DNS Authorization resource.

    Name string

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    Project string

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

    Domain string

    A domain which is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for "example.com" can be used to issue certificates for "example.com" and "*.example.com".

    Description string

    A human-readable description of the resource.

    Labels map[string]string

    Set of label tags associated with the DNS Authorization resource.

    Name string

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    Project string

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

    domain String

    A domain which is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for "example.com" can be used to issue certificates for "example.com" and "*.example.com".

    description String

    A human-readable description of the resource.

    labels Map<String,String>

    Set of label tags associated with the DNS Authorization resource.

    name String

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    project String

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

    domain string

    A domain which is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for "example.com" can be used to issue certificates for "example.com" and "*.example.com".

    description string

    A human-readable description of the resource.

    labels {[key: string]: string}

    Set of label tags associated with the DNS Authorization resource.

    name string

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    project string

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

    domain str

    A domain which is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for "example.com" can be used to issue certificates for "example.com" and "*.example.com".

    description str

    A human-readable description of the resource.

    labels Mapping[str, str]

    Set of label tags associated with the DNS Authorization resource.

    name str

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    project str

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

    domain String

    A domain which is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for "example.com" can be used to issue certificates for "example.com" and "*.example.com".

    description String

    A human-readable description of the resource.

    labels Map<String>

    Set of label tags associated with the DNS Authorization resource.

    name String

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    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 DnsAuthorization resource produces the following output properties:

    DnsResourceRecords List<DnsAuthorizationDnsResourceRecord>

    The structure describing the DNS Resource Record that needs to be added to DNS configuration for the authorization to be usable by certificate. Structure is documented below.

    Id string

    The provider-assigned unique ID for this managed resource.

    DnsResourceRecords []DnsAuthorizationDnsResourceRecord

    The structure describing the DNS Resource Record that needs to be added to DNS configuration for the authorization to be usable by certificate. Structure is documented below.

    Id string

    The provider-assigned unique ID for this managed resource.

    dnsResourceRecords List<DnsAuthorizationDnsResourceRecord>

    The structure describing the DNS Resource Record that needs to be added to DNS configuration for the authorization to be usable by certificate. Structure is documented below.

    id String

    The provider-assigned unique ID for this managed resource.

    dnsResourceRecords DnsAuthorizationDnsResourceRecord[]

    The structure describing the DNS Resource Record that needs to be added to DNS configuration for the authorization to be usable by certificate. Structure is documented below.

    id string

    The provider-assigned unique ID for this managed resource.

    dns_resource_records Sequence[DnsAuthorizationDnsResourceRecord]

    The structure describing the DNS Resource Record that needs to be added to DNS configuration for the authorization to be usable by certificate. Structure is documented below.

    id str

    The provider-assigned unique ID for this managed resource.

    dnsResourceRecords List<Property Map>

    The structure describing the DNS Resource Record that needs to be added to DNS configuration for the authorization to be usable by certificate. Structure is documented below.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing DnsAuthorization Resource

    Get an existing DnsAuthorization 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?: DnsAuthorizationState, opts?: CustomResourceOptions): DnsAuthorization
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            dns_resource_records: Optional[Sequence[DnsAuthorizationDnsResourceRecordArgs]] = None,
            domain: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            project: Optional[str] = None) -> DnsAuthorization
    func GetDnsAuthorization(ctx *Context, name string, id IDInput, state *DnsAuthorizationState, opts ...ResourceOption) (*DnsAuthorization, error)
    public static DnsAuthorization Get(string name, Input<string> id, DnsAuthorizationState? state, CustomResourceOptions? opts = null)
    public static DnsAuthorization get(String name, Output<String> id, DnsAuthorizationState 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

    A human-readable description of the resource.

    DnsResourceRecords List<DnsAuthorizationDnsResourceRecord>

    The structure describing the DNS Resource Record that needs to be added to DNS configuration for the authorization to be usable by certificate. Structure is documented below.

    Domain string

    A domain which is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for "example.com" can be used to issue certificates for "example.com" and "*.example.com".

    Labels Dictionary<string, string>

    Set of label tags associated with the DNS Authorization resource.

    Name string

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    Project string

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

    Description string

    A human-readable description of the resource.

    DnsResourceRecords []DnsAuthorizationDnsResourceRecordArgs

    The structure describing the DNS Resource Record that needs to be added to DNS configuration for the authorization to be usable by certificate. Structure is documented below.

    Domain string

    A domain which is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for "example.com" can be used to issue certificates for "example.com" and "*.example.com".

    Labels map[string]string

    Set of label tags associated with the DNS Authorization resource.

    Name string

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    Project string

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

    description String

    A human-readable description of the resource.

    dnsResourceRecords List<DnsAuthorizationDnsResourceRecord>

    The structure describing the DNS Resource Record that needs to be added to DNS configuration for the authorization to be usable by certificate. Structure is documented below.

    domain String

    A domain which is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for "example.com" can be used to issue certificates for "example.com" and "*.example.com".

    labels Map<String,String>

    Set of label tags associated with the DNS Authorization resource.

    name String

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    project String

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

    description string

    A human-readable description of the resource.

    dnsResourceRecords DnsAuthorizationDnsResourceRecord[]

    The structure describing the DNS Resource Record that needs to be added to DNS configuration for the authorization to be usable by certificate. Structure is documented below.

    domain string

    A domain which is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for "example.com" can be used to issue certificates for "example.com" and "*.example.com".

    labels {[key: string]: string}

    Set of label tags associated with the DNS Authorization resource.

    name string

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    project string

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

    description str

    A human-readable description of the resource.

    dns_resource_records Sequence[DnsAuthorizationDnsResourceRecordArgs]

    The structure describing the DNS Resource Record that needs to be added to DNS configuration for the authorization to be usable by certificate. Structure is documented below.

    domain str

    A domain which is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for "example.com" can be used to issue certificates for "example.com" and "*.example.com".

    labels Mapping[str, str]

    Set of label tags associated with the DNS Authorization resource.

    name str

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    project str

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

    description String

    A human-readable description of the resource.

    dnsResourceRecords List<Property Map>

    The structure describing the DNS Resource Record that needs to be added to DNS configuration for the authorization to be usable by certificate. Structure is documented below.

    domain String

    A domain which is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for "example.com" can be used to issue certificates for "example.com" and "*.example.com".

    labels Map<String>

    Set of label tags associated with the DNS Authorization resource.

    name String

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    project String

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

    Supporting Types

    DnsAuthorizationDnsResourceRecord, DnsAuthorizationDnsResourceRecordArgs

    Data string

    (Output) Data of the DNS Resource Record.

    Name string

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    Type string

    (Output) Type of the DNS Resource Record.

    Data string

    (Output) Data of the DNS Resource Record.

    Name string

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    Type string

    (Output) Type of the DNS Resource Record.

    data String

    (Output) Data of the DNS Resource Record.

    name String

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    type String

    (Output) Type of the DNS Resource Record.

    data string

    (Output) Data of the DNS Resource Record.

    name string

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    type string

    (Output) Type of the DNS Resource Record.

    data str

    (Output) Data of the DNS Resource Record.

    name str

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    type str

    (Output) Type of the DNS Resource Record.

    data String

    (Output) Data of the DNS Resource Record.

    name String

    Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.


    type String

    (Output) Type of the DNS Resource Record.

    Import

    DnsAuthorization can be imported using any of these accepted formats

     $ pulumi import gcp:certificatemanager/dnsAuthorization:DnsAuthorization default projects/{{project}}/locations/global/dnsAuthorizations/{{name}}
    
     $ pulumi import gcp:certificatemanager/dnsAuthorization:DnsAuthorization default {{project}}/{{name}}
    
     $ pulumi import gcp:certificatemanager/dnsAuthorization:DnsAuthorization 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 v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi