typescript aws
parent
087f0cb8de
commit
3d3f6f6cde
|
|
@ -14,9 +14,6 @@ Metadata:
|
||||||
TTL:
|
TTL:
|
||||||
default: Time-to-live
|
default: Time-to-live
|
||||||
Parameters:
|
Parameters:
|
||||||
BUILDID:
|
|
||||||
Type: String
|
|
||||||
Default: ''
|
|
||||||
StackName:
|
StackName:
|
||||||
Type: String
|
Type: String
|
||||||
Description: Stack name that will be deleted.
|
Description: Stack name that will be deleted.
|
||||||
|
|
@ -90,7 +87,7 @@ Resources:
|
||||||
- GenerateCronExpression
|
- GenerateCronExpression
|
||||||
Type: "AWS::Events::Rule"
|
Type: "AWS::Events::Rule"
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join [ "", [ 'DeleteStackEventRule', !Ref BUILDID ] ]
|
Name: !Sub "DeleteStackEventRule-${StackName}"
|
||||||
Description: Delete stack event
|
Description: Delete stack event
|
||||||
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
|
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
|
||||||
State: "ENABLED"
|
State: "ENABLED"
|
||||||
|
|
@ -101,7 +98,7 @@ Resources:
|
||||||
PermissionForDeleteCFNLambda:
|
PermissionForDeleteCFNLambda:
|
||||||
Type: "AWS::Lambda::Permission"
|
Type: "AWS::Lambda::Permission"
|
||||||
Properties:
|
Properties:
|
||||||
FunctionName: !Sub "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:DeleteCFNLambda-${StackName}"
|
FunctionName: !Sub "DeleteCFNLambda-${StackName}"
|
||||||
Action: "lambda:InvokeFunction"
|
Action: "lambda:InvokeFunction"
|
||||||
Principal: "events.amazonaws.com"
|
Principal: "events.amazonaws.com"
|
||||||
SourceArn: !GetAtt DeleteStackEventRule.Arn
|
SourceArn: !GetAtt DeleteStackEventRule.Arn
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue