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 PMbillowy-kangaroo-51688
09/15/2020, 6:11 PMdynamodb.name.get()
is not being captured in my Lambdas?many-psychiatrist-74327
09/15/2020, 6:13 PMawsx
, eks
) in TS?
I am bringing up a kubernetes cluster and a few services running in it. I first implemented in Python to learn the framework. Then I re-implemented in TS because there are better libraries. However the latency is very different:
Python, 17 seconds:
$ time pulumi preview
Previewing update (dev)
View Live: (redacted)
Type Name Plan
pulumi:pulumi:Stack kubernetes-dev
(redacted)
Resources:
- 4 to delete
40 unchanged
real 0m17.365s
user 0m1.624s
sys 0m2.881s
TS, almost 2 minutes:
$ time pulumi preview
Previewing update (dev)
View Live: (redacted)
Type Name Plan
pulumi:pulumi:Stack infra-dev
Resources:
70 unchanged
real 1m37.499s
user 0m0.998s
sys 0m1.127s
How can I find out where this latency is coming from?billowy-kangaroo-51688
09/15/2020, 7:39 PMnew aws.lambda.CallbackFunction(
"handler",
{
tags,
memorySize: 128,
role: lambdaRole,
layers: [awsSdkLayer.arn],
callback: (event: APIGatewayProxyEvent) => {
return handlerFactory({
tableName: db.name.get(), // db = result of `new aws.dynamodb.Table`
// [..] more values not being captured
})(event);
},
},
);
Iāve ādownloaded deployment packageā & the actual name of the table is nowhere to be found, I also tried to define const tableName = db.name.get()
before the return handlerFactory
š¤·āāļøhandsome-actor-1155
09/15/2020, 8:21 PMpulumi up
or even pulumi preview
. This would save quite a bit of time. Or is this something I would need to configure within the Dockerfile itself? Thanks!chilly-garage-80867
09/15/2020, 8:23 PMchilly-garage-80867
09/15/2020, 8:24 PMloud-battery-37784
09/15/2020, 8:25 PMchilly-garage-80867
09/15/2020, 8:25 PMbitter-application-91815
09/15/2020, 9:03 PM<https://github.com/pulumi/pulumi-aws/blob/master/sdk/go/aws/eks/nodeGroup.go#L314>
bitter-application-91815
09/15/2020, 9:03 PM// Identifiers of EC2 Subnets to associate with the EKS Node Group. These subnets must have the following resource tag: `<http://kubernetes.io/cluster/CLUSTER_NAME|kubernetes.io/cluster/CLUSTER_NAME>` (where `CLUSTER_NAME` is replaced with the name of the EKS Cluster).`
bitter-application-91815
09/15/2020, 9:04 PMmillions-judge-24978
09/15/2020, 9:15 PMaws.lambda.Function
using go code, is there a way to automate the go build
as part of the pulumi program running?
I see this:
Using Pulumiās Asset and Archive classes, we can fetch code from anywhere ā in-memory, on disk, or even over the network. Pulumi will detect changes in the contents of these assets and archives so that when you run pulumi up, diffs will be detected and updated.It seems to me though that would be missing the necessary
go build
thoughfast-magician-55948
09/15/2020, 9:18 PMfast-magician-55948
09/15/2020, 9:28 PMfast-magician-55948
09/15/2020, 9:28 PM