broad-dog-22463
04/08/2020, 11:20 AMbroad-dog-22463
04/08/2020, 11:21 AMstale-knife-36790
04/08/2020, 12:43 PMbrave-angle-33257
04/08/2020, 3:01 PMpolite-portugal-60022
04/08/2020, 3:22 PM# Note, I'm abstracting a lot of what we do with simple wrapper classes since 99% of our instances will follow the same patterns. The second reason is to easily load/write templates automagically from provided inputs to script(s)
for resource_objs in template_objs:
# Build all non-disk/non-instance objects first in case there are dependencies later
objs = list( filter( lambda obj: not 'disk' in obj[1].lower() and not 'instance' in obj[1].lower(), resource_objs) )
for obj in objs:
obj[0].build()
# Extract and build all "disk" objects
disk_objs = list( filter( lambda obj: 'disk' in obj[1].lower(), resource_objs) )
for disk_obj in disk_objs:
disk_obj[0].build()
# Extract instance object
instance_obj = list( filter( lambda obj: 'instance' in obj[1].lower(), resource_objs) ).pop()
# Some kind of bug?, need to filter out pulumi.output.Output objects from attached_disks attr
# else, will try to add ALL previously created disks. Not just the disks created in this iteration!!!
instance_obj[0].attached_disks = list( filter(lambda disk: not isinstance(disk, pulumi.output.Output),
instance_obj[0].attached_disks) )
# Append disks to be attached_disks attr and build instance
for disk_obj in disk_objs:
instance_obj[0].attached_disks.append( { 'device_name': disk_obj[0].result.name,
'source': disk_obj[0].result.name } )
instance_obj[0].build()
cool-egg-852
04/08/2020, 3:59 PMelegant-crayon-4967
04/08/2020, 5:18 PMflaky-baker-91034
04/08/2020, 5:32 PMbillions-glass-17089
04/08/2020, 6:08 PMbright-orange-69401
04/09/2020, 8:04 AMdelete_before_replace
does not help me here because the two records are 2 separate resources (they are in different stacks)famous-kite-69533
04/09/2020, 1:20 PMopenssl rand -base64 128
brainy-nest-61978
04/09/2020, 2:02 PMgray-yak-9058
04/09/2020, 4:06 PMpulumi up
on the sandbox and preprod stacks, but I want to lock down the prod stack so that only certain users can run pulumi up
. Is this possible?
2. How does the Pulumi GitHub action work when it comes to multiple stacks? Does it cycle through all stacks within a project? I would like to be able to control when a pulumi up
is run on a specific stack during CI/CD. While making infrastructure changes, I would obviously want to try it in the sandbox or preprod environments before making changes in production. Is this capable with the Pulumi GitHub action or do I need to look for another solution?future-kite-91191
04/09/2020, 4:52 PMPulumi.<stack-name>.yaml
files for each stack. But how can I specify default values that apply to all stacks? Can I specify config data at project level and the Pulumi.<stack-name>.yaml
can override it? Some settings are the same for all stacks most of the time, would be handy to keep it DRY. Is that possible?brave-glass-88708
04/09/2020, 5:02 PM@pulumi/kubernetesx
and @pulumi/kubernetes
SDK for nodejs.
1. i know it can load a yaml manifest and deploy it - i take it that i can retrieve a remote file from a public source, customize it with some other configs and deploy it? since it's nodejs it should be possible 🙂
2. since most of these are third-party, they are provided as a helm chart or kustomize. with helm chart i see that pulumi has first-class support for it, for kustomize is it possible to achieve the same result as helm and providing custom overrides?fierce-dinner-20116
04/09/2020, 6:06 PMpulumi up
on a fresh checkout, i get the following errors:
~/dev/go/src/github.com/sourcegraph/deploy-k8s-helper master
❯ yarn
yarn install v1.22.4
warning package.json: No license field
warning sg-deploy-k8s-helper: No license field
[1/4] 🔍 Resolving packages...
success Already up-to-date.
✨ Done in 0.15s.
~/dev/go/src/github.com/sourcegraph/deploy-k8s-helper master
❯ pulumi up
Previewing update (dev):
Type Name Plan Info
pulumi:pulumi:Stack sourcegraph-deploy-kubernetes-helper-dev 3 messages
Diagnostics:
pulumi:pulumi:Stack (sourcegraph-deploy-kubernetes-helper-dev):
(node:95200) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
(node:95200) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)
(node:95200) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 5)
salmon-army-25804
04/09/2020, 7:04 PMnew aws.s3.Bucket
with param website: { redirectAllRequestsTo: "<http://example.com|example.com>" }
. The s3 docs say that there is an option to specify protocol (I need to redirect with https
) but that does not seem possible in pulumi since redirectAllRequestsTo
is of type pulumi.Input<string>
. I additionally tried to specify routingRules: { Redirect: {HostName: "<http://example.com|example.com>",Protocol: "https"} }
to the same Bucket resource but then get the error message that aws:s3/bucket:Bucket resource 'mybucketname' has a problem: "website.0.redirect_all_requests_to": conflicts with website.0.routing_rules
. Additionally, if I go into the AWS web UI and manually update the Protocol field to "https" and then run pulumi up
, pulumi does not recognize that a change was made to the bucket configs which leads me to wonder if there is a bugfull-painter-18061
04/09/2020, 9:51 PMfamous-kite-69533
04/09/2020, 10:02 PMeager-cartoon-54068
04/09/2020, 11:04 PMaws.batch.ComputeEnvironment
, I have to specify computeEnvironmentName
and that exact name is used to deploy the resource. If I make any changes to the CE, I have to go in and change the name to avoid a conflict. Is there a way to get the suffix that Pulumi normally adds to resources so I don’t have to change the name every time I want to update an AWS Batch Compute Environment?quaint-jelly-95055
04/10/2020, 2:00 AMquaint-jelly-95055
04/10/2020, 2:01 AMquaint-jelly-95055
04/10/2020, 2:02 AM// Step 4: Create a Fargate service task that can scale out.
const appService = new awsx.ecs.FargateService("app-svc", {
cluster,
taskDefinitionArgs: {
container: {
image: img,
cpu: 102 /*10% of 1024*/,
memory: 50 /*MB*/,
portMappings: [{ containerPort: 8000, }],
},
},
desiredCount: 5,
});
shy-journalist-23327
04/10/2020, 4:18 AMacceptable-stone-35112
04/10/2020, 8:17 AMadorable-musician-66353
04/10/2020, 1:09 PMbrave-glass-88708
04/10/2020, 4:06 PMbrave-glass-88708
04/10/2020, 4:15 PMbright-orange-69401
04/10/2020, 4:16 PMcurl
my deployed website at the end of every deployment, and of course the URL is built from Pulumi variables... 🙂flaky-baker-91034
04/10/2020, 5:28 PM$ pulumi destroy
error: getting user info from <https://api.pulumi.com>: performing HTTP request: Get "<https://api.pulumi.com/api/user>": dial tcp 52.26.53.20:443: i/o timeout
flaky-baker-91034
04/10/2020, 5:28 PM$ pulumi destroy
error: getting user info from <https://api.pulumi.com>: performing HTTP request: Get "<https://api.pulumi.com/api/user>": dial tcp 52.26.53.20:443: i/o timeout
clever-sunset-76585
04/10/2020, 5:45 PM