1

我有含有具有RdsDatabase對象DataPipeline資源CloudFormation堆棧模板:不支持的屬性*密碼

AWSTemplateFormatVersion: '2010-09-09' 
Resources: 
    ProUsageReportsPipelineStg: 
    Type: AWS::DataPipeline::Pipeline 
    Properties: 
     Name: my-db 
     PipelineObjects: 
     - id: ProAccountDB 
      type: RdsDatabase 
      region: us-west-2 
      username: username 
      "*password": password 
      rdsInstanceId: mydb 

當我嘗試創建這個堆棧中,我得到以下錯誤:

Encountered unsupported property *password 

但是,根據documentation即是傳遞密碼的地方。

回答

1

你非常接近。正確的語法是這樣的:

AWSTemplateFormatVersion: '2010-09-09' 
Resources: 
    ProUsageReportsPipelineStg: 
    Type: AWS::DataPipeline::Pipeline 
    Properties: 
     Name: my-db 
     PipelineObjects: 
     - 
      Id: ProAccountDB 
      Name: "My Pro Account database" 
      Fields: 
      - 
       Key: "type" 
       StringValue: "RdsDatabase" 
      - 
       Key: "region" 
       StringValue: "us-west-2" 
      - 
       Key: "username" 
       StringValue: "username" 
      - 
       Key: "*password" 
       StringValue: "password" 
      - 
       Key: "rdsInstanceId" 
       StringValue: "mydb" 

您還可以檢查在AWS文檔this例子供參考。