agreeable-angle-1483
05/01/2020, 10:32 AMrequire_object
but its not working as I’m expected.
this is the object:
endemic:backend_services:
service_a:
protocol: HTTP
timeout: 30
port: 80
instance_group: lala
health_check: lala-hc
service_b:
protocol: HTTPS
timeout: 30
port: 443
instance_group: kuku
health_check: kuku-hc
and this is how I’m trying to load it
config_obj = pulumi.Config('endemic')
backend_services = config_obj.require('backend_services')
when I’m printing it its showing me only the names
for service in backend_services:
print(service)
service_a
service_b
how do I access to the inside parameters? and if it’s possible I’d rather prefer to use the pulumi config
variables load inside,
i.e: service_protocol = config_obj.require('service_a:protocol')
let me know if you have other suggestion for the variables structure
thanks a lotbig-potato-91793
05/01/2020, 12:55 PMbrainy-vegetable-77467
05/01/2020, 1:34 PMbrainy-vegetable-77467
05/01/2020, 1:34 PMconst master = new digitalocean.Droplet(`k3s-master`, {
image: "ubuntu-18-04-x64",
region: region,
privateNetworking: true,
size: digitalocean.DropletSlugs.DropletS1VCPU1GB,
userData: userDataMaster,
});
export const master_ip_priv = master.ipv4AddressPrivate;
const userDataWorker = `#!/bin/bash
echo IPAddressMaster: $master_ip_priv > ip-master.txt
`;
const worker = new digitalocean.Droplet(`k3s-worker-1`, {
image: "ubuntu-18-04-x64",
region: region,
privateNetworking: true,
size: digitalocean.DropletSlugs.Droplet512mb,
userData: userDataWorker,
});
brainy-vegetable-77467
05/01/2020, 2:44 PMbrainy-vegetable-77467
05/01/2020, 2:44 PMconst userDataWorker = `
#!/bin/bash
echo ${(master_ip_priv.apply( master_ip_priv => master_ip_priv.toString() ))} > ipmaster.txt | sh -
`;
brainy-vegetable-77467
05/01/2020, 2:45 PM#!/bin/bash
echo Calling [toString] on an [Output<T>] is not supported.
To get the value of an Output<T> as an Output<string> consider either:
1: o.apply(v => `prefix${v}suffix`)
famous-kite-69533
05/01/2020, 3:08 PMlemon-tailor-72006
05/01/2020, 3:24 PMlemon-tailor-72006
05/01/2020, 3:54 PMlemon-tailor-72006
05/01/2020, 3:55 PMgray-yak-9058
05/01/2020, 7:30 PMmake
scripts/get-py-version.go:7:2: cannot find module providing package <http://github.com/pulumi/pulumi/sdk/v2/go/common/util/buildutil|github.com/pulumi/pulumi/sdk/v2/go/common/util/buildutil>: working directory is not part of a module
================
opsgenie Package
================
BUILD:
cd provider && go install -ldflags "-X <http://github.com/pulumi/pulumi-opsgenie/provider/pkg/version.Version=v0.0.1-alpha.1588074230+gca4ea26.dirty|github.com/pulumi/pulumi-opsgenie/provider/pkg/version.Version=v0.0.1-alpha.1588074230+gca4ea26.dirty>" <http://github.com/pulumi/pulumi-opsgenie/provider/cmd/pulumi-tfgen-opsgenie|github.com/pulumi/pulumi-opsgenie/provider/cmd/pulumi-tfgen-opsgenie>
pulumi-tfgen-opsgenie schema --out ./provider/cmd/pulumi-resource-opsgenie
/bin/bash: pulumi-tfgen-opsgenie: command not found
make: *** [generate_schema] Error 127
Any idea on what I might be doing wrong?cool-egg-852
05/01/2020, 7:48 PMimport
doesn’t accept Output<string>
important-football-63662
05/02/2020, 10:07 PMimportant-football-63662
05/02/2020, 10:53 PMpulumi up
hang indefinitely. I have to ctrl+c twice, export state, delete pending ops, re-import state, re-run each timeadamant-motorcycle-76548
05/03/2020, 11:00 AMgray-tailor-20387
05/03/2020, 2:25 PMerror: [resource plugin digitalocean-2.1.0-alpha.1586903880] downloading from <https://api.pulumi.com/releases/plugins>: 404 HTTP error fetching plugin from <https://api.pulumi.com/releases/plugins/pulumi-resource-digitalocean-v2.1.0-alpha.1586903880-linux-amd64.tar.gz>
How do i fix this? Preferrably i'd actually use pulumi plugin install resource digitalocean 2.3.0
if possible.gray-tailor-20387
05/03/2020, 3:32 PMpulumi plugin install resource digitalocean 2.3.0
#You can set the environment variable PULUMI_ENABLE_LEGACY_PLUGIN_SEARCH=1 to get unblocked and load plugins exactly as before.
export PULUMI_ENABLE_LEGACY_PLUGIN_SEARCH=1
Then I manually fixed Providers in stack.json aften export, then importpolite-student-92901
05/04/2020, 6:06 AM<http://networking.gke.io/v1beta2|networking.gke.io/v1beta2>
?rhythmic-lighter-17156
05/04/2020, 9:58 AMswift-lunch-74411
05/04/2020, 9:58 AMnutritious-shampoo-16116
05/04/2020, 10:48 AM<pulumi.output.Output object at 0x7f662973a100>-elb-ssl-listener
is it possible to reference outputs into resources names?white-airport-48392
05/04/2020, 11:26 AMverbose npm v6.14.4
293 error code ELIFECYCLE
294 error syscall spawn
295 error file sh
296 error errno ENOENT
297 error deasync@0.1.19 install: `node ./build.js`
297 error spawn ENOENT
298 error Failed at the deasync@0.1.19 install script.
298 error This is probably not a problem with npm. There is likely additional logging output above.
I use pulumi 2 , I tried with node version 12 and 14 , with same outcome ,
All of this worked fine in my Mac ,
Any idea about this ?mammoth-france-95463
05/04/2020, 3:42 PMalert-processor-41605
05/04/2020, 5:04 PMalert-processor-41605
05/04/2020, 6:15 PM<http://aws.lb|aws.lb>.LoadBalancer
to a new <http://awsx.lb|awsx.lb>.ApplicationLoadBalancer
? I am using the typescript package currently. I want to take advantage of the features of aws crosswalk, but it's import that I can use an imported resource of an ALB that already exists in my amazon account. For all the other crosswalk resources, I have used the pattern of creating a non crosswalk resource using the import
option and then passing that in as the argument to create the crosswalk resource. Am I missing something here with the load balancer? As far as I can tell, it will always create a new load balancer and there is no way to pass in an existing one.
To draw a comparison to other resources, when creating a crosswalk cluster, you can pass in an existing aws cluster. If it exists, it will get the cluster and use it, if it doesn't it creates a new cluster. Looking at the source for the load balancer, it seems to always create one no matter what.
Cluster Implementation
https://github.com/pulumi/pulumi-awsx/blob/6e41506897a3d7bf3985beb8ecdc596638047699/nodejs/awsx/ecs/cluster.ts#L49
Load Balancer Implementation
https://github.com/pulumi/pulumi-awsx/blob/6e41506897a3d7bf3985beb8ecdc596638047699/nodejs/awsx/lb/loadBalancer.ts#L42loud-lifeguard-46150
05/05/2020, 3:49 AMdef get_cloud_init(param1, param2, param3):
with open('cloud-init.sh') as f:
return f.read().format(param1=param1, param2=param2, param3=param3)
def swarm_scaleset(role, count=1, instance_type=None):
return pulumi.Output.all(param1, param2, param3).apply(
lambda args: az.compute.ScaleSet(
...
os_profile={
...
'custom_data': get_cloud_init(*args),
...
},
...
)
)
managers = swarm_scaleset('manager', 3, 'Standard_B1ms')
workers = swarm_scaleset('worker', 10, 'Standard_B1ms')
How do people handle this scenario usually?loud-lifeguard-46150
05/05/2020, 4:07 AMdef get_cloud_init(param1, param2, param3):
with open('cloud-init.sh') as f:
return f.read().format(param1=param1, param2=param2, param3=param3)
def swarm_scaleset(role, count=1, instance_type=None):
return az.compute.ScaleSet(
...
os_profile={
...
'custom_data': pulumi.Output.all(param1, param2, param3).apply(
lambda args: get_cloud_init(*args)
)
...
},
...
)
managers = swarm_scaleset('manager', 3, 'Standard_B1ms')
workers = swarm_scaleset('worker', 10, 'Standard_B1ms')
I'm testing it at the moment and it seems to work ok, I'll test it on a fresh install soon (which was the problem before)sparse-intern-71089
05/05/2020, 7:35 AMnutritious-judge-27316
05/05/2020, 8:10 AM