white-balloon-205
s3.Bucket.get
expects the name of the bucket not the arn. So s3.Bucket.get(“pm-images”, “pm-images”)
.
I don’t quite follow how the more recent example is related?orange-australia-91292
12/28/2019, 10:28 PMid (str) – The unique provider ID of the resource to lookup.And I got the idea that it’s an ARN from https://www.pulumi.com/blog/easy-serverless-apps-and-infrastructure-real-events-real-code/#connect-to-an-existing-resource and a Stack Overflow answer. That’s a blog post, so I guess it’s outdated. The error returned about a valid ARN not being valid didn’t help either.
orange-australia-91292
12/28/2019, 10:29 PMorange-australia-91292
12/28/2019, 10:46 PMS3 Bucket to which this Public Access Block configuration should be applied.It’s not clear that it’s talking about the bucket name. I guess I got the idea that it should be an ARN from the bucket parameter of s3.Bucket(), where it says:
bucket (pulumi.Input[str]) – The ARN of the S3 bucket where you want Amazon S3 to store replicas of the object identified by the rule.I assumed it expects the same thing because the parameter name is the same.
orange-australia-91292
12/28/2019, 10:48 PMorange-australia-91292
12/28/2019, 10:50 PMbright-orange-69401
01/06/2020, 2:23 AMapply
a function to a list of dicts
When I run the code, I get an empty record:
> + records_to_create : {}
Why is that ? I printed the input of my function and it's indeed populated (just like in my docstring)brainy-camera-35431
01/07/2020, 12:04 AMbrainy-camera-35431
01/07/2020, 12:04 AMs = state.RemoteStateReference("localstate", "local", state.LocalBackendArgs(path='/xxx/.terraform/terraform.tfstate'))
debug: reading resource: ty=terraform:state:RemoteStateReference, name=localstate, id=localstate
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/cmclaughlin/.pyenv/versions/pulumi/lib/python3.7/site-packages/pulumi_terraform/state/remote_state_reference.py", line 637, in __init__
opts_with_id)
File "/Users/cmclaughlin/.pyenv/versions/pulumi/lib/python3.7/site-packages/pulumi/resource.py", line 791, in __init__
Resource.__init__(self, t, name, True, props, opts)
File "/Users/cmclaughlin/.pyenv/versions/pulumi/lib/python3.7/site-packages/pulumi/resource.py", line 697, in __init__
read_resource(self, t, name, props, opts)
File "/Users/cmclaughlin/.pyenv/versions/pulumi/lib/python3.7/site-packages/pulumi/runtime/resource.py", line 151, in read_resource
monitor = settings.get_monitor()
File "/Users/cmclaughlin/.pyenv/versions/pulumi/lib/python3.7/site-packages/pulumi/runtime/settings.py", line 162, in get_monitor
require_test_mode_enabled()
File "/Users/cmclaughlin/.pyenv/versions/pulumi/lib/python3.7/site-packages/pulumi/runtime/settings.py", line 114, in require_test_mode_enabled
raise RunError('Program run without the Pulumi engine available; re-run using the `pulumi` CLI')
pulumi.errors.RunError: Program run without the Pulumi engine available; re-run using the `pulumi` CLI
brainy-camera-35431
01/07/2020, 12:04 AMhelp
method to read the docscolossal-plastic-46140
01/07/2020, 6:11 PMbetter-actor-92669
01/08/2020, 11:29 AMfrom pulumi import get_project, export, ResourceOptions
from pulumi.resource import CustomTimeouts
for item in DATABASES_TO_CREATE:
database = Database('database_' + item.replace('-', '_'),
opts=ResourceOptions(
custom_timeouts=CustomTimeouts(create="30s"),
depends_on=[cloud_pgsql_main_1],
protect=True,
),
I get
TypeError: Parameter to MergeFrom() must be instance of same class: expected CustomTimeouts got CustomTimeouts. for field RegisterResourceRequest.customTimeouts
error: an unhandled error occurred: Program exited with non-zero exit code: 1
witty-battery-24953
01/08/2020, 5:45 PMNo module named pulumi
error, but using the v1.7.1 tagged actions container works just fine. Unrelated question: where's the right place to bring up issues with actions/ci in general? Opening up an issue in the pulumi/pulumi
repo didn't seem quite right...witty-battery-24953
01/08/2020, 5:46 PMpulumi:pulumi:Stack infra-prod Traceback (most recent call last):
pulumi:pulumi:Stack infra-prod File "/usr/bin/pulumi-language-python-exec", line 14, in <module>
pulumi:pulumi:Stack infra-prod import pulumi
pulumi:pulumi:Stack infra-prod ModuleNotFoundError: No module named 'pulumi'
pulumi:pulumi:Stack infra-prod It looks like the Pulumi SDK has not been installed. Have you run pip install?
pulumi:pulumi:Stack infra-prod If you are running in a virtualenv, you must run pip install -r requirements.txt from inside the virtualenv.
pulumi:pulumi:Stack infra-prod error: an unhandled error occurred: Program exited with non-zero exit code: 1
pulumi:pulumi:Stack infra-prod 1 error; 6 messages
agreeable-angle-1483
01/19/2020, 4:52 PMVPC
and Subnet Network
with Pulumi in python and during the process to understand the relationships management in Pulumi, I’ve created the following 3 files (attaching in the comments):
network.py
- which contains the python functions I want to use in multiple projects
Pulumi.stg.yaml
- contains the configurations
__main__.py
- main code with calls to the functions
When I ran this code I saw there is no relationship management, I have tried to use ResourceOptions(parent\child)
I’ve also tried to use the dependsOn:
but I didn’t success to use it, I think in both options the resource should be exists before, and I want to know how to do it right.
I’d be glad to get some examples because I didn’t find on the internet.
Thanks a lotfaint-helicopter-36405
01/22/2020, 2:49 PM__main__.py
with Pulumi for Python as the program entrypoint?mammoth-hamburger-56768
01/22/2020, 7:52 PMpulumi-terraform-template
. The Python SDK is generated with a package name of pulumi_terraform-template
, which isn't a valid package name (I don't think). If I rename the dir in ./venv
to pulumi_terraform_template
, it's importable and works as expected. Am I missing something? It seems like pulumi-terraform-bridge
might only be converting the first hyphen to underscore when it generates the package nameicy-evening-27754
01/23/2020, 9:44 PMFile "/usr/local/lib/python3.7/site-packages/pulumi/stack_reference.py", line 70, in <lambda>
value: Output[Any] = Output.all([Output.from_input(name), self.outputs]).apply(lambda l: l[1].get(l[0])) # type: ignore
IndexError: list index out of range
error: an unhandled error occurred: Program exited with non-zero exit code: 1
Haven't changed anything on my end, wondering if anyone else is getting this?!bright-orange-69401
01/25/2020, 8:56 AMsource_code_hash
in the Lambda. The problem is that this won't work unless you use the exact same hashing algorithm that Terraform uses, in Go language.
So I've reverse-engineered said algorithm and created a public Gist that I wanted to share with the community here:
https://gist.github.com/LouisAmon/ea395d39d80b28eb78181831fa523456
Cheersbetter-actor-92669
01/27/2020, 1:20 PM[CustomTimeouts]
from pulumi.*ResourceOptions*
?broad-market-21398
02/01/2020, 5:00 AMdeployment = Deployment(
"nginx",
spec={
"selector": { "match_labels": app_labels },
"replicas": 1,
"template": {
"metadata": { "labels": app_labels },
"spec": { "containers": [{ "name": "nginx", "image": "nginx" }] }
}
})
There's no typing on the keys like "selector", "replicas", etc.
These specs are defined in the OpenAPI, so I was hoping there would be some way to get type hints for the actual spec body for code completion -- am I missing some way to get this working, or is this not implemented?
This is (verbosely) implemented in client-python
; I'm hoping for something like this (but perhaps a bit more ergonomic): https://github.com/kubernetes-client/python/blob/master/examples/deployment_crud.py#L24-L46broad-market-21398
02/01/2020, 5:01 AMmany-garden-84306
02/02/2020, 1:56 AMclever-nest-47198
02/04/2020, 3:18 PMglamorous-scooter-76401
02/06/2020, 1:49 PMwonderful-plastic-88586
02/13/2020, 12:14 AMloud-midnight-95614
02/13/2020, 12:35 AMloud-midnight-95614
02/13/2020, 12:39 AMloud-midnight-95614
02/14/2020, 10:40 PMpulumi.debug()
where do those messages go? I tried to use --verbose 5
on the command line, but I still didn't see the messages.clever-nest-47198
02/17/2020, 5:44 PM