microscopic-barista-15731
10/11/2022, 12:53 PM└── common
├── Pulumi.cmn.yaml
├── Pulumi.yaml
├── __main__.py
├── __pycache__
├── kubernetes
│ ├── Pulumi.kubernetes.yaml
│ ├── Pulumi.yaml
│ ├── __main__.py
│ ├── __pycache__
│ └── requirements.txt
└── requirements.txt
I would like to have micro stacks and use the GCP bucket as the backend.
I’m pointing to the same GCP bucket in both Pulumi.yaml files.
Here is stacks list:
pulumi stack ls
NAME LAST UPDATE RESOURCE COUNT
cmn 12 minutes ago 3
kubernetes 22 hours ago 0
in kubernetes
__main__.py
file I have this part of code
stack = pulumi.get_stack()
print(stack)
pulumi.stack_reference(f"cmn")
and I’m getting the error:
pulumi:pulumi:Stack (kubernetes-kubernetes):
error: Program failed with an unhandled exception:
Traceback (most recent call last):
File "/Users/irmas/projects/devops-new/infra/common/kubernetes/./__main__.py", line 16, in <module>
pulumi.stack_reference("cmn")
TypeError: 'module' object is not callable
kubernetes
billowy-army-68599
10/12/2022, 3:33 PMproject.stack
microscopic-barista-15731
10/12/2022, 3:34 PMbillowy-army-68599
10/12/2022, 3:37 PMf
string from your stack_reference?microscopic-barista-15731
10/12/2022, 3:38 PMpulumi.stack_reference("common.cmn")
tried coomon-cmn, cmnbillowy-army-68599
10/12/2022, 3:41 PMstack = pulumi.get_stack()
print(stack)
pulumi.StackReference("stack-1.dev")
microscopic-barista-15731
10/12/2022, 4:12 PMbillowy-army-68599
10/12/2022, 4:27 PMmicroscopic-barista-15731
10/13/2022, 2:13 PM