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

trust_account and trust_external always drifting #686

Closed
4 tasks done
lra opened this issue Aug 9, 2023 · 1 comment · Fixed by #687
Closed
4 tasks done

trust_account and trust_external always drifting #686

lra opened this issue Aug 9, 2023 · 1 comment · Fixed by #687
Assignees
Labels
bug Something isn't working

Comments

@lra
Copy link

lra commented Aug 9, 2023

Readiness Checklist

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I am reporting the issue to the correct repository (for multi-repository projects)

Expected Behavior

I'm expecting a clean plan after a simple imported deployement:

No changes. Your infrastructure matches the configuration.

Current Behavior

When I terraform plan/apply, I get:

Terraform will perform the following actions:

  # ec_deployment.percolate_cs will be updated in-place
  ~ resource "ec_deployment" "percolate_cs" {
      ~ elasticsearch          = {
          + trust_account  = (known after apply)
          + trust_external = (known after apply)
            # (9 unchanged attributes hidden)
        }
        id                     = "f18b28c9f9db4f40ac4078be249e6e41"
        name                   = "prod-percolate-percolate-cs"
        # (5 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

## Terraform definition

resource "ec_deployment" "percolate_cs" {
  name                   = "prod-percolate-percolate-cs"
  region                 = "us-east-1"
  version                = "7.10.0"
  deployment_template_id = "aws-io-optimized-v2"

  elasticsearch {}

  kibana {}
}

Steps to Reproduce

  1. terraform import ec_deployment.percolate_cs f18b28c9f9db4f40ac4078be249e6e41
  2. terraform apply
  3. terraform apply
  4. ...

Context

Trying to import existing deployments to upgrade the provider from v0.5 to v0.8 now that our previous issue blocking the upgrade is fixed: #599.

In the terraform state, I am seeing:

              "trust_account": null,
              "trust_external": null,

I tried to specify empty lists or set to both and it still give us the same behavior. Changing the values in the state does not solve it either. We are unable to get a drift-less plan.

Possible Solution

Because of this we can't upgrade to 0.8+ and need to stick with v0.5.1.

Your Environment

Terraform v1.5.4
on darwin_arm64
+ provider registry.terraform.io/elastic/ec v0.8.0
@lra lra added the bug Something isn't working label Aug 9, 2023
@tobio tobio self-assigned this Aug 13, 2023
@lra
Copy link
Author

lra commented Aug 17, 2023

Thanks, will confirm the fix once a new release is out.

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

Successfully merging a pull request may close this issue.

2 participants