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

    sparse-student-54516

    11/10/2021, 3:51 PM
    For storing state file of my pulumi stack I am using s3 bucket. Should I use single s3 bucket for all stacks/env? or should I create 3 different buckets for state file of 3 different stacks? Which is better/preferred?  Our aim it to keep state file of different env as isolated as possible. Please suggest.
    w
    • 2
    • 2
  • s

    steep-beach-52652

    11/10/2021, 4:25 PM
    hello Guys, im new here and new to pulumi, iam deploying a container to ECS, but then can't exec into container using aws execute-command option, maybe I am missing some role and policy, how can i do that in pulumi, thanks
  • s

    steep-beach-52652

    11/10/2021, 4:39 PM
    i think the container config looks ok for that, but there is still something missing
  • s

    steep-beach-52652

    11/10/2021, 4:39 PM
    "managedAgents": [
                            {
                                "lastStartedAt": "2021-11-10T14:35:43.210000+00:00",
                                "name": "ExecuteCommandAgent",
                                "lastStatus": "RUNNING"
                            }
                        ],
                        "cpu": "0"
                    }
                ],
                "cpu": "256",
                "createdAt": "2021-11-10T14:35:03.404000+00:00",
                "desiredStatus": "RUNNING",
                "enableExecuteCommand": true,
  • s

    steep-beach-52652

    11/10/2021, 4:41 PM
    aws ecs execute-command --cluster cluster-79da775     --task 4791ddaf725a4244a39fcf01943a5ce7  --container my-app     --interactive     --command "/bin/sh"
    
    The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.
    
    
    An error occurred (TargetNotConnectedException) when calling the ExecuteCommand operation: The execute command failed due to an internal error. Try again later.
  • m

    magnificent-lifeguard-15082

    11/11/2021, 10:34 AM
    Hey all! Is there a good example/tutorial which shows the best-practice way to access outputs/config in application code? For example creating an sns topic with pulumi and then referencing the name of that in application code when making a call to
    aws-sdk
    . For extra context, I’m not using inline functions but referencing an externally packaged zip for lambda. This can reference any required pulumi runtime but not entirely sure where to start.
    m
    • 2
    • 7
  • c

    colossal-boots-62227

    11/12/2021, 2:53 AM
    I’ve just gone through the AWS getting started tutorial (https://www.pulumi.com/docs/get-started/aws/) and at the end it points towards Crosswalk for AWS (https://www.pulumi.com/docs/guides/crosswalk/aws/). However i’m also aware of the AWS classic package (https://www.pulumi.com/registry/packages/aws/) and the newer AWS Native (https://www.pulumi.com/registry/packages/aws-native/). As a Pulumi newbie who intends to target AWS (mainly ECS/Fargate and related services) and prefers to use Python, what is the recommend path?
    s
    g
    • 3
    • 5
  • s

    steep-beach-52652

    11/12/2021, 5:58 AM
    @colossal-boots-62227 looking for the same
  • s

    steep-beach-52652

    11/12/2021, 5:58 AM
    I need to enable Service discovery in aws ECS service using pulumi, need help
  • s

    steep-beach-52652

    11/15/2021, 1:51 PM
    Hello, is there any blog pot or doc , how to build a ci/cd pipeline using aws tools with pulumi
    g
    • 2
    • 3
  • w

    wonderful-twilight-70958

    11/15/2021, 2:50 PM
    Stack per env seems to be a 'best practise' pattern, but curious how folks are dealing with environments that diverge in more than just simple parameters. For instance in dev I might want a private hosted zone, and a direct connect or whatever, but in prod it's public and something something etc... Are folks just doing env-branching in the code?
    if env == dev: do x elif env == prod do y
    ?
    b
    s
    +2
    • 5
    • 5
  • a

    acceptable-insurance-51692

    11/17/2021, 10:06 AM
    Hi. I'm not sure if this is the correct channel, but here goes. I'm trying to use ObjectCopy to copy a file from one S3 bucket to another. I expect the source to update from time to time (newer versions of the file), but the destination (key) should stay the same. I simulate this behaviour by changing the source path - say:
    original_src_path = /path/to/origObj
    new_src_path = /path/to/newObj
    When I execute pulumi up and select details, I see 3 actions are about to be done:
    ++aws😒3/objectCopy:ObjectCopy: (create-replacement)
    +-aws😒3/objectCopy:ObjectCopy: (replace)
    --aws😒3/objectCopy:ObjectCopy: (delete-replaced)
    When I execute them, they happen in order, i.e. create, replace, delete. Thing is, the delete is deleting the newly created file (which has the same path), so I'm left with an empty bucket. To emphasize - create-replacement creates the object, but it's subsequently deleted. Question is, what am I doing wrong? Edit: apparently adding the following reverses the order of operation and works around the problem. seems like a bug to me though.
    {deleteBeforeReplace: true}
  • l

    lively-student-98057

    11/17/2021, 10:04 PM
    Hi! I’m having trouble getting started… When I create an EKS cluster, the default nodes are not created. I can’t figure out why! I’m executing the following.
    const publicCluster = new eks.Cluster(`eks-cluster`, {
        vpcId: vpc.id,
        publicSubnetIds: publicSubnetIds,
        privateSubnetIds: privateSubnetIds,
        nodeAssociatePublicIpAddress: false,
        createOidcProvider: true,
        providerCredentialOpts: {
            profileName: aws.config.profile,
        },
    });
    I can confirm that the resulting EKS cluster is properly associated with the specified subnets. Anyone have any advice?
    b
    w
    • 3
    • 43
  • f

    fast-rain-29589

    11/18/2021, 1:39 AM
    Hey, so I’m wondering something… Maybe I just missed some documentation somewhere but… where do secrets live in the context of Pulumi automation?
    a
    • 2
    • 3
  • s

    steep-beach-52652

    11/18/2021, 7:37 AM
    I am struggling with AWS ECS not able to access the secret manager secret to pull docker image from priavate github repo, any help plz
  • s

    steep-beach-52652

    11/18/2021, 7:40 AM
    ResourceInitializationError: unable to pull secrets or registry auth: execution resource retrieval failed: unable to get registry auth from asm: service call has been retried 5 time(s): failed to fetch secret arn:aws:secretsmanager:us-west-2:3798216913...
  • m

    miniature-window-2464

    11/18/2021, 1:54 PM
    Hello, I am trying to deploy an Azure Container Instance on a Virtual Private Network, but I am not able to find how to do it properly. If I deploy with public ip address everything is ok. Do you have any suggestions/examples on how to properly do it? Thank you
    s
    • 2
    • 2
  • s

    swift-pharmacist-99893

    11/19/2021, 10:41 AM
    Hello, I’m creating this resource with an in-line program. It works if I call
    python main.py
    but my tests fail with the following error
    Program run without the Pulumi engine available; re-run using the pulumi CLI
    . Did someone know how to test inline programs?
    stateholder.py
    • 1
    • 1
  • w

    witty-honey-13693

    11/20/2021, 2:09 PM
    Hii Does any body have sample code snippet to add a Backend in the APIM for Azure Resource? This link only explains about Service Fabric and Custom URL but not the Azure Resource https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/backend/ Thanks in advance.
    s
    t
    • 3
    • 9
  • s

    steep-sunset-89396

    11/21/2021, 11:03 AM
    set the channel topic: Ask any question on how to get started with Pulumi. Looking for examples? => https://github.com/pulumi/examples
  • w

    witty-honey-13693

    11/22/2021, 10:23 AM
    Hiii Iam trying to create a backend resource in Azure APIM. But getting an error. var backend = new Pulumi.AzureNative.ApiManagement.Backend("autobackend", new Pulumi.AzureNative.ApiManagement.BackendArgs { BackendId = "autobackend", ResourceGroupName = resourceGroup.Name, ServiceName = stackName+projectname, Url = "http://app-sea.azurewebsites.net/api", ResourceId = funcapp.Id, Protocol = "https", Tls = new Pulumi.AzureNative.ApiManagement.Inputs.BackendTlsPropertiesArgs { ValidateCertificateChain = true, ValidateCertificateName = true, }, }); Any idea what iam missing ? Error : Status=400 Code="ValidationError" Message="One or more fields contain incorrect values:" Details=[{"code":"ValidationError","message":"Value should represent absolute http URL","target":"resourceId"}]
    w
    • 2
    • 5
  • a

    astonishing-elephant-65796

    11/23/2021, 8:21 PM
    I am attempting to use pulumi locally following the online instructions but it seems to be failing to create Pulumi.dev.yaml and not knowing that it is failing. I am using --force because I have tried the command several times after running pulumi stack rm
    $ pulumi new kubernetes-typescript -v=3 --force
    This command will walk you through creating a new Pulumi project.
    Enter a value or leave blank to accept the (default), and press <ENTER>.
    Press ^C at any time to quit.
    project name: (quickstart)
    project description: (A minimal Kubernetes TypeScript Pulumi program)
    Created project 'quickstart'
    Please enter your desired stack name.
    `To create a stack in an organization, use the format <org-name>/<stack-name> (e.g.
    acmecorp/dev
    ).`
    stack name: (dev)
    Created stack 'dev'
    Installing dependencies...
    up to date, audited 123 packages in 699ms
    30 packages are looking for funding
     `run
    npm fund
    for details`
    found 0 vulnerabilities
    Finished installing dependencies
    Your new project is ready to go! :sparkles:
    To perform an initial deployment, run 'pulumi up'
    $ ls
    Pulumi.yaml       index.ts        node_modules      package-lock.json    package.json      tsconfig.json
    g
    • 2
    • 2
  • a

    astonishing-elephant-65796

    11/23/2021, 8:21 PM
    I am under the impression there should be a Pulumi.dev.yaml present in the directory
  • s

    sticky-country-73582

    11/23/2021, 8:56 PM
    Hi, For EMR
    Cluster
    class in pulumi-aws v4.29.0, when trying to add
    auto_termination_policy=pulumi_aws.emr.ClusterAutoTerminationPolicyArgs(
        idle_timeout=<some-int-value>,
    )
    I get the following error - AttributeError: module 'pulumi_aws.emr' has no attribute 'ClusterAutoTerminationPolicyArgs' error: an unhandled error occurred: Program exited with non-zero exit code: 1 Is this the right way to use this? Also, are there any IAM related dependencies that should be taken care of?
  • w

    witty-honey-13693

    11/24/2021, 1:04 PM
    Hi Any body created the credentials method in Backend resource. The code in the pulumi documentation is also showing few errors. (https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/backend/) Please let me know if any body did this in the past and help me to resolve this.
    b
    • 2
    • 2
  • w

    witty-honey-13693

    11/25/2021, 3:07 AM
    @here Does any body knows how to create a host key in Function APp through Pulumi I didnt find any sample in Pulumi documentation.
  • b

    broad-answer-39628

    11/25/2021, 9:32 AM
    Hey everyone, first time posting and new to Pulumi - thanks for having me here!Running into a problem deploying a project to Lambda but could anyone help? I’m using this tutorial to deploy Express onto Lambda through Pulumi: https://www.pulumi.com/blog/running-a-serverles-nodejs-http-server-on-aws-and-azure/ The index.js file I am using looks like this
    "use strict";
    const cloud = require("@pulumi/cloud-aws");
    const server = new cloud.HttpServer("reviews-getter", () => {
     
    const app = require('./app/app');
     
    return app;
    })
    module.exports = server;
    ./app/app.js
    is the express object exported from another file. The problem is that after
    pulumi up
    , index.js is successfully converted into a lambda function but the ./app folder is not included in the code. I therefore get an error saying that module ‘./app/app’ cannot be found. Moving the code in ./app/app.js into index.js does not help either because of the other dependencies in ./app which cannot be accessed.
    cloud:functionIncludePaths: ./app/
    is already declared in the config so could someone please advise on how to resolve this? Thanks in advance!
  • f

    fierce-vr-50495

    11/26/2021, 3:36 PM
    Hi! I’m following this go inline example: https://github.com/pulumi/automation-api-examples/blob/main/go/inline_program/main.go (changed some values for stackName + replaced fmt with log and trying with k8s and not aws). When running
    go run main.go
    I get the following output
    2021/11/26 16:28:42 Created/Selected stack "org/proj/stack"
    2021/11/26 16:28:42 Installing the Kubernetes Plugin
    2021/11/26 16:28:42 Successfully installed kubernetes v3.10.1
    2021/11/26 16:28:44 Successfully set config
    2021/11/26 16:28:44 Starting refresh
    2021/11/26 16:28:45 Failed to refresh stack: failed to refresh stack: exit status 255
    code: 255
    stdout: 
    stderr: error: no stack named 'org/proj/stack' found
    
    
    exit status 1
    Any hints what I’m missing might miss?
    b
    • 2
    • 7
  • m

    mammoth-engineer-60103

    11/28/2021, 4:08 PM
    Hi I'm new to pulumi I'm running the following code
    server = aws.ec2.Instance(
        "pulumi_made",
        ami=ami.id,
        vpc_security_group_ids=[security_group.id],
        instance_type="t2.micro",
        tags=common_tags,
        key_name=ec2_key_name,
        # availability_zone="us-east-1a",
        ebs_block_devices=[aws.ec2.InstanceEbsBlockDeviceArgs(
            delete_on_termination=True,
            volume_size=10,
            device_name="/dev/sda1"
        )],
        volume_tags=common_tags
    )
    everytime I run
    pulumi up
    it recreates a new instance even if the code has not changed. what am I doing wrong? i couldnt find anything in docs.
    s
    • 2
    • 1
  • m

    mammoth-engineer-60103

    11/28/2021, 4:09 PM
    the change set it identifies is as follows
    pulumi:pulumi:Stack: (same)
        [urn=urn:pulumi:dev::iac-lab2-ec2::pulumi:pulumi:Stack::iac-lab2-ec2-dev]
        ++aws:ec2/instance:Instance: (create-replacement)
            [id=i-055c1e578277fdd23]
            [urn=urn:pulumi:dev::iac-lab2-ec2::aws:ec2/instance:Instance::pulumi_made]
            [provider=urn:pulumi:dev::iac-lab2-ec2::pulumi:providers:aws::default_4_29_0::7d347e6c-5fb5-4e2b-bc1f-f2e5ff067bf1]
          ~ ebsBlockDevices: [
              ~ [0]: {
                      ~ deleteOnTermination: true => true
                      ~ deviceName         : "/dev/sda1" => "/dev/sda1"
                      + volumeSize         : 10
                    }
            ]
        +-aws:ec2/instance:Instance: (replace)
            [id=i-055c1e578277fdd23]
            [urn=urn:pulumi:dev::iac-lab2-ec2::aws:ec2/instance:Instance::pulumi_made]
            [provider=urn:pulumi:dev::iac-lab2-ec2::pulumi:providers:aws::default_4_29_0::7d347e6c-5fb5-4e2b-bc1f-f2e5ff067bf1]
          ~ ebsBlockDevices: [
              ~ [0]: {
                      ~ deleteOnTermination: true => true
                      ~ deviceName         : "/dev/sda1" => "/dev/sda1"
                      + volumeSize         : 10
                    }
            ]
        --outputs:--
      ~ hostname: "<http://ec2-52-90-186-159.compute-1.amazonaws.com|ec2-52-90-186-159.compute-1.amazonaws.com>" => output<string>
      ~ ip      : "52.90.186.159" => output<string>
        --aws:ec2/instance:Instance: (delete-replaced)
            [id=i-055c1e578277fdd23]
            [urn=urn:pulumi:dev::iac-lab2-ec2::aws:ec2/instance:Instance::pulumi_made]
            [provider=urn:pulumi:dev::iac-lab2-ec2::pulumi:providers:aws::default_4_29_0::7d347e6c-5fb5-4e2b-bc1f-f2e5ff067bf1]
    b
    • 2
    • 2
Powered by Linen
Title
m

mammoth-engineer-60103

11/28/2021, 4:09 PM
the change set it identifies is as follows
pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:dev::iac-lab2-ec2::pulumi:pulumi:Stack::iac-lab2-ec2-dev]
    ++aws:ec2/instance:Instance: (create-replacement)
        [id=i-055c1e578277fdd23]
        [urn=urn:pulumi:dev::iac-lab2-ec2::aws:ec2/instance:Instance::pulumi_made]
        [provider=urn:pulumi:dev::iac-lab2-ec2::pulumi:providers:aws::default_4_29_0::7d347e6c-5fb5-4e2b-bc1f-f2e5ff067bf1]
      ~ ebsBlockDevices: [
          ~ [0]: {
                  ~ deleteOnTermination: true => true
                  ~ deviceName         : "/dev/sda1" => "/dev/sda1"
                  + volumeSize         : 10
                }
        ]
    +-aws:ec2/instance:Instance: (replace)
        [id=i-055c1e578277fdd23]
        [urn=urn:pulumi:dev::iac-lab2-ec2::aws:ec2/instance:Instance::pulumi_made]
        [provider=urn:pulumi:dev::iac-lab2-ec2::pulumi:providers:aws::default_4_29_0::7d347e6c-5fb5-4e2b-bc1f-f2e5ff067bf1]
      ~ ebsBlockDevices: [
          ~ [0]: {
                  ~ deleteOnTermination: true => true
                  ~ deviceName         : "/dev/sda1" => "/dev/sda1"
                  + volumeSize         : 10
                }
        ]
    --outputs:--
  ~ hostname: "<http://ec2-52-90-186-159.compute-1.amazonaws.com|ec2-52-90-186-159.compute-1.amazonaws.com>" => output<string>
  ~ ip      : "52.90.186.159" => output<string>
    --aws:ec2/instance:Instance: (delete-replaced)
        [id=i-055c1e578277fdd23]
        [urn=urn:pulumi:dev::iac-lab2-ec2::aws:ec2/instance:Instance::pulumi_made]
        [provider=urn:pulumi:dev::iac-lab2-ec2::pulumi:providers:aws::default_4_29_0::7d347e6c-5fb5-4e2b-bc1f-f2e5ff067bf1]
b

billowy-army-68599

11/28/2021, 4:14 PM
hmm this doesn't look right, I wonder if it's a bug. Could you open an issue in github.com/pulumi/pulumi-aws
m

mammoth-engineer-60103

11/28/2021, 5:06 PM
sure thanks!
View count: 3