DigitalOcean

v4.16.0 published on Wednesday, Sep 28, 2022 by Pulumi

Domain

Provides a DigitalOcean domain resource.

Example Usage

using System.Collections.Generic;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

return await Deployment.RunAsync(() => 
{
    // Create a new domain
    var @default = new DigitalOcean.Domain("default", new()
    {
        Name = "example.com",
        IpAddress = digitalocean_droplet.Foo.Ipv4_address,
    });

});
package main

import (
	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := digitalocean.NewDomain(ctx, "default", &digitalocean.DomainArgs{
			Name:      pulumi.String("example.com"),
			IpAddress: pulumi.Any(digitalocean_droplet.Foo.Ipv4_address),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.Domain;
import com.pulumi.digitalocean.DomainArgs;
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 Domain("default", DomainArgs.builder()        
            .name("example.com")
            .ipAddress(digitalocean_droplet.foo().ipv4_address())
            .build());

    }
}
import pulumi
import pulumi_digitalocean as digitalocean

# Create a new domain
default = digitalocean.Domain("default",
    name="example.com",
    ip_address=digitalocean_droplet["foo"]["ipv4_address"])
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

// Create a new domain
const _default = new digitalocean.Domain("default", {
    name: "example.com",
    ipAddress: digitalocean_droplet.foo.ipv4_address,
});
resources:
  # Create a new domain
  default:
    type: digitalocean:Domain
    properties:
      name: example.com
      ipAddress: ${digitalocean_droplet.foo.ipv4_address}

Create Domain Resource

new Domain(name: string, args: DomainArgs, opts?: CustomResourceOptions);
@overload
def Domain(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           ip_address: Optional[str] = None,
           name: Optional[str] = None)
@overload
def Domain(resource_name: str,
           args: DomainArgs,
           opts: Optional[ResourceOptions] = None)
func NewDomain(ctx *Context, name string, args DomainArgs, opts ...ResourceOption) (*Domain, error)
public Domain(string name, DomainArgs args, CustomResourceOptions? opts = null)
public Domain(String name, DomainArgs args)
public Domain(String name, DomainArgs args, CustomResourceOptions options)
type: digitalocean:Domain
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DomainArgs
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 DomainArgs
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 DomainArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Name string

The name of the domain

IpAddress string

The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

Name string

The name of the domain

IpAddress string

The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

name String

The name of the domain

ipAddress String

The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

name string

The name of the domain

ipAddress string

The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

name str

The name of the domain

ip_address str

The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

name String

The name of the domain

ipAddress String

The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

Outputs

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

DomainUrn string

The uniform resource name of the domain

Id string

The provider-assigned unique ID for this managed resource.

Ttl int

The TTL value of the domain

DomainUrn string

The uniform resource name of the domain

Id string

The provider-assigned unique ID for this managed resource.

Ttl int

The TTL value of the domain

domainUrn String

The uniform resource name of the domain

id String

The provider-assigned unique ID for this managed resource.

ttl Integer

The TTL value of the domain

domainUrn string

The uniform resource name of the domain

id string

The provider-assigned unique ID for this managed resource.

ttl number

The TTL value of the domain

domain_urn str

The uniform resource name of the domain

id str

The provider-assigned unique ID for this managed resource.

ttl int

The TTL value of the domain

domainUrn String

The uniform resource name of the domain

id String

The provider-assigned unique ID for this managed resource.

ttl Number

The TTL value of the domain

Look up Existing Domain Resource

Get an existing Domain 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?: DomainState, opts?: CustomResourceOptions): Domain
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        domain_urn: Optional[str] = None,
        ip_address: Optional[str] = None,
        name: Optional[str] = None,
        ttl: Optional[int] = None) -> Domain
func GetDomain(ctx *Context, name string, id IDInput, state *DomainState, opts ...ResourceOption) (*Domain, error)
public static Domain Get(string name, Input<string> id, DomainState? state, CustomResourceOptions? opts = null)
public static Domain get(String name, Output<String> id, DomainState 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:
DomainUrn string

The uniform resource name of the domain

IpAddress string

The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

Name string

The name of the domain

Ttl int

The TTL value of the domain

DomainUrn string

The uniform resource name of the domain

IpAddress string

The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

Name string

The name of the domain

Ttl int

The TTL value of the domain

domainUrn String

The uniform resource name of the domain

ipAddress String

The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

name String

The name of the domain

ttl Integer

The TTL value of the domain

domainUrn string

The uniform resource name of the domain

ipAddress string

The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

name string

The name of the domain

ttl number

The TTL value of the domain

domain_urn str

The uniform resource name of the domain

ip_address str

The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

name str

The name of the domain

ttl int

The TTL value of the domain

domainUrn String

The uniform resource name of the domain

ipAddress String

The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

name String

The name of the domain

ttl Number

The TTL value of the domain

Import

Domains can be imported using the domain name, e.g.

 $ pulumi import digitalocean:index/domain:Domain mydomain mytestdomain.com

Package Details

Repository
https://github.com/pulumi/pulumi-digitalocean
License
Apache-2.0
Notes

This Pulumi package is based on the digitalocean Terraform Provider.