github hashicorp/terraform-provider-ultradns v0.2.0

pre-release3 years ago

ENHANCEMENTS:

  • Added the Terrform Import feature, which can be used to import data from UltraDNS.
  • Added additional Unit Testcases for existing resources.
  • Unit Testcase coverage is now at 80% for this project.
  • Compatibility with latest ultradns-sdk-go plugin.
  • Enhanced ".travis.yml" to enable additional code coverage.
  • Updated "README" file to reflect current changes.
  • Updated "GNUMake" file to enable additional code coverage and testing.
  • Enhanced acceptance test case in resource dirpool to support DirPoolProfile DTO.
  • Enhanced acceptance test cases in all the resources by making domain and baseurl fields dynamic in acceptance test cases.
    NOTES:
  • The terraform state generated by a previous version of the ultradns plugin is compatible with the newest version of the plugin. However, the terraform state file that is generated by a new version of the ultradns plugin is not compatible with the old plugin.
    Please make sure to create the backup of the terraform state file that is created by the previous version.
  • RDpool, TCpool, and Dirpool terraform resources only support the usage of "A" type records.

TESTING THE PLUGIN LOCALLY (as a third-party plugin, until officially released by hashicorp):

  • Download the plugin binary (terraform-provider-ultradns_v0.2.0.zip) from the release assets
  • Unzip the plugin binary
    $> unzip terraform-provider-ultradns_v0.2.0.zip
  • Move the plugin to appropriate (third-party plugin) directory
    $> mv terraform-provider-ultradns_v0.2.0 ~/.terraform.d/plugins/
  • Remove the older terraform plugin, if it exists
    $> rm -f .terraform/plugins/<OS>_<ARCH>/terraform-provider-ultradns*
  • Update main.tf to use the provider plugin as intended WITH the desired ultradns provider "version"
    provider "ultradns" {
      version  = "~>0.2.0"
      username = "${var.ULTRADNS_USERNAME}"
      password = "${var.ULTRADNS_PASSWORD}"
      baseurl  = "${var.ULTRADNS_BASEURL}"
    }
    
  • Initialize the plugin using "terraform init" command

TESTING TERRAFORM IMPORT FEATURE:

  • Below are some examples that displays various scenarios in which we can perform terraform import on the resources provided by the ultradns plugin.
    UltraDNS RDPool Resource
    $> terraform import "ultradns_rdpool.it" "test-rdpool-minimal:kubernetes-ultradns-provider-test.com:A"
    Output:
    ultradns_rdpool.it: Importing from ID "test-rdpool-minimal:kubernetes-ultradns-provider-test.com:A"...
    ultradns_rdpool.it: Import prepared!
      Prepared ultradns_rdpool for import
    ultradns_rdpool.it: Refreshing state... [id=test-rdpool-minimal:kubernetes-ultradns-provider-test.com:A]
    Import successful!
    The resources that were imported are shown above. These resources are now in
    your Terraform state and will henceforth be managed by Terraform.
    Warning: Interpolation-only expressions are deprecated
      on main.tf line 8, in provider "ultradns":
       8:   username = "${var.ULTRADNS_USERNAME}"
    Terraform 0.11 and earlier required all non-constant expressions to be
    provided via interpolation syntax, but this pattern is now deprecated. To
    silence this warning, remove the "${ sequence from the start and the }"
    sequence from the end of this expression, leaving just the inner expression.
    Template interpolation syntax is still used to construct strings from
    expressions when the template includes multiple interpolation sequences or a
    mixture of literal strings and interpolations. This deprecation applies only
    to templates that consist entirely of a single interpolation sequence.
    (and 31 more similar warnings elsewhere)
    Warning: Quoted references are deprecated
      on main.tf line 119, in resource "ultradns_probe_ping" "it":
     119:   depends_on = ["ultradns_tcpool.test-probe-ping-pool"]
    In this context, references are expected literally rather than in quotes.
    Terraform 0.11 and earlier required quotes, but quoted references are now
    deprecated and will be removed in a future version of Terraform. Remove the
    quotes surrounding this reference to silence this warning.
    (and 5 more similar warnings elsewhere)
    Warning: Quoted type constraints are deprecated
      on variables.tf line 2, in variable "ULTRADNS_USERNAME":
       2:   type = "string"
    Terraform 0.11 and earlier required type constraints to be given in quotes,
    but that form is now deprecated and will be removed in a future version of
    Terraform. To silence this warning, remove the quotes around "string".
    (and 7 more similar warnings elsewhere)
    
    UltraDNS Resource Record
    $> terraform import "ultradns_record.it" "test-record-txt:kubernetes-ultradns-provider-test.com:TXT"
    
    Output:
    ultradns_record.it: Importing from ID "test-record-txt:kubernetes-ultradns-provider-test.com:TXT"...
    ultradns_record.it: Import prepared!
      Prepared ultradns_record for import
    ultradns_record.it: Refreshing state... [id=test-record-txt:kubernetes-ultradns-provider-test.com:TXT]
    Import successful!
    The resources that were imported are shown above. These resources are now in
    your Terraform state and will henceforth be managed by Terraform.
    Warning: Interpolation-only expressions are deprecated
      on main.tf line 8, in provider "ultradns":
       8:   username = "${var.ULTRADNS_USERNAME}"
    Terraform 0.11 and earlier required all non-constant expressions to be
    provided via interpolation syntax, but this pattern is now deprecated. To
    silence this warning, remove the "${ sequence from the start and the }"
    sequence from the end of this expression, leaving just the inner expression.
    Template interpolation syntax is still used to construct strings from
    expressions when the template includes multiple interpolation sequences or a
    mixture of literal strings and interpolations. This deprecation applies only
    to templates that consist entirely of a single interpolation sequence.
    (and 31 more similar warnings elsewhere)
    Warning: Quoted references are deprecated
      on main.tf line 119, in resource "ultradns_probe_ping" "it":
     119:   depends_on = ["ultradns_tcpool.test-probe-ping-pool"]
    In this context, references are expected literally rather than in quotes.
    Terraform 0.11 and earlier required quotes, but quoted references are now
    deprecated and will be removed in a future version of Terraform. Remove the
    quotes surrounding this reference to silence this warning.
    (and 5 more similar warnings elsewhere)
    Warning: Quoted type constraints are deprecated
      on variables.tf line 2, in variable "ULTRADNS_USERNAME":
       2:   type = "string"
    Terraform 0.11 and earlier required type constraints to be given in quotes,
    but that form is now deprecated and will be removed in a future version of
    Terraform. To silence this warning, remove the quotes around "string".
    (and 7 more similar warnings elsewhere)
    
    UltraDNS Probe HTTP Resource
    $> terraform import "ultradns_probe_http.test-probe-http-minimal" "testprobehttpminimal.com:kubernetes-ultradns-provider-test.com:060848825F134517"  
    Output:
    ultradns_probe_http.test-probe-http-minimal: Importing from ID "testprobehttpminimal.com:kubernetes-ultradns-provider-test.com:060848825F134517"...
    ultradns_probe_http.test-probe-http-minimal: Import prepared!
      Prepared ultradns_probe_http for import
    ultradns_probe_http.test-probe-http-minimal: Refreshing state... [id=testprobehttpminimal.com:kubernetes-ultradns-provider-test.com:060848825F134517]
    Import successful!
    The resources that were imported are shown above. These resources are now in
    your Terraform state and will henceforth be managed by Terraform.
    Warning: Interpolation-only expressions are deprecated
      on main.tf line 8, in provider "ultradns":
       8:   username = "${var.ULTRADNS_USERNAME}"
    Terraform 0.11 and earlier required all non-constant expressions to be
    provided via interpolation syntax, but this pattern is now deprecated. To
    silence this warning, remove the "${ sequence from the start and the }"
    sequence from the end of this expression, leaving just the inner expression.
    Template interpolation syntax is still used to construct strings from
    expressions when the template includes multiple interpolation sequences or a
    mixture of literal strings and interpolations. This deprecation applies only
    to templates that consist entirely of a single interpolation sequence.
    (and 35 more similar warnings elsewhere)
    Warning: Quoted references are deprecated
      on main.tf line 119, in resource "ultradns_probe_ping" "it":
     119:   depends_on = ["ultradns_tcpool.test-probe-ping-pool"]
    In this context, references are expected literally rather than in quotes.
    Terraform 0.11 and earlier required quotes, but quoted references are now
    deprecated and will be removed in a future version of Terraform. Remove the
    quotes surrounding this reference to silence this warning.
    (and 5 more similar warnings elsewhere)
    Warning: Quoted type constraints are deprecated
      on variables.tf line 2, in variable "ULTRADNS_USERNAME":
       2:   type = "string"
    Terraform 0.11 and earlier required type constraints to be given in quotes,
    but that form is now deprecated and will be removed in a future version of
    Terraform. To silence this warning, remove the quotes around "string".
    (and 7 more similar warnings elsewhere)
    
    UltraDNS Probe Ping Resource
    
    $> terraform import "ultradns_tcpool.test-probe-ping-pool" "testprobepingpool:kubernetes-ultradns-provider-test.com:A"
    
    Output:
    ultradns_tcpool.test-probe-ping-pool: Importing from ID "testprobepingpool:kubernetes-ultradns-provider-test.com:A"...
    ultradns_tcpool.test-probe-ping-pool: Import prepared!
      Prepared ultradns_tcpool for import
    ultradns_tcpool.test-probe-ping-pool: Refreshing state... [id=testprobepingpool:kubernetes-ultradns-provider-test.com:A]
     
    Import successful!
     
    The resources that were imported are shown above. These resources are now in
    your Terraform state and will henceforth be managed by Terraform.
     
     
    Warning: Interpolation-only expressions are deprecated
     
      on main.tf line 8, in provider "ultradns":
       8:   username = "${var.ULTRADNS_USERNAME}"
     
    Terraform 0.11 and earlier required all non-constant expressions to be
    provided via interpolation syntax, but this pattern is now deprecated. To
    silence this warning, remove the "${ sequence from the start and the }"
    sequence from the end of this expression, leaving just the inner expression.
     
    Template interpolation syntax is still used to construct strings from
    expressions when the template includes multiple interpolation sequences or a
    mixture of literal strings and interpolations. This deprecation applies only
    to templates that consist entirely of a single interpolation sequence.
     
    (and 35 more similar warnings elsewhere)
     
     
    Warning: Quoted references are deprecated
     
      on main.tf line 119, in resource "ultradns_probe_ping" "it":
     119:   depends_on = ["ultradns_tcpool.test-probe-ping-pool"]
     
    In this context, references are expected literally rather than in quotes.
    Terraform 0.11 and earlier required quotes, but quoted references are now
    deprecated and will be removed in a future version of Terraform. Remove the
    quotes surrounding this reference to silence this warning.
     
    (and 5 more similar warnings elsewhere)
     
     
    Warning: Quoted type constraints are deprecated
     
      on variables.tf line 2, in variable "ULTRADNS_USERNAME":
       2:   type = "string"
     
    Terraform 0.11 and earlier required type constraints to be given in quotes,
    but that form is now deprecated and will be removed in a future version of
    Terraform. To silence this warning, remove the quotes around "string".
     
    (and 7 more similar warnings elsewhere)
    
    

ROLLBACK PROCEDURE:

  • Download the plugin binary (terraform-provider-ultradns_v0.1.1.zip) from the release assets
  • Unzip the plugin binary
    $> unzip terraform-provider-ultradns_v0.1.1.zip
  • Move the plugin to appropriate (third-party plugin) directory
    $> mv terraform-provider-ultradns_v0.1.1 ~/.terraform.d/plugins/
  • Remove the older terraform plugin, if it exists
    $> rm -f .terraform/plugins/<OS>_<ARCH>/terraform-provider-ultradns*
  • Update main.tf to use the provider plugin as intended WITH the desired ultradns provider "version"
    provider "ultradns" {
      version  = "~>0.1.1"
      username = "${var.ULTRADNS_USERNAME}"
      password = "${var.ULTRADNS_PASSWORD}"
      baseurl  = "${var.ULTRADNS_BASEURL}"
    }
    
  • Initialize the plugin using "terraform init" command

Don't miss a new terraform-provider-ultradns release

NewReleases is sending notifications on new releases.