diff --git a/terraform/environments/ccms-ebs-upgrade/ssm-document-system-update.yaml b/terraform/environments/ccms-ebs-upgrade/ssm-document-system-update.yaml new file mode 100644 index 00000000000..fc22ce7ed4c --- /dev/null +++ b/terraform/environments/ccms-ebs-upgrade/ssm-document-system-update.yaml @@ -0,0 +1,15 @@ +# ssm-document-system-update.yaml +--- +schemaVersion: "2.2" +description: Run 'yum -y update'. +mainSteps: + - name: YumUpdate + action: aws:runShellScript + isEnd: true + precondition: + StringEquals: + - platformType + - Linux + inputs: + runCommand: + - "yum -y update" \ No newline at end of file diff --git a/terraform/environments/ccms-ebs-upgrade/ssm_oracle_lms_cpuq.yaml b/terraform/environments/ccms-ebs-upgrade/ssm-oracle-lms-cpuq.yaml similarity index 100% rename from terraform/environments/ccms-ebs-upgrade/ssm_oracle_lms_cpuq.yaml rename to terraform/environments/ccms-ebs-upgrade/ssm-oracle-lms-cpuq.yaml diff --git a/terraform/environments/ccms-ebs-upgrade/ssm.tf b/terraform/environments/ccms-ebs-upgrade/ssm.tf index 4a0d3f8b723..69f073a12c8 100644 --- a/terraform/environments/ccms-ebs-upgrade/ssm.tf +++ b/terraform/environments/ccms-ebs-upgrade/ssm.tf @@ -7,9 +7,17 @@ resource "aws_ssm_document" "create_backup_snapshots" { } resource "aws_ssm_document" "oracle_lms_cpuq" { - name = "Oracle-lms-cpuq" + name = "CCMS-Oracle-lms-cpuq" document_type = "Command" document_format = "YAML" - content = file("ssm_oracle_lms_cpuq.yaml") + content = file("ssm-oracle-lms-cpuq.yaml") +} + +resource "aws_ssm_document" "system_update" { + name = "CCMS-System-Update" + document_type = "Command" + document_format = "YAML" + + content = file("ssm-document-system-update.yaml") } \ No newline at end of file diff --git a/terraform/environments/ccms-ebs/ccms-ssm-create-backup-snapshots.yaml b/terraform/environments/ccms-ebs/ccms-ssm-document-create-backup-snapshots.yaml similarity index 100% rename from terraform/environments/ccms-ebs/ccms-ssm-create-backup-snapshots.yaml rename to terraform/environments/ccms-ebs/ccms-ssm-document-create-backup-snapshots.yaml diff --git a/terraform/environments/ccms-ebs/ccms-ssm-document-system-update.yaml b/terraform/environments/ccms-ebs/ccms-ssm-document-system-update.yaml new file mode 100644 index 00000000000..0ac693fdc60 --- /dev/null +++ b/terraform/environments/ccms-ebs/ccms-ssm-document-system-update.yaml @@ -0,0 +1,15 @@ +# ccms-ssm-create-backup-snapshots.yaml +--- +schemaVersion: "2.2" +description: Run 'yum -y update'. +mainSteps: + - name: YumUpdate + action: aws:runShellScript + isEnd: true + precondition: + StringEquals: + - platformType + - Linux + inputs: + runCommand: + - "yum -y update" \ No newline at end of file diff --git a/terraform/environments/ccms-ebs/ccms-ssm-documents.tf b/terraform/environments/ccms-ebs/ccms-ssm-documents.tf index 77c94f5c95a..987d2d8fad4 100644 --- a/terraform/environments/ccms-ebs/ccms-ssm-documents.tf +++ b/terraform/environments/ccms-ebs/ccms-ssm-documents.tf @@ -3,7 +3,15 @@ resource "aws_ssm_document" "create_backup_snapshots" { document_type = "Command" document_format = "YAML" - content = file("ccms-ssm-create-backup-snapshots.yaml") + content = file("ccms-ssm-document-create-backup-snapshots.yaml") +} + +resource "aws_ssm_document" "oracle_lms_cpuq" { + name = "CCMS-Oracle-lms-cpuq" + document_type = "Command" + document_format = "YAML" + + content = file("ccms-ssm-document-oracle-lms-cpuq.yaml") } resource "aws_ssm_document" "service_actions" { @@ -14,10 +22,10 @@ resource "aws_ssm_document" "service_actions" { content = file("ccms-ssm-document-service-actions.yaml") } -resource "aws_ssm_document" "oracle_lms_cpuq" { - name = "Oracle-lms-cpuq" +resource "aws_ssm_document" "system_update" { + name = "CCMS-System-Update" document_type = "Command" document_format = "YAML" - content = file("ccms-ssm-document-oracle-lms-cpuq.yaml") + content = file("ccms-ssm-document-system-update.yaml") } \ No newline at end of file