-
Notifications
You must be signed in to change notification settings - Fork 102
Changed artifact version #427
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a comment here exaplaining why is this being harcoded and linking to terraform issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we not do some kind of map here in the variables?
amis = {
eu-west-1 => 'ami-123',
us-east-1 => 'ami-456',
}
etc..
and then use that var to replace on the end..
"${atlas_artifact.mesos-master.metadata_full.region-${var.amis.${region}}}"
above code is syntactically incorrect but you get the gist
or even just use the region string without the AMi map? -
varname = "atlas_artifact.mesos-master.metadata_full.region-${var.region}”
ami = ${varname}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont think that interpolation is supported by terraform. -> "${atlas_artifact.mesos-master.metadata_full.region-${var.amis.${region}}}"
Think we can harcode it as ${atlas_artifact.mesos-master.metadata_full.region-eu-west-1}
or create a static map region -> ami-id
Then just ami = lookup(var.amis, var.region)
Static mapping would need to be updated every time we build images and the atlas_artifact resource shoudl be removed as it would be useless if we go for second option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As enxebre mentioned the interpolation is not supported by terraform. I tested it with terraform version 0.6.1 (the newest one). So the code:
varname = "atlas_artifact.mesos-master.metadata_full.region-${var.region}”
ami = ${varname}
and my version mentioned in the terraform ticket:
ami = "${lookup(atlas_artifact.mesos-master.metadata_full, concat("region-", var.region))}"
don't work.
|
Labeling as needs work as this needs to wait for having vagrant image with same version of ubuntu and linux kernel |
181bf18 to
c2a0c7b
Compare
|
This change would need to be applied to aws provider too. |
c2a0c7b to
a9862a9
Compare
|
this lgtm |
a9862a9 to
d0be7d3
Compare
Changed to a new artifact version with hvm virtualization