https://pulumi.com logo
Docs
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
  • f

    fancy-flower-77794

    07/13/2021, 1:22 AM
    anyone have a good example of AWS ECS connected to RDS using IAM auth?
  • m

    many-yak-61188

    07/13/2021, 7:28 AM
    I've the following code
    const asgEventsTopic = new aws.sns.Topic("asg-events-topic")
    
    asgEventsTopic.onEvent("ci-cd-scale-in", async ev =>{
        console.log("Processing " + ev);
    })
    
    const runnerAsg = new aws.autoscaling.Group("ci-cd-runner-asg", {
        name: "ci-cd-runner-asg",
        desiredCapacity: 2,
        maxSize: 2,
        minSize: 1,
        healthCheckGracePeriod: 300,
        healthCheckType: "EC2",
        launchTemplate: {
            id: launchTemplate.id,
            version: `$Latest`,
        },
        vpcZoneIdentifiers: vpc.privateSubnetIds,
        initialLifecycleHooks: [{
            name: "asg-events-hook",
            defaultResult: "CONTINUE",
            lifecycleTransition: "autoscaling:EC2_INSTANCE_TERMINATING",
            notificationTargetArn: asgEventsTopic.arn
        }]
    });
    the sns topic is assigned as a
    notificationTargetArn
    to the ASG. I noticed during delete the topic subscription is deleted before the ASG. If it were the other way around, ASG deleted prior to topic subscription, deleting ASG would fire lifecycle transtion events for the EC2 hosts. In thread, I'm posting the output of
    pulumi delete
    bug may be / am I missing something?
    • 1
    • 1
  • n

    nutritious-shampoo-16116

    07/13/2021, 9:59 AM
    is it forbidden to use Outputs as resource name? seems like pulumi can't resolve those
    w
    p
    • 3
    • 6
  • a

    ancient-eve-13947

    07/13/2021, 10:11 AM
    hi, I'm looking into Pulumi to set up Azure resources from C# and I'm wondering about one thing: for example, when creating an SQL server, you pass one `name`parameter directly in the constructor, and then there is a property `ServerName`in the
    ServerArgs
    parameters, too. The same goes for CosmosDb: there is the name parameter of the constructor and the
    AccountName
    property of
    DatabaseAccountArgs
    . What's the deal here? Why are there two different ways of specifying the name? What happens if I don't specify the one in the properties? Thank you, Mark @ DEON
    b
    • 2
    • 11
  • c

    cold-coat-35200

    07/13/2021, 11:43 AM
    hi, still there's no way to clean up unused pulumi plugins? I can't see any related CLI command to figure out which plugins are used by which project/stack, but I'm pretty sure we don't use aws 1.7.0 or cloudflare 1.2.0 etc. plugins anymore. The total plugin cache is almost 7GB, which is unnecessarily big and I want to clean this up, but removing all of the plugins, not a solution, because as far as I know pulumi still does not redownload a plugin if it thinks that already installed and have to do it manually, one by one. Am I correct? What are the alternatives here?
    b
    • 2
    • 2
  • i

    incalculable-printer-98305

    07/13/2021, 2:56 PM
    Do I still have to have a CLI if I’m running pulumi commands using Kubernetes operator? I also wanted to use the automation API’s with Kubernetes operator
    b
    • 2
    • 4
  • a

    ancient-eve-13947

    07/13/2021, 4:49 PM
    the documentation for SignalR for typescript shows that one specifies cors so:
    cors: [{
            allowedOrigins: ["<http://www.example.com>"],
        }]
    but if I do that, there is a com/transpiler error: Type '{ allowedOrigins: string[]; }[]' is not assignable to type 'Input<SignalRCorsSettingsArgs> | undefined'. Type '{ allowedOrigins: string[]; }[]' is missing the following properties from type 'OutputInstance<SignalRCorsSettingsArgs>': apply, getts(2322) signalR.d.ts(118, 5): The expected type comes from property 'cors' which is declared here on type 'SignalRArgs'
  • a

    ancient-eve-13947

    07/13/2021, 4:50 PM
    so how's the right way?
  • a

    ancient-eve-13947

    07/13/2021, 5:07 PM
    nevermind, the correct way is:
    cors: {
            allowedOrigins: ["http://www.example.com"],     } would be good to adjust the docs
    c
    • 2
    • 1
  • a

    ancient-eve-13947

    07/13/2021, 5:09 PM
    they also talk about `
    new azure.signalr.Service
    while the current way is
    new SignalR
    b
    • 2
    • 2
  • b

    bored-oyster-3147

    07/13/2021, 7:34 PM
    Is there any documentation somewhere on serving private pulumi plugins with the
    --server
    flag on
    pulumi plugin install
    ? Can the URL be blob storage? Is there a specific directory structure it is expecting? etc.
    b
    • 2
    • 12
  • b

    bored-oyster-3147

    07/13/2021, 8:56 PM
    How does the Azure Native provider code override the sdk generation so that given the name
    azure-native
    it generates a dotnet project sdk called
    Pulumi.AzureNative
    instead of
    Pulumi.Azure-native
    ?
    r
    b
    • 3
    • 6
  • c

    calm-gpu-56173

    07/14/2021, 12:01 AM
    Hello guys did any body face "*error:* spawn docker ENOENT" while creating an ECS ?
    s
    • 2
    • 12
  • f

    fast-advantage-98237

    07/14/2021, 3:01 AM
    Hi, I tried to import eks cluster. However, I got these errors.
    Computed attributes cannot be set: Computed attributes cannot be set, but a value was set for "vpc_config.0.vpc_id".. Examine values at 'Cluster.VpcConfig.VpcId'.
  • f

    fast-advantage-98237

    07/14/2021, 3:01 AM
    How can I resolve this ?
  • m

    microscopic-orange-69417

    07/14/2021, 4:13 AM
    Does pulumi have something like https://registry.terraform.io/ yet? Or is searching npm the only way to discover community components (not sure of the correct terminology here)?
    s
    b
    • 3
    • 2
  • i

    icy-jordan-58549

    07/14/2021, 11:34 AM
    Run pulumi/setup-pulumi@v2
      with:
        pulumi-version: 3.7.0
    Configured range: 3.7.0
    Error: Could not find a version that satisfied the version range
    b
    • 2
    • 5
  • a

    ancient-eve-13947

    07/14/2021, 1:31 PM
    how does one get the connection string for a NamespaceAuthorizationRule for an Azure servicebus from Typescript? the documentation says NamespaceAuthorizationRule should have an output primaryConnectionString, but the d.ts says it has only name, rights and type as outputs.
  • c

    calm-gpu-56173

    07/14/2021, 1:50 PM
    Hello i use concourse ci/cd to run pulumi.. recently got issue while trying to create ECR. because container i was using did not have prebuilt docker image. are there any containers available which has pre build docker image with pulumi & nodejs ? Container i used was --- /******platform: linux image_resource: type: docker-image source: repository: pulumi/pulumi-nodejs tag: "3.6.1"*******/
  • b

    bored-oyster-3147

    07/14/2021, 2:16 PM
    The pulumi-provider-boilerplate as it currently exists - if you clone it and run the SDK codegen - seems to have a bug. It generates the dotnet SDK without a package reference to the
    Pulumi
    NuGet package (see here), so the generated dotnet SDK can't build as it is. Originally I thought OK maybe the stock
    schema.json
    is just missing an argument to add that reference, but the nodejs SDK generated from the same provider code does have the reference. So I'm wagering it was a bug potentially introduced during changes made to release
    azure-native
    ? Any thoughts on what I need to do so that the codegen adds that reference?
    t
    b
    • 3
    • 21
  • s

    sparse-apartment-71989

    07/14/2021, 3:39 PM
    I know Civo is a little bitty player in the scheme of things, so maybe a Civo-specific channel is not justified. However, I kind of hate posting Civo-specific questions into General. I think something like an Other Cloud Providers channel would be warranted for discussions around Civo, DigitalOcean, Linode, etc. Thoughts? Or, maybe I’m just missing a channel that is well-suited for those provider-specific kinds of discussions?
    h
    c
    • 3
    • 3
  • r

    rough-football-77038

    07/14/2021, 4:02 PM
    Hi everyone! I am new with Pulumi. I have a trouble when I try to import a Lambda function in AWS. I use
    pulumi import aws:lambda/function:Function test_lambda my_test_lambda_function
    but, this does not work, error: "Preview failed: handler and runtime must be set when PackageType is Zip" I don't have idea how set this parameters or if have other way to import a Lambda. I hope I have explained my problem well, I appreciate any help. Thanks!
    b
    b
    • 3
    • 4
  • b

    big-microphone-36818

    07/14/2021, 6:16 PM
    Hello. I’m working on unit testing with Mocha. But when I run my tests with
    node_modules/mocha/bin/mocha -r ts-node/register index.ts
    , none of the configuration values from my project’s stack are loaded. Any tips would be greatly appreciated.
  • e

    elegant-crayon-4967

    07/14/2021, 7:00 PM
    I’m having an issue where the AWS Provider doesn’t seem to be respecting the
    sessionName
    param passed in. We have conditions setup on our service accounts that only allow assume role usage if the session name matches the correct phrase. I have Pulumi setup to match this
    _sessionName_: 'agent-example'
    but in my cloudtrail logs I can clearly see the assume role operation denied and the request parameters show as “null” where it should show the sessionName.
    w
    • 2
    • 21
  • h

    hundreds-businessperson-87013

    07/14/2021, 8:10 PM
    Hello! I'm trying use node-canvas npm module in aws lambda. And I build node modules on Windows, but aws lambda runs on linux and i get error about elf header. How i can fix it in? Any help would be so much appreciated!
  • a

    ancient-eve-13947

    07/15/2021, 10:25 AM
    how does one upgrade one's account from "individual" to "team"?
    w
    • 2
    • 3
  • m

    miniature-leather-70472

    07/15/2021, 10:26 AM
    Why, when I try and delete a specific resource with the --target property, does Pulumi complain that it can't delete it without deleting the child resource X? If I am telling it to delete the parent resource then I want it to delete all the child resources
    b
    l
    • 3
    • 8
  • p

    proud-easter-54321

    07/15/2021, 11:42 AM
    how do i run stack programatically without using
    pulumi up
    ?
    b
    b
    +2
    • 5
    • 11
  • l

    limited-mouse-98047

    07/15/2021, 1:49 PM
    Is deleting custom resources special in any way? I noticed that If I try to delete one that has children,
    --target-dependents
    has no effect. I must be missing something here.
    b
    • 2
    • 4
  • l

    little-market-63455

    07/15/2021, 2:11 PM
    I have some code which initializes a database (creates, grants privileges and so on) if it is not already initialized and should delete it on
    destroy
    . I am not using the automation API and wondering if there is a property somewhere that tells me what mode is the CLI running under like
    up
    ,
    destroy
    ,
    refresh
    ,
    preview
    and so on. I check
    pulumi.runtime
    but it doesn't seem to expose this. I am probably not doing it the correct way, maybe dynamic providers?
    b
    • 2
    • 3
Powered by Linen
Title
l

little-market-63455

07/15/2021, 2:11 PM
I have some code which initializes a database (creates, grants privileges and so on) if it is not already initialized and should delete it on
destroy
. I am not using the automation API and wondering if there is a property somewhere that tells me what mode is the CLI running under like
up
,
destroy
,
refresh
,
preview
and so on. I check
pulumi.runtime
but it doesn't seem to expose this. I am probably not doing it the correct way, maybe dynamic providers?
b

bored-oyster-3147

07/15/2021, 2:33 PM
in your pulumi code you can check for
IsDryRun
which tells you if it is
preview
. That is so you can omit work that should only run during an
up
. Both
refresh
and
destroy
don't actually execute your pulumi code so it isn't necessary to check for them
🙌 1
l

little-market-63455

07/15/2021, 4:04 PM
hmm but I do want to run some code on
destroy
for cleanup but I guess that should live elsewhere. Thanks for the tip though 👍
b

bored-oyster-3147

07/15/2021, 4:06 PM
Np. Yea you'll have to do post-destroy work independently of your call to
pulumi destroy
. Because
pulumi destroy
just loads your providers and destroyed what is currently in your state, which is why it doesn't execute your pulumi code
View count: 1