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

    magnificent-sandwich-15839

    02/03/2022, 2:06 PM
    Hi all, Can someone help me figure out what I might be doing wrong.
    pulumi.all([
                    config.requireSecret("secretKey"),
                    config.requireSecret("dbPassword"),
                ])
                .apply(([secretKey, dbPassword]) =>
                    createStack({
                        secretKey: `${secretKey}`,
                        dbPassword: `${dbPassword}`,
                    })
                );
    I still get secretKey as
    '[secret]'
    I’ve kind of never been able to get string out of Output<string>
    m
    d
    l
    • 4
    • 4
  • b

    billions-judge-9412

    02/06/2022, 7:49 PM
    Is there any way to do a basic type check? Like terraform validate kind-of-thing
    l
    d
    • 3
    • 2
  • f

    flaky-beach-82888

    02/08/2022, 10:09 PM
    can someone help me understand how to use cloudinit with pulumi? I tried the following: main
    resource_config = cloudinit.Config("resource", base64_encode=False,
                                        gzip=False,
                                        parts=[cloudinit.GetConfigPartArgs(
                                            content="baz",
                                            content_type="text/cloud-config",
                                            filename="cloudinit/test.yaml",
                                        )])
    
    node0 = hcloud.Server(
      get_name('node'),
      image=image,
      location=location,
      server_type=server_type,
      ssh_keys=[default_ssh.id],
      user_data=resource_config
    )
    cloudinit file - taken from cloudinit docu
    #cloud-config
    
    # run commands
    # default: none
    # runcmd contains a list of either lists or a string
    # each item will be executed in order at rc.local like level with
    # output to the console
    # - runcmd only runs during the first boot
    # - if the item is a list, the items will be properly executed as if
    #   passed to execve(3) (with the first arg as the command).
    # - if the item is a string, it will be simply written to the file and
    #   will be interpreted by 'sh'
    #
    # Note, that the list has to be proper yaml, so you have to quote
    # any characters yaml would eat (':' can be problematic)
    runcmd:
     - [ ls, -l, / ]
     - [ sh, -xc, "echo $(date) ': hello world!'" ]
     - [ sh, -c, echo "=========hello world'=========" ]
     - ls -l /root
     # Note: Don't write files to /tmp from cloud-init use /run/somedir instead.
     # Early boot environments can race systemd-tmpfiles-clean LP: #1707222.
     - mkdir /run/mydir
     - [ wget, "<http://slashdot.org>", -O, /run/mydir/index.html ]
    pulumi up runs through without errors, but cloud init is not applied. -> directory /run/mydir does not exists. edit: I use hetzner cloud, user_data should be supported according to pulumi doc.
    ✅ 1
    l
    • 2
    • 4
  • g

    gentle-school-19497

    02/09/2022, 12:01 AM
    Is there run pulumi up from python with out using popen. I'm try have git action to run behave, and use behave package to run pulumi up. But for some reason when I try to run pulumi up form subprocess it does retain the aws creds
    l
    • 2
    • 3
  • g

    great-sunset-355

    02/10/2022, 9:40 AM
    Can I protect a resource against updates?
    e
    • 2
    • 3
  • h

    hallowed-scooter-78375

    02/10/2022, 10:42 AM
    Hi all, i'm trying to add PublicIPAddressSkuArgs into my pulumi script based on the example here: https://www.pulumi.com/registry/packages/azure-native/api-docs/network/publicipaddress/#publicipaddressskuname but I end up with the following Go error: panic: runtime error: comparing uncomparable type resource.PropertyMap goroutine 15 [running]: github.com/pulumi/pulumi-azure-native/provider/pkg/provider.(*azureNativeProvider).Diff(0x14000472300, {0x105b68ac8, 0x1401416a7b0}, 0x14000556230) /home/runner/work/pulumi-azure-native/pulumi-azure-native/provider/pkg/provider/provider.go:737 +0x9e8 github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Diff_Handler.func1({0x105b68ac8, 0x1401416a7b0}, {0x105ad8900, 0x14000556230}) /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.23.2/proto/go/provider.pb.go:2611 +0x7c github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x105b68ac8, 0x1401416a480}, {0x105ad8900, 0x14000556230}, 0x14012535f60, 0x1401415c858) /home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x3bc github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Diff_Handler({0x105b19c00, 0x14000472300}, {0x105b68ac8, 0x1401416a480}, 0x1400e3ea120, 0x14000643f00) /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.23.2/proto/go/provider.pb.go:2613 +0x150 google.golang.org/grpc.(*Server).processUnaryRPC(0x140004f2000, {0x105b7a0e8, 0x1400017ec00}, 0x1401416c000, 0x140140f8b70, 0x106ddee28, 0x0) /home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.0/server.go:1217 +0xc38 google.golang.org/grpc.(*Server).handleStream(0x140004f2000, {0x105b7a0e8, 0x1400017ec00}, 0x1401416c000, 0x0) /home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.0/server.go:1540 +0xa34 google.golang.org/grpc.(*Server).serveStreams.func1.2(0x1400c6e4020, 0x140004f2000, {0x105b7a0e8, 0x1400017ec00}, 0x1401416c000) /home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.0/server.go:878 +0x94 created by google.golang.org/grpc.(*Server).serveStreams.func1 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.0/server.go:876 +0x1f0 Anyone have any ideahow to resolve?
    s
    • 2
    • 1
  • c

    clever-glass-42863

    02/12/2022, 12:04 AM
    A quick questions about multiple Output<string> in an array Input<string>[]
    Envs = new Input<string>[]
                    {
                        // Analytics DB...
                        "ANALYTICS_DB_USERNAME=postgres",
                        "ANALYTICS_DB_PASSWORD=password",
                        analyticsPostgresHostname,
                        // Accounts DB...
                        "ACCOUNTS_DB_USERNAME=postgres",
                        "ACCOUNTS_DB_PASSWORD=password",
                        accountsPostgresHostname,
                        "ACCOUNTS_DB_PORT=5432",
                        "ANALYTICS_DB_PORT=5431",
                        "PORT=80"
                    },
    Where both the
    analyticsPostgresHostname
    and
    accountsPostgresHostname
    are defined like:
    var accountsPostgresHostname = accountsPostgresContainer.Hostname.Apply(networkName => $"ACCOUNTS_DB_HOSTNAME={networkName}");
                var analyticsPostgresHostname = analyticsPostgresContainer.Hostname.Apply(networkName => $"ANALYTICS_DB_HOSTNAME={networkName}");
    However, only one of those hostnames actually get filled, the other is an empty string. Is it expected that both those Output<string> be resolved in that Input<string>[]? I appreciate your time!
    e
    • 2
    • 6
  • q

    quaint-pillow-20530

    02/13/2022, 8:18 PM
    👋 Hello, team! I just started using Pulumi. I have a question: How can I make my aks cluster access my azure PostgreSQL database? Any doc or article will help
  • v

    victorious-wall-1075

    02/15/2022, 2:47 PM
    Hello all.. I am getting started with Pulumi for Kubernetes platform (python): I am trying to create a namespace in my automation program:
    ns = Namespace(kwargs["namespace"], metadata={"name": kwargs["namespace"]})
    This works when the namespace does not exist. It fails with “already exists” if the namespace exists.
    +  pulumi:pulumi:Stack pulumi-iac-k8-deploy-heml-rmjbpcxuer creating
     +  kubernetes:core/v1:Namespace iac-test creating
     +  kubernetes:core/v1:Namespace iac-test creating Retry #0; creation failed: namespaces "iac-test" already exists
    How do I change this code so that Namespace is created only if it doesn’t exist. ? I am looking at the docs but cannot find an option to do this.. Help appreciated..
    b
    • 2
    • 2
  • h

    hallowed-quill-52018

    02/15/2022, 4:03 PM
    👋 Hello, team! I have a question about state. I believe I know the answer, but is it possible to store state in terraform enterprise?
    b
    f
    m
    • 4
    • 4
  • s

    silly-evening-40761

    02/16/2022, 4:51 PM
    Hello ! I have a question about parallel updates. When many of my lambdas code changes, it seems it is updated serially as in my console each job finishes one after the other one, and that makes for quite a long time when having 40 or so lambdas. Is there a way to multiplex updates? I'll add that I bundle my lambdas code with esbuild and feed the output file to my lambda objects through a asset archive and a file asset. Any ideas ?
    e
    • 2
    • 2
  • f

    fast-ability-28628

    02/16/2022, 10:02 PM
    Does anyone know how to create OAuth GCP in pulumi? I have looked under gcp.iap and gcp.identityplatform and cannot find the right constructor to use.
    k
    • 2
    • 3
  • b

    breezy-helicopter-33703

    02/17/2022, 6:12 AM
    Hello team, We have requirement of creating multiple policy on Azuredevops by using pulumi automated script so scenario is like we have from to create policy after get approval from azuredevops portal it will create policy so we want to develop a script by using pulumi to automate this one for multiple policy creation is this possible with pulumi ?
  • f

    future-cartoon-6373

    02/18/2022, 12:41 PM
    Hi all i'm new to Pulumi and have some basic/commercial questions i would like to ask, anyone from Pulumi dev/managers I can PM?
    e
    b
    • 3
    • 3
  • l

    little-library-54601

    02/21/2022, 7:35 PM
    I'm trying to follow the Azure "getting started" guide at: https://www.pulumi.com/docs/get-started/azure/. The command "pulumi login --local" seems to be working - I see the .pulumi folder with the templates, etc. When I execute the command "pulumi new azure-csharp", it displays the basic information and instructions about entering values and prompts me for the project name. When I hit "Enter", nothing happens. It also doesn't accept any input for the project name (i.e. if I try to type in a project name, it doesn't seem to accept any input - it certainly doesn't echo the characters to the screen). So I'm guessing there's some kind of issue in the terminal / shell / console where I'm executing the "pulumi new" command. A "Ctrl-C" does break out of the command back to the prompt. I'm on Windows 10 21H2 (10944.1469); Windows Terminal 1.11.3471.0; Windows Powershell 7.2.1. Any thoughts on this? Anyone else run into it?
    l
    • 2
    • 14
  • l

    little-library-54601

    02/21/2022, 9:28 PM
    Another question for someone who's just getting started: Is there a way to use the "pulumi login file://{path}" command so that the project-specific .pulumi folder is under the project root folder and to do it in a path-independent way, e.g. if the project for me is under d:\src\myazproject and for my teammate it's under c:\dev\myazproject we could both use the same "pulumi login file://{path}" command to reference the fact that the .pulumi folder is under "myazproject" for each of us?
    • 1
    • 1
  • r

    rapid-football-44318

    02/23/2022, 8:40 AM
    Hi all, I'm starting to use Pulumi as a pilot for our infrastructure. Would love some help with an issue please. It maybe a common rookie error. All good using the CLI and now creating an Azure Pipeline. Using the Pulumi@1 task There are 3 jobs. 1. Pulumi Preview ✅ 2. Manual Intervention ✅ 3. Pulumi Up ❌ The 1 and 2 work fine. The 'pulumi up', but it fails with...
    ##[debug]   stack
    ##[debug]   select
    ##[debug]   myorganisation/bg/dev
    /home/vsts/work/_temp/01d522e5-8d36-46cb-863b-4387991ea26a/pulumi/pulumi stack select myorganisation/bg/dev
    ##[debug]task result: Failed
    ##[error]Error: There was an error when attempting to execute the process '/home/vsts/work/_temp/01d522e5-8d36-46cb-863b-4387991ea26a/pulumi/pulumi'. This may indicate the process failed to start. Error: spawn /home/vsts/work/_temp/01d522e5-8d36-46cb-863b-4387991ea26a/pulumi/pulumi ENOENT
    
    ##[debug]Processed: ##vso[task.issue type=error;]Error: There was an error when attempting to execute the process '/home/vsts/work/_temp/01d522e5-8d36-46cb-863b-4387991ea26a/pulumi/pulumi'. This may indicate the process failed to start. Error: spawn /home/vsts/work/_temp/01d522e5-8d36-46cb-863b-4387991ea26a/pulumi/pulumi ENOENT
    It looks like it fails on the 'select stack', but this is fine in the preview and is identical. The YAML looks like
    # Infrastructure Build and Deploy
    variables:
      - template: /pipelines/variables/common-vars.yml
      - template: /pipelines/variables/bg/common-vars.yml
      - group: Core-Variables
    
    trigger:
      batch: true
      branches:
        include:
        - main
      paths:
        include:
        - 'infrastructure/bg/**/*'
    
    name: $(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
    
    stages:
    
    - stage: DEV
      displayName: Deploy to DEV
    
      variables:
        - template: /pipelines/variables/common-vars-dev.yml
        - template: /pipelines/variables/bg/dev-vars.yml
        - group: KeyVault-BG-Dev
    
      jobs:
        - job: PreviewInfra
          displayName: Pulumi Preview
          pool:
            vmImage: 'ubuntu-latest'
          steps:
              - task: NuGetToolInstaller@1
              - task: Pulumi@1
                condition: or(eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Reason'], 'Manual'))
                inputs:
                  azureSubscription: '${{ variables.AzureSubscriptionConnection }}'
                  command: 'preview'
                  cwd: '$(pulumiWorkingDirectory)'
                  stack: '$(pulumiStackName)'
        - job: ManualIntervention
          dependsOn: PreviewInfra
          condition: and(succeeded('PreviewInfra'), ne(variables['Build.Reason'], 'PullRequest'))
          displayName: Manual Cross Check of Preview
          pool: server
          steps:
            - task: ManualValidation@0
              inputs:
                notifyUsers: '<mailto:me@somewhere.com|me@somewhere.com>'
                instructions: 'Cross check and Review the Pulumi Preview step and if appropriate approve.'
        - deployment: DeployInfra
          dependsOn: ManualIntervention
          displayName: Pulumi Up
          pool:
            vmImage: 'ubuntu-latest'
          environment: ${{ variables.DevOpsEnvName }}
          strategy:
            runOnce:
              deploy:
                steps:
                - task: NuGetToolInstaller@1
                - task: Pulumi@1
                  inputs:
                    azureSubscription: '${{ variables.AzureSubscriptionConnection }}'
                    command: 'up'
                    cwd: '$(pulumiWorkingDirectory)'
                    stack: '$(pulumiStackName)'
                    args: '--yes'
  • r

    rapid-football-44318

    02/23/2022, 11:38 PM
    I think I have found the issue. The -deployment job does not checkout the repo. Need to add
    checkout: self
    to the job prior to the pulumi task. see https://docs.microsoft.com/en-us/azure/devops/pipelines/process/deployment-jobs?view=azure-devops
  • l

    little-library-54601

    02/24/2022, 3:50 PM
    If I correctly understand the Pulumi docs on its architecture and the concept of a stack ("an isolated, independently configurable instance of a Pulumi program"), a single Pulumi program should be able to be used to create multiple "environments" (as we'd use the term: dev, test, uat, production). For that to be true, the resource names specified in the Pulumi program (C# for us, the class derived from "Stack") have to be unique for each environment. What is Pulumi's vision or recommended practice for how to accomplish that (the examples I've seen don't demonstrate this). 1. Is there a way in our Stack class to determine the currently active stack (i.e. what "pulumi stack" would output as the current stack)? 2. If not (or perhaps even if there is), should we use the Pulumi configuration mechanism, as documented at https://www.pulumi.com/docs/intro/concepts/config/ to let our Stack class know the target environment so that we can ensure unique resource names? Thanks.
    e
    b
    +2
    • 5
    • 11
  • c

    chilly-plastic-75584

    02/24/2022, 6:51 PM
    ⚡ Got team subscription enabled... so I'm officially the first adopter at the company I'm at 🎉 Right now I'm at free tier on a K8 deployment being roughly 8k Pulumi credits. I'm trying to plan for future stuff and super confused on the credit stuff or at least wondering if I'm right/wrong? • Let's say I'm at 150k credits. • I do a new k8 deployment and 8k more credits are used. • 0.00025 per pulumi credit would mean $2 a month, but then I see the credits are calculated per hour or something. So Each month with that said I'm thinking $1300, which I can't believe is right. I want to keep adopting for little things here and there while I promote internally, but having a solid understanding of potential cost is really important. If I all of a sudden hit $1300 for a new plan on the credit card some folks might have some serious questions 🙂 Any calculator or examples would be welcome to better plan for using.
    p
    • 2
    • 13
  • c

    creamy-fall-88031

    02/24/2022, 11:29 PM
    Hi everyone. I've bumped into an error I can't seem to resolve while trying to deploy on Azure via Service Principal. I would appreciate your help very much. Service principal is created and my stack yaml file has all the variables stated here in option 2: https://www.pulumi.com/registry/packages/azure-native/installation-configuration/ yet I keep getting the following error:
    {
      "error": {
        "code": "AuthenticationFailed",
        "message": "Authentication failed. The 'Authorization' header is missing."
      }
    }
    Anyone with an idea what I might be doing wrong?
    g
    c
    • 3
    • 5
  • b

    bored-coat-16933

    02/25/2022, 8:27 AM
    Hi, We are evaluating Pulumi and we wonder if the stack references are available when you are working with an Azure blob storage backend? If so, how do you create your stack and reference it? I guess there is no organization available? cfr: https://www.pulumi.com/learn/building-with-pulumi/stack-references/
    e
    • 2
    • 45
  • b

    bulky-bird-93072

    02/26/2022, 3:08 PM
    Hi everyone. I'm new to Pulumi and trying to learn if there is a way to use it with Proxmox Virtual Environment (PVE). Can anyone tell me something about this? Is there a way? A Proxmox PVE integration would be crucial to even start using Pulumi, since our main platform bases on this today and there are only vague ideas to bring specific things into the cloud.
    e
    • 2
    • 5
  • w

    wet-carpenter-14925

    03/02/2022, 4:02 PM
    Hi, everyone. Just starting with Pulumi, and hoping to work in PyCharm. Unfortunately, PyCharm doesn't see an interpreter in the
    venv
    created by
    pulumi new
    , and it also doesn't have documentation for the pulumi modules. Does anyone have experience getting these set up?
    g
    • 2
    • 26
  • a

    alert-zebra-27114

    03/02/2022, 8:58 PM
    Does anybody have a good way to work with istioctl from a Pulumi project? I would like to include the set-up of Istio in my IaC specification as some parts of it depends on AWS EIPs and similar. I can see that I can create a pulumi_command provider, but I'm not sure this is the right way
    w
    m
    • 3
    • 5
  • g

    gifted-artist-72219

    03/03/2022, 7:55 AM
    Hi, can anybody explain how switch Event pattern to Pre-defined pattern by service in Amazon EventBridge Rules? Аt now my EventRule looks like this
    const EventRule = new aws.cloudwatch.EventRule("testpulumi", {
        eventBusName: "default",
        isEnabled: true,
        name: "testpulumi",
        description: "Get scheduled events for EC2 instance",
        eventPattern: `{
          "source": ["aws.health"],
          "detail-type": ["AWS Health Event"],
          "detail": {
            "service": ["EC2"],
            "eventTypeCategory": ["scheduledChange"]
          }
        }`,
    });
    g
    • 2
    • 2
  • b

    bright-oil-46290

    03/06/2022, 3:42 AM
    Can I invoke all the CLI commands from Code? I am hoping to use Pulumi in combination with Temporal and don't want to have to reach out to the shell.
    g
    • 2
    • 4
  • b

    bright-oil-46290

    03/06/2022, 3:43 AM
    https://www.pulumi.com/docs/guides/automation-api/
  • b

    bright-oil-46290

    03/07/2022, 6:02 AM
    The on prem backends use mutexes? Can I run 2 ups at the same time?
    p
    b
    • 3
    • 13
  • a

    abundant-book-94104

    03/07/2022, 11:18 PM
    Can someone point me to where I can work out the app service plans in Azure for a config? I can't find plans like Y1 which people have in documents and posts, when looking at Azure pricing. I want a consumption plan for a simple basic app. This is one of my issues with pulumi that it's hard to find some of this stuff in the documents, that is suggested values to configure something
    w
    • 2
    • 2
Powered by Linen
Title
a

abundant-book-94104

03/07/2022, 11:18 PM
Can someone point me to where I can work out the app service plans in Azure for a config? I can't find plans like Y1 which people have in documents and posts, when looking at Azure pricing. I want a consumption plan for a simple basic app. This is one of my issues with pulumi that it's hard to find some of this stuff in the documents, that is suggested values to configure something
w

witty-candle-66007

03/07/2022, 11:27 PM
Are you asking about the skus for app service plans? Ala, https://www.pulumi.com/registry/packages/azure-native/api-docs/web/appserviceplan/
a

abundant-book-94104

03/08/2022, 4:48 AM
Yes, I've got one working on a B1 sku. Had a few issues as I was goin to use an F1, but something about not being compatible with my Linux settings. It appears to be working now
👍 1
View count: 3