Skip to content

Commit

Permalink
Refactor S3 object resource in downloads.tf
Browse files Browse the repository at this point in the history
``
  • Loading branch information
arnol377 committed Feb 4, 2025
1 parent d135923 commit e53168e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion downloads.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
6 changes: 1 addition & 5 deletions morpheus.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
locals {
morpheus_ami = "ami-04a32122e0bdbb20f"
}

module "morpheus" {
source = "HappyPathway/image-pipeline/aws"
project_name = "morpheus-app"
Expand Down Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "use_rhel9_ami" {
description = "Use RHEL 9 AMI"
type = bool
default = false
default = true
}

0 comments on commit e53168e

Please sign in to comment.