aws-ec2-instance: upgrade AMI to Ubuntu 22.04
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
d0b97a118d
commit
e2b1b6248b
|
@ -7,6 +7,8 @@ locals {
|
|||
|
||||
/* the image needs to be queried */
|
||||
data "aws_ami" "ubuntu" {
|
||||
most_recent = true
|
||||
|
||||
owners = [var.image_owner]
|
||||
|
||||
filter {
|
||||
|
@ -75,6 +77,11 @@ resource "aws_instance" "main" {
|
|||
Fleet = "${var.env}.${var.stage}"
|
||||
}
|
||||
|
||||
/* Ignore changes to disk image */
|
||||
lifecycle {
|
||||
ignore_changes = [ami]
|
||||
}
|
||||
|
||||
/* bootstraping access for later Ansible use */
|
||||
provisioner "ansible" {
|
||||
plays {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
variable "image_name" {
|
||||
description = "Name of AMI image to use."
|
||||
type = string
|
||||
default = "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20190212.1"
|
||||
default = "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"
|
||||
}
|
||||
|
||||
variable "image_owner" {
|
||||
|
|
Loading…
Reference in New Issue