many-psychiatrist-74327
09/10/2020, 3:27 PMworried-umbrella-80893
09/10/2020, 3:54 PMgentle-diamond-70147
09/10/2020, 3:55 PMfaint-table-42725
09/10/2020, 4:15 PMearly-intern-90238
09/10/2020, 8:23 PMincalculable-dream-27508
09/11/2020, 11:40 AMsteep-angle-29984
09/11/2020, 11:53 AMpulumi stack init --copy-config-from stack
but can that handle different projects somehow?incalculable-dream-27508
09/11/2020, 12:12 PMips = []
hostnames = []
(...)
INSTANCES = {
i: openstack.compute.Instance(...)
for i in range(COUNT)
}
for srv in INSTANCES:
ips.append(INSTANCES[srv].access_ip_v4)
hostnames.append(INSTANCES[srv].name)
pulumi.export('ips', ips)
pulumi.export('hostnames', hostnames)
and that works. I tried adding to it
exported = {}
(...)
exported[INSTANCES[srv].name] = INSTANCES[srv].access_ip_v4
pulumi.export('nodes', exported)
to have a dictionary mapping hostname to IP instead of having separate lists, but it very much doesn't like that. Any ideas what I'm doing wrong?bitter-dentist-28132
09/11/2020, 2:26 PMorange-electrician-25669
09/11/2020, 4:30 PMadamant-advantage-95831
09/11/2020, 4:47 PMsecretsprovider:
and encryptedkey:
entries from my stack configuration file seems to fix my pulumi preview
and pulumi up
being stuck commands. if I run pulumi stack change-secrets-provider "azurekeyvault://<my-url>.net/keys/<my key>"
doesn't seem to do anything. -- Alright I'm dumb. Turns out I needed to add AZURE_TENANT_ID, AZURE_CLIENT_ID, and AZURE_CLIENT_SECRET
to my Environment Variables 😛thousands-planet-11416
09/11/2020, 5:00 PMworried-city-86458
09/11/2020, 7:08 PMcold-car-67614
09/11/2020, 7:14 PMdamp-elephant-82829
09/12/2020, 8:21 AMcalm-agent-81076
09/12/2020, 2:10 PMbitter-alligator-63874
09/12/2020, 4:21 PMvictorious-xylophone-55816
09/12/2020, 5:41 PMaws.acm.Certificate() -> aws.route53.getZone() -> aws.route53.Record() -> aws.acm.CertificateValidation() -> awsx.lb.NetworkLoadBalancer({ certificateArn: certCertificate.arn })
But feels like I probably shouldn't repeat this for every service, creating CertificateValidation
and new NetworkLoadBalancer
.
What's the best way to do this? Or could I use something like Caddy for automatic HTTPS without all the other steps? (not sure how it works)
Grateful for any input 🙏damp-table-85095
09/12/2020, 8:50 PMcreamy-vr-86450
09/13/2020, 12:58 AMgithub.Team
from @pulumi/github
? A regular account’s PAT
doesn’t work nor does there seem to be a way to authorize as an organization. This is the error I get:
This resource can only be used in the context of an organization
damp-table-85095
09/13/2020, 1:21 AMdamp-table-85095
09/13/2020, 3:01 AMconst startupScript = pulumi.interpolate`
#!/usr/bin/env sh
echo ${something}`;
Where something
is defined as:
const something = config.requireSecret("mySecret");
But this fails with Calling [toString] on an [Output<T>] is not supported.
damp-table-85095
09/13/2020, 3:09 AMmetadataStartupScript
parameter expects types string | Promise<string> | pulumi.OutputInstance<string> | undefined
and interpolate returns pulumi.Output<string>
. Is that a problem?best-france-51653
09/14/2020, 10:16 AMincalculable-dream-27508
09/14/2020, 11:52 AMpromise
that's related to outputs, but I wasn't yet able to find documentation regarding this, any links?incalculable-dream-27508
09/14/2020, 11:53 AMincalculable-dream-27508
09/14/2020, 11:59 AMasyncio
(or maybe aiostream
)incalculable-portugal-13011
09/14/2020, 9:43 PMworried-city-86458
09/14/2020, 10:00 PMmany-psychiatrist-74327
09/15/2020, 1:08 AMconst env = pulumi.getStack();
const infra = new pulumi.StackReference(`acmecorp/infra/${env}`);
const provider = new k8s.Provider("k8s", { kubeconfig: infra.getOutput("kubeConfig") });
const service = new k8s.core.v1.Service(..., { provider: provider });
But I’m seeing an error on line 3 whenever I do `pulumi preview`:
Diagnostics:
pulumi:pulumi:Stack (services-dev):
panic: interface conversion: interface {} is resource.PropertyMap, not string
goroutine 27 [running]:
<http://github.com/pulumi/pulumi/sdk/v2/go/common/resource.PropertyValue.StringValue(...)|github.com/pulumi/pulumi/sdk/v2/go/common/resource.PropertyValue.StringValue(...)>
/home/travis/gopath/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.9.3-0.20200902150941-d583bcb9153e/go/common/resource/properties.go:362
<http://github.com/pulumi/pulumi-kubernetes/provider/v2/pkg/provider.parseKubeconfigPropertyValue(0x289d6c0|github.com/pulumi/pulumi-kubernetes/provider/v2/pkg/provider.parseKubeconfigPropertyValue(0x289d6c0>, 0xc000436630, 0x29b6e3e, 0xa, 0xc0003b7a68)
...truncated...
The stacktrace doesn’t trace back to line 3, but if I comment out line 3, the error goes away. It also makes sense because the other stack’s kubeConfig
output is a String.
Now, even though preview
and up
throw that error, I can still apply the update and it actually works properly. But of course I’d rather not have random errors show up whenever I run pulumi.
Is there a way to avoid this error? Thanks!many-psychiatrist-74327
09/15/2020, 1:08 AMconst env = pulumi.getStack();
const infra = new pulumi.StackReference(`acmecorp/infra/${env}`);
const provider = new k8s.Provider("k8s", { kubeconfig: infra.getOutput("kubeConfig") });
const service = new k8s.core.v1.Service(..., { provider: provider });
But I’m seeing an error on line 3 whenever I do `pulumi preview`:
Diagnostics:
pulumi:pulumi:Stack (services-dev):
panic: interface conversion: interface {} is resource.PropertyMap, not string
goroutine 27 [running]:
<http://github.com/pulumi/pulumi/sdk/v2/go/common/resource.PropertyValue.StringValue(...)|github.com/pulumi/pulumi/sdk/v2/go/common/resource.PropertyValue.StringValue(...)>
/home/travis/gopath/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.9.3-0.20200902150941-d583bcb9153e/go/common/resource/properties.go:362
<http://github.com/pulumi/pulumi-kubernetes/provider/v2/pkg/provider.parseKubeconfigPropertyValue(0x289d6c0|github.com/pulumi/pulumi-kubernetes/provider/v2/pkg/provider.parseKubeconfigPropertyValue(0x289d6c0>, 0xc000436630, 0x29b6e3e, 0xa, 0xc0003b7a68)
...truncated...
The stacktrace doesn’t trace back to line 3, but if I comment out line 3, the error goes away. It also makes sense because the other stack’s kubeConfig
output is a String.
Now, even though preview
and up
throw that error, I can still apply the update and it actually works properly. But of course I’d rather not have random errors show up whenever I run pulumi.
Is there a way to avoid this error? Thanks!little-cartoon-10569
09/15/2020, 1:27 AMawait
a getOutputValue
to make that example work...many-psychiatrist-74327
09/15/2020, 6:50 PMkubeconfig
takes a string | pulumi.OutputInstance<string> | Promise<string> | undefined
pulumi.Output
was a promise too, but I guess not
im trying out StackReference.getOutputValue()
instead (and requireOutputValue()
)Promise<any>
. 😞gentle-diamond-70147
09/15/2020, 7:21 PMmany-psychiatrist-74327
09/15/2020, 7:22 PMconst stack = pulumi.getStack()
const infra = new pulumi.StackReference(`jetpack/infra/${stack}`)
const provider = new k8s.Provider('infra-cluster-provider', {
kubeconfig: infra.getOutput("kubeconfig")
})
infra.getOutputValue("kubeconfig")
(same error)
and infra.getOutput("kubeconfig").get()
(different error, cannot call .get() during preview/upawait
, but it requires target of es2017
or higher. pulumi new
sets the target to es2016
, presumably for good reason (haven’t tried changing it yet)gentle-diamond-70147
09/15/2020, 8:00 PMinterface conversion: interface {} is resource.PropertyMap, not string
as the error?many-psychiatrist-74327
09/15/2020, 9:33 PMpulumi version
v2.10.0
bitter-toddler-22112
10/01/2020, 11:47 AMmany-psychiatrist-74327
10/12/2020, 11:06 PMpulumi destroy
and re-creation, without changing any of the code, the error went away.