Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,16 @@ Resources:
- "kms:Decrypt"
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,16 @@ Resources:
- "kms:Decrypt"
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,16 @@ Resources:
- "kms:Decrypt"
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ Resources:
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ Resources:
- "kms:Decrypt"
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ Resources:
- "kms:Decrypt"
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,16 @@ Resources:
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
- HasEnvFile
- PolicyName: !Join ['', [!Ref AppName, '-', !Ref EnvName, '-', !Ref WorkloadName, GetEnvFilePolicy]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ Resources:
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- PolicyName: 'Publish2SNS'
PolicyDocument:
Version: '2012-10-17'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,16 @@ Resources: # If a bucket URL is specified, that means the template exists.
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ Resources: # If a bucket URL is specified, that means the template exists.
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,16 @@ Resources: # If a bucket URL is specified, that means the template exists.
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ Resources: # If a bucket URL is specified, that means the template exists.
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,16 @@ Resources: # If a bucket URL is specified, that means the template exists.
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
- HasEnvFile
- PolicyName: !Join ['', [!Ref AppName, '-', !Ref EnvName, '-', !Ref WorkloadName, GetEnvFilePolicy]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,16 @@ Resources: # If a bucket URL is specified, that means the template exists.
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,16 @@ Resources: # If a bucket URL is specified, that means the template exists.
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@ Resources: # If a bucket URL is specified, that means the template exists.
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,16 @@ Resources:
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
- !If
- HasEnvFile
- PolicyName: !Join ['', [!Ref AppName, '-', !Ref EnvName, '-', !Ref WorkloadName, GetEnvFilePolicy]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ ExecutionRole:
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
# Optional IAM permission required by ECS task def env file
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html#taskdef-envfiles-iam
# Example EnvFileARN: arn:aws:s3:::stackset-demo-infrastruc-pipelinebuiltartifactbuc-11dj7ctf52wyf/manual/1638391936/env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ InstanceRole:
- 'kms:Decrypt'
Resource:
- !Ref ArtifactKeyARN
- Sid: DecryptTaggedKMSKey
Effect: 'Allow'
Action:
- 'kms:Decrypt'
Resource:
- !Sub 'arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*'
Condition:
StringEquals:
'aws:ResourceTag/copilot-application': !Sub '${AppName}'
'aws:ResourceTag/copilot-environment': !Sub '${EnvName}'
{{- end }}
{{- if .Publish }}
{{- if .Publish.Topics }}
Expand Down