Skip to content

Latest commit

 

History

History

dns

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

CIS DNS module

This module is used to create and manage IBM Cloud Internet Services (CIS) DNS records. For more information, see the main readme file for this module.

Usage

provider "ibm" {
  ibmcloud_api_key = ""
}

module "cis_dns_records" {
  source          = "terraform-ibm-modules/cis/ibm/dns"
  cis_instance_id = "crn:v1:bluemix:public:internet-svcs:global:a/xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX:xxxxxxxx-XXXX-xxxx-XXXX-xxxxxXXXXxxxx::"
  domain_id       = "xxxxXXXXxxxxXXXXxxxxxxxxXXXXxxxx"
  dns_record_set  = [
    {
      type    = "A"
      name    = "test-example"
      content = "1.2.3.4"
      ttl     = 900
    }
  ]
}

Requirements

Name Version
terraform >= 1.3.0
ibm >= 1.63.0
local >= 2.4.0

Modules

No modules.

Resources

Name Type
ibm_cis_dns_record.dns_records resource
ibm_cis_dns_records_import.import_dns_records resource
local_file.dns_record_file resource

Inputs

Name Description Type Default Required
base64_encoded_dns_records_file The base64-encoded DNS zone file in BIND format that contains the details of the DNS records Learn more. Required if dns_records_file is not specified. string null no
cis_instance_id CRN of the existing CIS instance. string n/a yes
dns_record_set List of DNS records to be added for the CIS Instance.
list(object({
name = string
type = string
ttl = optional(number) # in unit seconds, starts with value 120
content = optional(string)
priority = optional(number) # mandatory for SRV type of record
proxied = optional(bool) # default value is false
data = optional(object({
altitude = optional(number) # mandatory for LOC type of record
lat_degrees = optional(number) # mandatory for LOC type of record
lat_direction = optional(string) # mandatory for LOC type of record
lat_minutes = optional(number) # mandatory for LOC type of record
lat_seconds = optional(number) # mandatory for LOC type of record
long_degrees = optional(number) # mandatory for LOC type of record
long_direction = optional(string) # mandatory for LOC type of record
long_minutes = optional(number) # mandatory for LOC type of record
long_seconds = optional(number) # mandatory for LOC type of record
precision_horz = optional(number) # mandatory for LOC type of record
precision_vert = optional(number) # mandatory for LOC type of record
size = optional(number) # mandatory for LOC type of record
tag = optional(string) # required for CAA type of record
value = optional(string) # required for CAA type of record
target = optional(string) # required for SRV type of record
priority = optional(number) # required for SRV type of record
port = optional(number) # mandatory for SRV type of record
proto = optional(string) # mandatory for SRV type of record
service = optional(string) # mandatory for SRV type of record, starts with an '_'
weight = optional(number) # mandatory for SRV type of record
}))
}))
[] no
dns_records_file The DNS file in text format that contains the details of the DNS records. Required if base64_encoded_dns_records_file is not specified. string null no
domain_id ID of the existing domain to add a DNS record to the CIS instance. string n/a yes

Outputs

Name Description
cis_dns_records DNS records of CIS instance
cis_imported_dns_records Imported DNS records from a file.