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 subnet VPC forced to change when using "map_public_ip_on_launch" field #671

Closed
spyrospph opened this issue Dec 15, 2014 · 7 comments · Fixed by #1234
Closed

aws subnet VPC forced to change when using "map_public_ip_on_launch" field #671

spyrospph opened this issue Dec 15, 2014 · 7 comments · Fixed by #1234
Assignees

Comments

@spyrospph
Copy link

Hi,

With the latest edition of the field "map_public_ip_on_launch" in the subnet of the aws VPC we get the below change when terraform planning

~ aws_subnet.some.0
map_public_ip_on_launch: "false" => ""

However when we try to terraform update we get the following error:

Error applying plan:

1 error(s) occurred:

Resource type 'aws_subnet' doesn't support update

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

The issues is that the state "map_public_ip_on_launch" is false anyway in my VPC so update should not be required.

I am using latest terraform compiled on linux

-S.

@spyrospph
Copy link
Author

quick workaround:

Go to terraform.state file and erase the line
"map_public_ip_on_launch"

After that when doing terraform plan the change will not be there anymore.

@pmoust
Copy link
Contributor

pmoust commented Dec 15, 2014

Same issue on Darwin, but with int type

map_public_ip_on_launch: "0" => ""

Version 0.3.5 with slight modifications on top of upstream, that should not affect that part.
Apply action is fine, but keeps being marked for change.
Can confirm that removing the map_public_ip_on_launch from the state json stops that behavior.

@ojongerius
Copy link
Contributor

+1

Note that I had to both add map_public_ip_on_launch = false to my config and remove map_public_ip_on_launch from the state file to make it stop.

@brycekahle
Copy link
Contributor

Perhaps this line is the offender? Shouldn't that be d.Get("map_public_ip_on_launch")

@catsby
Copy link
Contributor

catsby commented Mar 18, 2015

Hello all – @spyrospph I sent a patch in #1234 that actually reads the map_public_ip_on_launch value (thanks @brycekahle 😄).

I'm not sure I totally follow the scenario you describe though, so I can't say for sure if that addresses this issue. Can you follow up with me here and let me know?

@catsby
Copy link
Contributor

catsby commented Mar 30, 2015

I'm going to close this for now, please re-open if you feel #1234 does not address this.

@catsby catsby closed this as completed Mar 30, 2015
@ghost
Copy link

ghost commented May 3, 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 May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants