bitter-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!victorious-xylophone-55816
09/15/2020, 1:31 AM.staging.env
, .production.env
files, is there anything wrong with loading them using dotenv
or something instead of duplicating those values in my Pulumi.staging.yaml
etc files?victorious-xylophone-55816
09/15/2020, 1:37 AMtype StackEnvironment = "staging" | "production"
const stack = pulumi.getStack() as StackEnvironment
loadDotenv({
path: path.join(__dirname, `../.${stack}.env`)
})
ancient-dentist-35597
09/15/2020, 7:39 AMpulumi up
.
We have a pulumi stack that deploys an app service on azure, however recently I've found that on update it removes some appSettings
that we enter manually through Azure. we had the stack working fine and the settings weren’t being deleted for about 6 months with multiple pushes a day, then suddenly it started removing the settings (within the last week or so). I've even set the specific version of pulumi in the github actions that we originally used and it's still happening. So is there any way to make sure that pulumi doesn't delete settings? Thanks! 🙏steep-angle-29984
09/15/2020, 10:41 AMvictorious-xylophone-55816
09/15/2020, 2:12 PMaws:route53:Record (certificate-record):
error: [ERR]: Error building changeset: InvalidChangeBatch: [Tried to create resource record set [name='_d7342dc96b265c66ab8427198a513284.xxxx.com.', type='CNAME'] but it already exists]
Similarly, trying to put this if/else
in a custom ComponentResource
for ACM certificates, makes it attempt to delete the certificate instead of not doing anything:
const existingCertificate = pulumi.output( aws.acm.getCertificate({ domain: parentDomain }, { async: true }) )
if (existingCertificate) {
this.arn = existingCertificate.arn
} else {
const certificate = new aws.acm.Certificate(
// rest of code
Is there a way to properly guarding all of your resources with "Try to look this up already and don't create it if it exists, just return the identifier"?incalculable-dream-27508
09/15/2020, 4:51 PMREGIONS = {
'ams': openstack.Provider("ams", cloud="cnos_ams"),
'lati': openstack.Provider("lati", cloud="cnos_lati")
}
and then for each of the two categories of machines creating them, and putting the objects in dictionaries like:
INSTANCES_API = {
# pylint: disable=line-too-long
f'webadm-{i + 1}.otp.{dc}.local': openstack.compute.Instance(
f'webadm-{i + 1}.otp.{dc}.local',
flavor_name=FLAVOR_DB,
...
security_groups=SECGROUPS_API,
__opts__=pulumi.ResourceOptions(provider=REGIONS[dc]))
for i in range(COUNT_API) for dc in REGIONS
}
and similar with INSTANCES_LEAF
and then for convenience also create a new dictionary with all of them
INSTANCES = {**INSTANCES_API, **INSTANCES_LEAF}
Then I'm trying to get information about the machines, ideally a dictionary of "hostname": "access_ip_v4"
to be able to use that later to generate names (since unique are required) and contents of security groups. But so far all my attempts at that have failed. My two most recent attempts are:
for srv in INSTANCES:
exported[INSTANCES[srv].name.apply] = INSTANCES[srv].access_ip_v4.apply
and
for srv in INSTANCES:
exported.update(
pulumi.Output.all(INSTANCES[srv].name,
INSTANCES[srv].access_ip_v4).apply(
lambda args: json.dumps([{
args[0]: args[1]
}])))
cold-car-67614
09/15/2020, 5:24 PMincalculable-dream-27508
09/15/2020, 5:25 PMincalculable-dream-27508
09/15/2020, 5:25 PMastonishing-quill-88807
09/15/2020, 5:26 PMcold-car-67614
09/15/2020, 5:28 PMcold-car-67614
09/15/2020, 5:29 PMloud-egg-62954
09/15/2020, 5:57 PMloud-egg-62954
09/15/2020, 5:57 PMloud-egg-62954
09/15/2020, 5:59 PMloud-egg-62954
09/15/2020, 5:59 PM