23 lines
526 B
Python
Executable File
23 lines
526 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import pulumi.automation as auto
|
|
|
|
|
|
|
|
# ws = auto.LocalWorkspace(work_dir=".")
|
|
# all_stacks = ws.list_stacks()
|
|
# print([s.name for s in all_stacks])
|
|
|
|
project_name = 'p1'
|
|
stack_names = ['c1', 'c2', 'c3']
|
|
|
|
for s in stack_names:
|
|
stack = auto.create_or_select_stack(stack_name=s, project_name=project_name, work_dir=".")
|
|
stack.workspace.install_plugin("digitalocean", "4.33.0")
|
|
|
|
stack.set_config("foo", auto.ConfigValue(value=s))
|
|
|
|
stack.refresh(on_output=print)
|
|
stack.up(on_output=print)
|
|
|