salmon-honey-75627
11/22/2020, 9:33 PMsalmon-honey-75627
11/22/2020, 9:33 PMsalmon-honey-75627
11/22/2020, 9:33 PMbetter-actor-92669
11/24/2020, 5:13 PM# rrdatas=[
# dbs_instance_pulumi_objects[item].
# network_interfaces[0]['networkIp'],
# ],
But when you initiate the stack for the first time in a new project and all instances are yet to be created alongside DNS records, networkInterfaces
only contains this
networkInterfaces : [
[0]: {
subnetwork: output<string>
}
]
When some instance is finally created, it becomes
networkInterfaces
[
{
"accessConfigs": [],
"aliasIpRanges": [],
"name": "nic0",
"network": "<https://www.googleapis.com/compute/v1/projects/some-project/global/networks/vpc-network-default-b803ef2>",
"networkIp": "10.122.0.3",
"subnetwork": "<https://www.googleapis.com/compute/v1/projects/some-project/regions/europe-west1/subnetworks/vpc-subnetwork-default-bab788a>",
"subnetworkProject": "some-subnetwork"
}
]
How can I ask pulumi to wait for the value, even though the key is not present yet? Or how should I reference it properly?bitter-policeman-94135
11/27/2020, 7:33 PMDiagnostics:
pulumi:providers:pulumi-python (default):
error: no resource plugin 'pulumi-python' found in the workspace or on your $PATH
Try as I might, I can't find a plugin named pulumi-python
. Do any of you have any insight?bitter-policeman-94135
11/27/2020, 7:52 PMdynamic.ResourceProvider
:
class ProvisionerProvider(dynamic.ResourceProvider):
Then in that class's initializer it tries to initialize pulumi-python
(dynamic.py:256):
super(Resource, self).__init__("pulumi-python:dynamic:Resource", name, props, opts)
bitter-policeman-94135
11/27/2020, 9:27 PMpulumi
.bitter-policeman-94135
11/27/2020, 9:27 PMbitter-policeman-94135
11/27/2020, 9:28 PMpulumi
. That serves me right for not following directions exactly.worried-queen-62794
12/10/2020, 9:47 PMfierce-ability-58936
12/10/2020, 10:28 PMsticky-salesmen-55696
12/15/2020, 6:28 PMpurple-arm-63328
12/15/2020, 9:48 PMstar_apply
besides apply
in Output
?
It would work like this:
pulumi.Output.all(a, b, c).star_apply(lambda x, y, z: ...)
Otherwise, the lambda function must receive one argument and use it like a sequence.
Any thoughts?shy-football-10348
12/15/2020, 11:38 PMjolly-camera-35709
12/17/2020, 5:53 AMjolly-camera-35709
12/17/2020, 5:54 AMjolly-camera-35709
12/17/2020, 5:54 AMcustom_data=base64.b64encode("hahaha".encode("utf-8"))
fancy-river-36247
12/23/2020, 1:48 PMFile "/Users/jasonvertrees/work/infra-pulumi/venv/lib/python3.9/site-packages/pulumi/output.py", line 175, in run
transformed: Input[U] = func(value)
TypeError: sequence item 7: expected str instance, int found
fancy-river-36247
12/23/2020, 1:49 PMechoing-dawn-86996
12/27/2020, 8:37 PMclever-plumber-29709
12/28/2020, 9:40 PMsparse-intern-71089
01/03/2021, 6:23 PMechoing-dawn-86996
01/05/2021, 2:51 PMMetricBucketOptionsArgs
MetricMetricDescriptorArgs
MetricMetricDescriptorLabelArgs
average-school-38756
01/09/2021, 9:41 PM_import
option is working well. One case which is not working is trying to use an existing AWS Lambda function. There is some difference detected in the code
property:
+ pulumi:pulumi:Stack hello-dev create 1 error
...
= ├─ aws:lambda:Function exampleLambda import [diff: +code]; 1 warning
...
aws:lambda:Function (exampleLambda):
warning: inputs to import do not match the existing resource; importing this resource will fail
Original code looks like this:
lambda_.Function("exampleLambda",
role=lambda_role.arn,
runtime="python3.7",
handler='hello.handler',
code=pulumi.AssetArchive({
'.': pulumi.FileArchive('./hello')
})
)
State looks like this:
{
"4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
"assets": {
".": {
"4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
"hash": "935cf7f6edab4c54246b65708d75c720b7e47142e4c0d70ed8e7803ec63b4883",
"path": "./hello"
}
},
"hash": "935cf7f6edab4c54246b65708d75c720b7e47142e4c0d70ed8e7803ec63b4883"
}
How can i detect and address the difference detected when pulumi up
is run?
$ pulumi preview --diff
...
warning: inputs to import do not match the existing resource; importing this resource will fail
= aws:lambda/function:Function: (import)
[id=exampleLambda-2775aa5]
[urn=urn:pulumi:dev::hello::aws:lambda/function:Function::exampleLambda]
[provider=urn:pulumi:dev::hello::pulumi:providers:aws::default_3_20_0::04da6b54-80e4-46f7-96ec-b56ff0331ba9]
+ code: archive(assets:935cf7f) {
+ ".": archive(assets:935cf7f) {
}
}
echoing-dawn-86996
01/10/2021, 12:51 PMdelete_before_replace=True
is simply not working.
Here is how I do it:
compute.Instance(
f"{name}-{zone}",
# More instance config here
opts=ResourceOptions(delete_before_replace=True)
)
However, pulumi simply ignores it. Each time the resource changes (the name changes), it first creates the new resource, and then deletes the old one.
What am I missing here?flat-appointment-64705
01/12/2021, 11:17 AMflat-appointment-64705
01/12/2021, 11:18 AMjolly-camera-35709
01/14/2021, 6:55 AMjolly-camera-35709
01/14/2021, 6:55 AMdb_server_fqdn = db_stack.get_output("db_server_fqdn")
db_server_fqdn_value = db_server_fqdn.apply(lambda db_server_fqdn: db_server_fqdn)
jolly-camera-35709
01/14/2021, 6:56 AM