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
getting-started
  • f

    fancy-eve-82724

    05/17/2022, 1:07 PM
    @boundless-queen-72669 you can 'login' to pulumi to store your stack state in various backends. You can store the state on your local machine if you want using
    pulumi login file:///path/to/store
    or
    pulumi login --local
    . I use Amazon S3. See https://www.pulumi.com/docs/reference/cli/pulumi_login/
    b
    • 2
    • 2
  • p

    proud-nail-99860

    05/18/2022, 7:00 PM
    Hey all, I’m thinking about migrating my personal side projects setup to Pulumi. As it stands today, I configure everything in one giant Ansible playbook (https://github.com/banool/server-setup). This playbook communicates with my personal home server to open ports, install packages, start DBs, copy across config files, run containers, setup timers, you name it. I want to split up each of these distinct apps. I’ve got a couple of questions: 1. Should I write a separate Pulumi program per app I’m working with? 2. Pulumi seems to encourage you to write programs that target one particular provider. Is there a more agnostic way to approach this? Perhaps Kubernetes? Ideally I’d learn Kubernetes but I’m not sure if it’s necessary here / I feel like using it might throw out some of the power of Pulumi? 3. When moving from one server to cloud, I imagine I’d switch to hosting my containers with something like ECS, spin up a DB using a native provider DB service, etc. Is it possible to write a program that will work for both this new setup as well as my existing “everything on one box setup”, or am I dreaming? Any tips on how to get started would be much appreciated!
    l
    • 2
    • 20
  • a

    ancient-nightfall-54764

    05/19/2022, 8:14 AM
    Hi Everyone, I want to ask something regarding pulumi stack reference. I have different stack (infra and dev), I just want to get output from infra stack and using that into my ec2 resource. So I have code like this
    stack infra
    index.ts
    ....
    export const ruleSgId = secgroup.id;
    export const subnetA = subneta.id;
    
    
    stack dev
    index.ts
    ...
    const stackRef = new pulumi.StackReference("blabla/blabla/infra");
    const secg = stackRef.getOutput("ruleSgId");
    const subnet = stackRef.getOutput("subnetA");
    
    subnetId: subnet,
    vpcSecurityGroupIds: [ secg, ],
    ...
    But when I run the code, the result was error like this
    error: Running program '/Users/mhw/WS/repos/pulumi' failed with an unhandled exception:
        TypeError: Cannot read properties of undefined (reading 'id')
    https://www.pulumi.com/learn/building-with-pulumi/stack-references/ Thank you.
    v
    c
    • 3
    • 12
  • a

    ancient-nightfall-54764

    05/20/2022, 2:55 PM
    Hi Everyone, I just want to know, how to increase root device volume size of a server (ec2) with pulumi, because I didn’t find in the documentation about how to increase/resize root volume size? https://www.pulumi.com/registry/packages/aws/api-docs/ec2/instance/ this my example code, the result is 8GB for root device volume. I want to increase the size. Thank you.
    let server = [];
    server.push(new aws.ec2.Instance(`proxy-website-${ stack }`, {
        ami: config.require("id-ami-ubuntu"),
        instanceType: "t3.small",
        keyName: config.require("key-name"),
        subnetId: publicSubnet,
        vpcSecurityGroupIds: [ secgroup ],
        tags: {
            Name: `proxy-website-${ stack }`,
            Environment: `${ stack }`,
            Pulumi: "true",
        },
    }));
    l
    • 2
    • 2
  • h

    hundreds-toothbrush-20089

    05/21/2022, 11:31 AM
    Hi guys I am new here and I poked around some examples. I am working on GCP and I am trying to find the best way to trigger a database migration. How do you guys do it? I saw I can use init container that will wait for a job to do it or with by using some helm.sh/hook. What is the best way with Pulumi? Also is there a way to do it a specific way from Pulumi? Thanks!
  • g

    gorgeous-twilight-11045

    05/21/2022, 7:19 PM
    Working through creating a proof of concept multilang component and I'm having some trouble understanding some sections in the
    schema.json
    resources block: 1. When would
    isComponent
    be false? 2. What does it mean for something in the
    properties
    section to be
    required
    ? I think properties = output properties but then a "required output property" doesn't really make sense to me. Thanks!
    • 1
    • 1
  • p

    plain-doctor-68403

    05/23/2022, 4:19 PM
    Hello, I just tried running the
    install pulumi
    script for Linux I found at https://www.pulumi.com/docs/get-started/aws/begin/
    curl -fsSL <https://get.pulumi.com> | sh
    but got the following error while extracting the file:
    === Installing Pulumi v3.33.1 ===
    + Downloading <https://get.pulumi.com/releases/sdk/pulumi-v3.33.1-linux-x64.tar>
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Curren
                                     Dload  Upload   Total   Spent    Left  Speed
    100 78.7M  100 78.7M    0     0  9856k      0  0:00:08  0:00:08 --:--:-- 10.2M
    + Extracting to /home/max/.pulumi/bin
    
    gzip: stdin: unexpected end of file
    tar: Child returned status 1
    tar: Error is not recoverable: exiting now
    
    We're sorry, but it looks like something might have gone wrong during installa
    If you need help, please join us on <https://slack.pulumi.com/>
    Any advice on how to proceed? Thanks!
    👀 1
    p
    b
    m
    • 4
    • 12
  • m

    most-jordan-25674

    05/23/2022, 4:42 PM
    I’m having trouble creating a Fargate Cluster on AWS, getting a VPC not found when trying to get an existing non-default one. Not sure what to try next as google is failing me 😞
    • 1
    • 2
  • p

    proud-nail-99860

    05/23/2022, 5:21 PM
    Do yall know how to copy a folder into a bucket with Pulumi? I somewhat assumed if I had code like this:
    // Create an archive resource for the latest web build.
    let remoteArchive = new pulumi.asset.RemoteArchive("<https://example.com/mywebstuff.zip>");
    
    const bucketObject = new gcp.storage.BucketObject("web", {
        bucket: bucket.name,
        contentType: "text/html",
        source: remoteArchive,
    })
    There would be an
    unzip
    option where it then unzips the archive and creates a folder called
    web
    o
    • 2
    • 2
  • c

    creamy-fall-88031

    05/24/2022, 2:39 PM
    Hi all. General TypeScript related question. I need to reference user managed identity as seen in the following code snippet taken from the docs:
    identity: {
            type: azure_native.network.ResourceIdentityType.UserAssigned,
            userAssignedIdentities: {
                "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {},
            },
        },
    Now, I'm trying to change resource path in the example above with something more dynamic, so did the following:
    let userIdentity = pulumi.all([subscriptionId, resourceGroup.name, userAssignedIdentity.id])
                       .apply(([subscriptionId, resourceGroup, usrAssignedIdentity]) => `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${usrAssignedIdentity}`)
    And then used it as follows:
    identity: {
        type: azure_native.network.ResourceIdentityType.UserAssigned,
        userAssignedIdentities: {
            ${userIdentity} : {},
        },
    },
    But this doesn't seem to be working when the variable
    {$userIdentity}
    is on the left of the colon sign. I'm getting the following error:
    error: Code="LinkedInvalidPropertyId" Message="Property id 'userIdentity' at path '' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'."
    Can someone please help me with the proper way to do this ?
    o
    • 2
    • 6
  • p

    proud-nail-99860

    05/24/2022, 5:27 PM
    Do yall know a good tutorial for using Pulumi + GCP to run a container? I can’t really use Cloud Run, [it doesn’t fit my model very well](https://stackoverflow.com/questions/72354350/how-to-run-container-every-5-seconds-with-gcp). I know on the UI you can configure a container right there when making your instance, I just can’t see how to do that via Pulumi.
    o
    q
    • 3
    • 8
  • m

    mysterious-hamburger-19066

    05/24/2022, 11:58 PM
    Hello. I’m trying to set up a VM on Azure using Pulumi, and I’m following along with this tutorial: Top 5 Things an Azure Developer Needs to Know: VMs | Pulumi Blog I have a couple of questions though. How do I connect to an existing resource group instead of creating a new one? How do I connect using ssh instead of a username and password? I need to create a VM in an existing resource group, install Anaconda on it, install a python package, and sync a directory from local machine to the remote machine. If you could suggest any tutorials or classes I need to look at, it would be great.
    • 1
    • 2
  • m

    mysterious-hamburger-19066

    05/25/2022, 4:07 AM
    Is the parallel argument supported in the pulumi python automation api? If so how do I use it? Do I have to account for the name collisions when creating multiple VMs?
    e
    • 2
    • 2
  • m

    most-stone-11511

    05/25/2022, 1:29 PM
    Hi, We've recently migrated our stack to a Team and activated our subscription. Previously we were using an individual account and using access tokens to allow team members to perform operations on our stack. Since migrating we have lost the ability to grant access tokens, further more only one member of the team can be granted an admin role. Is there a way for us to grant rights to additional members?
    l
    b
    • 3
    • 2
  • h

    hallowed-australia-10473

    05/26/2022, 2:05 AM
    Is it not possible to set the TTL when creating a domain record with the DigitalOcean provider?
  • h

    hallowed-australia-10473

    05/26/2022, 3:25 AM
    Also, I can see how to make the creation of a droplet depend on the creation of a bucket — what I can’t see is how to block until the bucket is created before writing my user data from a template file for that droplet. If the user data file itself were a Pulumi resource, then it could depend on the bucket’s creation, and the droplet could depend on that, but I don’t see any generic file provider, and I’m not sure how to use the cloud-init provider in this case. Am I missing something conceptual?
    a
    l
    • 3
    • 40
  • s

    sticky-answer-6826

    05/27/2022, 7:06 PM
    Hi - Do stack outputs need to always be string type? Is this good practice or Pulumi implementation decision?
  • s

    sticky-answer-6826

    05/27/2022, 7:38 PM
    Also, are outputs only available to the CLI using
    pulumi stack output myOut
    after deployment and the backend gets updated? I.e not simply by specifying a new line
    export const myOut = outputs.then(o, => o.myOutput)
    . Adding this to my TS file alone results in an error with command above but is displayed with
    pulumi preview
    . Hence, new outputs won't be available to other stacks until I
    pulumi
    up
    l
    • 2
    • 4
  • s

    sticky-answer-6826

    05/27/2022, 9:52 PM
    Hi If I move code into another stack, how can I assure the AWS resource that was already created in another stack is recognized? Basically, I move the identical implementation (literally the same code) to create an AWS resource into a new stack. No code changes at all. However,
    pulumi up
    in the new stack yields an error because the resource already exists in AWS. Is there a way to link these and have a new stack recognize it’s the same one I need, other than removing the resource in the other stack and then
    pulumi up
    again in the new stack (basically delete and recreate)?
    v
    • 2
    • 2
  • s

    square-library-83546

    05/28/2022, 4:04 PM
    Hey there... I just did a fresh install on windows 11 with chocolatey. I'm following the docs to create a new project. It prompts me for my project name and any value I enter is invalid... Anyone else seeing this?
    • 1
    • 2
  • w

    witty-vegetable-61961

    05/30/2022, 11:44 PM
    hi all, I am pretty sure this is a comon question but how can I get the value of an output? Essentially the problem here- https://stackoverflow.com/questions/62561660/how-to-convert-pulumi-outputt-to-string
    l
    m
    e
    • 4
    • 26
  • q

    quick-painter-61380

    06/01/2022, 12:32 AM
    I'm just getting started and have a fairly small update going on that is taking a long time (updating an aws security group taking more than 10 minutes). Is there a good way to see what's happening behind the scenes?
    l
    m
    • 3
    • 10
  • s

    sparse-caravan-29563

    06/01/2022, 9:46 AM
    Hi, what is the right way to cope with a locked stack? How can I distinguish between a case that a stack is locked because another process is currently updating it, and the case when the CLI process got killed while performing an update? In the first case I would like to do nothing (or allow update only after a certain time period has passed), and in the second case I would like to unlock the stack and retry the update
    e
    • 2
    • 10
  • q

    quick-painter-61380

    06/01/2022, 4:38 PM
    I'm having trouble getting pulumi to respect
    aws:accessKey
    and
    aws:secretKey
    in my stack config while using the automation api. Is this not possible or is there documentation I'm missing? I have
    PULUMI_CONFIG_PASSPHRASE_FILE
    set and it works when I take out the automation api parts and run pulumi up.
    b
    • 2
    • 3
  • s

    sticky-answer-6826

    06/01/2022, 10:29 PM
    I'm seeing an odd behavior when looping through some AWS resource creation that I can only attribute to getting another stack’s output, specially I think the error is a result of lopping through and getting a stack reference each time within the loop, i.e.
    stack
    =
    new
    pulimi.StackReference(stackName)
    . More specifically the errors occurs after that but before the next line that follows
    myOutput
    =
    await
    stack.requireOutputValue(‘myVal’)
    . The error is “Duplicate resource URN ‘`urn😛ulumi:currentStack::currentProject:😛ulumi:pulumi::StackReference::stackINeed`’”. When I only loop one set of resources,
    pulumi
    preview
    works fine. It is when I have 2 resources that iterate through the loop that I get the error. Hence, I can only attribute it to trying to get a reference to the stack that already exists in the current state of running
    pulumi preview
    . Am I way off in my thought? Thanks!
    l
    • 2
    • 7
  • h

    handsome-rainbow-98791

    06/02/2022, 11:19 PM
    I’m trying to deploy a pulumi stack that was already created by another developer. I’m on teh teams version and the operation failed b/c my mac force restarted on me. Since pulumi did not successfully run, I delete the EKS cluster in the AWS Console. I’ve since been trying to force pulumi to delete all the remaining elements and start from scratch but whether destroying the stack, updating the state, or removing the pending operations, pulumi cli won’t successfully do anything.
    $  pulumi destroy                                                                                                                                                 git:peer_to_rds*
    Previewing destroy (ironnetcybersecurity/jcc)
    
    View Live: <https://app.pulumi.com/ironnetcybersecurity/salamander/jcc/previews/7ac2218e-7bbe-4d24-9f10-27a93537ba82>
    Do you want to perform this destroy? yes
    Destroying (ironnetcybersecurity/jcc)
    
    View Live: <https://app.pulumi.com/ironnetcybersecurity/salamander/jcc/updates/114>
    
         Type                             Name             Status                  Info
         pulumi:pulumi:Stack              salamander-jcc   **failed**              1 error; 1 warning
     -   └─ kubernetes:core/v1:Namespace  global-services  **deleting failed**     1 error
    
    Diagnostics:
      pulumi:pulumi:Stack (salamander-jcc):
        warning: Attempting to deploy or update resources with 1 pending operations from previous deployment.
          * urn:pulumi:jcc::salamander::kubernetes:core/v1:Namespace::global-services, interrupted while deleting
        These resources are in an unknown state because the Pulumi CLI was interrupted while
        waiting for changes to these resources to complete. You should confirm whether or not the
        operations listed completed successfully by checking the state of the appropriate provider.
        For example, if you are using AWS, you can confirm using the AWS Console.
    
        Once you have confirmed the status of the interrupted operations, you can repair your stack
        using 'pulumi refresh' which will refresh the state from the provider you are using and
        clear the pending operations if there are any.
    
        Note that 'pulumi refresh' will not clear pending CREATE operations since those could have resulted in resources
        which are not tracked by pulumi. To repair the stack and remove pending CREATE operation,
        use 'pulumi stack export' which will  export your stack to a file. For each operation that succeeded,
        remove that operation from the "pending_operations" section of the file. Once this is complete,
        use 'pulumi stack import' to import the repaired stack.
        error: update failed
    
      kubernetes:core/v1:Namespace (global-services):
        error: Timeout occurred polling for 'global-services'
    
    
    
    
    
    
    
    $ pulumi cancel                                                                                                                                                  git:peer_to_rds*
    This will irreversibly cancel the currently running update for 'jcc'!
    Please confirm that this is what you'd like to do by typing ("jcc"): jcc
    error: [409] Conflict: The Update has already completed
    
    $ pulumi refresh
    l
    • 2
    • 21
  • f

    freezing-daybreak-42018

    06/03/2022, 3:04 PM
    2022-06-03T15:00:31.4557125Z Diagnostics: 2022-06-03T15:00:31.4557538Z azure-native😒ql:Database (diae-smartov-test): 2022-06-03T15:00:31.4558162Z error: Duplicate resource URN 'urn😛ulumi:test::SmartGov-Diae::azure-native:sql😄atabase::diae-smartov-test'; try giving it a unique name
    b
    • 2
    • 1
  • f

    freezing-daybreak-42018

    06/03/2022, 3:04 PM
    Hi all
  • f

    freezing-daybreak-42018

    06/03/2022, 3:04 PM
    getting above no matter what i do
  • f

    freezing-daybreak-42018

    06/03/2022, 3:04 PM
    destroyed rd stacks but it still references db names that i have changed
Powered by Linen
Title
f

freezing-daybreak-42018

06/03/2022, 3:04 PM
destroyed rd stacks but it still references db names that i have changed
View count: 3