From f08c60e5cb6534e95e8eccf12eb1181258c089c3 Mon Sep 17 00:00:00 2001 From: Armen Rostamian Date: Wed, 5 May 2021 17:32:26 -0700 Subject: [PATCH] fix(tagging): Added resource-level tagging in accordance with pr #205 --- .../ivs-helpers/IVS-Channel.template | 3 ++- .../livestream-helpers/cloudfront-distribution.template | 4 ++++ .../vod-helpers/CFDistribution.template.ejs | 9 ++++++--- .../vod-helpers/LambdaFunctions/InputLambda/index.js | 1 + 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/provider-utils/awscloudformation/cloudformation-templates/ivs-helpers/IVS-Channel.template b/provider-utils/awscloudformation/cloudformation-templates/ivs-helpers/IVS-Channel.template index 65ba08af..02e7ebe5 100644 --- a/provider-utils/awscloudformation/cloudformation-templates/ivs-helpers/IVS-Channel.template +++ b/provider-utils/awscloudformation/cloudformation-templates/ivs-helpers/IVS-Channel.template @@ -35,4 +35,5 @@ Resources: ServiceToken: !Ref pFunctionArn name: !Ref pProjectName type: !Ref pQuality - latencyMode: !Ref pLatencyMode \ No newline at end of file + latencyMode: !Ref pLatencyMode + tags: {"amplify-video" : "amplify-video"} diff --git a/provider-utils/awscloudformation/cloudformation-templates/livestream-helpers/cloudfront-distribution.template b/provider-utils/awscloudformation/cloudformation-templates/livestream-helpers/cloudfront-distribution.template index 4d832746..c62f3b0b 100644 --- a/provider-utils/awscloudformation/cloudformation-templates/livestream-helpers/cloudfront-distribution.template +++ b/provider-utils/awscloudformation/cloudformation-templates/livestream-helpers/cloudfront-distribution.template @@ -166,6 +166,10 @@ "rDistribution" : { "Type": "AWS::CloudFront::Distribution", "Properties": { + "Tags" : [{ + "Key" : "amplify-video", + "Value" : "amplify-video" + }], "DistributionConfig": { "Origins": [ { diff --git a/provider-utils/awscloudformation/cloudformation-templates/vod-helpers/CFDistribution.template.ejs b/provider-utils/awscloudformation/cloudformation-templates/vod-helpers/CFDistribution.template.ejs index 043dd2a7..7ac5388d 100644 --- a/provider-utils/awscloudformation/cloudformation-templates/vod-helpers/CFDistribution.template.ejs +++ b/provider-utils/awscloudformation/cloudformation-templates/vod-helpers/CFDistribution.template.ejs @@ -20,6 +20,9 @@ Resources: rCloudFrontDist: Type: AWS::CloudFront::Distribution Properties: + Tags: + - Key: amplify-video + Value: amplify-video DistributionConfig: DefaultCacheBehavior: ForwardedValues: @@ -40,8 +43,8 @@ Resources: TrustedKeyGroups: - !Ref rCloudFrontKeyGroup <% } %> - Origins: - - + Origins: + - DomainName: !Ref pBucketUrl Id: vodS3Origin S3OriginConfig: @@ -72,4 +75,4 @@ Outputs: <% } %> oCFDomain: Value: !GetAtt rCloudFrontDist.DomainName - Description: Domain for our videos \ No newline at end of file + Description: Domain for our videos diff --git a/provider-utils/awscloudformation/cloudformation-templates/vod-helpers/LambdaFunctions/InputLambda/index.js b/provider-utils/awscloudformation/cloudformation-templates/vod-helpers/LambdaFunctions/InputLambda/index.js index d2449de7..c699e75c 100644 --- a/provider-utils/awscloudformation/cloudformation-templates/vod-helpers/LambdaFunctions/InputLambda/index.js +++ b/provider-utils/awscloudformation/cloudformation-templates/vod-helpers/LambdaFunctions/InputLambda/index.js @@ -64,6 +64,7 @@ async function createJob(eventObject) { UserMetadata: {}, Role: process.env.MC_ROLE, Settings: jobSettings, + Tags: { 'amplify-video': 'amplify-video' }, }; await mcClient.createJob(jobParams).promise(); }