У меня есть следующий шаблон облачной информации:
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
serviceRoleArn:
Type: String
Description: The role that's used when the task is executed.
AWSInstanceID:
Type: String
awsSSMMaintenanceWindowTargetId:
Type: String
awsSSMMaintenanceWindowId:
Type: String
automationSSMTaskRole:
Type: String
automationSSMTaskType:
Type: String
automationSSMTaskDescription:
Type: String
automationSSMTaskARN:
Type: String
Resources:
startInstanceTask:
Type: 'AWS::SSM::MaintenanceWindowTask'
Properties:
MaxErrors: "2"
Description: !Ref "automationSSMTaskDescription"
ServiceRoleArn:
Ref: serviceRoleArn
Priority: 1
MaxConcurrency: "1"
Targets:
- Values:
- !Ref "awsSSMMaintenanceWindowTargetId"
Key: WindowTargetIds
Name: !Ref "automationSSMTaskType"
TaskArn: !Ref "automationSSMTaskARN"
WindowId: !Ref "awsSSMMaintenanceWindowId"
TaskType: "AUTOMATION"
TaskInvocationParameters:
MaintenanceWindowAutomationParameters:
DocumentVersion: "$DEFAULT"
Parameters:
InstanceId:
- !Ref AWSInstanceID
AutomationAssumeRole:
- Ref: automationSSMTaskRole
Однако AWSInstanceID преобразуется в:
"InstanceId": ["i-0375357htn1a8ad40,i-0d0f0f724tytf4d37,i-0e61cc61hthf8c2b2"]
Но это не тот формат, который мне нужен.Как получить следующий вывод?
"InstanceId": [
"i-0375357htn1a8ad40",
"i-0d0f0f724tytf4d37",
"i-0e61cc61hthf8c2b2"
]
Я хотел бы преобразовать String в CommaDelimitedList.