From 2d13c6ab77196b17a2a434a65cf13129ef54799d Mon Sep 17 00:00:00 2001 From: arnol377 Date: Tue, 11 Feb 2025 15:38:46 -0500 Subject: [PATCH] Refactor morpheus.tf to update module source and adjust volume mappings for consistency with Ansible tasks --- aws-image-pipeline.code-workspace | 3 +++ morpheus.tf | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/aws-image-pipeline.code-workspace b/aws-image-pipeline.code-workspace index 333ce78..ba0cc0e 100644 --- a/aws-image-pipeline.code-workspace +++ b/aws-image-pipeline.code-workspace @@ -19,6 +19,9 @@ { "path": "../image-pipeline-goss-testing", "name": "test/goss-testing" + }, + { + "path": "../packer-plugin-amazon/docs" } ], "settings": { diff --git a/morpheus.tf b/morpheus.tf index 4f7fd92..0287615 100644 --- a/morpheus.tf +++ b/morpheus.tf @@ -1,5 +1,5 @@ module "morpheus" { - source = "../terraform-aws-image-pipeline" + source = "HappyPathway/image-pipeline/aws" project_name = "morpheus-app" builder_image = "aws/codebuild/standard:7.0" create_new_role = true @@ -44,20 +44,20 @@ module "morpheus" { shutdown_behavior = "stop" } assets_bucket_name = aws_s3_bucket.assets_bucket.bucket + root_volume = { + device_name = "/dev/sda1" + volume_size = 200 + volume_type = "gp3" + delete_on_termination = true + } + image_volume_mapping = [ - { - device_name = "/dev/sda1" - volume_size = 200 - volume_type = "gp3" - delete_on_termination = true - encrypted = true - }, { device_name = "/dev/xvdf" volume_size = 10 volume_type = "gp3" delete_on_termination = true - mount_path = "/APPS" + mount_path = "/apps" # Changed from /APPS to match Ansible task encrypted = true }, { @@ -65,7 +65,7 @@ module "morpheus" { volume_size = 50 volume_type = "gp3" delete_on_termination = true - mount_path = "/optmor" + mount_path = "/opt/morpheus" # Changed from /optmor to match Ansible task encrypted = true }, { @@ -73,7 +73,7 @@ module "morpheus" { volume_size = 150 volume_type = "gp3" delete_on_termination = true - mount_path = "/varoptmor" + mount_path = "/var/opt/morpheus" # Changed from /varoptmor to match Ansible task encrypted = true } ]