From e53168ed5e70e7209bea57f855f395cbdfa3b9ae Mon Sep 17 00:00:00 2001 From: arnol377 Date: Tue, 4 Feb 2025 18:07:50 -0500 Subject: [PATCH] Refactor S3 object resource in downloads.tf `` --- downloads.tf | 2 +- morpheus.tf | 6 +----- variables.tf | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/downloads.tf b/downloads.tf index db687e5..912a79e 100644 --- a/downloads.tf +++ b/downloads.tf @@ -30,7 +30,7 @@ module downloader { } -resource "aws_s3_bucket_object" "morpheus_rpms" { +resource "aws_s3_object" "morpheus_rpms" { for_each = tomap({ for download in local.downloads : download.name => download }) bucket = aws_s3_bucket.assets_bucket.bucket key = "${each.value.path_prefix}/${each.key}" diff --git a/morpheus.tf b/morpheus.tf index 9b1bb6a..a47a5ce 100644 --- a/morpheus.tf +++ b/morpheus.tf @@ -1,7 +1,3 @@ -locals { - morpheus_ami = "ami-04a32122e0bdbb20f" -} - module "morpheus" { source = "HappyPathway/image-pipeline/aws" project_name = "morpheus-app" @@ -40,7 +36,7 @@ module "morpheus" { state = local.state_config vpc_config = local.vpc_config ami = { - source_ami = var.use_rhel9_ami ? one(data.aws_ssm_parameter.rhel9_ami).value : local.morpheus_ami + source_ami = one(data.aws_ssm_parameter.rhel9_ami).value instance_type = "m5.xlarge" # x86_64 compatible instance type } extra_parameters = { diff --git a/variables.tf b/variables.tf index f88b4f3..cf9dee5 100644 --- a/variables.tf +++ b/variables.tf @@ -1,5 +1,5 @@ variable "use_rhel9_ami" { description = "Use RHEL 9 AMI" type = bool - default = false + default = true } \ No newline at end of file