diff --git a/template-sar.yml b/template-sar.yml index 24b6d3c..88b25de 100644 --- a/template-sar.yml +++ b/template-sar.yml @@ -1,6 +1,10 @@ AWSTemplateFormatVersion: '2010-09-09' Transform: 'AWS::Serverless-2016-10-31' Description: 'Create pipeline-dashboard application.' +Parameters: + PipelinePattern: + Description: 'The pattern of pipeline names to allow access to describe. Recommended value: *' + Type: String Resources: PipelineDashboardEventHandler: Type: 'AWS::Serverless::Function' @@ -23,7 +27,7 @@ Resources: Policies: - CloudWatchPutMetricPolicy: {} - CodePipelineReadOnlyPolicy: - PipelineName: '*' + PipelineName: !Ref PipelinePattern PipelineDashboardGenerator: Type: 'AWS::Serverless::Function' Properties: diff --git a/template.yml b/template.yml index 4b73832..612441d 100644 --- a/template.yml +++ b/template.yml @@ -1,6 +1,10 @@ AWSTemplateFormatVersion: '2010-09-09' Transform: 'AWS::Serverless-2016-10-31' Description: 'Create pipeline-dashboard application.' +Parameters: + PipelinePattern: + Description: 'The pattern of pipeline names to allow access to describe. Recommended value: *' + Type: String Resources: PipelineDashboardEventHandler: Type: 'AWS::Serverless::Function' @@ -23,7 +27,7 @@ Resources: Policies: - CloudWatchPutMetricPolicy: {} - CodePipelineReadOnlyPolicy: - PipelineName: '*' + PipelineName: !Ref PipelinePattern PipelineDashboardGenerator: Type: 'AWS::Serverless::Function' Properties: