OpenStack

v3.9.0 published on Thursday, Aug 4, 2022 by Pulumi

Zone

Manages a DNS zone in the OpenStack DNS Service.

Example Usage

Automatically detect the correct network

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var example_com = new OpenStack.Dns.Zone("example.com", new OpenStack.Dns.ZoneArgs
        {
            Description = "An example zone",
            Email = "jdoe@example.com",
            Ttl = 3000,
            Type = "PRIMARY",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/dns"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dns.NewZone(ctx, "example.com", &dns.ZoneArgs{
			Description: pulumi.String("An example zone"),
			Email:       pulumi.String("jdoe@example.com"),
			Ttl:         pulumi.Int(3000),
			Type:        pulumi.String("PRIMARY"),
		})
		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.openstack.dns.Zone;
import com.pulumi.openstack.dns.ZoneArgs;
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 example_com = new Zone("example.com", ZoneArgs.builder()        
            .description("An example zone")
            .email("jdoe@example.com")
            .ttl(3000)
            .type("PRIMARY")
            .build());

    }
}
import pulumi
import pulumi_openstack as openstack

example_com = openstack.dns.Zone("example.com",
    description="An example zone",
    email="jdoe@example.com",
    ttl=3000,
    type="PRIMARY")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const example_com = new openstack.dns.Zone("example.com", {
    description: "An example zone",
    email: "jdoe@example.com",
    ttl: 3000,
    type: "PRIMARY",
});
resources:
  example.com:
    type: openstack:dns:Zone
    properties:
      description: An example zone
      email: jdoe@example.com
      ttl: 3000
      type: PRIMARY

Create Zone Resource

new Zone(name: string, args?: ZoneArgs, opts?: CustomResourceOptions);
@overload
def Zone(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         attributes: Optional[Mapping[str, Any]] = None,
         description: Optional[str] = None,
         disable_status_check: Optional[bool] = None,
         email: Optional[str] = None,
         masters: Optional[Sequence[str]] = None,
         name: Optional[str] = None,
         project_id: Optional[str] = None,
         region: Optional[str] = None,
         ttl: Optional[int] = None,
         type: Optional[str] = None,
         value_specs: Optional[Mapping[str, Any]] = None)
@overload
def Zone(resource_name: str,
         args: Optional[ZoneArgs] = None,
         opts: Optional[ResourceOptions] = None)
func NewZone(ctx *Context, name string, args *ZoneArgs, opts ...ResourceOption) (*Zone, error)
public Zone(string name, ZoneArgs? args = null, CustomResourceOptions? opts = null)
public Zone(String name, ZoneArgs args)
public Zone(String name, ZoneArgs args, CustomResourceOptions options)
type: openstack:dns:Zone
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

Attributes Dictionary<string, object>

Attributes for the DNS Service scheduler. Changing this creates a new zone.

Description string

A description of the zone.

DisableStatusCheck bool

Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack request returned success.

Email string

The email contact for the zone record.

Masters List<string>

An array of master DNS servers. For when type is SECONDARY.

Name string

The name of the zone. Note the . at the end of the name. Changing this creates a new DNS zone.

ProjectId string

The ID of the project DNS zone is created for, sets X-Auth-Sudo-Tenant-ID header (requires an assigned user role in target project)

Region string

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.

Ttl int

The time to live (TTL) of the zone.

Type string

The type of zone. Can either be PRIMARY or SECONDARY. Changing this creates a new zone.

ValueSpecs Dictionary<string, object>

Map of additional options. Changing this creates a new zone.

Attributes map[string]interface{}

Attributes for the DNS Service scheduler. Changing this creates a new zone.

Description string

A description of the zone.

DisableStatusCheck bool

Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack request returned success.

Email string

The email contact for the zone record.

Masters []string

An array of master DNS servers. For when type is SECONDARY.

Name string

The name of the zone. Note the . at the end of the name. Changing this creates a new DNS zone.

ProjectId string

The ID of the project DNS zone is created for, sets X-Auth-Sudo-Tenant-ID header (requires an assigned user role in target project)

Region string

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.

Ttl int

The time to live (TTL) of the zone.

Type string

The type of zone. Can either be PRIMARY or SECONDARY. Changing this creates a new zone.

ValueSpecs map[string]interface{}

Map of additional options. Changing this creates a new zone.

attributes Map<String,Object>

Attributes for the DNS Service scheduler. Changing this creates a new zone.

description String

A description of the zone.

disableStatusCheck Boolean

Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack request returned success.

email String

The email contact for the zone record.

masters List<String>

An array of master DNS servers. For when type is SECONDARY.

name String

The name of the zone. Note the . at the end of the name. Changing this creates a new DNS zone.

projectId String

The ID of the project DNS zone is created for, sets X-Auth-Sudo-Tenant-ID header (requires an assigned user role in target project)

region String

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.

ttl Integer

The time to live (TTL) of the zone.

type String

The type of zone. Can either be PRIMARY or SECONDARY. Changing this creates a new zone.

valueSpecs Map<String,Object>

Map of additional options. Changing this creates a new zone.

attributes {[key: string]: any}

Attributes for the DNS Service scheduler. Changing this creates a new zone.

description string

A description of the zone.

disableStatusCheck boolean

Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack request returned success.

email string

The email contact for the zone record.

masters string[]

An array of master DNS servers. For when type is SECONDARY.

name string

The name of the zone. Note the . at the end of the name. Changing this creates a new DNS zone.

projectId string

The ID of the project DNS zone is created for, sets X-Auth-Sudo-Tenant-ID header (requires an assigned user role in target project)

region string

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.

ttl number

The time to live (TTL) of the zone.

type string

The type of zone. Can either be PRIMARY or SECONDARY. Changing this creates a new zone.

valueSpecs {[key: string]: any}

Map of additional options. Changing this creates a new zone.

attributes Mapping[str, Any]

Attributes for the DNS Service scheduler. Changing this creates a new zone.

description str

A description of the zone.

disable_status_check bool

Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack request returned success.

email str

The email contact for the zone record.

masters Sequence[str]

An array of master DNS servers. For when type is SECONDARY.

name str

The name of the zone. Note the . at the end of the name. Changing this creates a new DNS zone.

project_id str

The ID of the project DNS zone is created for, sets X-Auth-Sudo-Tenant-ID header (requires an assigned user role in target project)

region str

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.

ttl int

The time to live (TTL) of the zone.

type str

The type of zone. Can either be PRIMARY or SECONDARY. Changing this creates a new zone.

value_specs Mapping[str, Any]

Map of additional options. Changing this creates a new zone.

attributes Map<Any>

Attributes for the DNS Service scheduler. Changing this creates a new zone.

description String

A description of the zone.

disableStatusCheck Boolean

Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack request returned success.

email String

The email contact for the zone record.

masters List<String>

An array of master DNS servers. For when type is SECONDARY.

name String

The name of the zone. Note the . at the end of the name. Changing this creates a new DNS zone.

projectId String

The ID of the project DNS zone is created for, sets X-Auth-Sudo-Tenant-ID header (requires an assigned user role in target project)

region String

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.

ttl Number

The time to live (TTL) of the zone.

type String

The type of zone. Can either be PRIMARY or SECONDARY. Changing this creates a new zone.

valueSpecs Map<Any>

Map of additional options. Changing this creates a new zone.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing Zone Resource

Get an existing Zone 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?: ZoneState, opts?: CustomResourceOptions): Zone
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        attributes: Optional[Mapping[str, Any]] = None,
        description: Optional[str] = None,
        disable_status_check: Optional[bool] = None,
        email: Optional[str] = None,
        masters: Optional[Sequence[str]] = None,
        name: Optional[str] = None,
        project_id: Optional[str] = None,
        region: Optional[str] = None,
        ttl: Optional[int] = None,
        type: Optional[str] = None,
        value_specs: Optional[Mapping[str, Any]] = None) -> Zone
func GetZone(ctx *Context, name string, id IDInput, state *ZoneState, opts ...ResourceOption) (*Zone, error)
public static Zone Get(string name, Input<string> id, ZoneState? state, CustomResourceOptions? opts = null)
public static Zone get(String name, Output<String> id, ZoneState 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:
Attributes Dictionary<string, object>

Attributes for the DNS Service scheduler. Changing this creates a new zone.

Description string

A description of the zone.

DisableStatusCheck bool

Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack request returned success.

Email string

The email contact for the zone record.

Masters List<string>

An array of master DNS servers. For when type is SECONDARY.

Name string

The name of the zone. Note the . at the end of the name. Changing this creates a new DNS zone.

ProjectId string

The ID of the project DNS zone is created for, sets X-Auth-Sudo-Tenant-ID header (requires an assigned user role in target project)

Region string

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.

Ttl int

The time to live (TTL) of the zone.

Type string

The type of zone. Can either be PRIMARY or SECONDARY. Changing this creates a new zone.

ValueSpecs Dictionary<string, object>

Map of additional options. Changing this creates a new zone.

Attributes map[string]interface{}

Attributes for the DNS Service scheduler. Changing this creates a new zone.

Description string

A description of the zone.

DisableStatusCheck bool

Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack request returned success.

Email string

The email contact for the zone record.

Masters []string

An array of master DNS servers. For when type is SECONDARY.

Name string

The name of the zone. Note the . at the end of the name. Changing this creates a new DNS zone.

ProjectId string

The ID of the project DNS zone is created for, sets X-Auth-Sudo-Tenant-ID header (requires an assigned user role in target project)

Region string

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.

Ttl int

The time to live (TTL) of the zone.

Type string

The type of zone. Can either be PRIMARY or SECONDARY. Changing this creates a new zone.

ValueSpecs map[string]interface{}

Map of additional options. Changing this creates a new zone.

attributes Map<String,Object>

Attributes for the DNS Service scheduler. Changing this creates a new zone.

description String

A description of the zone.

disableStatusCheck Boolean

Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack request returned success.

email String

The email contact for the zone record.

masters List<String>

An array of master DNS servers. For when type is SECONDARY.

name String

The name of the zone. Note the . at the end of the name. Changing this creates a new DNS zone.

projectId String

The ID of the project DNS zone is created for, sets X-Auth-Sudo-Tenant-ID header (requires an assigned user role in target project)

region String

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.

ttl Integer

The time to live (TTL) of the zone.

type String

The type of zone. Can either be PRIMARY or SECONDARY. Changing this creates a new zone.

valueSpecs Map<String,Object>

Map of additional options. Changing this creates a new zone.

attributes {[key: string]: any}

Attributes for the DNS Service scheduler. Changing this creates a new zone.

description string

A description of the zone.

disableStatusCheck boolean

Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack request returned success.

email string

The email contact for the zone record.

masters string[]

An array of master DNS servers. For when type is SECONDARY.

name string

The name of the zone. Note the . at the end of the name. Changing this creates a new DNS zone.

projectId string

The ID of the project DNS zone is created for, sets X-Auth-Sudo-Tenant-ID header (requires an assigned user role in target project)

region string

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.

ttl number

The time to live (TTL) of the zone.

type string

The type of zone. Can either be PRIMARY or SECONDARY. Changing this creates a new zone.

valueSpecs {[key: string]: any}

Map of additional options. Changing this creates a new zone.

attributes Mapping[str, Any]

Attributes for the DNS Service scheduler. Changing this creates a new zone.

description str

A description of the zone.

disable_status_check bool

Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack request returned success.

email str

The email contact for the zone record.

masters Sequence[str]

An array of master DNS servers. For when type is SECONDARY.

name str

The name of the zone. Note the . at the end of the name. Changing this creates a new DNS zone.

project_id str

The ID of the project DNS zone is created for, sets X-Auth-Sudo-Tenant-ID header (requires an assigned user role in target project)

region str

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.

ttl int

The time to live (TTL) of the zone.

type str

The type of zone. Can either be PRIMARY or SECONDARY. Changing this creates a new zone.

value_specs Mapping[str, Any]

Map of additional options. Changing this creates a new zone.

attributes Map<Any>

Attributes for the DNS Service scheduler. Changing this creates a new zone.

description String

A description of the zone.

disableStatusCheck Boolean

Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack request returned success.

email String

The email contact for the zone record.

masters List<String>

An array of master DNS servers. For when type is SECONDARY.

name String

The name of the zone. Note the . at the end of the name. Changing this creates a new DNS zone.

projectId String

The ID of the project DNS zone is created for, sets X-Auth-Sudo-Tenant-ID header (requires an assigned user role in target project)

region String

The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.

ttl Number

The time to live (TTL) of the zone.

type String

The type of zone. Can either be PRIMARY or SECONDARY. Changing this creates a new zone.

valueSpecs Map<Any>

Map of additional options. Changing this creates a new zone.

Import

This resource can be imported by specifying the zone ID with optional project ID

 $ pulumi import openstack:dns/zone:Zone zone_1 <zone_id>
 $ pulumi import openstack:dns/zone:Zone zone_1 <zone_id>:<project_id>

Package Details

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

This Pulumi package is based on the openstack Terraform Provider.