Skip to content

Commit

Permalink
remove ubuntu pro from os list
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitPhulera committed Oct 31, 2023
1 parent bc6515c commit ff17685
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 0 additions & 19 deletions src/commcare_cloud/commands/terraform/templates/variables.tf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion src/commcare_cloud/environment/schemas/terraform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ff17685

Please sign in to comment.