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
  • e

    enough-potato-36582

    09/06/2022, 9:18 AM
    hey folks πŸ‘‹ I'm trying to use Pulumi plans, but is there a way to verify a plan can be applied? During my tests, if I apply an "old" plan (someone modified the stack after I generated the plan), it fails to apply. I would like to verify it can be applied before running the
    pulumi up
    v
    • 2
    • 13
  • e

    enough-potato-36582

    09/06/2022, 9:20 AM
    apparently, the plan was applied partially
  • f

    few-lizard-48557

    09/06/2022, 1:00 PM
    Splitting code into TypeScript modules => "dependsOn" doesn't work Hello, the system I want to create with Pulumi basically consists of a MongoDB, a VNet with some subnets, 3 WebApps, a KeyVault and a Virtual Machine. As programming language I want to use TypeScript and the target system is Azure. My problem now is that all the examples I have found so far for creating various Azure resources with Pulumi, always work only with a single index.ts file. To make the code clearer I split the TypeScript code into single modules and made the contained objects available for other TypeScript modules via export. This way the code structure is easier to read and I then have e.g. a KeyVault.ts module that contains only the KeyVault related resource like Keys, Secrets and the related Access Policies. Unfortunately I found out that it can happen that Pulumi creates the resources in the wrong order. Therefore I use "depensOn" to define the order at the sensitive places myself. Unfortunately this does not work for me if I split the code into different TS modules. This means that no error is reported but the order in which the resources are created does not correspond to my "dependsOn" configuration. My dependsOn configuration only works if I have all the TypeScript code in a singleTypeScript file. Can you tell me if I am doing something wrong or why Pulumi behaves like this? ..and are there any examples available which show the how to split the code into different TypeScript modules? Many thanks and greetings, Wolfgang Schreck
    βœ… 1
    f
    • 2
    • 3
  • l

    lively-crayon-44649

    09/06/2022, 1:13 PM
    Is anyone running arbitrary NodeJS
    child_process
    functions (e.g.
    spawn
    ,
    spawnSync
    ) in their Pulumi applications? E.g. suppose you want to set up an SSH tunnel midway through a Pulumi process, after e.g. provisioning a bastion host, so rough pseudo code:
    const bastion = new cloudProvider.Instance(...)
    
    spawnSync("ssh", ["-L", ...])
    
    const database = new postgresql.Database(..., {
      host: "localhost" // the host is localhost because of the tunnel we've set up
    })
    I can see a few ways to go about this: 1. Use Pulumi automations, in which I orchestrate the "pre-tunnel" and "post-tunnel" bits. There's an example of this online, but I'm somewhat wary of this as I'd like to maintain access to the "standard" Pulumi CLI and its features if possible, which I understand automations would take me away from 2. "Just call the function" in the middle of the Pulumi program -- I think this is OK? Perhaps it needs wrapping in an
    apply
    or something and feeding into another
    dependsOn
    ? https://github.com/pulumi/pulumi-kubernetes/issues/1857 seems to suggest this is possible but the equivalent TypeScript code appears to be type incorrect (though I may be missing something obvious) 3. Use something like
    @pulumi/command
    , though since I want the tunnel to be created on every run, this feels wrong, since I'd not want it to go in the state file. But again, could be wrong here. All thoughts and input welcome/gratefully received πŸ™
    s
    • 2
    • 3
  • g

    gray-area-92171

    09/06/2022, 1:50 PM
    Hi there. Just starting with Pulumi and considering using it in our company. We're an Azure Cloud shop and make use of Golang a lot. I followed the tutorial to get Azure Container Apps working and it worked perfectly. Was a very nice experience! I then tried to create a Postgres instance and hit a problem: it appear to be this one -- https://github.com/pulumi/pulumi-azure-native/issues/1553 Also, looking at the documentation here -- https://www.pulumi.com/registry/packages/azure-native/api-docs/dbforpostgresql/server/ -- the example Go code is invalid (the reference to
    pulumi.Any{
    ). Does anybody know a sane workaround here? Right now I see this as a blocker for us, I've not found a sane way to work around this bug/limitation.
  • b

    busy-magazine-6225

    09/06/2022, 5:59 PM
    I have a lot of different pulumi applications (and github repositories, one per app) that are scoped to various things like networking, kubernetes, monitoring, etc. I want a single place to execute all the stacks in order. I was thinking of building a script to do this, but I was curious if anyone has created a better solution. I'm working through github actions to deploy pulumi, so I don't think I can just tie those actions together to execute each other.
    v
    • 2
    • 14
  • c

    crooked-cpu-12491

    09/06/2022, 7:39 PM
    Hi there, I pulled pulumi-google-native 0.25.0 version this morning and trying to do pulumi preview. I get the following error with the latest version. I could do the preview when I tried the same with 0.14.0 last week. Any thoughts on this? I'm using pulumi version 3.38.0
    error: Preview failed: unable to find required configuration setting: GCP Project
    Set the GCP Project by using:
    	`pulumi config set gcp:project <project>`
  • d

    dry-potato-52542

    09/06/2022, 7:49 PM
    Hey all, wanted to ask in case we need to add some pulling mechanism in pulumi component that waiting for a remote task to complete. Is this generally a good practice to add those? Are there any existing mechanism or tools that do similar behaviors???
  • v

    victorious-dusk-75271

    09/06/2022, 8:20 PM
    how do i remove this pending sate. i tried to find this pending state in exported stack but nothing there
    -   β”‚     β”‚  β”œβ”€ aws:ec2:LaunchConfiguration                 primary-eks-ng-nodeLaunchConfiguration                     deleting..     completing deletion from previous update
    l
    m
    • 3
    • 24
  • v

    victorious-dusk-75271

    09/06/2022, 9:13 PM
    please help, i cant do anything anymore
  • v

    victorious-dusk-75271

    09/07/2022, 3:38 AM
    kubernetes:<http://rbac.authorization.k8s.io/v1:RoleBinding|rbac.authorization.k8s.io/v1:RoleBinding> (primary-production-laravel-usr-binding):
        warning: configured Kubernetes cluster is unreachable: unable to load schema information from the API server: Get "<https://xxxx.gr7.ap-southeast-1.eks.amazonaws.com/openapi/v2?timeout=32s>": dial tcp: lookup <http://xxxx.gr7.ap-southeast-1.eks.amazonaws.com|xxxx.gr7.ap-southeast-1.eks.amazonaws.com> on 172.17.64.1:53: no such host
        error: Preview failed: failed to read resource state due to unreachable cluster. If the cluster has been deleted, you can edit the pulumi state to remove this resource
    what can i do in this case?
  • v

    victorious-dusk-75271

    09/07/2022, 3:38 AM
    manually delete the items from stack?
  • v

    victorious-dusk-75271

    09/07/2022, 4:56 AM
    so pulumi deleted the cluster and created a new one but did not use the new provider
    s
    • 2
    • 22
  • i

    icy-doctor-13719

    09/07/2022, 3:51 PM
    Does anyone ever have issues with VSCode not picking up the Intellisense for Pulumi?
    s
    f
    • 3
    • 5
  • f

    famous-magician-5742

    09/07/2022, 5:10 PM
    Hi, @tall-librarian-49374 On my team we're wondering about the priority of https://github.com/pulumi/pulumi/issues/6515. This is something we've hit that has made us decide to explore alternatives to Pulumi.
    βž• 1
  • n

    numerous-printer-41511

    09/07/2022, 7:21 PM
    Hey all β€” revisiting Pulumi after many months, and wondering what the current state of the world is with respect to the different languages. Is one more well supported than the other? I remember, for example, that Python/TS had some Crosswalk best-practices modules that were not yet implemented in languages like Go.
    s
    • 2
    • 1
  • n

    numerous-printer-41511

    09/07/2022, 7:28 PM
    I saw this blog but still not seeing Crosswalk libs for Go, as an example
    b
    • 2
    • 1
  • i

    incalculable-thailand-44404

    09/07/2022, 9:12 PM
    Does anyone know how to create Kafka topics on a AWS MSK cluster which is configured using SASL/IAM using pulumi? I found this but it does not say how to validate using SASL/IAM, since it needs the AWS MSK IAM lib
  • d

    dry-potato-52542

    09/07/2022, 9:18 PM
    Are there is any ways to generate sdk client from aws provider?
    l
    • 2
    • 8
  • a

    able-dentist-35553

    09/08/2022, 7:54 AM
    can anyone direct me to an accounts contact?
  • g

    gorgeous-country-43026

    09/08/2022, 8:30 AM
    warning: A new version of Pulumi is available. To upgrade from version '3.39.1' to '3.39.2', visit <https://pulumi.com/docs/reference/install/> for manual instructions and release notes.
    > winget upgrade pulumi
    No applicable update found.
    Is the winget GHA deployer broken again?
    s
    • 2
    • 5
  • f

    fresh-librarian-41835

    09/08/2022, 5:06 PM
    Using the Pulumi CLI against an existing stack running
    pulumi config refresh
    results in an error:
    no previous deployment
    This stack has resources that were created that are less than 24 hours old.
    l
    • 2
    • 3
  • c

    careful-scooter-51385

    09/09/2022, 1:13 AM
    Hey Everyone! I'm starting to get serious with my Pulumi usage. Good to be here!
    πŸ‘‹πŸ» 1
    πŸ‘‹ 4
    πŸ’œ 4
  • a

    astonishing-quill-88807

    09/09/2022, 3:30 PM
    If I want to create a custom provider of a given resource type, how do I determine what the proper entry for
    aliases
    would be to migrate from the default provider instance?
    m
    • 2
    • 3
  • f

    few-plastic-88435

    09/09/2022, 3:56 PM
    Anyone can share with me a fully eks cluster creation using pulumi yaml ?. Thanks.
    c
    s
    • 3
    • 5
  • a

    agreeable-whale-35898

    09/09/2022, 6:26 PM
    Hi, checking Pulumi for our cause 😊 But after issuing
    pulumi up
    it's stuck indefinitely so:
    Previewing update (dev)
    View Live: <https://app.pulumi.com/user/Proj/dev/previews/><guid...>
         Type                 Name           Plan     Info
         pulumi:pulumi:Stack  Proj-dev           'dotnet build -nologo .' completed successfully
    Any idea, if not what the problem is, at least how to debug (I despaired.. couldn't find how to extract logs our of it...) ? Thanks a lot in advance for any hint!! πŸ™πŸ™πŸ™
    s
    • 2
    • 1
  • f

    few-plastic-88435

    09/09/2022, 9:35 PM
    Anyone know how can I install the Pulumi extensions for VS Code ?
    o
    • 2
    • 4
  • h

    hundreds-ghost-24810

    09/09/2022, 10:23 PM
    Hi, have been trying out Pulumi with EKS for the last two evenings, it has been nothing but a source of frustration for me. First I had to figure how to befriend pulumi and git, then learn how to install python packages where they need to be, now im stuck with a cluster i don't have permissions to that cannot even run kubernetes dashboard. Packages did not work for me either. With terraform it was so much simpler even for a noob like me.
    g
    f
    s
    • 4
    • 6
  • w

    worried-helmet-23171

    09/10/2022, 11:44 AM
    Question: what would an GCP equivalent example of this line found in the schema.json boilerplate: "$ref": "/aws/v3.30.0/schema.json#/resources/aws:lambda%2Ffunction:Function". Is it β€œ$ref”: β€œ/gcp/v6.36.0/schema.json#/resources/gcp:cloudfunctions:Function” ?
    s
    • 2
    • 14
  • f

    freezing-artist-36980

    09/11/2022, 6:41 AM
    How do I get subnet ids of a vpc?
    const vpcConnector = new awsc.apprunner.VpcConnector("vpc-connector", {
    securityGroups: [ec2SecurityGroup.id],
    subnets: [pulumi.output(vpc.getSubnetsIds)], // ERROR HERE
    });
    It shows
    1. Type 'Output<(type: VpcSubnetType) => Promise<Output<string>[]>>[]' is not assignable to type 'Input<Input<string>[]>'.
    s
    a
    • 3
    • 3
Powered by Linen
Title
f

freezing-artist-36980

09/11/2022, 6:41 AM
How do I get subnet ids of a vpc?
const vpcConnector = new awsc.apprunner.VpcConnector("vpc-connector", {
securityGroups: [ec2SecurityGroup.id],
subnets: [pulumi.output(vpc.getSubnetsIds)], // ERROR HERE
});
It shows
1. Type 'Output<(type: VpcSubnetType) => Promise<Output<string>[]>>[]' is not assignable to type 'Input<Input<string>[]>'.
s

steep-sunset-89396

09/11/2022, 8:56 AM
1. you shouldn't need to call
pulumi.output()
2. if you created the
vpc
yourself (recommended), then you will need to create the subnet(s) as well. Then using
mySubnet.id
will work. Have you had a look at the example repository? https://github.com/pulumi/examples
f

freezing-artist-36980

09/11/2022, 11:39 AM
I did create a VPC with
awsx
which includes private and public subnets already I believe. I think I will just have to get those subnet IDs if I'm not wrong, I just don't know how.
a

average-tiger-58107

09/11/2022, 12:36 PM
At least in the newer (beta) versions of awsx, you can access subnets directly on your Vpc object, using
vpc.publicSubnetIds
and
vpc.privateSubnetIds
View count: 3