terraform show -json plan.out contains resource_changes, each with an address, a type and
change.actions — a list such as ["create"], ["update"], ["delete"], ["delete", "create"]
(replace) or ["no-op"].
Return {"create": n, "update": n, "delete": n, "replace": n, "blocked": [...]} where blocked is the
sorted list of addresses that would destroy (delete or replace) a resource whose type is in
protected_types.
Implement summarize_plan. Input: plan: dict, protected_types: list[str]. Returns: dict.
def summarize_plan(plan: dict, protected_types: list[str]) -> dict:
return {"create": 0, "update": 0, "delete": 0, "replace": 0, "blocked": []}
Run executes the public tests. Submit grades against public and hidden tests.
terraform show -json plan.out contains resource_changes, each with an address, a type and
change.actions — a list such as ["create"], ["update"], ["delete"], ["delete", "create"]
(replace) or ["no-op"].
Return {"create": n, "update": n, "delete": n, "replace": n, "blocked": [...]} where blocked is the
sorted list of addresses that would destroy (delete or replace) a resource whose type is in
protected_types.
Implement summarize_plan. Input: plan: dict, protected_types: list[str]. Returns: dict.
def summarize_plan(plan: dict, protected_types: list[str]) -> dict:
return {"create": 0, "update": 0, "delete": 0, "replace": 0, "blocked": []}
Run executes the public tests. Submit grades against public and hidden tests.