fix
parent
dd219dfbf5
commit
ece36312dc
|
|
@ -18,7 +18,7 @@ Parameters:
|
||||||
Type: String
|
Type: String
|
||||||
Default: development
|
Default: development
|
||||||
Description: 'Your deployment environment: DEV, QA , PROD'
|
Description: 'Your deployment environment: DEV, QA , PROD'
|
||||||
BUILD_GUID:
|
BUILDGUID:
|
||||||
Type: String
|
Type: String
|
||||||
Default: ''
|
Default: ''
|
||||||
StackName:
|
StackName:
|
||||||
|
|
@ -34,7 +34,7 @@ Resources:
|
||||||
DeleteCFNLambda:
|
DeleteCFNLambda:
|
||||||
Type: "AWS::Lambda::Function"
|
Type: "AWS::Lambda::Function"
|
||||||
Properties:
|
Properties:
|
||||||
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILD_GUID ] ]
|
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDGUID ] ]
|
||||||
Code:
|
Code:
|
||||||
ZipFile: |
|
ZipFile: |
|
||||||
import boto3
|
import boto3
|
||||||
|
|
@ -74,7 +74,7 @@ Resources:
|
||||||
- GenerateCronExpression
|
- GenerateCronExpression
|
||||||
Type: "AWS::Events::Rule"
|
Type: "AWS::Events::Rule"
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join [ "", [ 'DeleteStackEventRule', !Ref BUILD_GUID ] ]
|
Name: !Join [ "", [ 'DeleteStackEventRule', !Ref BUILDGUID ] ]
|
||||||
Description: Delete stack event
|
Description: Delete stack event
|
||||||
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
|
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
|
||||||
State: "ENABLED"
|
State: "ENABLED"
|
||||||
|
|
@ -87,14 +87,14 @@ Resources:
|
||||||
DependsOn:
|
DependsOn:
|
||||||
- DeleteStackEventRule
|
- DeleteStackEventRule
|
||||||
Properties:
|
Properties:
|
||||||
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILD_GUID ] ]
|
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDGUID ] ]
|
||||||
Action: "lambda:InvokeFunction"
|
Action: "lambda:InvokeFunction"
|
||||||
Principal: "events.amazonaws.com"
|
Principal: "events.amazonaws.com"
|
||||||
SourceArn: !GetAtt DeleteStackEventRule.Arn
|
SourceArn: !GetAtt DeleteStackEventRule.Arn
|
||||||
GenerateCronExpLambda:
|
GenerateCronExpLambda:
|
||||||
Type: "AWS::Lambda::Function"
|
Type: "AWS::Lambda::Function"
|
||||||
Properties:
|
Properties:
|
||||||
FunctionName: !Join [ "", [ 'GenerateCronExpressionLambda', !Ref BUILD_GUID ] ]
|
FunctionName: !Join [ "", [ 'GenerateCronExpressionLambda', !Ref BUILDGUID ] ]
|
||||||
Code:
|
Code:
|
||||||
ZipFile: |
|
ZipFile: |
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
@ -138,6 +138,6 @@ Resources:
|
||||||
Type: "Custom::GenerateCronExpression"
|
Type: "Custom::GenerateCronExpression"
|
||||||
Version: "1.0"
|
Version: "1.0"
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join [ "", [ 'GenerateCronExpression', !Ref BUILD_GUID ] ]
|
Name: !Join [ "", [ 'GenerateCronExpression', !Ref BUILDGUID ] ]
|
||||||
ServiceToken: !GetAtt GenerateCronExpLambda.Arn
|
ServiceToken: !GetAtt GenerateCronExpLambda.Arn
|
||||||
ttl: !Ref 'TTL'
|
ttl: !Ref 'TTL'
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ Parameters:
|
||||||
Type: Number
|
Type: Number
|
||||||
Default: 2048
|
Default: 2048
|
||||||
Description: How much memory in megabytes to give the container
|
Description: How much memory in megabytes to give the container
|
||||||
BUILD_GUID:
|
BUILDGUID:
|
||||||
Type: String
|
Type: String
|
||||||
Default: ''
|
Default: ''
|
||||||
Command:
|
Command:
|
||||||
|
|
|
||||||
|
|
@ -1400,7 +1400,7 @@ class AWSTemplates {
|
||||||
${p1}Secret:
|
${p1}Secret:
|
||||||
Type: AWS::SecretsManager::Secret
|
Type: AWS::SecretsManager::Secret
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join [ "", [ '${p1}', !Ref BUILD_GUID ] ]
|
Name: !Join [ "", [ '${p1}', !Ref BUILDGUID ] ]
|
||||||
SecretString: !Ref ${p1}
|
SecretString: !Ref ${p1}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -14,7 +14,7 @@ export class AWSTemplates {
|
||||||
${p1}Secret:
|
${p1}Secret:
|
||||||
Type: AWS::SecretsManager::Secret
|
Type: AWS::SecretsManager::Secret
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join [ "", [ '${p1}', !Ref BUILD_GUID ] ]
|
Name: !Join [ "", [ '${p1}', !Ref BUILDGUID ] ]
|
||||||
SecretString: !Ref ${p1}
|
SecretString: !Ref ${p1}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ Parameters:
|
||||||
Type: String
|
Type: String
|
||||||
Default: development
|
Default: development
|
||||||
Description: 'Your deployment environment: DEV, QA , PROD'
|
Description: 'Your deployment environment: DEV, QA , PROD'
|
||||||
BUILD_GUID:
|
BUILDGUID:
|
||||||
Type: String
|
Type: String
|
||||||
Default: ''
|
Default: ''
|
||||||
StackName:
|
StackName:
|
||||||
|
|
@ -34,7 +34,7 @@ Resources:
|
||||||
DeleteCFNLambda:
|
DeleteCFNLambda:
|
||||||
Type: 'AWS::Lambda::Function'
|
Type: 'AWS::Lambda::Function'
|
||||||
Properties:
|
Properties:
|
||||||
FunctionName: !Join ['', ['DeleteCFNLambda', !Ref BUILD_GUID]]
|
FunctionName: !Join ['', ['DeleteCFNLambda', !Ref BUILDGUID]]
|
||||||
Code:
|
Code:
|
||||||
ZipFile: |
|
ZipFile: |
|
||||||
import boto3
|
import boto3
|
||||||
|
|
@ -74,7 +74,7 @@ Resources:
|
||||||
- GenerateCronExpression
|
- GenerateCronExpression
|
||||||
Type: 'AWS::Events::Rule'
|
Type: 'AWS::Events::Rule'
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join ['', ['DeleteStackEventRule', !Ref BUILD_GUID]]
|
Name: !Join ['', ['DeleteStackEventRule', !Ref BUILDGUID]]
|
||||||
Description: Delete stack event
|
Description: Delete stack event
|
||||||
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
|
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
|
||||||
State: 'ENABLED'
|
State: 'ENABLED'
|
||||||
|
|
@ -86,14 +86,14 @@ Resources:
|
||||||
DependsOn:
|
DependsOn:
|
||||||
- DeleteStackEventRule
|
- DeleteStackEventRule
|
||||||
Properties:
|
Properties:
|
||||||
FunctionName: !Join ['', ['DeleteCFNLambda', !Ref BUILD_GUID]]
|
FunctionName: !Join ['', ['DeleteCFNLambda', !Ref BUILDGUID]]
|
||||||
Action: 'lambda:InvokeFunction'
|
Action: 'lambda:InvokeFunction'
|
||||||
Principal: 'events.amazonaws.com'
|
Principal: 'events.amazonaws.com'
|
||||||
SourceArn: !GetAtt DeleteStackEventRule.Arn
|
SourceArn: !GetAtt DeleteStackEventRule.Arn
|
||||||
GenerateCronExpLambda:
|
GenerateCronExpLambda:
|
||||||
Type: 'AWS::Lambda::Function'
|
Type: 'AWS::Lambda::Function'
|
||||||
Properties:
|
Properties:
|
||||||
FunctionName: !Join ['', ['GenerateCronExpressionLambda', !Ref BUILD_GUID]]
|
FunctionName: !Join ['', ['GenerateCronExpressionLambda', !Ref BUILDGUID]]
|
||||||
Code:
|
Code:
|
||||||
ZipFile: |
|
ZipFile: |
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
@ -137,6 +137,6 @@ Resources:
|
||||||
Type: 'Custom::GenerateCronExpression'
|
Type: 'Custom::GenerateCronExpression'
|
||||||
Version: '1.0'
|
Version: '1.0'
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join ['', ['GenerateCronExpression', !Ref BUILD_GUID]]
|
Name: !Join ['', ['GenerateCronExpression', !Ref BUILDGUID]]
|
||||||
ServiceToken: !GetAtt GenerateCronExpLambda.Arn
|
ServiceToken: !GetAtt GenerateCronExpLambda.Arn
|
||||||
ttl: !Ref 'TTL'
|
ttl: !Ref 'TTL'
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ Parameters:
|
||||||
Type: Number
|
Type: Number
|
||||||
Default: 2048
|
Default: 2048
|
||||||
Description: How much memory in megabytes to give the container
|
Description: How much memory in megabytes to give the container
|
||||||
BUILD_GUID:
|
BUILDGUID:
|
||||||
Type: String
|
Type: String
|
||||||
Default: ''
|
Default: ''
|
||||||
Command:
|
Command:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue