1. Packages
  2. Civo Provider
  3. API Docs
  4. DnsDomainName
civo 1.1.5 published on Thursday, Feb 6, 2025 by civo

civo.DnsDomainName

Explore with Pulumi AI

Provides a Civo DNS domain name resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as civo from "@pulumi/civo";

// Create a new domain name
const main = new civo.DnsDomainName("main", {});
Copy
import pulumi
import pulumi_civo as civo

# Create a new domain name
main = civo.DnsDomainName("main")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/civo/civo"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a new domain name
		_, err := civo.NewDnsDomainName(ctx, "main", nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Civo = Pulumi.Civo;

return await Deployment.RunAsync(() => 
{
    // Create a new domain name
    var main = new Civo.DnsDomainName("main");

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.civo.DnsDomainName;
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) {
        // Create a new domain name
        var main = new DnsDomainName("main");

    }
}
Copy
resources:
  # Create a new domain name
  main:
    type: civo:DnsDomainName
Copy

Create DnsDomainName Resource

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

Constructor syntax

new DnsDomainName(name: string, args?: DnsDomainNameArgs, opts?: CustomResourceOptions);
@overload
def DnsDomainName(resource_name: str,
                  args: Optional[DnsDomainNameArgs] = None,
                  opts: Optional[ResourceOptions] = None)

@overload
def DnsDomainName(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  dns_domain_name_id: Optional[str] = None,
                  name: Optional[str] = None)
func NewDnsDomainName(ctx *Context, name string, args *DnsDomainNameArgs, opts ...ResourceOption) (*DnsDomainName, error)
public DnsDomainName(string name, DnsDomainNameArgs? args = null, CustomResourceOptions? opts = null)
public DnsDomainName(String name, DnsDomainNameArgs args)
public DnsDomainName(String name, DnsDomainNameArgs args, CustomResourceOptions options)
type: civo:DnsDomainName
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args DnsDomainNameArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args DnsDomainNameArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args DnsDomainNameArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args DnsDomainNameArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DnsDomainNameArgs
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 dnsDomainNameResource = new Civo.DnsDomainName("dnsDomainNameResource", new()
{
    DnsDomainNameId = "string",
    Name = "string",
});
Copy
example, err := civo.NewDnsDomainName(ctx, "dnsDomainNameResource", &civo.DnsDomainNameArgs{
DnsDomainNameId: pulumi.String("string"),
Name: pulumi.String("string"),
})
Copy
var dnsDomainNameResource = new DnsDomainName("dnsDomainNameResource", DnsDomainNameArgs.builder()
    .dnsDomainNameId("string")
    .name("string")
    .build());
Copy
dns_domain_name_resource = civo.DnsDomainName("dnsDomainNameResource",
    dns_domain_name_id="string",
    name="string")
Copy
const dnsDomainNameResource = new civo.DnsDomainName("dnsDomainNameResource", {
    dnsDomainNameId: "string",
    name: "string",
});
Copy
type: civo:DnsDomainName
properties:
    dnsDomainNameId: string
    name: string
Copy

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

DnsDomainNameId string
The ID of this resource.
Name string
The name of the domain
DnsDomainNameId string
The ID of this resource.
Name string
The name of the domain
dnsDomainNameId String
The ID of this resource.
name String
The name of the domain
dnsDomainNameId string
The ID of this resource.
name string
The name of the domain
dns_domain_name_id str
The ID of this resource.
name str
The name of the domain
dnsDomainNameId String
The ID of this resource.
name String
The name of the domain

Outputs

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

AccountId string
The account ID of the domain
Id string
The provider-assigned unique ID for this managed resource.
AccountId string
The account ID of the domain
Id string
The provider-assigned unique ID for this managed resource.
accountId String
The account ID of the domain
id String
The provider-assigned unique ID for this managed resource.
accountId string
The account ID of the domain
id string
The provider-assigned unique ID for this managed resource.
account_id str
The account ID of the domain
id str
The provider-assigned unique ID for this managed resource.
accountId String
The account ID of the domain
id String
The provider-assigned unique ID for this managed resource.

Look up Existing DnsDomainName Resource

Get an existing DnsDomainName 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?: DnsDomainNameState, opts?: CustomResourceOptions): DnsDomainName
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        dns_domain_name_id: Optional[str] = None,
        name: Optional[str] = None) -> DnsDomainName
func GetDnsDomainName(ctx *Context, name string, id IDInput, state *DnsDomainNameState, opts ...ResourceOption) (*DnsDomainName, error)
public static DnsDomainName Get(string name, Input<string> id, DnsDomainNameState? state, CustomResourceOptions? opts = null)
public static DnsDomainName get(String name, Output<String> id, DnsDomainNameState state, CustomResourceOptions options)
resources:  _:    type: civo:DnsDomainName    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AccountId string
The account ID of the domain
DnsDomainNameId string
The ID of this resource.
Name string
The name of the domain
AccountId string
The account ID of the domain
DnsDomainNameId string
The ID of this resource.
Name string
The name of the domain
accountId String
The account ID of the domain
dnsDomainNameId String
The ID of this resource.
name String
The name of the domain
accountId string
The account ID of the domain
dnsDomainNameId string
The ID of this resource.
name string
The name of the domain
account_id str
The account ID of the domain
dns_domain_name_id str
The ID of this resource.
name str
The name of the domain
accountId String
The account ID of the domain
dnsDomainNameId String
The ID of this resource.
name String
The name of the domain

Import

using domain name

$ pulumi import civo:index/dnsDomainName:DnsDomainName main mydomain.com
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Civo civo/terraform-provider-civo
License
Notes
This Pulumi package is based on the civo Terraform Provider.