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

EIP in EC2-VPC wrong value assumed #91

Closed
jharriman opened this issue Jul 29, 2014 · 1 comment
Closed

EIP in EC2-VPC wrong value assumed #91

jharriman opened this issue Jul 29, 2014 · 1 comment

Comments

@jharriman
Copy link
Contributor

According to the documentation at http://www.terraform.io/docs/providers/aws/r/eip.html, the following code that is present in file: builtin/providers/aws/resource_aws_eip.go, in commit: ebd50ab assumes the wrong type of value:

if rs.Attributes["vpc"] == "true" {
       vpc = true
       domainOpt = "vpc"
}

From the documentation, rs.Attributes["vpc"] should be the VPC ID from AWS and not a boolean value. Running the code as is with the VPC ID from AWS throws the following error:

1 error(s) occurred:
* Failure associating instances: You must specify an allocation id when mapping an address to a VPC instance (InvalidParameterCombination)

Changing the value to "true" in my .tf file fixes the problem, but that is not consistent with the documentation.

Also the example in the documentation should use ${aws_instance.web.id} instead of ${aws_instance.web.instance_id}.

I see there has been pretty recent work on this file, so maybe the documentation will change between now and the finished tool. But as it stands either the documentation or the code should be changed.

@pearkes
Copy link
Contributor

pearkes commented Jul 29, 2014

Thanks, fixed in master. Documentation was just wrong, also modified the example as you suggested. Appreciate it!

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

No branches or pull requests

2 participants