Q68 — AWS ANS-C01 Ch.1

Question 68 of 100 | ← Chapter 1

A network engineer must develop an AWS CloudFormation template that can create a virtual private gateway, a customer gateway, a VPN Connection, and static routes in a route table. During testing of the template, the network engineer notes that the CloudFormation template has Encountered an error and is rolling back. What should the network engineer do to resolve the error?

Correct Answer: D. Add the DependsOn attribute to the resource declaration for the route table entry. Specify the virtual private gateway resource.

Explanation

在AWSCloudFormation中,当模板中资源的创建顺序依赖于其他资源的状态时,需要使用`DependsOn`属性来确保依赖关系被正确处理。在本题中,静态路由(routetableentry)依赖于虚拟私有网关(virtualprivategateway)的存在,因为路由需要指向这个网关。因此,网络工程师应该在路由表条目的资源声明中添加`DependsOn`属性,并指定虚拟私有网关资源。这样,CloudFormation就会先创建虚拟私有网关,然后再创建静态路由,从而避免回滚错误。所以正确答案是D。 查看全部