-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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_elasticache_subnet_group throws an error on 2nd run #2178
Comments
Alas, I just noticed this:
Do you have a configuration example that uses this splat format? |
@catsby still getting the same error. Using version
here's a sample config
The cache subnet is created correctly. Just on the 2nd run it dies with that error. |
The second run of what, exactly? After you create it successfully, what does |
After I apply and it gets created.. a |
that's very strange, I can't reproduce that. This is the config I'm using, see anything I'm missing? provider "aws" {
region = "us-west-2"
}
resource "aws_vpc" "default" {
cidr_block = "10.250.0.0/16"
tags {
Name = "ec-sub-test"
}
}
resource "aws_subnet" "private" {
vpc_id = "${aws_vpc.default.id}"
cidr_block = "10.250.3.0/24"
}
resource "aws_subnet" "private2" {
vpc_id = "${aws_vpc.default.id}"
cidr_block = "10.250.2.0/24"
}
resource "aws_elasticache_subnet_group" "test" {
name = "test"
description = "Test Memcached"
subnet_ids = [
"${aws_subnet.private.*.id}",
"${aws_subnet.private2.id}",
]
}
I assume you're using the |
I went ahead and merged 2191 as it was needed anyway. Thanks! |
@catsby yea I still get the error.. even on a new environment. |
@mzupan You ever resolve this? I'm not doing any splatting in my tf file, just deploying a subnet group and a cluster. Applies fine, next plan will break with that error.
|
this is how I'm doing it now and its working off master
its been working |
@mzupan wow... I think I just figured out the problem. Testing theory now... |
@mzupan Yep. I've solved the mystery! This is one of those fun issues that could be pointed at 3 different entities:
I'd say it's likely easier for Terraform to just convert the string to lowercase than it would be to wait for AWS to fix their API. Any thoughts @catsby? |
looks like #3 might be the reason originally this issue failed.. Seems to me terraform should just lower case it to be on the safe side |
Hey @mzupan and @thepastelsuit - sounds reasonable that Terraform can do a better job handling this situation - can one of you open a fresh issue to talk about improving the behavior with mixed-case subnet group names? |
I'm having this same issue. I also have a mixed-case id. It's non-trivial for me to switch the id to lowercase because it's populated with a variable that's used elsewhere. |
I've attempted to address the issue with the API lowercasing the name in PR #3120. |
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. |
If I create the following then every
apply
after throws an errorworks then the next run produces
My state looks ok
The text was updated successfully, but these errors were encountered: