From a9804f3d38fa878735de15eeb32a0eac797fb68c Mon Sep 17 00:00:00 2001 From: Robert Sweetman Date: Thu, 22 Feb 2024 15:17:31 +0000 Subject: [PATCH] add precondition otherwise this runs on Linux hosts and breaks things (#5149) --- .../ssm-documents/windows-cloudwatch-agent-config.yaml | 8 ++++++++ .../ssm-documents/windows-cloudwatch-agent-config.yaml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/terraform/environments/corporate-staff-rostering/ssm-documents/windows-cloudwatch-agent-config.yaml b/terraform/environments/corporate-staff-rostering/ssm-documents/windows-cloudwatch-agent-config.yaml index 78ff83a64fd..dd9ea196e97 100644 --- a/terraform/environments/corporate-staff-rostering/ssm-documents/windows-cloudwatch-agent-config.yaml +++ b/terraform/environments/corporate-staff-rostering/ssm-documents/windows-cloudwatch-agent-config.yaml @@ -9,6 +9,10 @@ parameters: mainSteps: - name: installCWAgent action: aws:runDocument + precondition: + StringEquals: + - platformType + - Windows inputs: documentType: SSMDocument documentPath: AWS-ConfigureAWSPackage @@ -17,6 +21,10 @@ mainSteps: name: AmazonCloudWatchAgent - name: configureCWAgent action: aws:runDocument + precondition: + StringEquals: + - platformType + - Windows inputs: documentType: SSMDocument documentPath: AmazonCloudWatch-ManageAgent diff --git a/terraform/environments/planetfm/ssm-documents/windows-cloudwatch-agent-config.yaml b/terraform/environments/planetfm/ssm-documents/windows-cloudwatch-agent-config.yaml index 78ff83a64fd..dd9ea196e97 100644 --- a/terraform/environments/planetfm/ssm-documents/windows-cloudwatch-agent-config.yaml +++ b/terraform/environments/planetfm/ssm-documents/windows-cloudwatch-agent-config.yaml @@ -9,6 +9,10 @@ parameters: mainSteps: - name: installCWAgent action: aws:runDocument + precondition: + StringEquals: + - platformType + - Windows inputs: documentType: SSMDocument documentPath: AWS-ConfigureAWSPackage @@ -17,6 +21,10 @@ mainSteps: name: AmazonCloudWatchAgent - name: configureCWAgent action: aws:runDocument + precondition: + StringEquals: + - platformType + - Windows inputs: documentType: SSMDocument documentPath: AmazonCloudWatch-ManageAgent