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

getting ImportStateVerify attributes not equivalent. when bumping to v1.6.0 #393

Closed
BBBmau opened this issue Nov 25, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@BBBmau
Copy link

BBBmau commented Nov 25, 2024

terraform-plugin-testing version

github.com/hashicorp/terraform-plugin-testing v1.6.0

Relevant provider source code

Could be due to this PR

Terraform Configuration Files

Relevant Test: https://github.com/hashicorp/terraform-provider-google/blob/efe355c1a6d781fee6d43624701217ae3a666e23/google/services/bigquery/resource_bigquery_dataset_test.go#L263-L313

Many are found here when attempting to bump from v1.5.0 -> v1.11.0 which is what led to some investigation into this

Expected Behavior

Tests should just pass as usual. They currently do but the moment we bump to v1.6.0 we run into ImportStateVerify issues

Actual Behavior

We run into ImportStateVerify errors that we didn't have previously. Here is just one example out of many:

2024-11-25T14:07:26.548-0800 [DEBUG] sdk.helper_resource: Started tfprotov5 provider instance server: test_step_number=4 test_name=TestAccBigQueryDataset_access test_terraform_path=/Users/mau/.asdf/shims/terraform test_working_directory=/var/folders/mq/r6f7by0x78j1966k9ybr5bnc0000gn/T/plugintest4044340386 tf_provider_addr=registry.terraform.io/hashicorp/google
2024/11/25 14:07:26 [DEBUG] [transport] [server-transport 0x14002b47380] Closing: EOF 
2024/11/25 14:07:26 [DEBUG] [transport] [server-transport 0x14000fd6b60] Closing: EOF 
2024/11/25 14:07:26 [DEBUG] [transport] [server-transport 0x14000fd6b60] loopyWriter exiting with error: transport closed by client 
2024-11-25T14:07:26.971-0800 [DEBUG] sdk.helper_resource: Stopping providers: test_name=TestAccBigQueryDataset_access test_terraform_path=/Users/mau/.asdf/shims/terraform test_working_directory=/var/folders/mq/r6f7by0x78j1966k9ybr5bnc0000gn/T/plugintest4044340386 test_step_number=4
2024-11-25T14:07:26.974-0800 [ERROR] sdk.helper_resource: Error running import: test_name=TestAccBigQueryDataset_access test_terraform_path=/Users/mau/.asdf/shims/terraform test_working_directory=/var/folders/mq/r6f7by0x78j1966k9ybr5bnc0000gn/T/plugintest4044340386 test_step_number=4
  error=
  | ImportStateVerify attributes not equivalent. Difference is shown below. The - symbol indicates attributes missing after import.
  | 
  |   map[string]string{
  | - \t"access.0.iam_member":     "allUsers",
  | + \t"access.0.iam_member":     "",
  | - \t"access.0.role":           "READER",
  | + \t"access.0.role":           "OWNER",
  | - \t"access.0.user_by_email":  "",
  | + \t"access.0.user_by_email":  "[email protected]",
  | - \t"access.1.domain":         "hashicorp.com",
  | + \t"access.1.domain":         "",
  | - \t"access.1.iam_member":     "",
  | + \t"access.1.iam_member":     "allUsers",
  | + \t"access.2.domain":         "hashicorp.com",
  | + \t"access.2.group_by_email": "",
  | + \t"access.2.iam_member":     "",
  | - \t"access.2.role":           "OWNER",
  | + \t"access.2.role":           "READER",
  | + \t"access.2.special_group":  "",
  | - \t"access.2.user_by_email":  "[email protected]",
  | + \t"access.2.user_by_email":  "",
  |   }

Steps to Reproduce

To get past this we are setting these teststeps with ImportStateVerifyIgnore though this should be temporary.

References

@BBBmau BBBmau added the bug Something isn't working label Nov 25, 2024
@BBBmau
Copy link
Author

BBBmau commented Nov 25, 2024

closing since this is a duplicate of: #327

@BBBmau BBBmau closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant