DOP-C02 Practice Question 75: Cross Stack Export Import Protection
AWS Certified DevOps Engineer – Professional (DOP-C02) · Test 8 · question 5 of 10
A "network" stack exports its VPC ID and subnet IDs with Export names, and three separate application stacks import those values with Fn::ImportValue. A platform engineer now needs to change the CidrBlock used to compute one of the exported subnet outputs, and separately wants to know whether the network stack could simply be deleted and recreated with a new template.
What will CloudFormation do?
Show answer and explanation
Answer:
CloudFormation tracks every Fn::ImportValue reference to an Export. As long as at least one stack imports an export, CloudFormation rejects both an update that would change that output's value and any attempt to delete the exporting stack. The three importing application stacks would have to stop importing the subnet output (update those stacks first) before the network stack's output can change or the stack can be deleted.
Option A ignores this protection entirely; nothing about cross-stack references resolves silently on the importer's side, and the exporting stack's change or deletion would be blocked outright.
Option B and C each get only half of the restriction right: the restriction applies symmetrically to both changing the value and deleting the stack (or removing the export), not to only one of the two.
Reference: Fn::ImportValue