pull/310/head
Frostebite 2021-12-30 22:08:59 +00:00
parent dd219dfbf5
commit ece36312dc
7 changed files with 17 additions and 17 deletions

View File

@ -18,7 +18,7 @@ Parameters:
Type: String
Default: development
Description: 'Your deployment environment: DEV, QA , PROD'
BUILD_GUID:
BUILDGUID:
Type: String
Default: ''
StackName:
@ -34,7 +34,7 @@ Resources:
DeleteCFNLambda:
Type: "AWS::Lambda::Function"
Properties:
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILD_GUID ] ]
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDGUID ] ]
Code:
ZipFile: |
import boto3
@ -74,7 +74,7 @@ Resources:
- GenerateCronExpression
Type: "AWS::Events::Rule"
Properties:
Name: !Join [ "", [ 'DeleteStackEventRule', !Ref BUILD_GUID ] ]
Name: !Join [ "", [ 'DeleteStackEventRule', !Ref BUILDGUID ] ]
Description: Delete stack event
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
State: "ENABLED"
@ -87,14 +87,14 @@ Resources:
DependsOn:
- DeleteStackEventRule
Properties:
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILD_GUID ] ]
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDGUID ] ]
Action: "lambda:InvokeFunction"
Principal: "events.amazonaws.com"
SourceArn: !GetAtt DeleteStackEventRule.Arn
GenerateCronExpLambda:
Type: "AWS::Lambda::Function"
Properties:
FunctionName: !Join [ "", [ 'GenerateCronExpressionLambda', !Ref BUILD_GUID ] ]
FunctionName: !Join [ "", [ 'GenerateCronExpressionLambda', !Ref BUILDGUID ] ]
Code:
ZipFile: |
from datetime import datetime, timedelta
@ -138,6 +138,6 @@ Resources:
Type: "Custom::GenerateCronExpression"
Version: "1.0"
Properties:
Name: !Join [ "", [ 'GenerateCronExpression', !Ref BUILD_GUID ] ]
Name: !Join [ "", [ 'GenerateCronExpression', !Ref BUILDGUID ] ]
ServiceToken: !GetAtt GenerateCronExpLambda.Arn
ttl: !Ref 'TTL'

View File

@ -30,7 +30,7 @@ Parameters:
Type: Number
Default: 2048
Description: How much memory in megabytes to give the container
BUILD_GUID:
BUILDGUID:
Type: String
Default: ''
Command:

2
dist/index.js vendored
View File

@ -1400,7 +1400,7 @@ class AWSTemplates {
${p1}Secret:
Type: AWS::SecretsManager::Secret
Properties:
Name: !Join [ "", [ '${p1}', !Ref BUILD_GUID ] ]
Name: !Join [ "", [ '${p1}', !Ref BUILDGUID ] ]
SecretString: !Ref ${p1}
`;
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -14,7 +14,7 @@ export class AWSTemplates {
${p1}Secret:
Type: AWS::SecretsManager::Secret
Properties:
Name: !Join [ "", [ '${p1}', !Ref BUILD_GUID ] ]
Name: !Join [ "", [ '${p1}', !Ref BUILDGUID ] ]
SecretString: !Ref ${p1}
`;
}

View File

@ -18,7 +18,7 @@ Parameters:
Type: String
Default: development
Description: 'Your deployment environment: DEV, QA , PROD'
BUILD_GUID:
BUILDGUID:
Type: String
Default: ''
StackName:
@ -34,7 +34,7 @@ Resources:
DeleteCFNLambda:
Type: 'AWS::Lambda::Function'
Properties:
FunctionName: !Join ['', ['DeleteCFNLambda', !Ref BUILD_GUID]]
FunctionName: !Join ['', ['DeleteCFNLambda', !Ref BUILDGUID]]
Code:
ZipFile: |
import boto3
@ -74,7 +74,7 @@ Resources:
- GenerateCronExpression
Type: 'AWS::Events::Rule'
Properties:
Name: !Join ['', ['DeleteStackEventRule', !Ref BUILD_GUID]]
Name: !Join ['', ['DeleteStackEventRule', !Ref BUILDGUID]]
Description: Delete stack event
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
State: 'ENABLED'
@ -86,14 +86,14 @@ Resources:
DependsOn:
- DeleteStackEventRule
Properties:
FunctionName: !Join ['', ['DeleteCFNLambda', !Ref BUILD_GUID]]
FunctionName: !Join ['', ['DeleteCFNLambda', !Ref BUILDGUID]]
Action: 'lambda:InvokeFunction'
Principal: 'events.amazonaws.com'
SourceArn: !GetAtt DeleteStackEventRule.Arn
GenerateCronExpLambda:
Type: 'AWS::Lambda::Function'
Properties:
FunctionName: !Join ['', ['GenerateCronExpressionLambda', !Ref BUILD_GUID]]
FunctionName: !Join ['', ['GenerateCronExpressionLambda', !Ref BUILDGUID]]
Code:
ZipFile: |
from datetime import datetime, timedelta
@ -137,6 +137,6 @@ Resources:
Type: 'Custom::GenerateCronExpression'
Version: '1.0'
Properties:
Name: !Join ['', ['GenerateCronExpression', !Ref BUILD_GUID]]
Name: !Join ['', ['GenerateCronExpression', !Ref BUILDGUID]]
ServiceToken: !GetAtt GenerateCronExpLambda.Arn
ttl: !Ref 'TTL'

View File

@ -30,7 +30,7 @@ Parameters:
Type: Number
Default: 2048
Description: How much memory in megabytes to give the container
BUILD_GUID:
BUILDGUID:
Type: String
Default: ''
Command: