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

resource/aws_network_acl: Use schema.ImportStatePassthrough #13419

Merged
merged 1 commit into from
May 21, 2020

Conversation

bflad
Copy link
Contributor

@bflad bflad commented May 20, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment 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 pull request followers and do not help prioritize the request

Reference: #13408

Release note for CHANGELOG:

NONE

While this resource was not actually performing multiple resource import, the commented code was showing up in searches for it (via .SetType()). As an added bonus to the dramatically simpler code (since Terraform automatic refresh during import), this removes the legacy import_ file. Yay!

Output from acceptance testing (see #13382 for fixes to _SubnetsChange and _SubnetsDelete tests):

--- PASS: TestAccAWSNetworkAcl_espProtocol (34.51s)
--- PASS: TestAccAWSNetworkAcl_basic (35.15s)
--- PASS: TestAccAWSNetworkAcl_ipv6ICMPRules (36.21s)
--- PASS: TestAccAWSNetworkAcl_OnlyEgressRules (37.51s)
--- PASS: TestAccAWSNetworkAcl_disappears (37.95s)
--- PASS: TestAccAWSNetworkAcl_EgressAndIngressRules (38.20s)
--- PASS: TestAccAWSNetworkAcl_ipv6VpcRules (38.68s)
--- PASS: TestAccAWSNetworkAcl_ipv6Rules (44.12s)
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_basic (44.86s)
--- PASS: TestAccAWSNetworkAcl_CaseSensitivityNoChanges (45.01s)
--- FAIL: TestAccAWSNetworkAcl_SubnetsDelete (55.50s)
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_update (65.91s)
--- PASS: TestAccAWSNetworkAcl_SubnetChange (66.79s)
--- PASS: TestAccAWSNetworkAcl_Egress_ConfigMode (74.44s)
--- PASS: TestAccAWSNetworkAcl_Subnets (75.89s)
--- PASS: TestAccAWSNetworkAcl_Ingress_ConfigMode (76.75s)

Reference: #13408

While this resource was not actually performing multiple resource import, the commented code was showing up in searches for it (via `.SetType()`). As an added bonus to the dramatically simpler code (since Terraform automatic refresh during import), this removes the legacy `import_` file. Yay!

Output from acceptance testing (see #13382 for fixes to _SubnetsChange and _SubnetsDelete tests):

```
--- PASS: TestAccAWSNetworkAcl_espProtocol (34.51s)
--- PASS: TestAccAWSNetworkAcl_basic (35.15s)
--- PASS: TestAccAWSNetworkAcl_ipv6ICMPRules (36.21s)
--- PASS: TestAccAWSNetworkAcl_OnlyEgressRules (37.51s)
--- PASS: TestAccAWSNetworkAcl_disappears (37.95s)
--- PASS: TestAccAWSNetworkAcl_EgressAndIngressRules (38.20s)
--- PASS: TestAccAWSNetworkAcl_ipv6VpcRules (38.68s)
--- PASS: TestAccAWSNetworkAcl_ipv6Rules (44.12s)
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_basic (44.86s)
--- PASS: TestAccAWSNetworkAcl_CaseSensitivityNoChanges (45.01s)
--- FAIL: TestAccAWSNetworkAcl_SubnetsDelete (55.50s)
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_update (65.91s)
--- PASS: TestAccAWSNetworkAcl_SubnetChange (66.79s)
--- PASS: TestAccAWSNetworkAcl_Egress_ConfigMode (74.44s)
--- PASS: TestAccAWSNetworkAcl_Subnets (75.89s)
--- PASS: TestAccAWSNetworkAcl_Ingress_ConfigMode (76.75s)
```
@bflad bflad added the technical-debt Addresses areas of the codebase that need refactoring or redesign. label May 20, 2020
@bflad bflad requested a review from a team May 20, 2020 04:26
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. labels May 20, 2020
@anGie44 anGie44 self-assigned this May 21, 2020
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉LGTM @bflad

Output of acceptance tests:

--- PASS: TestAccAWSNetworkAclRule_missingParam (18.79s)
--- PASS: TestAccAWSNetworkAcl_disappears (22.71s)
--- PASS: TestAccAWSNetworkAcl_basic (33.72s)
--- PASS: TestAccAWSNetworkAclRule_disappears (33.97s)
--- PASS: TestAccAWSNetworkAclRule_ipv6ICMP (35.42s)
--- PASS: TestAccAWSNetworkAclRule_ingressEgressSameNumberDisappears (36.78s)
--- PASS: TestAccAWSNetworkAcl_EgressAndIngressRules (41.76s)
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_basic (41.78s)
--- PASS: TestAccAWSNetworkAcl_OnlyEgressRules (46.24s)
--- PASS: TestAccAWSNetworkAclRule_tcpProtocol (55.14s)
--- PASS: TestAccAWSNetworkAclRule_basic (55.95s)
--- PASS: TestAccAWSNetworkAcl_CaseSensitivityNoChanges (59.31s)
--- PASS: TestAccAWSNetworkAcl_ipv6Rules (25.63s)
--- PASS: TestAccAWSNetworkAclRule_ipv6 (60.10s)
--- PASS: TestAccAWSNetworkAcl_ipv6VpcRules (27.10s)
--- PASS: TestAccAWSNetworkAcl_ipv6ICMPRules (29.24s)
--- PASS: TestAccAWSNetworkAclRule_disappears_NetworkAcl (63.71s)
--- PASS: TestAccAWSNetworkAcl_espProtocol (29.42s)
--- PASS: TestAccAWSNetworkAcl_Egress_ConfigMode (68.21s)
--- PASS: TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate (69.74s)
--- PASS: TestAccAWSNetworkAcl_Subnets (51.24s)
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_update (73.57s)
--- PASS: TestAccAWSNetworkAcl_SubnetsDelete (56.01s)
--- PASS: TestAccAWSNetworkAcl_Ingress_ConfigMode (79.62s)
--- FAIL: TestAccAWSNetworkAcl_SubnetChange (88.56s) -- as expected w/o changes in #13382
--- PASS: TestAccAWSNetworkAclRule_allProtocol (90.05s)

@bflad bflad added this to the v2.63.0 milestone May 21, 2020
@bflad bflad merged commit 021ebbc into master May 21, 2020
@bflad bflad deleted the td-aws_network_acl-import branch May 21, 2020 21:01
@ghost
Copy link

ghost commented May 22, 2020

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

adamdecaf pushed a commit to adamdecaf/terraform-provider-aws that referenced this pull request May 28, 2020
…p#13419)

Reference: hashicorp#13408

While this resource was not actually performing multiple resource import, the commented code was showing up in searches for it (via `.SetType()`). As an added bonus to the dramatically simpler code (since Terraform automatic refresh during import), this removes the legacy `import_` file. Yay!

Output from acceptance testing (see hashicorp#13382 for fixes to _SubnetsChange and _SubnetsDelete tests):

```
--- PASS: TestAccAWSNetworkAcl_espProtocol (34.51s)
--- PASS: TestAccAWSNetworkAcl_basic (35.15s)
--- PASS: TestAccAWSNetworkAcl_ipv6ICMPRules (36.21s)
--- PASS: TestAccAWSNetworkAcl_OnlyEgressRules (37.51s)
--- PASS: TestAccAWSNetworkAcl_disappears (37.95s)
--- PASS: TestAccAWSNetworkAcl_EgressAndIngressRules (38.20s)
--- PASS: TestAccAWSNetworkAcl_ipv6VpcRules (38.68s)
--- PASS: TestAccAWSNetworkAcl_ipv6Rules (44.12s)
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_basic (44.86s)
--- PASS: TestAccAWSNetworkAcl_CaseSensitivityNoChanges (45.01s)
--- FAIL: TestAccAWSNetworkAcl_SubnetsDelete (55.50s)
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_update (65.91s)
--- PASS: TestAccAWSNetworkAcl_SubnetChange (66.79s)
--- PASS: TestAccAWSNetworkAcl_Egress_ConfigMode (74.44s)
--- PASS: TestAccAWSNetworkAcl_Subnets (75.89s)
--- PASS: TestAccAWSNetworkAcl_Ingress_ConfigMode (76.75s)
```
@ghost
Copy link

ghost commented Jun 21, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. size/M Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants