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

aws_route_table bug with ignore_changes - "diffs didn't match during apply" #3869

Closed
carlsverre opened this issue Nov 12, 2015 · 7 comments
Closed

Comments

@carlsverre
Copy link

All output summarized here: https://gist.github.com/carlsverre/f50395eaee55952d95ed

Here is the repro (also in the gist):

provider "aws" {
    region = "us-east-1"
}

resource "aws_vpc" "default" {
    cidr_block = "172.17.0.0/24"
}

resource "aws_subnet" "default" {
    vpc_id = "${aws_vpc.default.id}"
    cidr_block = "172.17.0.0/24"
}

resource "aws_internet_gateway" "default" {
    vpc_id = "${aws_vpc.default.id}"
}

resource "aws_route_table" "default" {
    vpc_id = "${aws_vpc.default.id}"

    route {
        cidr_block = "0.0.0.0/0"
        gateway_id = "${aws_internet_gateway.default.id}"
    }
    lifecycle {
        ignore_changes = ["route"]
    }
}

If you comment the ignore_changes line it applies fine.

@carlsverre
Copy link
Author

  • Note: I originally had create_before_destroy specified as well, this was unneeded and doesn't affect the repo so I removed it for clarity.

@dverbeek84
Copy link

I have the same issue. Only on initial run and destroy.

@hanninen
Copy link
Contributor

Same here, diff's didn't match during apply error is shown on each terraform apply, when ignore_changes is on for the aws_route_table resource.

@mgoodness
Copy link

This directive is a requirement for the way I'm provisioning a Kubernetes cluster with AWS cloud provider support. Kubernetes adjusts the route table at startup to suit its needs. Without ignore_changes, TF resets those changes.

@phinze
Copy link
Contributor

phinze commented Mar 14, 2016

Hi folks, some causes for diffs didn't apply on ignore_changes were fixed up in #4965. Others will be tackled in #5627 by me. Head to #5627 if you're still having issues on v0.6.12.

@phinze phinze closed this as completed Mar 14, 2016
@carlsverre
Copy link
Author

Awesome - thanks phinze! Since original report I ended up going a different direction that didn't require ignore_changes. Will loop back if I encounter any more issues with it.

omeid pushed a commit to omeid/terraform that referenced this issue Mar 30, 2018
…ticache_cluster-replication-group-id

resource/aws_elasticache_cluster: Add replication_group_id argument
omeid pushed a commit to omeid/terraform that referenced this issue Mar 30, 2018
@ghost
Copy link

ghost commented Apr 27, 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 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.

@ghost ghost locked and limited conversation to collaborators Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants