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

Cannot destroy after creating > 50 host DNS entries #581

Closed
tsella opened this issue Aug 28, 2018 · 4 comments
Closed

Cannot destroy after creating > 50 host DNS entries #581

tsella opened this issue Aug 28, 2018 · 4 comments
Labels

Comments

@tsella
Copy link

tsella commented Aug 28, 2018

Terraform Version

Terraform v0.11.7

OCI Provider Version

v2.2.0

Description:

My setup creates multiple oci_core_instances and oci_dns_record host records to point to them. Recently I've created >50 instances, and when trying to destroy them, terraform croaked while refreshing:

Error: Error refreshing state: 2 error(s) occurred:

  • module.dns_suborigin.oci_dns_record.host: 1 error(s) occurred:

  • module.dns_suborigin.oci_dns_record.host: oci_dns_record.host: target A record could not be matched against data XXX.XXX.XXX.XXX
    from set [{ ....

The returned set is capped at 50 records, and so, while the XXX.XXX.XXX.XXX address has a corresponding DNS entry, terraform is unable to find it.

@tsella
Copy link
Author

tsella commented Aug 28, 2018

Terraform Plan

provider "oci" {
  version              = "~> 2.2"
  tenancy_ocid         = ""
  user_ocid            = ""
  fingerprint          = ""
  private_key_path     = ""
  region               = "us-ashburn-1"
  disable_auto_retries = "true"
}

variable number_of_entries {
  type = "string"
}

variable zone_name {
  type = "string"
  default = ""
}

variable compartment_ocid {
  type = "string"
  default = ""
}

resource "oci_dns_zone" "vcn-zone" {
  compartment_id = "${var.compartment_ocid}"
  name = "${var.zone_name}"
  zone_type = "PRIMARY"
}

resource "oci_dns_record" "host" {
  count = "${var.number_of_entries}"
  zone_name_or_id = "${oci_dns_zone.vcn-zone.name}"
  domain = "192-168-168-${count.index}.${oci_dns_zone.vcn-zone.name}"
  rtype = "A"
  rdata = "192.168.168.${count.index}"
  ttl = "600"
}

Fill in your provider configuration, compartment_ocid and zone_name.

Apply for number_of_entries of 20, then destroy: works
Apply for number_of_entries of 51, then destroy: fails.

@rcohenma
Copy link
Contributor

We have a fix for this. We plan to release it next week.

@tsella
Copy link
Author

tsella commented Sep 17, 2018

Thanks for the update

@rcohenma
Copy link
Contributor

v3.0.0 should have the fix for this issue.

in v3.0.0 we changed the way to get the latest version of our provider in order to be more in line with other terraform providers. See the following doc for instructions on how to upgrade
https://www.terraform.io/docs/providers/oci/guides/version-3-upgrade.html

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

No branches or pull requests

3 participants