elegant-dusk-37631
04/24/2020, 6:50 AMchilly-terabyte-21485
04/24/2020, 10:04 AMchilly-terabyte-21485
04/24/2020, 10:06 AMchilly-terabyte-21485
04/24/2020, 10:06 AMfaint-motherboard-95438
04/24/2020, 10:51 AMOUTPUT VALUE
componentProps {"foo": "something", "bar": "whatever", ...}
And I want to get it like pulumi stack output componentProps.foo
or pulumi stack output componentProps:foo
but didn’t find the right way to do it.
Obviously I can do a pulumi stack output componentProps | jq -r '.foo'
but I was wondering if there was a “native” way in pulumi
CLI to do it (and avoid the jq
dependency)steep-angle-29984
04/24/2020, 11:53 AMhelpful-processor-86468
04/24/2020, 11:57 AMpulumi destroy
? I have a cloud endpoint resource that is causing problems when it's deleted.mysterious-australia-14256
04/24/2020, 12:15 PMsteep-angle-29984
04/24/2020, 2:16 PMcuddly-secretary-5371
04/24/2020, 3:17 PMimportant-morning-41038
04/24/2020, 9:24 PMable-zoo-58396
04/24/2020, 11:55 PMaws-javascript
template, and every time I try to run pulumi up
or pulumi preview
it fails with this error:
error: an unhandled error occurred: Program exited with non-zero exit code: -1
/usr/local/bin/node[9740]: ../src/env.cc:435:virtual node::Environment::~Environment(): Assertion `(base_object_count()) == (0)' failed.
1: 0x100b8ff9a node::Abort() (.cold.1) [/usr/local/bin/node]
2: 0x1000832c4 node::FatalError(char const*, char const*) [/usr/local/bin/node]
3: 0x10008307c node::AppendExceptionLine(node::Environment*, v8::Local<v8::Value>, v8::Local<v8::Message>, node::ErrorHandlingMode) [/usr/local/bin/node]
4: 0x10003e4bc node::Environment::~Environment() [/usr/local/bin/node]
5: 0x10003e606 node::Environment::~Environment() [/usr/local/bin/node]
6: 0x1000b4ac2 node::NodeMainInstance::Run() [/usr/local/bin/node]
7: 0x100060f13 node::Start(int, char**) [/usr/local/bin/node]
8: 0x7fff71d33cc9 start [/usr/lib/system/libdyld.dylib]
Even if I remove all of the actual resources so it has nothing to deploy, it will still crash on the preview. Basically, it never gets to the state where it asks me to proceed or not. Any reports of something like this?gray-yak-9058
04/25/2020, 3:51 PMfancy-ice-8211
04/26/2020, 5:16 AMTypeError: startswith first arg must be bytes or a tuple of bytes, not str
So I guess I'm doing something wrong with the config, but I can't see it (fixed, see thread).eager-vase-43200
04/26/2020, 6:57 AMcuddly-lizard-88530
04/26/2020, 7:36 AMbillions-glass-17089
04/26/2020, 6:22 PMmysterious-australia-14256
04/27/2020, 8:29 AMchilly-terabyte-21485
04/27/2020, 12:54 PMwonderful-dog-9045
04/27/2020, 3:21 PMpulumi new
that replaces the template parameter?adamant-dress-73325
04/27/2020, 4:18 PMpulumi.Output<string>[]
but this just produces weird type error I’m unable to resolve without casting to unknown
.
const vpcId = stackRef.requireOutput('vpcId');
const vpcPrivateSubnetIds = <string[]>stackRef.requireOutputSync('vpcPrivateSubnetIds');
const vpcPublicSubnetIds = <string[]>stackRef.requireOutputSync('vpcPublicSubnetIds');
const vpc = awsx.ec2.Vpc.fromExistingIds('vpc', {
privateSubnetIds: vpcPrivateSubnetIds,
publicSubnetIds: vpcPublicSubnetIds,
vpcId,
});
worried-engineer-33884
04/27/2020, 8:48 PMorange-policeman-59119
04/27/2020, 9:34 PMkubernetes:<http://networking.k8s.io:NetworkPolicy|networking.k8s.io:NetworkPolicy> prometheus-monitoring error: Duplicate resource URN 'urn:pulumi:review-payment-manager-fix-prometheus::payment-manager::kubernetes:<http://networking.k8s.io/v1:NetworkPolicy::prometheus-monitoring';|networking.k8s.io/v1:NetworkPolicy::prometheus-monitoring';> try giving it a unique name
There is only one new k8s.networking.v1.NetworkPolicy('prometheus-monitoring')
call and resource as far as I can tellorange-policeman-59119
04/27/2020, 9:35 PMcreamy-potato-29402
04/27/2020, 9:35 PMfast-activity-86095
04/27/2020, 10:37 PMtask_definition = ecs.TaskDefinition(
name,
family=name,
cpu="256",
memory="512",
network_mode="awsvpc",
requires_compatibilities=["FARGATE"],
execution_role_arn=role.arn,
container_definitions=json.dumps(
[
{
"name": "my-app",
"image": image,
"portMappings": [{"containerPort": port, "protocol": "tcp"}],
}
]
),
opts=child_opts,
)
Is there something I need to do to get the two stacks to work together? I don't have this problem with my other networking project stack, which uses python.fast-activity-86095
04/27/2020, 10:37 PM(venv) ~/***/pulumi/projects/images/config $ pulumi stack output image
***.<http://dkr.ecr.us-east-1.amazonaws.com/jdrake/***-59fb83d:602e111c06b6934013578ad80554a074049c59441d9bcd963cb4a7feccede7a5|dkr.ecr.us-east-1.amazonaws.com/jdrake/***-59fb83d:602e111c06b6934013578ad80554a074049c59441d9bcd963cb4a7feccede7a5>
and then a python stack that's trying to import it then pass it to a Component:
env = pulumi.get_stack()
image_stack = pulumi.StackReference(f"jdrake/***-image-config/{env}")
image = image_stack.get_output("image")
service = Service("***", env, image, port=80)
However, running pulumi up
gives me:
error: Program failed with an unhandled exception:
error: Traceback (most recent call last):
File "/usr/local/bin/pulumi-language-python-exec", line 85, in <module>
loop.run_until_complete(coro)
File "/Users/jdrake/.pyenv/versions/3.6.8/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
return future.result()
File "/Users/jdrake/.pyenv/versions/3.6.8/lib/python3.6/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
File "/Users/jdrake/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pulumi/runtime/stack.py", line 81, in run_in_stack
await run_pulumi_func(lambda: Stack(func))
File "/Users/jdrake/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pulumi/runtime/stack.py", line 34, in run_pulumi_func
func()
File "/Users/jdrake/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pulumi/runtime/stack.py", line 81, in <lambda>
await run_pulumi_func(lambda: Stack(func))
File "/Users/jdrake/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pulumi/runtime/stack.py", line 104, in __init__
func()
File "/usr/local/bin/pulumi-language-python-exec", line 84, in <lambda>
coro = pulumi.runtime.run_in_stack(lambda: runpy.run_path(args.PROGRAM, run_name='__main__'))
File "/Users/jdrake/.pyenv/versions/3.6.8/lib/python3.6/runpy.py", line 280, in run_path
run_name, mod_spec, pkg_name).copy()
File "/Users/jdrake/.pyenv/versions/3.6.8/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "./__main__.py", line 8, in <module>
service = Service("***", env, image, port=80)
File "/Users/jdrake/talos/pulumi/components/service/src/ns_pulumi_component_service/component.py", line 86, in __init__
"portMappings": [{"containerPort": port, "protocol": "tcp"}],
File "/Users/jdrake/.pyenv/versions/3.6.8/lib/python3.6/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/Users/jdrake/.pyenv/versions/3.6.8/lib/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/Users/jdrake/.pyenv/versions/3.6.8/lib/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/Users/jdrake/.pyenv/versions/3.6.8/lib/python3.6/json/encoder.py", line 180, in default
o.__class__.__name__)
TypeError: Object of type 'Output' is not JSON serializable
error: an unhandled error occurred: Program exited with non-zero exit code: 1
This is failing when I try to use that image value in a task definition:fancy-ice-8211
04/27/2020, 10:41 PMObject of type 'Output' is not JSON serializable
suggests to me you need an 'apply' somewhere
https://www.pulumi.com/docs/intro/concepts/programming-model/#outputsfancy-ice-8211
04/27/2020, 11:54 PMacceptable-stone-35112
04/28/2020, 8:35 AM