diff --git a/ansible/terraform.py b/ansible/terraform.py index da51c45..9c37275 100755 --- a/ansible/terraform.py +++ b/ansible/terraform.py @@ -401,12 +401,6 @@ def _execute_shell(): else: return json.loads(out_cmd) - -def _backup_tf(tfstate): - # Crates a state backup in case we lose Consul - with open(TERRAFORM_BPK, 'w') as f: - f.write(json.dumps(tfstate.state_json)) - def _backup_ansible(inventory): # Crates a state backup in Ansible inventory format text = '# NOTE: This file is generated by terraform.py\n' @@ -437,8 +431,6 @@ def _main(): inventory.add_resource(resource) sys.stdout.write(json.dumps(inventory.to_dict(), indent=2)) - # backup raw TF state - _backup_tf(tfstate) # backup ansible inventory _backup_ansible(inventory) except Exception: