Skip to content

Commit

Permalink
CC-2923: SSM command for executing 'yum update'.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmgovuk committed Nov 4, 2024
1 parent 446bbee commit 4826bdf
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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"
12 changes: 10 additions & 2 deletions terraform/environments/ccms-ebs-upgrade/ssm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Original file line number Diff line number Diff line change
@@ -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"
16 changes: 12 additions & 4 deletions terraform/environments/ccms-ebs/ccms-ssm-documents.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -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")
}

0 comments on commit 4826bdf

Please sign in to comment.