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

r/aws_network_interface_sg_attachment: "Error: Provider produced inconsistent result after apply" #16201

Closed
ewbankkit opened this issue Nov 14, 2020 · 6 comments · Fixed by #18466
Assignees
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@ewbankkit
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Reported by @queglay and @atsalolikhin-spokeo in #12449:

3776 [23:29:14] Error: timeout - last error: ssh: rejected: connect failed (Connection timed out)
3777 [23:29:14] 
3778 [23:29:14] 
3779 [23:29:14] 
3780 [23:29:14] Error: Provider produced inconsistent result after apply
3781 [23:29:14] 
3782 [23:29:14] When applying changes to
3783 [23:29:14] module.softnas.aws_network_interface_sg_attachment.sg_attachment_vpn[0],
3784 [23:29:14] provider "registry.terraform.io/-/aws" produced an unexpected new value for
3785 [23:29:14] was present, but now absent.
3786 [23:29:14] 
3787 [23:29:14] This is a bug in the provider, which should be reported in the provider's own
3788 [23:29:14] issue tracker.

and:

Error: Provider produced inconsistent result after apply

When applying changes to
module.my_module_name.aws_network_interface_sg_attachment.my_server[2],
provider "registry.terraform.io/hashicorp/aws" produced an unexpected new
value: Root resource was present, but now absent.

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

Affected Resource(s)

@ewbankkit ewbankkit added bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. labels Nov 14, 2020
@ewbankkit
Copy link
Contributor Author

I see that the resource ID is not being set in resourceAwsNetworkInterfaceSGAttachmentCreate after successful creation but instead is being set later in resourceAwsNetworkInterfaceSGAttachmentRead.

@Buri
Copy link

Buri commented Dec 1, 2020

We are seeing the same error, but with aws_sns_topic_subscription

@camlow325
Copy link
Contributor

We saw the "Root resource was present" error for an aws_sns_topic_subscription resource as well, but I think the root cause for it may be different than for the others in this issue. Our case seems to be an AWS / eventual consistency problem. I filed #16695 with details on the error we saw.

@recintoit
Copy link

I stumbled onto this because I have a similar error using a different provider. I thought it could be something didn't configure correctly in the config, but now that I see the simllar error in other providers, I will watch to see if an issue is fixed if it will be patched in other providers.

@bflad bflad self-assigned this Mar 29, 2021
bflad added a commit that referenced this issue Mar 29, 2021
…e eventual consistency

Reference: #10363
Reference: #16201
Reference: #16796

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_disappears (59.24s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_basic (59.57s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_Multiple (63.42s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_Instance (93.21s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_DataSource (105.56s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_disappears (61.51s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_basic (62.15s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_Multiple (65.05s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_DataSource (93.55s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_Instance (114.74s)
```
bflad added a commit that referenced this issue Apr 1, 2021
…e eventual consistency (#18466)

* resource/aws_network_interface_sg_attachment: Handle read-after-create eventual consistency

Reference: #10363
Reference: #16201
Reference: #16796

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_disappears (59.24s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_basic (59.57s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_Multiple (63.42s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_Instance (93.21s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_DataSource (105.56s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_disappears (61.51s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_basic (62.15s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_Multiple (65.05s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_DataSource (93.55s)
--- PASS: TestAccAWSNetworkInterfaceSGAttachment_Instance (114.74s)
```

* Update CHANGELOG for #18466
@github-actions github-actions bot added this to the v3.35.0 milestone Apr 1, 2021
@ghost
Copy link

ghost commented Apr 1, 2021

This has been released in version 3.35.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!

@ghost
Copy link

ghost commented May 1, 2021

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!

@ghost ghost locked as resolved and limited conversation to collaborators May 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
5 participants