OpenStack

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

RecordSet

Manages a DNS record set in the OpenStack DNS Service.

Example Usage

Automatically detect the correct network

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleZone = new OpenStack.Dns.Zone("exampleZone", new OpenStack.Dns.ZoneArgs
        {
            Description = "a zone",
            Email = "email2@example.com",
            Ttl = 6000,
            Type = "PRIMARY",
        });
        var rsExampleCom = new OpenStack.Dns.RecordSet("rsExampleCom", new OpenStack.Dns.RecordSetArgs
        {
            Description = "An example record set",
            Records = 
            {
                "10.0.0.1",
            },
            Ttl = 3000,
            Type = "A",
            ZoneId = exampleZone.Id,
        });
    }

}
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 {
		exampleZone, err := dns.NewZone(ctx, "exampleZone", &dns.ZoneArgs{
			Description: pulumi.String("a zone"),
			Email:       pulumi.String("email2@example.com"),
			Ttl:         pulumi.Int(6000),
			Type:        pulumi.String("PRIMARY"),
		})
		if err != nil {
			return err
		}
		_, err = dns.NewRecordSet(ctx, "rsExampleCom", &dns.RecordSetArgs{
			Description: pulumi.String("An example record set"),
			Records: pulumi.StringArray{
				pulumi.String("10.0.0.1"),
			},
			Ttl:    pulumi.Int(3000),
			Type:   pulumi.String("A"),
			ZoneId: exampleZone.ID(),
		})
		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 com.pulumi.openstack.dns.RecordSet;
import com.pulumi.openstack.dns.RecordSetArgs;
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 exampleZone = new Zone("exampleZone", ZoneArgs.builder()        
            .description("a zone")
            .email("email2@example.com")
            .ttl(6000)
            .type("PRIMARY")
            .build());

        var rsExampleCom = new RecordSet("rsExampleCom", RecordSetArgs.builder()        
            .description("An example record set")
            .records("10.0.0.1")
            .ttl(3000)
            .type("A")
            .zoneId(exampleZone.id())
            .build());

    }
}
import pulumi
import pulumi_openstack as openstack

example_zone = openstack.dns.Zone("exampleZone",
    description="a zone",
    email="email2@example.com",
    ttl=6000,
    type="PRIMARY")
rs_example_com = openstack.dns.RecordSet("rsExampleCom",
    description="An example record set",
    records=["10.0.0.1"],
    ttl=3000,
    type="A",
    zone_id=example_zone.id)
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const exampleZone = new openstack.dns.Zone("example_zone", {
    description: "a zone",
    email: "email2@example.com",
    ttl: 6000,
    type: "PRIMARY",
});
const rsExampleCom = new openstack.dns.RecordSet("rs_example_com", {
    description: "An example record set",
    records: ["10.0.0.1"],
    ttl: 3000,
    type: "A",
    zoneId: exampleZone.id,
});
resources:
  exampleZone:
    type: openstack:dns:Zone
    properties:
      description: a zone
      email: email2@example.com
      ttl: 6000
      type: PRIMARY
  rsExampleCom:
    type: openstack:dns:RecordSet
    properties:
      description: An example record set
      records:
        - 10.0.0.1
      ttl: 3000
      type: A
      zoneId: ${exampleZone.id}

Create RecordSet Resource

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

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

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

ZoneId string

The ID of the zone in which to create the record set. Changing this creates a new DNS record set.

Description string

A description of the record set.

DisableStatusCheck bool

Disable wait for recordset to reach ACTIVE status. This argumen is disabled by default. If it is set to true, the recordset will be considered as created/updated/deleted if OpenStack request returned success.

Name string

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

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)

Records List<string>

An array of DNS records. Note: if an IPv6 address contains brackets ([ ]), the brackets will be stripped and the modified address will be recorded in the state.

Region string

The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS record set.

Ttl int

The time to live (TTL) of the record set.

Type string

The type of record set. Examples: "A", "MX". Changing this creates a new DNS record set.

ValueSpecs Dictionary<string, object>

Map of additional options. Changing this creates a new record set.

ZoneId string

The ID of the zone in which to create the record set. Changing this creates a new DNS record set.

Description string

A description of the record set.

DisableStatusCheck bool

Disable wait for recordset to reach ACTIVE status. This argumen is disabled by default. If it is set to true, the recordset will be considered as created/updated/deleted if OpenStack request returned success.

Name string

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

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)

Records []string

An array of DNS records. Note: if an IPv6 address contains brackets ([ ]), the brackets will be stripped and the modified address will be recorded in the state.

Region string

The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS record set.

Ttl int

The time to live (TTL) of the record set.

Type string

The type of record set. Examples: "A", "MX". Changing this creates a new DNS record set.

ValueSpecs map[string]interface{}

Map of additional options. Changing this creates a new record set.

zoneId String

The ID of the zone in which to create the record set. Changing this creates a new DNS record set.

description String

A description of the record set.

disableStatusCheck Boolean

Disable wait for recordset to reach ACTIVE status. This argumen is disabled by default. If it is set to true, the recordset will be considered as created/updated/deleted if OpenStack request returned success.

name String

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

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)

records List<String>

An array of DNS records. Note: if an IPv6 address contains brackets ([ ]), the brackets will be stripped and the modified address will be recorded in the state.

region String

The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS record set.

ttl Integer

The time to live (TTL) of the record set.

type String

The type of record set. Examples: "A", "MX". Changing this creates a new DNS record set.

valueSpecs Map<String,Object>

Map of additional options. Changing this creates a new record set.

zoneId string

The ID of the zone in which to create the record set. Changing this creates a new DNS record set.

description string

A description of the record set.

disableStatusCheck boolean

Disable wait for recordset to reach ACTIVE status. This argumen is disabled by default. If it is set to true, the recordset will be considered as created/updated/deleted if OpenStack request returned success.

name string

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

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)

records string[]

An array of DNS records. Note: if an IPv6 address contains brackets ([ ]), the brackets will be stripped and the modified address will be recorded in the state.

region string

The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS record set.

ttl number

The time to live (TTL) of the record set.

type string

The type of record set. Examples: "A", "MX". Changing this creates a new DNS record set.

valueSpecs {[key: string]: any}

Map of additional options. Changing this creates a new record set.

zone_id str

The ID of the zone in which to create the record set. Changing this creates a new DNS record set.

description str

A description of the record set.

disable_status_check bool

Disable wait for recordset to reach ACTIVE status. This argumen is disabled by default. If it is set to true, the recordset will be considered as created/updated/deleted if OpenStack request returned success.

name str

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

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)

records Sequence[str]

An array of DNS records. Note: if an IPv6 address contains brackets ([ ]), the brackets will be stripped and the modified address will be recorded in the state.

region str

The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS record set.

ttl int

The time to live (TTL) of the record set.

type str

The type of record set. Examples: "A", "MX". Changing this creates a new DNS record set.

value_specs Mapping[str, Any]

Map of additional options. Changing this creates a new record set.

zoneId String

The ID of the zone in which to create the record set. Changing this creates a new DNS record set.

description String

A description of the record set.

disableStatusCheck Boolean

Disable wait for recordset to reach ACTIVE status. This argumen is disabled by default. If it is set to true, the recordset will be considered as created/updated/deleted if OpenStack request returned success.

name String

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

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)

records List<String>

An array of DNS records. Note: if an IPv6 address contains brackets ([ ]), the brackets will be stripped and the modified address will be recorded in the state.

region String

The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS record set.

ttl Number

The time to live (TTL) of the record set.

type String

The type of record set. Examples: "A", "MX". Changing this creates a new DNS record set.

valueSpecs Map<Any>

Map of additional options. Changing this creates a new record set.

Outputs

All input properties are implicitly available as output properties. Additionally, the RecordSet 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 RecordSet Resource

Get an existing RecordSet 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?: RecordSetState, opts?: CustomResourceOptions): RecordSet
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        disable_status_check: Optional[bool] = None,
        name: Optional[str] = None,
        project_id: Optional[str] = None,
        records: Optional[Sequence[str]] = None,
        region: Optional[str] = None,
        ttl: Optional[int] = None,
        type: Optional[str] = None,
        value_specs: Optional[Mapping[str, Any]] = None,
        zone_id: Optional[str] = None) -> RecordSet
func GetRecordSet(ctx *Context, name string, id IDInput, state *RecordSetState, opts ...ResourceOption) (*RecordSet, error)
public static RecordSet Get(string name, Input<string> id, RecordSetState? state, CustomResourceOptions? opts = null)
public static RecordSet get(String name, Output<String> id, RecordSetState 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 description of the record set.

DisableStatusCheck bool

Disable wait for recordset to reach ACTIVE status. This argumen is disabled by default. If it is set to true, the recordset will be considered as created/updated/deleted if OpenStack request returned success.

Name string

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

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)

Records List<string>

An array of DNS records. Note: if an IPv6 address contains brackets ([ ]), the brackets will be stripped and the modified address will be recorded in the state.

Region string

The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS record set.

Ttl int

The time to live (TTL) of the record set.

Type string

The type of record set. Examples: "A", "MX". Changing this creates a new DNS record set.

ValueSpecs Dictionary<string, object>

Map of additional options. Changing this creates a new record set.

ZoneId string

The ID of the zone in which to create the record set. Changing this creates a new DNS record set.

Description string

A description of the record set.

DisableStatusCheck bool

Disable wait for recordset to reach ACTIVE status. This argumen is disabled by default. If it is set to true, the recordset will be considered as created/updated/deleted if OpenStack request returned success.

Name string

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

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)

Records []string

An array of DNS records. Note: if an IPv6 address contains brackets ([ ]), the brackets will be stripped and the modified address will be recorded in the state.

Region string

The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS record set.

Ttl int

The time to live (TTL) of the record set.

Type string

The type of record set. Examples: "A", "MX". Changing this creates a new DNS record set.

ValueSpecs map[string]interface{}

Map of additional options. Changing this creates a new record set.

ZoneId string

The ID of the zone in which to create the record set. Changing this creates a new DNS record set.

description String

A description of the record set.

disableStatusCheck Boolean

Disable wait for recordset to reach ACTIVE status. This argumen is disabled by default. If it is set to true, the recordset will be considered as created/updated/deleted if OpenStack request returned success.

name String

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

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)

records List<String>

An array of DNS records. Note: if an IPv6 address contains brackets ([ ]), the brackets will be stripped and the modified address will be recorded in the state.

region String

The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS record set.

ttl Integer

The time to live (TTL) of the record set.

type String

The type of record set. Examples: "A", "MX". Changing this creates a new DNS record set.

valueSpecs Map<String,Object>

Map of additional options. Changing this creates a new record set.

zoneId String

The ID of the zone in which to create the record set. Changing this creates a new DNS record set.

description string

A description of the record set.

disableStatusCheck boolean

Disable wait for recordset to reach ACTIVE status. This argumen is disabled by default. If it is set to true, the recordset will be considered as created/updated/deleted if OpenStack request returned success.

name string

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

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)

records string[]

An array of DNS records. Note: if an IPv6 address contains brackets ([ ]), the brackets will be stripped and the modified address will be recorded in the state.

region string

The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS record set.

ttl number

The time to live (TTL) of the record set.

type string

The type of record set. Examples: "A", "MX". Changing this creates a new DNS record set.

valueSpecs {[key: string]: any}

Map of additional options. Changing this creates a new record set.

zoneId string

The ID of the zone in which to create the record set. Changing this creates a new DNS record set.

description str

A description of the record set.

disable_status_check bool

Disable wait for recordset to reach ACTIVE status. This argumen is disabled by default. If it is set to true, the recordset will be considered as created/updated/deleted if OpenStack request returned success.

name str

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

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)

records Sequence[str]

An array of DNS records. Note: if an IPv6 address contains brackets ([ ]), the brackets will be stripped and the modified address will be recorded in the state.

region str

The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS record set.

ttl int

The time to live (TTL) of the record set.

type str

The type of record set. Examples: "A", "MX". Changing this creates a new DNS record set.

value_specs Mapping[str, Any]

Map of additional options. Changing this creates a new record set.

zone_id str

The ID of the zone in which to create the record set. Changing this creates a new DNS record set.

description String

A description of the record set.

disableStatusCheck Boolean

Disable wait for recordset to reach ACTIVE status. This argumen is disabled by default. If it is set to true, the recordset will be considered as created/updated/deleted if OpenStack request returned success.

name String

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

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)

records List<String>

An array of DNS records. Note: if an IPv6 address contains brackets ([ ]), the brackets will be stripped and the modified address will be recorded in the state.

region String

The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS record set.

ttl Number

The time to live (TTL) of the record set.

type String

The type of record set. Examples: "A", "MX". Changing this creates a new DNS record set.

valueSpecs Map<Any>

Map of additional options. Changing this creates a new record set.

zoneId String

The ID of the zone in which to create the record set. Changing this creates a new DNS record set.

Import

This resource can be imported by specifying the zone ID and recordset ID, separated by a forward slash.

 $ pulumi import openstack:dns/recordSet:RecordSet recordset_1 <zone_id>/<recordset_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.