Skip to content

Use owners with data.aws_ami.info #35

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

Merged
merged 3 commits into from
Feb 28, 2019
Merged

Conversation

rsrchboy
Copy link
Contributor

The latest terraform-aws-provider appears to require this, so let's
humor it, and either supply it in case we're using the default AMI, or
allow the user to provide it.

The latest `terraform-aws-provider` appears to require this, so let's
humor it, and either supply it in case we're using the default AMI, or
allow the user to provide it.
@jstojanovski-scwx
Copy link

Wooo- you fixed this about the exact same time I opened #35 :)

Thanks!

Copy link

@jstojanovski-scwx jstojanovski-scwx left a comment

Choose a reason for hiding this comment

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

LGTM

module "instance" {
  # source                        = "git::https://github.com/cloudposse/terraform-aws-ec2-instance.git?ref=0.7.6"
  source                        = "git::https://github.com/rsrchboy/terraform-aws-ec2-instance.git?ref=ami-owner"
  namespace                     = "${local.namespace}"
  stage                         = "${local.workspace["environment"]}"
  name                          = "${local.project}-bastion"

  ami                           = "${data.aws_ami.ubuntu-1804-latest.id}"
  ami_owner                     = "${data.aws_ami.ubuntu-1804-latest.owner_id}"
  instance_type                 = "${local.workspace["instance_class"]}"
  ssh_key_pair                  = "${local.workspace["ssh_key"]}"
  allowed_ports                 = [ "22" ]
  associate_public_ip_address   = "true"
  subnet                        = "${module.subnets.public_subnet_ids[0]}"
  vpc_id                        = "${module.vpc.vpc_id}"
}

Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

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

thanks @rsrchboy

@aknysh aknysh merged commit c6c99d6 into cloudposse:master Feb 28, 2019
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