Skip to content

[~] - update ami to amazon linux 2 #21

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

Closed
wants to merge 1 commit into from
Closed

[~] - update ami to amazon linux 2 #21

wants to merge 1 commit into from

Conversation

oreststetsiak
Copy link

update ami to amazon linux 2

@@ -152,7 +158,7 @@ resource "aws_security_group" "rabbitmq_nodes" {

resource "aws_launch_configuration" "rabbitmq" {
name = local.cluster_name
image_id = data.aws_ami_ids.ami.ids[0]
image_id = data.aws_ami.amazon-linux-2.id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
image_id = data.aws_ami.amazon-linux-2.id
image_id = data.aws_ami_ids.amazon-linux-2.ids[0]

owners = ["amazon"]
data "aws_ami" "amazon-linux-2" {
owners = ["amazon"]
most_recent = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
most_recent = true

This isn't an valid attribute, https://www.terraform.io/docs/providers/aws/d/ami_ids.html#sort_ascending is probably what you were thinking of but that defaults to descending which is what we want.

@rraub
Copy link
Contributor

rraub commented Nov 21, 2019

Also this ami broke the find_hosts.sh script since the $HOSTNAME changed from just ip-10-2-1-82 to ip-10-2-1-82.ec2.internal in the newer Amazon Machine Linux 2. see: smartrent#1 if your interested

@krotkiewicz
Copy link
Member

Hey @oreststetsiak, thank you for PR and @rraub for comments.

Currently we don't have resources to prepare CI pipeline with some basic tests or to do tests manually. If you have some spare time and could help here, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants