https://pulumi.com logo
Join the conversationJoin Slack
Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
plugin-framework
pulumi-cdk
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumi-service
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by Linen
general
  • t

    tall-librarian-49374

    06/18/2019, 6:53 AM
    Great new flow for getting started! My minor remarks below.
    👍 1
    • 1
    • 6
  • f

    faint-motherboard-95438

    06/18/2019, 2:27 PM
    Hi there, I think I noticed a bug, or maybe I’m doing something wrong. I’d like your advice before opening an issue. When I update a
    Deployment
    configuration, I noticed it creates a new replicaset and does not delete the old one (or maybe it should update it, I don’t know). So it actually kills all the old pods in the old replicaset and creates the new one as expected, but now I have a stale useless replicasets. Is this something I misconfigured somewhere or is this a bug ?
    replicaset.apps/context-clusters-pvmtest-mqtt-5979fbcdbc                       2         2         2       2m13s
    replicaset.apps/context-clusters-pvmtest-mqtt-client-68fd4d4445                0         0         0       23m
    replicaset.apps/context-clusters-pvmtest-mqtt-client-6b8bdfc4b7                2         2         2       2m13s
    replicaset.apps/context-clusters-pvmtest-mqtt-f5bd9548f                        0         0         0       25m
    replicaset.apps/context-clusters-pvmtest-portal-567948dccd                     2         2         2       2m13s
    replicaset.apps/context-clusters-pvmtest-portal-6c5968cfcd                     0         0         0       26m
    p
    b
    • 3
    • 10
  • b

    bulky-businessperson-73745

    06/18/2019, 3:53 PM
    hey all. i’m excited about pulumi and giving it a spin. the link for “pulumi community edition” on the pricing page seems to take me to the home page. is this intended? i was hoping to see what was included with the community edition.
    l
    • 2
    • 3
  • e

    elegant-crayon-4967

    06/18/2019, 4:20 PM
    Does anyone have a working example of using an external user_data script w/ variables defined in
    index.ts
    for aws & typescript?
    w
    c
    • 3
    • 10
  • l

    limited-rainbow-51650

    06/18/2019, 4:20 PM
    How can I import existing resources into the Pulumi state? Stated differently, what is the Pulumi equivalent to
    terraform state import
    (https://www.terraform.io/docs/import/index.html)
    c
    w
    • 3
    • 4
  • p

    proud-alarm-92546

    06/18/2019, 5:09 PM
    having trouble doing a password reset via pulumi.com. get a
    not found: verification code "code" not found
    (which entirely amusing in it's repetition..
    • 1
    • 1
  • e

    elegant-crayon-4967

    06/18/2019, 5:47 PM
    to build on my previous question...looking for the user_data to be a powershell script
  • h

    handsome-actor-1155

    06/18/2019, 6:15 PM
    Hello, I have a question regarding deployments of pods to to k8s via Pulumi. I have a deployment that builds a docker image, uploads to ECR, and then deploys a replica set to k8s. When I update the docker image, I would expect a redeploy of the replica set in k8s but I do not see that happening.
    Updating (dev):
    
         Type                             Name                                       Status      Info
         pulumi:pulumi:Stack              stream-demo-sensor-reading-aggregator-dev              
     >   ├─ pulumi:pulumi:StackReference  brianbrifri/stream-demo-services/dev       read        
     >   ├─ pulumi:pulumi:StackReference  brianbrifri/stream-demo-infra/dev          read        
         ├─ docker:image:Image            sensorReadingAggregator                                
     ~   └─ kubernetes:apps:ReplicaSet    stream-demo-sensor-reading-aggregator      updated     [diff: ~spec]
    Is my output but the replica set in k8s is unchanged. Is this expected behavior?
    c
    • 2
    • 6
  • p

    proud-alarm-92546

    06/18/2019, 8:04 PM
    anyone available to discuss local environment setup? running into an interesting set of failures on
    pulumi/pulumi
    first time running
    make
    on a stock master,
    golangci-lint run
    complains about a bunch of things that don't seem to be erroring in the travis builds. makes me wonder if there's
    golangci-link
    version issue, or if there's a config somewhere that's not in the repo, or......
    cmd/pulumi-language-nodejs/main.go:87:56: `langauge` is a misspelling of `language` (misspell)
    	cmdutil.InitTracing("pulumi-language-nodejs", "pulumi-langauge-nodejs", tracing)
    (if I fix that one, it moves on to many others) opened an issue - https://github.com/pulumi/pulumi/issues/2841
    b
    • 2
    • 5
  • f

    full-dress-10026

    06/18/2019, 9:36 PM
    Are there any examples of using an Application Gateway with App Service in Azure?
    b
    t
    • 3
    • 11
  • b

    busy-air-16359

    06/19/2019, 12:29 PM
    -.txt
  • b

    busy-air-16359

    06/19/2019, 12:29 PM
    I’m getting weird connection refused errors out of the sudden, has anybody seen something like this?
    w
    • 2
    • 2
  • b

    busy-air-16359

    06/19/2019, 12:29 PM
    followed by a stacktrace from pulumi
  • t

    thankful-lamp-48382

    06/19/2019, 1:59 PM
    Hello guys! Pulumi looks really interesting! I need some simpler example to get started, something like create Droplet, upload some node.js app to it and execute npm install & npm run start on that Droplet, can also be for Linode
    b
    o
    • 3
    • 4
  • t

    thankful-lamp-48382

    06/19/2019, 1:59 PM
    Do you know any tutorial like this?
  • t

    thankful-lamp-48382

    06/19/2019, 2:22 PM
    One more thing that bothers me: I am working on multiplayer game and I would have initially 4 instances (Droplets) with game rooms, but I would like to dynamically add new Droplet when these initial 4 are full. Can I achieve it somehow with Pulumi?
  • t

    thankful-lamp-48382

    06/19/2019, 2:30 PM
    I mean I would detect myself that rooms are full, then would call some web hook or something that would call Pulumi? Is something like this possible?
    m
    c
    • 3
    • 4
  • b

    boundless-monkey-50243

    06/19/2019, 3:18 PM
    Is there a way, akin to
    terraform taint
    , that I can tell Pulumi “that resource must be replaced”? (I don’t think I can manually remove it; it’s an AWS API Gateway deployment and those are archived rather than deleted.)
  • f

    full-dress-10026

    06/19/2019, 4:17 PM
    The sample here: https://pulumi.io/reference/pkg/nodejs/pulumi/azure/compute/#example-usage-with-managed-disks-recommended on this line:
    loadBalancerInboundNatRulesIds: [pulumi.all(lbnatpool.map(v => v.id)).apply(id => id.map(v => v)[1])],
    does not work. You cannot
    map
    a
    NatPool
    .
  • b

    broad-dog-22463

    06/19/2019, 4:18 PM
    @full-dress-10026 please can you open a bug report in pulumi-azure repo?
    f
    • 2
    • 2
  • b

    bored-river-53178

    06/19/2019, 4:40 PM
    would it be possible to reopen https://github.com/pulumi/pulumi-awsx/issues/314 as it is still not fixed?
  • e

    early-musician-41645

    06/19/2019, 5:53 PM
    I saw this same error earlier here: https://pulumi-community.slack.com/archives/C84L4E3N1/p1558201564057000?thread_ts=1558193224.055800&cid=C84L4E3N1 However, I am running
    pulumi up
    and the error outputs:
    error: Plan apply failed: Program run without the `pulumi` CLI; this may not be what you want (enable PULUMI_TEST_MODE to disable this error)
    This started happening after I defined a new function as part of my custom resource I'm using Pulumi
    v0.17.16
    Any idea on a fix?
  • f

    full-dress-10026

    06/19/2019, 6:01 PM
    When using a
    azure.compute.ScaleSet
    to provision VMs, can you have the scale set assign public IPs to the created VMs so you can ssh onto them?
  • e

    early-musician-41645

    06/19/2019, 6:56 PM
    I'm running into difficulties with async functions in typescript with Pulumi CLI
    19 async function getServiceAccountAuth() {
     20   const secret = await aws.secretsmanager.getSecretVersion({
     21     secretId: "some-secret-name",
     22   });
     23   const secretString = secret.secretString
     24   console.log("SECRETSTRING: "+secretString);
     25
     26   let username: string = JSON.parse(secretString)["username"];
     27   let password: string = JSON.parse(secretString)["password"];
     28
     29   console.log("username: " + username);
     30
     31   return "Basic " + new Buffer(username + ":" + password).toString("base64");
     32 }
    When I run that function I get this:
    error: Plan apply failed: Program run without the `pulumi` CLI; this may not be what you want (enable PULUMI_TEST_MODE to disable this error)
    What am I doing wrong?
    w
    • 2
    • 3
  • f

    full-dress-10026

    06/19/2019, 7:01 PM
    If I change the
    osProfile
    of a
    ScaleSet
    I get this outputted from `pulumi up`:
    azure:compute:ScaleSet  azureDemo-ss2             updated     [diff: ~osProfile]
    However, the actual instances are not restarted. When changing
    customData
    , I would expect instances to restart to apply the new customData.
    w
    • 2
    • 2
  • f

    full-dress-10026

    06/19/2019, 9:04 PM
    Is there a way to have stack outputs that are outputs but not shown at the end of
    pulumi up
    ? Use case would be outputting a kubeconfig.
    âž• 1
    b
    w
    • 3
    • 6
  • f

    full-dress-10026

    06/19/2019, 11:11 PM
    Is there an easy path to get something like this https://www.terraform.io/docs/providers/datadog/index.html to work with Pulumi?
    b
    w
    • 3
    • 36
  • l

    late-lawyer-23405

    06/19/2019, 11:27 PM
    Main web site says to request languages here: I'm interested in Clojure, ClojureScript, and Kotlin
    w
    f
    • 3
    • 3
  • c

    colossal-room-15708

    06/19/2019, 11:30 PM
    Just an idea to the channel owners... should we maybe start splitting providers into their own channels? #general is getting really noisy and lots of messages drown in the noise (@white-balloon-205?)
    w
    • 2
    • 4
  • e

    early-musician-41645

    06/19/2019, 11:55 PM
    Is there a way to pass a value to the
    async delete
    method of a dynamic resource provider?
    w
    • 2
    • 13
Powered by Linen
Title
e

early-musician-41645

06/19/2019, 11:55 PM
Is there a way to pass a value to the
async delete
method of a dynamic resource provider?
My
async delete(id, props)
method requires some auth arguments to form a REST
DELETE
request. For the
async create(inputs)
I just added the auth data into the
inputs
and had no trouble. How can I make those available to
delete
?
w

white-balloon-205

06/20/2019, 12:01 AM
You can reference variables from the enclosing scope that contain these credentials - getting the values out of globals (perhaps from Pulumi config), or from parameters passed in to the Provider implementation somehow.
e

early-musician-41645

06/20/2019, 12:01 AM
It's more complicated - the auth is pulled from aws secretsmanager
w

white-balloon-205

06/20/2019, 12:01 AM
Putting these in the
inputs
probably isn't right here - there won't be any inputs during a
delete
.
e

early-musician-41645

06/20/2019, 12:02 AM
right, so how do I pass it to the provider?
w

white-balloon-205

06/20/2019, 12:03 AM
It's more complicated - the auth is pulled from aws secretsmanager
That should still be possible. Is it pulled from secrets manager at deployment time via
aws.secretsmanager.getSecretVersion
?
e

early-musician-41645

06/20/2019, 12:04 AM
I spent a couple days trying to get that method to work and eventually just used the
aws-sdk
instead. So the secret is pulled like this:
28 var secretsmanager = new AWS.SecretsManager();
 29 secretsmanager.getSecretValue({ SecretId: "eshamay-test" }, function(err: any, data: any) {
 30   if (err) {
 31     console.log("ERROR getting secret for service account", err);
 32     throw err;
 33   } else {
 34     const savedSearch = new splunk.SavedSearch("foo-search", {
 35       name: "foo-eshamay-test-1",
 36       description: "eshamay's test search",
 37       search: 'search index=online_prod source="*10ay*" earliest=-5m | stats count as Total',
 38       splunkAuthSecret: data.SecretString,
 39     });
 40   }
 41 });
 42
the SavedSearch is my
pulumi.dynamic.Resource
so the resource is created in the callback
I worked around this by doing this:
81 export class SavedSearch extends pulumi.dynamic.Resource {
 82   public readonly name: pulumi.Output<string>;
 83
 84   private static provider = new SavedSearchProvider();
 85
 86   constructor(name: string, props: SavedSearchInput, opts?: pulumi.CustomResourceOptions) {
 87     super(SavedSearch.provider, name, props, opts);
 88
 89     SavedSearch.provider.setAuth(props.splunkAuthSecret);
 90   }
 91 }
The creds are still in the
inputs
, but then I added a setter to the provider to create an instance variable that I can use in the
delete
method
Not ideal, but it works
w

white-balloon-205

06/20/2019, 12:16 AM
Yeah - something along those lines is likely going to be the best option. Writing a short example of a possibly slightly "nicer" interface now that I'll share.
Actually - going back to the original question. If you do want to pass this data through the resource properties, your
delete
implementation is passed the old
props
for the resource, so any credentials provided at creation time will be available on the
props
. Was that not working for you? Note that the Pulumi program does not run at all during a
destroy
- so there is no way to pass new values in during the deletes for a destroy - the only data you have available to you is either: 1. The old inputs from when the resource was created/updated. 2. The serialized implementation of the
delete
body, which itself may have serialized in some state captured during that last update.
View count: 1