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

bug: route_table reports Amazon FSx for NetApp ONTAP service routes and tag as configuration change #21246

Closed
awsaxeman opened this issue Oct 12, 2021 · 9 comments · Fixed by #21265
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. service/fsx Issues and PRs that pertain to the fsx service.
Milestone

Comments

@awsaxeman
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

Terraform CLI and Terraform AWS Provider Version

Terraform v1.0.8
aws v3.62.0

Affected Resource(s)

  • aws_route_table

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "aws_route_table" "PrivateRT" {    
    vpc_id = var.vpc
    route {
    cidr_block = "0.0.0.0/0"             
    nat_gateway_id = aws_nat_gateway.NATgw.id
    }
 }

resource "aws_fsx_ontap_file_system" "fsxontap" {
    storage_capacity    = 1024
    subnet_ids          = [var.privatesubnet_1, var.privatesubnet_2]
    deployment_type     = "MULTI_AZ_1"
    throughput_capacity = 512
    preferred_subnet_id = var.privatesubnet_1
    route_table_ids = [aws_route_table.PrivateRT.id]
}

Expected Behavior

When running a terraform plan after deploying an aws_fsx_ontap_file_system resource and specifying a terraform managed route_table the output should be "No changes. Your infrastructure matches the configuration."

Actual Behavior

FSx route that is managed by the Amazon FSx for NetApp ONTAP in route table and FSX tag shows as changed.

"aws_route_table.PrivateRT will be updated in-place"
~ resource "aws_route_table" "PrivateRT" {
~ route = [
~ tags = {
~ tags_all = {

"Plan: 0 to add, 1 to change, 0 to destroy."

Steps to Reproduce

  1. terraform apply
  2. terraform plan

References

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/ec2 Issues and PRs that pertain to the ec2 service. service/fsx Issues and PRs that pertain to the fsx service. labels Oct 12, 2021
@awsaxeman
Copy link
Contributor Author

Working on it

@ewbankkit
Copy link
Contributor

 % terraform plan
...
  # aws_route_table.test has been changed
  ~ resource "aws_route_table" "test" {
        id               = "rtb-057a228c2dd86416e"
      ~ route            = [
          + {
              + carrier_gateway_id         = ""
              + cidr_block                 = "198.19.255.23/32"
              + destination_prefix_list_id = ""
              + egress_only_gateway_id     = ""
              + gateway_id                 = ""
              + instance_id                = ""
              + ipv6_cidr_block            = ""
              + local_gateway_id           = ""
              + nat_gateway_id             = ""
              + network_interface_id       = "eni-0993c2d317e67588a"
              + transit_gateway_id         = ""
              + vpc_endpoint_id            = ""
              + vpc_peering_connection_id  = ""
            },
            # (1 unchanged element hidden)
        ]
      ~ tags             = {
          + "AmazonFSx" = "ManagedByAmazonFSx"
            # (1 unchanged element hidden)
        }
      ~ tags_all         = {
          + "AmazonFSx" = "ManagedByAmazonFSx"
            # (1 unchanged element hidden)
        }
        # (4 unchanged attributes hidden)
    }
...

@ewbankkit
Copy link
Contributor

provider "aws" {
  ignore_tags {
    keys = ["AmazonFSx"]
  }
}

will fix the tags diff.

@ewbankkit
Copy link
Contributor

To address the route diff you could use a separate aws_route resource for the NAT Gateway route (and have no routes specified in aws_route_table).

@ewbankkit ewbankkit added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Oct 12, 2021
@awsaxeman
Copy link
Contributor Author

Thanks @ewbankkit, I think the trouble is we can't guarantee how a customer may have their network definitions setup in terraform. The provided config is just one easy example but the customer could have many different network configurations and whoever is managing the network configuration may or may not be aware of the FSx configuration. It may be two different teams managing FSx and the network definition.

@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Oct 12, 2021
@ewbankkit ewbankkit added the bug Addresses a defect in current functionality. label Oct 12, 2021
@ewbankkit
Copy link
Contributor

I ran a Whois on that address range - https://search.arin.net/rdap/?query=198.19.255.23%2F32 - and:

Addresses starting with "198.18." or "198.19." are set aside for use in isolated laboratory networks used for benchmarking and performance testing. They should never appear on the Internet and if you see Internet traffic using these addresses, they are being used without permission.

@awsaxeman
Copy link
Contributor Author

These are used internally, not over the internet.

@github-actions
Copy link

github-actions bot commented Nov 4, 2021

This functionality has been released in v3.64.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. Thank you!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2022
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. service/fsx Issues and PRs that pertain to the fsx service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants