-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
terraform not picking up provider details #3551
Comments
any update on this? |
I have a similar problem. Same error. Seems to have shown up after manually deleting the vpc and trying to recreate in terraform. |
…ehavior when Default Route Table is missing Reference: #398 Reference: #3551 Reference: #9009 Previously on creation, if the Default Route Table was incorrectly configured or non-existent, the resource would unexpectedly attempt to remove itself from the Terraform state and propose recreation immediately. Prior to Terraform 0.12, this behavior was errantly acceptable. In Terraform 0.12, resources are required to return Terraform state about themselves during creation or throw an error explaining why the creation failed. Previously on read, if the Default Route Table was missing (e.g. due to the VPC being deleted outside Terraform), the resource would return an error and require operators to manually perform a `terraform state rm` command instead of proposing resource recreation. Output from new acceptance testing before code updates: ``` --- FAIL: TestAccAWSDefaultRouteTable_basic (20.02s) testing.go:628: Step 0, expected error: errors during apply: Provider produced inconsistent result after apply: When applying changes to aws_default_route_table.foo, provider "aws" produced an unexpected new value for was present, but now absent. This is a bug in the provider, which should be reported in the provider's own issue tracker. To match: TBD --- FAIL: TestAccAWSDefaultRouteTable_disappears_Vpc (20.27s) testing.go:635: Step 0 error: errors during follow-up refresh: Error: Default Route table not found testing.go:696: Error destroying resource! WARNING: Dangling resources may exist. The full state and error is shown below. Error: errors during refresh: Default Route table not found State: <nil> ``` Output from acceptance testing after code updates: ``` --- PASS: TestAccAWSDefaultRouteTable_disappears_Vpc (20.46s) --- PASS: TestAccAWSDefaultRouteTable_basic (40.99s) --- PASS: TestAccAWSDefaultRouteTable_vpc_endpoint (49.71s) --- PASS: TestAccAWSDefaultRouteTable_swap (73.89s) --- PASS: TestAccAWSDefaultRouteTable_Route (87.09s) --- PASS: TestAccAWSDefaultRouteTable_Route_TransitGatewayID (374.87s) ```
…ehavior when Default Route Table is missing (#10981) Reference: #398 Reference: #3551 Reference: #9009 Previously on creation, if the Default Route Table was incorrectly configured or non-existent, the resource would unexpectedly attempt to remove itself from the Terraform state and propose recreation immediately. Prior to Terraform 0.12, this behavior was errantly acceptable. In Terraform 0.12, resources are required to return Terraform state about themselves during creation or throw an error explaining why the creation failed. Previously on read, if the Default Route Table was missing (e.g. due to the VPC being deleted outside Terraform), the resource would return an error and require operators to manually perform a `terraform state rm` command instead of proposing resource recreation. Output from new acceptance testing before code updates: ``` --- FAIL: TestAccAWSDefaultRouteTable_basic (20.02s) testing.go:628: Step 0, expected error: errors during apply: Provider produced inconsistent result after apply: When applying changes to aws_default_route_table.foo, provider "aws" produced an unexpected new value for was present, but now absent. This is a bug in the provider, which should be reported in the provider's own issue tracker. To match: TBD --- FAIL: TestAccAWSDefaultRouteTable_disappears_Vpc (20.27s) testing.go:635: Step 0 error: errors during follow-up refresh: Error: Default Route table not found testing.go:696: Error destroying resource! WARNING: Dangling resources may exist. The full state and error is shown below. Error: errors during refresh: Default Route table not found State: <nil> ``` Output from acceptance testing after code updates: ``` --- PASS: TestAccAWSDefaultRouteTable_disappears_Vpc (20.46s) --- PASS: TestAccAWSDefaultRouteTable_basic (40.99s) --- PASS: TestAccAWSDefaultRouteTable_vpc_endpoint (49.71s) --- PASS: TestAccAWSDefaultRouteTable_swap (73.89s) --- PASS: TestAccAWSDefaultRouteTable_Route (87.09s) --- PASS: TestAccAWSDefaultRouteTable_Route_TransitGatewayID (374.87s) ```
The adjustment of the resource to propose resource recreation in this scenario instead of an error has been merged and will release with version 2.40.0 of the Terraform AWS Provider this week. |
This has been released in version 2.40.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Hi there,
I am trying to create a vpc in our aws prod account and in main.tf we have
ERROR
Error: Error refreshing state: 2 error(s) occurred:
data.terraform_remote_state.infrastructure_prod: 1 error(s) occurred:
data.terraform_remote_state.infrastructure_prod: data.terraform_remote_state.infrastructure_prod: error loading the remote state: AccessDenied: Access Denied
status code: 403, request id: 01524824E7FC9D7B, host id: UJL0U8azl+lgWJIlhtfa+3Nf9MEPyGTo301IJvPi7zks1gy922B3qoBAEAVc9jtpXnG8X2ZcQfU=
module.vpc.module.vpc.aws_default_route_table.default: 1 error(s) occurred:
module.vpc.module.vpc.aws_default_route_table.default: aws_default_route_table.default: Default Route table not found
Terraform Version
Run
terraform -v
to show the versionterraform -v
Terraform v0.11.3
main.tf
Outputs
The text was updated successfully, but these errors were encountered: