Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

GlobalDnsProvider

Provides a Rancher V2 Global DNS Provider resource. This can be used to create Global DNS Providers for Rancher V2. Supported Global DNS Providers: alidns, cloudflare, route53

Example Usage

using Pulumi;
using Rancher2 = Pulumi.Rancher2;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a new rancher2 Global DNS Provider - alidns
        var foo = new Rancher2.GlobalDnsProvider("foo", new Rancher2.GlobalDnsProviderArgs
        {
            AlidnsConfig = new Rancher2.Inputs.GlobalDnsProviderAlidnsConfigArgs
            {
                AccessKey = "YYYYYYYYYYYYYYYYYYYY",
                SecretKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            },
            RootDomain = "example.com",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-rancher2/sdk/v2/go/rancher2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := rancher2.NewGlobalDnsProvider(ctx, "foo", &rancher2.GlobalDnsProviderArgs{
            AlidnsConfig: &rancher2.GlobalDnsProviderAlidnsConfigArgs{
                AccessKey: pulumi.String("YYYYYYYYYYYYYYYYYYYY"),
                SecretKey: pulumi.String("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"),
            },
            RootDomain: pulumi.String("example.com"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_rancher2 as rancher2

# Create a new rancher2 Global DNS Provider - alidns
foo = rancher2.GlobalDnsProvider("foo",
    alidns_config=rancher2.GlobalDnsProviderAlidnsConfigArgs(
        access_key="YYYYYYYYYYYYYYYYYYYY",
        secret_key="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    ),
    root_domain="example.com")
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";

// Create a new rancher2 Global DNS Provider - alidns
const foo = new rancher2.GlobalDnsProvider("foo", {
    alidnsConfig: {
        accessKey: "YYYYYYYYYYYYYYYYYYYY",
        secretKey: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    },
    rootDomain: "example.com",
});

Create a GlobalDnsProvider Resource

new GlobalDnsProvider(name: string, args: GlobalDnsProviderArgs, opts?: CustomResourceOptions);
def GlobalDnsProvider(resource_name: str, opts: Optional[ResourceOptions] = None, alidns_config: Optional[GlobalDnsProviderAlidnsConfigArgs] = None, annotations: Optional[Mapping[str, Any]] = None, cloudflare_config: Optional[GlobalDnsProviderCloudflareConfigArgs] = None, labels: Optional[Mapping[str, Any]] = None, name: Optional[str] = None, root_domain: Optional[str] = None, route53_config: Optional[GlobalDnsProviderRoute53ConfigArgs] = None)
func NewGlobalDnsProvider(ctx *Context, name string, args GlobalDnsProviderArgs, opts ...ResourceOption) (*GlobalDnsProvider, error)
public GlobalDnsProvider(string name, GlobalDnsProviderArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args GlobalDnsProviderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args GlobalDnsProviderArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args GlobalDnsProviderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

GlobalDnsProvider Resource Properties

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

Inputs

The GlobalDnsProvider resource accepts the following input properties:

RootDomain string

The user ID to assign Global DNS Provider (string)

AlidnsConfig GlobalDnsProviderAlidnsConfigArgs
Annotations Dictionary<string, object>

Annotations for Global DNS Provider (map)

CloudflareConfig GlobalDnsProviderCloudflareConfigArgs
Labels Dictionary<string, object>

Labels for Global DNS Provider (map)

Name string

The name of the Global DNS Provider (string)

Route53Config GlobalDnsProviderRoute53ConfigArgs
RootDomain string

The user ID to assign Global DNS Provider (string)

AlidnsConfig GlobalDnsProviderAlidnsConfig
Annotations map[string]interface{}

Annotations for Global DNS Provider (map)

CloudflareConfig GlobalDnsProviderCloudflareConfig
Labels map[string]interface{}

Labels for Global DNS Provider (map)

Name string

The name of the Global DNS Provider (string)

Route53Config GlobalDnsProviderRoute53Config
rootDomain string

The user ID to assign Global DNS Provider (string)

alidnsConfig GlobalDnsProviderAlidnsConfig
annotations {[key: string]: any}

Annotations for Global DNS Provider (map)

cloudflareConfig GlobalDnsProviderCloudflareConfig
labels {[key: string]: any}

Labels for Global DNS Provider (map)

name string

The name of the Global DNS Provider (string)

route53Config GlobalDnsProviderRoute53Config
root_domain str

The user ID to assign Global DNS Provider (string)

alidns_config GlobalDnsProviderAlidnsConfigArgs
annotations Mapping[str, Any]

Annotations for Global DNS Provider (map)

cloudflare_config GlobalDnsProviderCloudflareConfigArgs
labels Mapping[str, Any]

Labels for Global DNS Provider (map)

name str

The name of the Global DNS Provider (string)

route53_config GlobalDnsProviderRoute53ConfigArgs

Outputs

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

DnsProvider string

(Computed) The Global DNS Provider alidns, cloudflare, route53 (string)

Id string
The provider-assigned unique ID for this managed resource.
DnsProvider string

(Computed) The Global DNS Provider alidns, cloudflare, route53 (string)

Id string
The provider-assigned unique ID for this managed resource.
dnsProvider string

(Computed) The Global DNS Provider alidns, cloudflare, route53 (string)

id string
The provider-assigned unique ID for this managed resource.
dns_provider str

(Computed) The Global DNS Provider alidns, cloudflare, route53 (string)

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing GlobalDnsProvider Resource

Get an existing GlobalDnsProvider 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?: GlobalDnsProviderState, opts?: CustomResourceOptions): GlobalDnsProvider
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, alidns_config: Optional[GlobalDnsProviderAlidnsConfigArgs] = None, annotations: Optional[Mapping[str, Any]] = None, cloudflare_config: Optional[GlobalDnsProviderCloudflareConfigArgs] = None, dns_provider: Optional[str] = None, labels: Optional[Mapping[str, Any]] = None, name: Optional[str] = None, root_domain: Optional[str] = None, route53_config: Optional[GlobalDnsProviderRoute53ConfigArgs] = None) -> GlobalDnsProvider
func GetGlobalDnsProvider(ctx *Context, name string, id IDInput, state *GlobalDnsProviderState, opts ...ResourceOption) (*GlobalDnsProvider, error)
public static GlobalDnsProvider Get(string name, Input<string> id, GlobalDnsProviderState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AlidnsConfig GlobalDnsProviderAlidnsConfigArgs
Annotations Dictionary<string, object>

Annotations for Global DNS Provider (map)

CloudflareConfig GlobalDnsProviderCloudflareConfigArgs
DnsProvider string

(Computed) The Global DNS Provider alidns, cloudflare, route53 (string)

Labels Dictionary<string, object>

Labels for Global DNS Provider (map)

Name string

The name of the Global DNS Provider (string)

RootDomain string

The user ID to assign Global DNS Provider (string)

Route53Config GlobalDnsProviderRoute53ConfigArgs
AlidnsConfig GlobalDnsProviderAlidnsConfig
Annotations map[string]interface{}

Annotations for Global DNS Provider (map)

CloudflareConfig GlobalDnsProviderCloudflareConfig
DnsProvider string

(Computed) The Global DNS Provider alidns, cloudflare, route53 (string)

Labels map[string]interface{}

Labels for Global DNS Provider (map)

Name string

The name of the Global DNS Provider (string)

RootDomain string

The user ID to assign Global DNS Provider (string)

Route53Config GlobalDnsProviderRoute53Config
alidnsConfig GlobalDnsProviderAlidnsConfig
annotations {[key: string]: any}

Annotations for Global DNS Provider (map)

cloudflareConfig GlobalDnsProviderCloudflareConfig
dnsProvider string

(Computed) The Global DNS Provider alidns, cloudflare, route53 (string)

labels {[key: string]: any}

Labels for Global DNS Provider (map)

name string

The name of the Global DNS Provider (string)

rootDomain string

The user ID to assign Global DNS Provider (string)

route53Config GlobalDnsProviderRoute53Config
alidns_config GlobalDnsProviderAlidnsConfigArgs
annotations Mapping[str, Any]

Annotations for Global DNS Provider (map)

cloudflare_config GlobalDnsProviderCloudflareConfigArgs
dns_provider str

(Computed) The Global DNS Provider alidns, cloudflare, route53 (string)

labels Mapping[str, Any]

Labels for Global DNS Provider (map)

name str

The name of the Global DNS Provider (string)

root_domain str

The user ID to assign Global DNS Provider (string)

route53_config GlobalDnsProviderRoute53ConfigArgs

Supporting Types

GlobalDnsProviderAlidnsConfig

AccessKey string

The AWS Access key (string)

SecretKey string

The AWS Secret key (string)

AccessKey string

The AWS Access key (string)

SecretKey string

The AWS Secret key (string)

accessKey string

The AWS Access key (string)

secretKey string

The AWS Secret key (string)

access_key str

The AWS Access key (string)

secret_key str

The AWS Secret key (string)

GlobalDnsProviderCloudflareConfig

ApiEmail string

The CloudFlare API Email (string)

ApiKey string

The CloudFlare API Key (string)

ProxySetting bool

CloudFlare Proxy Setting. Default: false (bool)

ApiEmail string

The CloudFlare API Email (string)

ApiKey string

The CloudFlare API Key (string)

ProxySetting bool

CloudFlare Proxy Setting. Default: false (bool)

apiEmail string

The CloudFlare API Email (string)

apiKey string

The CloudFlare API Key (string)

proxySetting boolean

CloudFlare Proxy Setting. Default: false (bool)

api_email str

The CloudFlare API Email (string)

api_key str

The CloudFlare API Key (string)

proxy_setting bool

CloudFlare Proxy Setting. Default: false (bool)

GlobalDnsProviderRoute53Config

AccessKey string

The AWS Access key (string)

SecretKey string

The AWS Secret key (string)

CredentialsPath string

The AWS credentials path. Default: "/.aws" (string)

Region string

The AWS Region. Default: "us-west-2" (string)

RoleArn string

The AWS Role ARN (string)

ZoneType string

The Route53 zone type public, private. Default: "public" (string)

AccessKey string

The AWS Access key (string)

SecretKey string

The AWS Secret key (string)

CredentialsPath string

The AWS credentials path. Default: "/.aws" (string)

Region string

The AWS Region. Default: "us-west-2" (string)

RoleArn string

The AWS Role ARN (string)

ZoneType string

The Route53 zone type public, private. Default: "public" (string)

accessKey string

The AWS Access key (string)

secretKey string

The AWS Secret key (string)

credentialsPath string

The AWS credentials path. Default: "/.aws" (string)

region string

The AWS Region. Default: "us-west-2" (string)

roleArn string

The AWS Role ARN (string)

zoneType string

The Route53 zone type public, private. Default: "public" (string)

access_key str

The AWS Access key (string)

secret_key str

The AWS Secret key (string)

credentials_path str

The AWS credentials path. Default: "/.aws" (string)

region str

The AWS Region. Default: "us-west-2" (string)

role_arn str

The AWS Role ARN (string)

zone_type str

The Route53 zone type public, private. Default: "public" (string)

Import

Global DNS Providers can be imported using the Rancher Global DNS Provider ID

 $ pulumi import rancher2:index/globalDnsProvider:GlobalDnsProvider foo <global_dns_provider_id>

Package Details

Repository
https://github.com/pulumi/pulumi-rancher2
License
Apache-2.0
Notes
This Pulumi package is based on the rancher2 Terraform Provider.