1. Packages
  2. OpenStack
  3. API Docs
  4. dns
  5. RecordSet
OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi

openstack.dns.RecordSet

Explore with Pulumi AI

openstack logo
OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi

    Manages a DNS record set in the OpenStack DNS Service.

    Example Usage

    Automatically detect the correct network

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleZone = new OpenStack.Dns.Zone("exampleZone", new()
        {
            Email = "email2@example.com",
            Description = "a zone",
            Ttl = 6000,
            Type = "PRIMARY",
        });
    
        var rsExampleCom = new OpenStack.Dns.RecordSet("rsExampleCom", new()
        {
            ZoneId = exampleZone.Id,
            Description = "An example record set",
            Ttl = 3000,
            Type = "A",
            Records = new[]
            {
                "10.0.0.1",
            },
        });
    
    });
    
    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{
    			Email:       pulumi.String("email2@example.com"),
    			Description: pulumi.String("a zone"),
    			Ttl:         pulumi.Int(6000),
    			Type:        pulumi.String("PRIMARY"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewRecordSet(ctx, "rsExampleCom", &dns.RecordSetArgs{
    			ZoneId:      exampleZone.ID(),
    			Description: pulumi.String("An example record set"),
    			Ttl:         pulumi.Int(3000),
    			Type:        pulumi.String("A"),
    			Records: pulumi.StringArray{
    				pulumi.String("10.0.0.1"),
    			},
    		})
    		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()        
                .email("email2@example.com")
                .description("a zone")
                .ttl(6000)
                .type("PRIMARY")
                .build());
    
            var rsExampleCom = new RecordSet("rsExampleCom", RecordSetArgs.builder()        
                .zoneId(exampleZone.id())
                .description("An example record set")
                .ttl(3000)
                .type("A")
                .records("10.0.0.1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_openstack as openstack
    
    example_zone = openstack.dns.Zone("exampleZone",
        email="email2@example.com",
        description="a zone",
        ttl=6000,
        type="PRIMARY")
    rs_example_com = openstack.dns.RecordSet("rsExampleCom",
        zone_id=example_zone.id,
        description="An example record set",
        ttl=3000,
        type="A",
        records=["10.0.0.1"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const exampleZone = new openstack.dns.Zone("exampleZone", {
        email: "email2@example.com",
        description: "a zone",
        ttl: 6000,
        type: "PRIMARY",
    });
    const rsExampleCom = new openstack.dns.RecordSet("rsExampleCom", {
        zoneId: exampleZone.id,
        description: "An example record set",
        ttl: 3000,
        type: "A",
        records: ["10.0.0.1"],
    });
    
    resources:
      exampleZone:
        type: openstack:dns:Zone
        properties:
          email: email2@example.com
          description: a zone
          ttl: 6000
          type: PRIMARY
      rsExampleCom:
        type: openstack:dns:RecordSet
        properties:
          zoneId: ${exampleZone.id}
          description: An example record set
          ttl: 3000
          type: A
          records:
            - 10.0.0.1
    

    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:

    Records List<string>
    An array of DNS records.
    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)
    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.
    Records []string
    An array of DNS records.
    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)
    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.
    records List<String>
    An array of DNS records.
    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)
    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.
    records string[]
    An array of DNS records.
    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)
    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.
    records Sequence[str]
    An array of DNS records.
    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)
    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.
    records List<String>
    An array of DNS records.
    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)
    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.
    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.
    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.
    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.
    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.
    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.
    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
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi