-
Notifications
You must be signed in to change notification settings - Fork 233
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
ImportState acceptance test step fails with multiple providers #521
Comments
This Terraform AWS Provider acceptance test failure on SDK v2 is likely related:
With its configuration: func testAccDynamoDbGlobalTableConfig_multipleRegions_dynamodb_tables(tableName string) string {
return testAccAlternateRegionProviderConfig() + fmt.Sprintf(`
data "aws_region" "alternate" {
provider = "awsalternate"
}
data "aws_region" "current" {}
resource "aws_dynamodb_table" "test" {
hash_key = "myAttribute"
name = %[1]q
stream_enabled = true
stream_view_type = "NEW_AND_OLD_IMAGES"
read_capacity = 1
write_capacity = 1
attribute {
name = "myAttribute"
type = "S"
}
}
resource "aws_dynamodb_table" "alternate" {
provider = "awsalternate"
hash_key = "myAttribute"
name = %[1]q
stream_enabled = true
stream_view_type = "NEW_AND_OLD_IMAGES"
read_capacity = 1
write_capacity = 1
attribute {
name = "myAttribute"
type = "S"
}
}
`, tableName)
} |
Ugh, ok, I have a Thought on what this is. I think when importing we don't have access to the configuration, so the I haven't investigated, but I have a hunch that could be the issue. [edit] I'm seeing #522 now as well, and that could potentially be the issue, as well, though I think ID-only imports would still be broken even then. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
SDK version
Relevant provider source code
...
Terraform Configuration Files
Failing Acceptance Test
Expected Behavior
The import test step should have passed.
Actual Behavior
The actual state is correct - The imported resource, using the default
aws
provider, is the requester.The expected state is incorrect - This is for the accepter resource which has the same ID but is using the
awsalternate
provider.Both resources are of the same type,
aws_vpc_peering_connection_options
, and have the same ID (the resource ID is the underlying VPC peering connection ID which is the same for both requester and accepter options resources).Steps to Reproduce
References
hashicorp/terraform-provider-aws#12126
The text was updated successfully, but these errors were encountered: