У меня есть следующий шаблон облачной информации:
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
Когда я запускаю событие DELETE
, я вижу следующее:
Вопросы:
- Почему WafRule удаляет первым?Когда его нельзя удалить до
WAFSizeCondition1
?Как я могу объявить зависимость в шаблоне, чтобы WAFSizeCondition1
удалял первым? - Почему
WAFSizeCondition1
нельзя удалить?На какой ресурс ссылается?Как правильно обрабатывать удаление ресурсов здесь?