[英]AWS CloudFormation delete resources
I have following cloudformation template: 我有以下cloudformation模板:
Parameters:
SizeCondition1:
Type: String
Default: SizeCondition1
Description: >-
Enter the name of the size condition. Note names cannot be modified after
creation and must be alphanumeric without spaces.
SizeURI1:
Type: String
Default: '8192'
Description: Enter the size limit of the URI.
SizeQuery1:
Type: String
Default: '8192'
Description: Enter the size limit of the query string.
Resources:
WAFSizeCondition1:
Type: 'AWS::WAF::SizeConstraintSet'
Properties:
Name: !Ref SizeCondition1
SizeConstraints:
- FieldToMatch:
Type: QUERY_STRING
ComparisonOperator: GT
Size: !Ref SizeQuery1
TextTransformation: NONE
- FieldToMatch:
Type: URI
ComparisonOperator: GT
Size: !Ref SizeURI1
TextTransformation: NONE
WafRule:
Type: 'Custom::CustomResource'
Properties:
ServiceToken: !Join
- ''
- - 'arn:aws:lambda:'
- !Ref 'AWS::Region'
- ':'
- !Ref 'AWS::AccountId'
- ':function:WafLambdaTest'
Name: WAFRateTest1
RateLimit: '2000'
MetricName: WAFRateTest1
Predicates:
- DataId: !Ref WAFSizeCondition1
Negated: false
Type: SizeConstraint
When I fire DELETE
event I see following: 当我触发
DELETE
事件时,我看到以下内容:
Questions: 问题:
WAFSizeCondition1
? WAFSizeCondition1
之前将其删除WAFSizeCondition1
? How can I declare dependency in the template to make WAFSizeCondition1
deletes first? WAFSizeCondition1
首先删除? WAFSizeCondition1
can not be deleted? WAFSizeCondition1
无法删除? By which resource it referenced? DependsOn
attribute. DependsOn
属性指定某种形式的依赖关系。 eg: WAFSizeCondition1: WAFSizeCondition1:
Type: 'AWS::WAF::SizeConstraintSet' 类型:“ AWS :: WAF :: SizeConstraintSet”
DependsOn: WafRule 取决于:WafRule
Permanently deletes a WebACL .
永久删除WebACL。 You can't delete a WebACL if it still contains any Rules .
如果WebACL仍然包含任何规则,则无法删除。
To delete a WebACL , perform the following steps:
要删除WebACL,请执行以下步骤:
Update the WebACL to remove Rules , if any.
更新WebACL以删除“规则”(如果有)。 For more information, see UpdateWebACL .
有关更多信息,请参见UpdateWebACL 。
Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteWebACL request.
使用GetChangeToken获取在DeleteWebACL请求的ChangeToken参数中提供的更改令牌。 Submit a DeleteWebACL request.
提交DeleteWebACL请求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.