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

add support for importing aws_network_acl_rule resources #12921

Merged
merged 6 commits into from
Apr 23, 2020

Conversation

anGie44
Copy link
Contributor

@anGie44 anGie44 commented Apr 21, 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

Closes #10983

Release note for CHANGELOG:

support for network_acl_rule resource importing

Output from acceptance testing:

--- PASS: TestAccAWSNetworkAclRule_tcpProtocol (40.08s)
--- PASS: TestAccAWSNetworkAclRule_disappears_NetworkAcl (171.46s)
--- PASS: TestAccAWSNetworkAclRule_missingParam (172.85s)
--- PASS: TestAccAWSNetworkAclRule_basic (186.02s)
--- PASS: TestAccAWSNetworkAclRule_ingressEgressSameNumberDisappears (301.98s)
--- PASS: TestAccAWSNetworkAclRule_ipv6ICMP (303.63s)
--- PASS: TestAccAWSNetworkAclRule_ipv6 (304.05s)
--- PASS: TestAccAWSNetworkAclRule_disappears (304.36s)
--- PASS: TestAccAWSNetworkAclRule_allProtocol (340.56s)
--- PASS: TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate (341.29s)

@anGie44 anGie44 requested a review from a team April 21, 2020 14:04
@ghost ghost added size/L Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 21, 2020
@ghost ghost added the documentation Introduces or discusses updates to documentation. label Apr 21, 2020
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 21, 2020
@bflad bflad self-assigned this Apr 21, 2020
@ghost ghost added size/M Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Apr 22, 2020
@@ -632,15 +643,13 @@ resource "aws_network_acl" "test" {
}

resource "aws_network_acl_rule" "test" {
from_port = -1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed these port ranges as the protocol here is ipv6-icmp and port range is supported only for ucp/tcp per docs. if port ranges are passed to the test, the api returns nil for resp.PortRange; response output from findNetworkAclRule:

  Egress: false,
  IcmpTypeCode: {
    Code: -1,
    Type: -1
  },
  Ipv6CidrBlock: "::/0",
  Protocol: "58",
  RuleAction: "allow",
  RuleNumber: 150
}

Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Hey @anGie44 👋 Thanks for diving into this tough one. Overall its looking good, just some things for working in the AWS Provider codebase (that might be different from others) that we'll want to be mindful of for now.

aws/resource_aws_network_acl_rule_test.go Outdated Show resolved Hide resolved
aws/resource_aws_network_acl_rule_test.go Outdated Show resolved Hide resolved
aws/resource_aws_network_acl_rule_test.go Outdated Show resolved Hide resolved
aws/resource_aws_network_acl_rule.go Outdated Show resolved Hide resolved
@anGie44 anGie44 requested a review from bflad April 22, 2020 20:59
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Looks great 🚀

Output from acceptance testing:

--- PASS: TestAccAWSNetworkAclRule_missingParam (11.72s)
--- PASS: TestAccAWSNetworkAclRule_disappears_NetworkAcl (14.10s)
--- PASS: TestAccAWSNetworkAclRule_disappears (16.28s)
--- PASS: TestAccAWSNetworkAclRule_ipv6ICMP (17.37s)
--- PASS: TestAccAWSNetworkAclRule_ingressEgressSameNumberDisappears (18.69s)
--- PASS: TestAccAWSNetworkAclRule_ipv6 (21.12s)
--- PASS: TestAccAWSNetworkAclRule_basic (23.07s)
--- PASS: TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate (25.02s)
--- PASS: TestAccAWSNetworkAclRule_tcpProtocol (27.31s)
--- PASS: TestAccAWSNetworkAclRule_allProtocol (33.73s)

@bflad bflad added this to the v2.59.0 milestone Apr 23, 2020
@anGie44 anGie44 merged commit 7f65a17 into master Apr 23, 2020
@anGie44 anGie44 deleted the ap_network_acl_rul_import branch April 23, 2020 15:12
@ghost
Copy link

ghost commented Apr 24, 2020

This has been released in version 2.59.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 23, 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 May 23, 2020
@breathingdust breathingdust removed the waiting-response Maintainers are waiting on response from community or contributor. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Importing aws_network_acl_rule
3 participants