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

Traffic filters in 0.6.0: "provider produced inconsistent result after apply" #621

Closed
4 tasks done
jamieparkinson opened this issue Apr 14, 2023 · 2 comments · Fixed by #632
Closed
4 tasks done
Labels
bug Something isn't working

Comments

@jamieparkinson
Copy link

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

Planning of an ec_deployment with associated ec_deployment_traffic_filter_associations should be idempotent: after applying once no changes should remain in the plan, and subsequent applys should succeed regardless.

Current Behavior

A cluster with associated traffic filters has successfully been configured/applied, but a subsequent plan aims to remove the traffic filters. On applying this plan, the following error occurs (specifics have been replaced with pseudocode in angle brackets):

Error: Provider produced inconsistent result after apply

When applying changes to <ec_deployment resource>, provider "provider[\"registry.terraform.io/elastic/ec\"]" produced an unexpected new value: .traffic_filter: was null, but now cty.SetVal([]cty.Value{cty.StringVal("<filter id 1>"), cty.StringVal("<filter id 2>")}).

This is a bug in the provider, which should be reported in the provider's own issue tracker.

We are also seeing spurious config changes to the elasticsearch block in the deployment resource, but I think this is already being tracked in other issues on this repo.

Terraform resources

resource "ec_deployment" "cluster" {
  // name, alias etc config omitted for brevity
  elasticsearch = {
    autoscale = "false"
    hot = {
      size        = "1g"
      zone_count  = 1
      autoscaling = {}
    }
  }
}

resource "ec_deployment_traffic_filter_association" "cluster" {
  for_each = var.network_config.ec_traffic_filters // set of filter ids

  deployment_id     = ec_deployment.cluster.id
  traffic_filter_id = each.value
}

Steps to Reproduce

  1. Apply a plan with ec_deployment_traffic_filter_associations
  2. Plan again - see that filters are to be removed
  3. Apply again - see error above.

Your Environment

Using the 0.6.0 provider

@jamieparkinson jamieparkinson added the bug Something isn't working label Apr 14, 2023
@jamieparkinson jamieparkinson changed the title Traffic filters: "provider produced inconsistent result after apply" Traffic filters in 0.6.0: "provider produced inconsistent result after apply" Apr 14, 2023
@jamieparkinson
Copy link
Author

Related to #419

@tobio
Copy link
Member

tobio commented Aug 5, 2023

This got released with 0.8.0 yesterday.

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
2 participants