Why WAF disassociate resource when Cloudformation change resource Cloudfront?

0

Hi Community. When I change Cloudformation template with resource Cloudfront, I will see Distribution Cloudfront removed on WAF. This makes me feel very uncomfortable. I must reassociate Distribution again on WAF. Why WAF disassociate Distribution? Please help me. Thank you

질문됨 2년 전301회 조회
1개 답변
1
수락된 답변

What changes are you making to your CloudFront Distribution resource in your template? Are you attaching WAF separately to CloudFormation? If you modify a property affecting WAF, CloudFormation may overwrite it; if you modify a property which requires replacement, CloudFormation will replace your Distribution with a new one.

I'd recommend you use CloudFormation to associate AWS WAF with your Distribution. You can provide it using the WebACLId property of the DistributionConfig property in your template. If you don't want to manage the whole WAF through CloudFormation, I'd recommend making a Parameter in your template to allow you to specify the WAF ACL Id, and then use that parameter when setting the value in the Distribution resource.

profile pictureAWS
전문가
James_S
답변함 2년 전
  • Hi James_S, WAF I don't use Cloudformation. It was created on consoles. Only Cloudfront was created by Cloudformation.
    Maybe I will write Cloudformation for WAF. Thank for the advice. Best regard.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠