fix(static): do not attempt to import from empty state
This commit is contained in:
parent
15a85b1efe
commit
10f79ec999
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ from app.terraform.terraform import TerraformAutomation
|
||||||
def import_state(state: Any) -> None:
|
def import_state(state: Any) -> None:
|
||||||
if not isinstance(state, dict):
|
if not isinstance(state, dict):
|
||||||
raise RuntimeError("The Terraform state object returned was not a dict.")
|
raise RuntimeError("The Terraform state object returned was not a dict.")
|
||||||
if "child_modules" not in state['values']['root_module']:
|
if "values" not in state or "child_modules" not in state['values']['root_module']:
|
||||||
# There are no CloudFront origins deployed to import state for
|
# There are no CloudFront origins deployed to import state for
|
||||||
return
|
return
|
||||||
# CloudFront distributions (origins)
|
# CloudFront distributions (origins)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue