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

Error while modifying countries in the terraform state for commercetools project. (Last index vanished) #511

Closed
mirzaSDE opened this issue Aug 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mirzaSDE
Copy link

Version information

  • terraform: 1.14.0
  • terraform provider: labd/commercetools

Describe the bug

Error while modifying countries in the terraform state. The pipeline terminated on this error below:

When applying changes to module.commercetools_project.commercetools_project_settings.project, provider "provider["registry.terraform.io/labd/commercetools"]" produced an unexpected new value: .countries: element 155 has vanished.

To Reproduce

resource "commercetools_project_settings" "project" {
  name                         = "test ${var.ct_env}"
  countries = [
    "DZ", "AS", "AD", "AO", "AG", "AM", "AW", "AU", "AT", "AZ",
    "BH", "BD", "BB", "BE", "BZ", "BJ", "BT", "BA", "BW", "BR",
    "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CL",
    "CN", "CO", "CG", "CK", "CR", "HR", "CY", "CZ", "DK", "DM",
    "EG", "SV", "GQ", "ER", "EE", "ET", "FJ", "FI", "FR", "GF",
    "PF", "GA", "GE", "GH", "GI", "GR", "GL", "GP", "GU", "GT",
    "GN", "HT", "HN", "HK", "HU", "IS", "IN", "ID", "IE", "IL",
    "IT", "JP", "JO", "KZ", "KE", "KI", "KR", "KG", "LA", "LV",
    "LB", "LS", "LR", "LI", "LT", "LU", "MO", "MK", "MG", "MY",
    "ML", "MT", "MQ", "MR", "MU", "MX", "MD", "MS", "MA", "MZ",
    "NA", "NR", "NL", "NC", "NZ", "NE", "NO", "OM", "PA", "PG",
    "PY", "PE", "PH", "PL", "PT", "QA", "RE", "DM", "RU", "RW",
    "KN", "LC", "WS", "ST", "SA", "SN", "SC", "SG", "SK", "SI",
    "SB", "ZA", "ES", "SE", "CH", "TW", "TZ", "TH", "TG", "TT",
    "TN", "TR", "TC", "AE", "GB", "UM", "UY", "US", "UZ", "VU",
    "VE", "VN", "VG", "VI", "WF", "ZM"
  ]
  currencies                   = ["AUD"]
  languages                    = ["en", "zh-CN"]
  enable_search_index_orders   = true
  enable_search_index_products = true

  carts {
    country_tax_rate_fallback_enabled = true
  }

  messages {
    enabled                    = true
    delete_days_after_creation = 15
  }
}

Expected behavior

Modify the countries for the commercetools project.

Screenshots

Screenshot 2024-08-20 at 1 00 05 PM Screenshot 2024-08-20 at 12 59 20 PM

Additional context

There is a list of countries added to commercetools project and terraform upon modifying the state throws an error that the element 155. This means in the state it claims that the last element has vanished.

Length of the list is 156 hence the element 155 is the last element/country = "ZM".

@mirzaSDE mirzaSDE added bug Something isn't working triage Needs triage labels Aug 20, 2024
@demeyerthom demeyerthom removed the triage Needs triage label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants