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

provider/aws: DynamoDB Table ARN #3500

Merged
merged 2 commits into from
Oct 14, 2015

Conversation

stack72
Copy link
Contributor

@stack72 stack72 commented Oct 14, 2015

After the DynamoDB table is created, the ARN wasn't being set. Fixes #3497

terraform [aws-dynamodb-table-arn●] % make testacc TEST=./builtin/providers/aws TESTARGS='-run=DynamoDb' 2>~/tf.log
go generate ./...
TF_ACC=1 go test ./builtin/providers/aws -v -run=DynamoDb -timeout 90m
=== RUN   TestAccAWSDynamoDbTable
[DEBUG] Adding LSI data to the table[DEBUG] Added 1 LSI definitions[DEBUG] Trying to create initial table state![DEBUG] Checking on table TerraformTestTable--- PASS: TestAccAWSDynamoDbTable (125.13s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    125.13s

@catsby
Copy link
Contributor

catsby commented Oct 14, 2015

Hey @stack72 – what do you think about instead of setting arn here, returning resourceAwsDynamoDbTableRead() instead of nil on 294 there?

@stack72
Copy link
Contributor Author

stack72 commented Oct 14, 2015

@catsby I actually did that originally, but it was a heavy query and made the test time move from 125seconds to 281seconds.

I didn't think that degrading the resource by that much was worth it.

Happy to change it though - it does make it more consistent with the other resource

FYI, here are the test results to show the time differences:

terraform [aws-dynamodb-table-arn●] % make testacc TEST=./builtin/providers/aws TESTARGS='-run=DynamoDb' 2>~/tf.log
go generate ./...
TF_ACC=1 go test ./builtin/providers/aws -v -run=DynamoDb -timeout 90m
=== RUN   TestAccAWSDynamoDbTable
[DEBUG] Adding LSI data to the table[DEBUG] Added 1 LSI definitions[DEBUG] Trying to create initial table state![DEBUG] Checking on table TerraformTestTable--- PASS: TestAccAWSDynamoDbTable (125.13s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    125.149s


terraform [aws-dynamodb-table-arn●] % make testacc TEST=./builtin/providers/aws TESTARGS='-run=DynamoDb' 2>~/tf.log
go generate ./...
TF_ACC=1 go test ./builtin/providers/aws -v -run=DynamoDb -timeout 90m
=== RUN   TestAccAWSDynamoDbTable
[DEBUG] Adding LSI data to the table[DEBUG] Added 1 LSI definitions[DEBUG] Trying to create initial table state![DEBUG] Checking on table TerraformTestTable--- PASS: TestAccAWSDynamoDbTable (281.78s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    281.794s

@catsby
Copy link
Contributor

catsby commented Oct 14, 2015

TestAccAWSDynamoDbTable taks ~260 seconds for me as it is. I ran it this morning for 300 seconds as well. Looking at the code as well, I'm not sure what's in the read that could cause any explosion in read time, it seems to make a single(?) API call

make it more consistent with the other resource

It seems there are a few other properties that are not set as well until the next read, so that change makes sense to me

@stack72
Copy link
Contributor Author

stack72 commented Oct 14, 2015

I'm happy with that :) Change is on it's way

catsby added a commit that referenced this pull request Oct 14, 2015
@catsby catsby merged commit 6eadfca into hashicorp:master Oct 14, 2015
@catsby
Copy link
Contributor

catsby commented Oct 14, 2015

Thanks!

omeid pushed a commit to omeid/terraform that referenced this pull request Mar 30, 2018
…nc_graphql_api

resource/appsync_graphql_api: Support import
@ghost
Copy link

ghost commented Apr 30, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_dynamodb_table arn attribute not present in apply run after creation
2 participants