-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
AMI will always upgrade #68
Comments
The easy fix is to ignore ami. I think the best method is to use an asg and a launch template to define the ami. If the ami updates, then we can update the launch template which would prevent updating the existing ec2 instance. See #25 |
actually you can use a filter to pin the ami terraform-aws-ec2-bastion-server/main.tf Lines 17 to 23 in 7020274
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami#filter https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html#options
module "ec2_bastion" {
source = "cloudposse/ec2-bastion-server/aws"
version = "0.27.0"
ami_filters = {
"image-id" = "ami-1234567890"
}
instance_type = var.instance_type
security_groups = compact(concat([module.vpc.vpc_default_security_group_id], var.security_groups))
subnets = module.subnets.public_subnet_ids
key_name = module.aws_key_pair.key_name
user_data = var.user_data
vpc_id = module.vpc.vpc_id
associate_public_ip_address = var.associate_public_ip_address
context = module.this.context
} |
Describe the Bug
As of version 0.25.0, AMIs are dynamically sourced and will force redeployment of this EC2 instance resource whenever the AMI is found to be updated.
Expected Behavior
Bastion host should be redeployed when I determine and not the AMI creator.
Additional Context
Perhaps use an optional
ignore_changes
?The text was updated successfully, but these errors were encountered: