billions-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 AMnumerous-plastic-88847
04/28/2020, 9:45 AMchilly-terabyte-21485
04/28/2020, 9:54 AMgreat-postman-59271
04/28/2020, 11:50 AMbetter-actor-92669
04/28/2020, 2:22 PMpulumi-kubernetes
and python
SDK. However, CRDs were not installed.
When I do helm install
manually, all CRDs are created.
There is a warning in the chart description https://github.com/containous/traefik-helm-chart/tree/master/traefik#warning for Helm 2 that states that you will have to install all CRDs manually, however for helm 3 it is not required. I obviously use helm 3, and as far as I understood, pulumi just calls helm via cli. Can someone please help me with this?cool-egg-852
04/28/2020, 2:53 PMvictorious-helmet-11068
04/28/2020, 3:49 PMvictorious-helmet-11068
04/28/2020, 3:49 PMlively-oil-7382
04/28/2020, 6:53 PMlively-oil-7382
04/28/2020, 6:53 PMlively-oil-7382
04/28/2020, 6:56 PMbitter-zebra-93800
04/28/2020, 10:08 PMbrief-vr-80039
04/29/2020, 5:28 AMimport * as k8s as "@pulumi/kubernetes";
const myApp = new k8s.yaml.ConfigFile("app", {
file: "app.yaml"
});
late-printer-99022
04/29/2020, 8:19 AMfamous-translator-53768
04/29/2020, 9:50 AMGet Started with Kubernetes
Pulumi’s Cloud Native SDK makes it easy to target any Kubernetes environment to provision a cluster, configure and deploy applications, and update them as required.
famous-translator-53768
04/29/2020, 9:50 AMfamous-translator-53768
04/29/2020, 9:52 AMfamous-translator-53768
04/29/2020, 9:52 AM