MCPcopy Create free account
hub / github.com/beelit94/python-terraform / wrapper

Function wrapper

test/test_terraform.py:139–147  ·  view source on GitHub ↗
(workspace_name, create=True, delete=True, *args, **kwargs)

Source from the content-addressed store, hash-verified

137
138 @contextmanager
139 def wrapper(workspace_name, create=True, delete=True, *args, **kwargs):
140 tf = Terraform(working_dir=current_path)
141 tf.init()
142 if create:
143 tf.create_workspace(workspace_name, *args, **kwargs)
144 yield tf
145 if delete:
146 tf.set_workspace("default")
147 tf.delete_workspace(workspace_name)
148
149 yield wrapper
150

Callers

nothing calls this directly

Calls 5

initMethod · 0.95
create_workspaceMethod · 0.95
set_workspaceMethod · 0.95
delete_workspaceMethod · 0.95
TerraformClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…