Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

srv_record not imported correctly #12

Open
LanceSandino opened this issue Oct 6, 2020 · 1 comment
Open

srv_record not imported correctly #12

LanceSandino opened this issue Oct 6, 2020 · 1 comment

Comments

@LanceSandino
Copy link

When importing SRV record, roundRobin info does not import.

sandino@host dns % terraform import --allow-missing-config constellix_srv_record.srv_record domains:<parent-id>:<record-id>
constellix_srv_record.srv_record: Importing from ID "domains:<parent-id>:<record-id>"...
constellix_srv_record.srv_record: Import prepared!
  Prepared constellix_srv_record for import
constellix_srv_record.srv_record: Refreshing state... [id=<record-id>]

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.

----------------

sandino@host dns % terraform state show 'constellix_srv_record.srv_record'
# constellix_srv_record.srv_record:
resource "constellix_srv_record" "srv_record" {
    domain_id   = "<parent-id>"
    gtd_region  = 1
    id          = "<record-id>"
    name        = "value"
    noanswer    = false
    source_type = "domains"
    ttl         = 1800
    type        = "SRV"
}
@nicksantamaria
Copy link

nicksantamaria commented Jan 5, 2021

I'm seeing the same problem with constellix_aname_record resources

resource "constellix_aname_record" "w" {
  domain_id     = constellix_domain.main.id
  name          = "w"
  source_type   = "domains"
  record_option = "roundRobin"
  ttl           = 3600
  note          = ""
  roundrobin {
    value        = "foo.bar.ap-southeast-2.elb.amazonaws.com."
    disable_flag = "false"
  }
}

After import, this is the delta detected after running terraform plan.

  # module.foo.constellix_aname_record.w will be updated in-place
  ~ resource "constellix_aname_record" "w" {
        contact_ids                  = []
        domain_id                    = "460964"
        geo_location                 = {}
        gtd_region                   = 1
        id                           = "6555475"
        name                         = "w"
        noanswer                     = false
        pools                        = []
        record_failover_disable_flag = "false"
        record_option                = "roundRobin"
        source_type                  = "domains"
        ttl                          = 3600
        type                         = "ANAME"

      + roundrobin {
          + disable_flag = false
          + value        = "foo.bar.ap-southeast-2.elb.amazonaws.com."
        }
    }

terraform show is missing the roundrobin block.

# module.foo.constellix_aname_record.w:
resource "constellix_aname_record" "w" {
    contact_ids                  = []
    domain_id                    = "460964"
    geo_location                 = {}
    gtd_region                   = 1
    id                           = "6555475"
    name                         = "w"
    noanswer                     = false
    pools                        = []
    record_failover_disable_flag = "false"
    record_option                = "roundRobin"
    source_type                  = "domains"
    ttl                          = 3600
    type                         = "ANAME"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants