Cloudformation: не удалось развернуть WebACLAssociation в первый раз, поскольку WebACL еще не развернут
Мой шаблон выглядит так:
Transform: AWS::Serverless-2016-10-31
Parameters:
Stage:
Type: String
Default: dev
Resources:
ApiWebACL:
Type: AWS::WAFv2::WebACL
Properties:
...
...
ApiGateway:
Type: AWS::Serverless::Api
Properties:
StageName: !Ref Stage
#HERE
ApiGatewayWebACLAssociation:
Type: AWS::WAFv2::WebACLAssociation
Properties:
ResourceArn: !Sub "arn:aws:apigateway:${AWS::Region}::/restapis/${ApiGateway}/stages/${Stage}"
WebACLArn: !GetAtt ApiWebACL.Arn
timerHandler:
Type: AWS::Serverless::Function
Properties:
...
...
Пожалуйста, форсируйтеApiGatewayWebACLAssociation
раздел. При первом развертывании я должен удалить этот раздел, иначе развертывание завершится ошибкой, поскольку AWS::WAFv2::WebACL еще не развернут. Итак, мой вопрос: есть ли какое-либо доступное свойство, такое как «зависит от», чтобы заставить AWS::WAFv2::WebACLAssociation ждать, пока AWS:: WAFv2::WebACL завершит развертывание?
Бревно:
2022-12-19 08:35:30 - Waiting for stack create/update to complete
CloudFormation events from stack operations (refresh every 0.5 seconds)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ResourceStatus ResourceType LogicalResourceId ResourceStatusReason
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CREATE_IN_PROGRESS AWS::IAM::Role bulkUpsertAccommodationsFunctionRole -
CREATE_IN_PROGRESS AWS::IAM::Role gettingAccommodationCodesFunctionRole -
CREATE_IN_PROGRESS AWS::WAFv2::WebACL ApiWebACL -
CREATE_IN_PROGRESS AWS::IAM::Role postingCredentialsFunctionRole -
CREATE_IN_PROGRESS AWS::IAM::Role gettingPinRole -
CREATE_IN_PROGRESS AWS::IAM::Role timerHandlerRole -
CREATE_IN_PROGRESS AWS::IAM::Role bulkUpsertAccommodationsFunctionRole Resource creation Initiated
CREATE_IN_PROGRESS AWS::IAM::Role postingCredentialsFunctionRole Resource creation Initiated
CREATE_IN_PROGRESS AWS::IAM::Role gettingAccommodationCodesFunctionRole Resource creation Initiated
CREATE_IN_PROGRESS AWS::IAM::Role gettingPinRole Resource creation Initiated
CREATE_IN_PROGRESS AWS::IAM::Role timerHandlerRole Resource creation Initiated
CREATE_IN_PROGRESS AWS::WAFv2::WebACL ApiWebACL Resource creation Initiated
CREATE_COMPLETE AWS::WAFv2::WebACL ApiWebACL -
CREATE_COMPLETE AWS::IAM::Role bulkUpsertAccommodationsFunctionRole -
CREATE_COMPLETE AWS::IAM::Role postingCredentialsFunctionRole -
CREATE_COMPLETE AWS::IAM::Role gettingPinRole -
CREATE_COMPLETE AWS::IAM::Role timerHandlerRole -
CREATE_COMPLETE AWS::IAM::Role gettingAccommodationCodesFunctionRole -
CREATE_IN_PROGRESS AWS::Lambda::Function postingCredentialsFunction -
CREATE_IN_PROGRESS AWS::Lambda::Function gettingPin -
CREATE_IN_PROGRESS AWS::Lambda::Function timerHandler -
CREATE_IN_PROGRESS AWS::Lambda::Function bulkUpsertAccommodationsFunction -
CREATE_IN_PROGRESS AWS::Lambda::Function gettingAccommodationCodesFunction -
CREATE_IN_PROGRESS AWS::Lambda::Function postingCredentialsFunction Resource creation Initiated
CREATE_IN_PROGRESS AWS::Lambda::Function gettingPin Resource creation Initiated
CREATE_IN_PROGRESS AWS::Lambda::Function timerHandler Resource creation Initiated
CREATE_IN_PROGRESS AWS::Lambda::Function bulkUpsertAccommodationsFunction Resource creation Initiated
CREATE_IN_PROGRESS AWS::Lambda::Function gettingAccommodationCodesFunction Resource creation Initiated
CREATE_COMPLETE AWS::Lambda::Function postingCredentialsFunction -
CREATE_COMPLETE AWS::Lambda::Function gettingPin -
CREATE_COMPLETE AWS::Lambda::Function timerHandler -
CREATE_COMPLETE AWS::Lambda::Function bulkUpsertAccommodationsFunction -
CREATE_IN_PROGRESS AWS::Events::Rule timerHandlerScheduledEvent -
CREATE_IN_PROGRESS AWS::Events::Rule timerHandlerScheduledEvent Resource creation Initiated
CREATE_COMPLETE AWS::Lambda::Function gettingAccommodationCodesFunction -
CREATE_IN_PROGRESS AWS::ApiGateway::RestApi ApiGateway -
CREATE_IN_PROGRESS AWS::ApiGateway::RestApi ApiGateway Resource creation Initiated
CREATE_COMPLETE AWS::ApiGateway::RestApi ApiGateway -
CREATE_IN_PROGRESS AWS::Lambda::Permission gettingAccommodationCodesFunctionApiPermissionStage -
CREATE_IN_PROGRESS AWS::Lambda::Permission bulkUpsertAccommodationsFunctionApiPermissionStage -
CREATE_IN_PROGRESS AWS::ApiGateway::Deployment ApiGatewayDeploymentffab4af353 -
CREATE_IN_PROGRESS AWS::Lambda::Permission gettingPinApiPermissionStage -
CREATE_IN_PROGRESS AWS::Lambda::Permission postingCredentialsFunctionApiPermissionStage -
CREATE_IN_PROGRESS AWS::Lambda::Permission gettingAccommodationCodesFunctionApiPermissionStage Resource creation Initiated
CREATE_IN_PROGRESS AWS::Lambda::Permission gettingPinApiPermissionStage Resource creation Initiated
CREATE_IN_PROGRESS AWS::WAFv2::WebACLAssociation ApiGatewayWebACLAssociation -
CREATE_IN_PROGRESS AWS::Lambda::Permission bulkUpsertAccommodationsFunctionApiPermissionStage Resource creation Initiated
CREATE_IN_PROGRESS AWS::Lambda::Permission postingCredentialsFunctionApiPermissionStage Resource creation Initiated
CREATE_FAILED AWS::WAFv2::WebACLAssociation ApiGatewayWebACLAssociation Resource handler returned message: "AWS WAF
couldn?t perform the operation because your
resource doesn?t exist. (Service: Wafv2, Status
Code: 400, Request ID:
80665733-a939-4fba-8773-75981f2aeec4, Extended
Request ID: null)" (RequestToken:
b58d050b-a45e-eed9-0c70-6c3945038640,
HandlerErrorCode: NotFound)
CREATE_IN_PROGRESS AWS::ApiGateway::Deployment ApiGatewayDeploymentffab4af353 Resource creation Initiated
CREATE_FAILED AWS::Lambda::Permission gettingPinApiPermissionStage Resource creation cancelled
CREATE_FAILED AWS::Events::Rule timerHandlerScheduledEvent Resource creation cancelled
CREATE_FAILED AWS::Lambda::Permission bulkUpsertAccommodationsFunctionApiPermissionStage Resource creation cancelled
CREATE_FAILED AWS::ApiGateway::Deployment ApiGatewayDeploymentffab4af353 Resource creation cancelled
CREATE_FAILED AWS::Lambda::Permission gettingAccommodationCodesFunctionApiPermissionStage Resource creation cancelled
CREATE_FAILED AWS::Lambda::Permission postingCredentialsFunctionApiPermissionStage Resource creation cancelled
ROLLBACK_IN_PROGRESS AWS::CloudFormation::Stack ilo The following resource(s) failed to create:
[ApiGatewayWebACLAssociation,
gettingPinApiPermissionStage,
timerHandlerScheduledEvent,
ApiGatewayDeploymentffab4af353,
bulkUpsertAccommodationsFunctionApiPermissionStage,
gettingAccommodationCodesFunctionApiPermissionStage
, postingCredentialsFunctionApiPermissionStage].
Rollback requested by user.
DELETE_IN_PROGRESS AWS::ApiGateway::Deployment ApiGatewayDeploymentffab4af353 -
DELETE_IN_PROGRESS AWS::Lambda::Permission gettingAccommodationCodesFunctionApiPermissionStage -
DELETE_IN_PROGRESS AWS::Events::Rule timerHandlerScheduledEvent -
DELETE_IN_PROGRESS AWS::Lambda::Permission postingCredentialsFunctionApiPermissionStage -
DELETE_IN_PROGRESS AWS::Lambda::Permission bulkUpsertAccommodationsFunctionApiPermissionStage -
DELETE_IN_PROGRESS AWS::Lambda::Permission gettingPinApiPermissionStage -
DELETE_COMPLETE AWS::WAFv2::WebACLAssociation ApiGatewayWebACLAssociation -
DELETE_IN_PROGRESS AWS::WAFv2::WebACL ApiWebACL -
DELETE_COMPLETE AWS::ApiGateway::Deployment ApiGatewayDeploymentffab4af353 -
DELETE_COMPLETE AWS::WAFv2::WebACL ApiWebACL -
DELETE_COMPLETE AWS::Lambda::Permission gettingAccommodationCodesFunctionApiPermissionStage -
DELETE_COMPLETE AWS::Lambda::Permission bulkUpsertAccommodationsFunctionApiPermissionStage -
DELETE_COMPLETE AWS::Lambda::Permission gettingPinApiPermissionStage -
DELETE_COMPLETE AWS::Lambda::Permission postingCredentialsFunctionApiPermissionStage -
DELETE_IN_PROGRESS AWS::ApiGateway::RestApi ApiGateway -
DELETE_COMPLETE AWS::ApiGateway::RestApi ApiGateway -
DELETE_IN_PROGRESS AWS::Lambda::Function postingCredentialsFunction -
DELETE_IN_PROGRESS AWS::Lambda::Function gettingAccommodationCodesFunction -
DELETE_IN_PROGRESS AWS::Lambda::Function bulkUpsertAccommodationsFunction -
DELETE_IN_PROGRESS AWS::Lambda::Function gettingPin -
DELETE_COMPLETE AWS::Lambda::Function gettingAccommodationCodesFunction -
DELETE_COMPLETE AWS::Lambda::Function gettingPin -
DELETE_COMPLETE AWS::Lambda::Function postingCredentialsFunction -
DELETE_COMPLETE AWS::Lambda::Function bulkUpsertAccommodationsFunction -
DELETE_IN_PROGRESS AWS::IAM::Role gettingPinRole -
DELETE_IN_PROGRESS AWS::IAM::Role gettingAccommodationCodesFunctionRole -
DELETE_IN_PROGRESS AWS::IAM::Role postingCredentialsFunctionRole -
DELETE_IN_PROGRESS AWS::IAM::Role bulkUpsertAccommodationsFunctionRole -
DELETE_COMPLETE AWS::IAM::Role gettingPinRole -
DELETE_COMPLETE AWS::IAM::Role postingCredentialsFunctionRole -
DELETE_COMPLETE AWS::IAM::Role bulkUpsertAccommodationsFunctionRole -
DELETE_COMPLETE AWS::IAM::Role gettingAccommodationCodesFunctionRole -
DELETE_COMPLETE AWS::Events::Rule timerHandlerScheduledEvent -
DELETE_IN_PROGRESS AWS::Lambda::Function timerHandler -
DELETE_COMPLETE AWS::Lambda::Function timerHandler -
DELETE_IN_PROGRESS AWS::IAM::Role timerHandlerRole -
DELETE_COMPLETE AWS::IAM::Role timerHandlerRole -
ROLLBACK_COMPLETE AWS::CloudFormation::Stack ilo -
Я использую Mac OS