diff --git a/src/commcare_cloud/commands/terraform/templates/commcarehq.tf.j2 b/src/commcare_cloud/commands/terraform/templates/commcarehq.tf.j2 index 35e399ac3c..de8d1dbb14 100644 --- a/src/commcare_cloud/commands/terraform/templates/commcarehq.tf.j2 +++ b/src/commcare_cloud/commands/terraform/templates/commcarehq.tf.j2 @@ -130,9 +130,7 @@ module "server__{{ server_name }}" { metadata_tokens = "{{ 'required' if ec2_metadata_tokens_required else 'optional' }}" enable_cross_region_backup = {{ server_spec.enable_cross_region_backup|tojson }} -{% if server_spec.os == 'ubuntu_pro_bionic' %} - server_image = data.aws_ami.ubuntu_pro_bionic.id -{% elif server_spec.os == 'bionic' %} +{% if server_spec.os == 'bionic' %} server_image = data.aws_ami.ubuntu_bionic.id {% elif server_spec.os == 'jammy' %} server_image = data.aws_ami.ubuntu_jammy.id diff --git a/src/commcare_cloud/commands/terraform/templates/variables.tf.j2 b/src/commcare_cloud/commands/terraform/templates/variables.tf.j2 index 00a4401e94..b661cf5a1d 100644 --- a/src/commcare_cloud/commands/terraform/templates/variables.tf.j2 +++ b/src/commcare_cloud/commands/terraform/templates/variables.tf.j2 @@ -20,25 +20,6 @@ variable "openvpn_az" { default = "a" } -data "aws_ami" "ubuntu_pro_bionic" { - // should match what is on - // https://aws.amazon.com/marketplace/server/configuration?productId=fc15dd7b-2aa0-47e5-bb05-94c75950b5de - // (Product detail: https://aws.amazon.com/marketplace/pp/B0821T9RL2) - most_recent = true - - filter { - name = "name" - values = ["ubuntu-pro-server/images/hvm-ssd/ubuntu-bionic-18.04-amd64-pro-*"] - } - - filter { - name = "virtualization-type" - values = ["hvm"] - } - - owners = ["679593333241"] # Amazon Web Services -} - data "aws_ami" "ubuntu_bionic" { # Should match what is in # https://cloud-images.ubuntu.com/locator/ec2/ diff --git a/src/commcare_cloud/environment/schemas/terraform.py b/src/commcare_cloud/environment/schemas/terraform.py index fb687fba93..5ace854bb4 100644 --- a/src/commcare_cloud/environment/schemas/terraform.py +++ b/src/commcare_cloud/environment/schemas/terraform.py @@ -117,7 +117,7 @@ class ServerConfig(jsonobject.JsonObject): volume_encrypted = jsonobject.BooleanProperty(default=True, required=True) block_device = jsonobject.ObjectProperty(lambda: BlockDevice, default=None) group = jsonobject.StringProperty() - os = jsonobject.StringProperty(required=True, choices=['bionic', 'ubuntu_pro_bionic', 'jammy']) + os = jsonobject.StringProperty(required=True, choices=['bionic', 'jammy']) server_auto_recovery = jsonobject.BooleanProperty(default=False) enable_cross_region_backup = jsonobject.BooleanProperty(default=False) count = jsonobject.IntegerProperty(default=None)