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

    brave-planet-10645

    06/30/2021, 3:17 AM
    Take a look here to get you started https://www.pulumi.com/docs/guides/crosswalk/aws/lambda/
  • i

    incalculable-action-69391

    06/30/2021, 3:35 AM
    Is there anyone please who know how to set environment vars in pulumi with python, this information is NOT covered even one time in the documentation. Is it a dictionary {key:value} .
    p
    b
    • 3
    • 2
  • i

    incalculable-action-69391

    06/30/2021, 3:37 AM
    I mean seriously, there are no examples how to implement enviromnet variables in python. Can anyone help me please?
  • f

    flaky-school-82490

    07/01/2021, 7:49 AM
    Hi #getting-started, trying to get started with pulumi + github actions. Using azure-native, and a service principal to login, I am hitting this error:
    azure-native:resources:ResourceGroup (resourceGroup):
          error: building auth config: Authenticating using the Azure CLI is only supported as a User (not a Service Principal).
          
      
          To authenticate to Azure using a Service Principal, you can use the separate 'Authenticate using a Service Principal'
          auth method - instructions for which can be found here:
          
          Alternatively you can authenticate using the Azure CLI by using a User Account.
    azure/login was successful. Where are the "separate 'Authenticate using a Service Principal' auth method - instructions"? Is there a way or a workaround to use pulumi with azure authenticated using a service principal?
    i
    b
    t
    • 4
    • 16
  • c

    crooked-wolf-21506

    07/01/2021, 2:54 PM
    anyone have good examples of setting up micro-stacks with typed exports in pulumi? I’m trying to avoid having errors with a large number of
    stack = new plulumi.StackReference(...);
    const resource1 = {
      arn: stack.getOutput("resource1Arn"),
      name: stack.getOutpu("resource1Name"),
      ...
    }
    ...
    • 1
    • 1
  • w

    witty-dentist-91954

    07/01/2021, 4:21 PM
    Is there a way in pulumi to build a ConfigMap from a directory of files, like kubectl create configmap my-map --from-file ? (I've got some json config files, which I would like to map into my pod)
    b
    • 2
    • 2
  • a

    astonishing-dinner-89046

    07/02/2021, 4:54 AM
    Hello! I’m familiar w/ Terraform and spent the last 2 days learning about Pulumi. Is there a counterpart for Terraform Modules? The Pulumi examples on youtube all uses a flat file with all resources lumped together. In the real world, what’s the best practice in spinning up a new AWS region with varying resources? What does the structure look like?
    b
    • 2
    • 2
  • m

    many-salesmen-89069

    07/02/2021, 9:31 AM
    Hello, I’m wondering what’s the best way to set the default AWS region for a project? By project, I mean that I have one
    Pulumi.yaml
    file and I wish to create multiple different stacks from this, all using the same default AWS region. I’ve tried to use the
    template
    option in
    Pulumi.yaml
    as below, but it had no effect (specifically,
    pulumi stack init
    succeeded, but then
    pulumi up
    failed due to missing AWS region config):
    template:
      config:
        aws:region:
          default: eu-west-1
    b
    i
    c
    • 4
    • 4
  • m

    magnificent-area-66739

    07/02/2021, 11:39 AM
    Hello, I was looking for setting up volumes for AWS fargate using Pulumi. I can't find any related docs. Any help would be appreciated
    b
    • 2
    • 4
  • a

    ambitious-article-39970

    07/02/2021, 1:29 PM
    Hey guys, just started using pulumi python SDK and im a big fan. My question is how does pulumi scale to 100s of projects and stacks?in terms of development, do many people just provide examples to developers? or do you create custom resources ? or can you approach this in a functional way with specific functions for commonly used setups? so a developer can simply do deploy_eks_rds_s3 for example through a centrally maintained lib. or simply write policy and let everyone write there own? I know all of these are possible but id be intrested in hearing how some people abit further on in the journey are tackling this
  • s

    some-twilight-56575

    07/03/2021, 2:11 AM
    Working on a new project trying out Pulumi. This is a deployment using aws, eks with multiple operators. When deploying a resource like IstioOperator I need to apply a transformation and update annotations using information like certificate arns. Using the python sdk do you have an example of applying a transform using a variable?
  • b

    brash-waiter-28842

    07/03/2021, 6:06 AM
    Hi #getting-started. trying to test out Pulumi automation API using golang. I am trying to create a GCP VPC in one stack and a GKE cluster in another. I am using local backend. The VPC works fine:
    net, err := compute.NewNetwork(ctx, infraName, networkConf)
    		if err != nil {
    			return err
    		}
    
    ctx.Export("vpcName", net.Name)
    Here’s the output of it getting created:
    Updating (mars-vpc):
    
     +  pulumi:pulumi:Stack gcp-mars-vpc creating 
     +  gcp:compute:Network mars-vpc creating 
     +  gcp:compute:Network mars-vpc created 
     +  pulumi:pulumi:Stack gcp-mars-vpc created 
     
    Outputs:
        vpcName: "mars-vpc"
    
    Resources:
        + 2 created
    For GKE, I am trying to get the `vpcName`:
    vpcStack, err := pulumi.NewStackReference(ctx, vpcStackName, nil)
    	if err != nil {
    		panic(err)
    	}
    vpcName := vpcStack.GetOutput(pulumi.String("vpcName"))
    gkeConf := &container.ClusterArgs{
    			Description: pulumi.StringPtr(fmt.Sprintf("GKE created for %s-krate", strings.Split(stack, "-")[0])),
    			Location:    pulumi.StringPtr("asia-southeast2"),
    			Name:        pulumi.StringPtr(infraName),
    			Network: vpcName.ApplyT(func(v string) string {
    				return v
    			}).(pulumi.StringOutput),
    		}
    But i get this error:
    stderr: error: an unhandled error occurred: go inline source runtime error, an unhandled error occurred:: applier must have 1 input parameter assignable from interface {}
    what am i missing? any help would be appreciated…
  • b

    bored-table-20691

    07/03/2021, 6:10 AM
    My guess is that
    vpcName
    does not implement
    string
    , and so your input parameter needs to b e
    func(v interface{})  string {  … }
  • b

    bored-table-20691

    07/03/2021, 6:10 AM
    I’d try something like:
    func(v interface{}) string {
      vStr := v.(string)
      return vStr
    }
  • b

    bored-table-20691

    07/03/2021, 6:10 AM
    you’ll likely get a better error as to what the type of
    v
    is.
  • b

    brash-waiter-28842

    07/03/2021, 6:12 AM
    Just what was needed:
    Network: vpcName.ApplyT(func(v interface{}) string {
    				return v.(string)
    			}).(pulumi.StringOutput),
    +Previewing update (mars-gke):
    + pulumi:pulumi:Stack: (create)
        [urn=urn:pulumi:mars-gke::gcp::pulumi:pulumi:Stack::gcp-mars-gke]
        > pulumi:pulumi:StackReference: (read)
            [urn=urn:pulumi:mars-gke::gcp::pulumi:pulumi:StackReference::mars-vpc]
            name: "mars-vpc"
        + gcp:container/cluster:Cluster: (create)
            [urn=urn:pulumi:mars-gke::gcp::gcp:container/cluster:Cluster::mars-gke]
            description          : "GKE created for mars-krate"
            enableKubernetesAlpha: false
            enableL4IlbSubsetting: false
            enableLegacyAbac     : false
            enableTpu            : false
            location             : "asia-southeast2"
            name                 : "mars-gke"
            network              : "mars-vpc"
    Resources:
        + 2 to create
    many thanks @bored-table-20691
    👍 1
    b
    • 2
    • 1
  • j

    jolly-terabyte-28195

    07/03/2021, 6:17 AM
    Hello guys, super happy to join the community
    s
    • 2
    • 1
  • a

    able-raincoat-50360

    07/03/2021, 9:11 AM
    Hi there
  • a

    able-raincoat-50360

    07/03/2021, 9:12 AM
    I am new to Programming, new to Python, but know AWS and wanted to automate stuff using Pulumi for my self learning
  • a

    able-raincoat-50360

    07/03/2021, 9:13 AM
    Have installed pulumi, but in vscode, the autocompletion is not working
    s
    • 2
    • 3
  • m

    magnificent-area-66739

    07/06/2021, 8:52 AM
    Hii, I have configured AWS Fargate tasks with volumes. And I am recieving an error waiting for ECS service to become ready: ResourceNotReady: exceeded wait attempts
    h
    • 2
    • 6
  • m

    many-yak-61188

    07/06/2021, 11:44 AM
    Hi, noob here. I'm evaluating pulumi for work. the setup utilizes pulumi with github actions. env is set up globally
    env:
                PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
                PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
    and the pulumi preview step is as below
    - name: Run pulumi preview
                  uses: pulumi/actions@v3
                  with:
                      command: preview
                      stack-name: dev
    My github action fails with the error
    Configured range: ^3
    Matched version: v3.6.0
    Install destination is /home/runner/.pulumi
    Successfully deleted pre-existing /home/runner/.pulumi/bin
    /usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /home/runner/.pulumi -f /home/runner/work/_temp/7870f4e2-f331-4e31-b9d4-c532297696f3
    Error: code: 255
     stdout: 
     stderr: error: no stack named 'dev' found
    
     err?:
    👀 1
    b
    • 2
    • 10
  • m

    many-yak-61188

    07/06/2021, 11:48 AM
    QQ : Can someone please help me with the error above. I've added additional details in the thread. Apologies if this is not the right place to ask, please feel free to redirect.
  • m

    many-yak-61188

    07/06/2021, 1:20 PM
    I've resolved the previous issue, posted my resolution at the end of the thread. I was using a different backend locally from the backend utilized by github actions. My local backend was set up a while ago and I'd since forgotten about it.
  • i

    icy-football-94152

    07/06/2021, 3:58 PM
    I am just passing on a C# coding tip in this post. The conventional styles of declaring a resource stack in Pulumi/C# trigger information messages from the compiler about an unused instance or unnecessary assignment. Today I discovered a new (to me) C# feature called a discard, using this results in a happy compiler. The underscore in the code below is the syntax for a discard. // new AzureNative.DocumentDB.SqlResourceSqlDatabase( // var db = new AzureNative.DocumentDB.SqlResourceSqlDatabase( _ = new AzureNative.DocumentDB.SqlResourceSqlDatabase(...
    ❤️ 1
  • h

    helpful-knife-18557

    07/06/2021, 4:24 PM
    Hello!, I am starting to port our infra to Pulumi and need to pick a language, I am way more familiar with Go but Python would not be a problem, is pulumi more mature in one vs the other?
    b
    b
    • 3
    • 4
  • a

    adventurous-camera-87788

    07/06/2021, 10:50 PM
    Hey guys, I am working with pulumi & azure native to create a storage account with the follow specs:
    const storageAccount = new azure_native.storage.StorageAccount(storageAccountName, {
            accountName: storageAccountName,
            resourceGroupName: resourceGroup.name,
            location: resourceGroup.location,
            sku: {
                name: 'Standard_GRS'
            },
            kind: 'StorageV2'
        });
    I am trying to figure out how to get the primary connection string from this instance. Does anyone know how to do that? I noticed standard storage account using the Azure library (not azure native) has a property
    primaryConnectionString
    that can be used as an output. Does something similar exist for the azure-native version of the storage account? Any help is appreciated.
    b
    • 2
    • 4
  • r

    red-tiger-64221

    07/07/2021, 4:35 PM
    Hello! I'm Anish and a ML Engineer. I'm new to Pulumi but I'm impressed with the Python library so far. I think Pulumi can be used to simplify infrastructure provisioning for data scientists and analysts. To that end, are there any resources or blog posts that use pulumi to setup and provision ML infrastructure?
    b
    • 2
    • 1
  • s

    sparse-apartment-71989

    07/07/2021, 6:33 PM
    Hello all. I’m wondering about the approach of storing the access token as a secret; e.g. from the Civo provider docs:
    pulumi config set civo:token XXXXXXXXXXXXXX --secret
    I see an encrypted value of the token is written out into a yaml file in the project. My question is, is this safe to commit into SCM or should it be ignored; i.e. excluded via .gitignore? Thanks in advance!
    b
    • 2
    • 2
  • i

    important-sandwich-62391

    07/07/2021, 9:01 PM
    When I’m trying to set a multi-line configuration value as a string in my stack yaml file, every time I run pulumi, it converts it to a string, with no newlines? Is there something I’m missing here?
    m
    • 2
    • 1
Powered by Linen
Title
i

important-sandwich-62391

07/07/2021, 9:01 PM
When I’m trying to set a multi-line configuration value as a string in my stack yaml file, every time I run pulumi, it converts it to a string, with no newlines? Is there something I’m missing here?
m

miniature-musician-31262

07/08/2021, 3:26 AM
Can you post what your yaml looks like? You should be able to use something like
echo "some
multi-line
string" | pulumi config set some_multiline_string
and have it be pulled into the program with the newlines intact.
View count: 4