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

    nutritious-church-27230

    06/09/2021, 4:56 PM
    Hi guys, I am trying to create a Linode instance with authorizedKeys (string[]). When I converted it into array, pulumi said it requires it to be ssh_rsa type. When I leave it as raw ssh_rsa type, pulumi said it requires a list type. What should I actually do?
    b
    • 2
    • 19
  • o

    orange-musician-98025

    06/09/2021, 8:58 PM
    Hi All, does anyone have a good example of creating a MySQL aurora cluster with an instance within. Tried some doc examples, but didn't have much success.
    b
    b
    • 3
    • 7
  • n

    nutritious-church-27230

    06/10/2021, 4:23 PM
    Hi guys, it seems that pulumi is unable to read file outside the parent folder. Both public key is on chmod 777
    let pubKey: string = fs.readFileSync(path.join(__dirname,'/../pulumi/id_rsa.pub')).toString()
    works though, able to read file within its pulumi directory.
    let pubKey: string = fs.readFileSync(path.join(__dirname,'/../secret/id_rsa.pub')).toString()
    doesn't work. Unable to find file outside pulumi directory.
    s
    • 2
    • 7
  • a

    adorable-noon-15528

    06/16/2021, 10:22 AM
    Hiya everyone. Is there some way to remove a project (not just a stack)?
    w
    • 2
    • 1
  • h

    happy-angle-19851

    06/16/2021, 10:26 AM
    Hello all how to use multi stack in same project any examples or links would be helpful Thank you 😊
    w
    • 2
    • 1
  • g

    great-sunset-355

    06/17/2021, 10:20 AM
    Hi I'm just reading about Pulumi and I'm trying to find out how does it work if the team has multiple developers (closed source). according to free option in Pricing scheme I get 1 user with hosted backed But there is also an option for self hosted backed (eg S3) - I should be able to have multiple users with this solution despite the lack of features (encryption, history, etc...), Correct? Thank you ref: https://www.pulumi.com/docs/intro/concepts/state/
    b
    • 2
    • 2
  • f

    flaky-school-82490

    06/17/2021, 4:54 PM
    Hi #getting-started, I have been looking on guidance and best practices on how to organize stack code to best manage and version control (Azure and dotnet stack, multitenant SaaS app). Most samples I looked at in your C# collection of samples group all code in a single Stack.cs. I was hoping I could find something more component-based, with configuration separated from stack code, so we can easily set up our delivery processes around it. How would you separate configuration from implementation, and allow a build pipeline to automatically compose stacks based on environment variables and such?
    q
    • 2
    • 3
  • g

    great-sunset-355

    06/18/2021, 8:59 AM
    Hi I have 2 problems I just installed
    pulumi
    and 1. I cannot get autocomplete in
    ZSH
    working, I use
    oh-my-zsh
    and followed the docs but no luck.
    - fixed filename must start with
    _
    ->
    _pulumi
    2. I tried to use python quickstart and found out that I do not get autocomplete in PyCharm, have I done anything wrong or is there anything I'm missing because the only docstring it was showing was a link to
    lazy_import
    which is probably a source of problems
    ✅ 1
    n
    • 2
    • 3
  • c

    careful-van-85195

    06/18/2021, 4:34 PM
    I’m easing my outfit to use Pulumi by starting by using Pulumi to verify whether resources were created as intended. Are there sample scripts for that already? I know about https://www.pulumi.com/docs/guides/testing/integration/ and scripts in https://github.com/pulumi/pulumi/blob/master/sdk/python/lib/test/automation/test_local_workspace.py but I’m looking for examples for all AWS resources
  • f

    fresh-waitress-69295

    06/19/2021, 10:54 AM
    Hi, is there a c# component resource example somewhere?
    g
    • 2
    • 1
  • l

    little-kangaroo-11618

    06/21/2021, 8:18 PM
    Hi! We created an API to manage some ressource (get/create/update/delete) and want to build a Pulumi provider associated with it. That’s the first time we do that, in which direction should we look? A native Pulumi provider package, a component package, something else? Ideally we'd like to use Typescript
    b
    • 2
    • 2
  • d

    dazzling-knife-70091

    06/22/2021, 7:12 AM
    Hi, I am playing to use Pulumi for an Azure installation. The solution consist of gateway and storage account, and I would have to download artifacts from artifactory and run scripts to populate the storage
  • d

    dazzling-knife-70091

    06/22/2021, 7:18 AM
    In that regard, based on what what I know about azure cli creating the gateway is long running (read: never-ending) process and any subsequent dependent tasks would be hard to implement. How is Pulumi handling it?
    s
    • 2
    • 2
  • n

    narrow-battery-21100

    06/23/2021, 7:54 AM
    resource_group = pulumi_azure_native.resources.ResourceGroup(
        'xyzzy',
        resource_group_name='xyzzy'
    )
    export('debug1', resource_group.resource_group_name)
    I'm baffled, must be some really silly mistake but I just don't see it ??? The above code does NOT produce the "debug1" output. I would expect it to produce Output "debug1" with value "xyzzy" because: The docs state "ResourceGroup resource accepts the following input properties: ..., resource_group_name, ..." and "All input properties are implicitly available as output properties." https://www.pulumi.com/docs/reference/pkg/azure-native/resources/resourcegroup/
  • a

    agreeable-tomato-43927

    06/23/2021, 7:55 AM
    Hi there! 👋 I'd like to deploy a full-stack app with Pulumi and I need to do the following: 1. Deploy backend (dynamoDB + API Gateway) 2. Build the frontend locally using the API URL from step 1 3. Deploy frontend (S3+Cloudfront) Is there a way to do all of this in the same "pulumi component"? My goal is to have atomic deploys, so, if the build fails (step 2) the backend is not deployed. I come from Serverless Components framework and it was pretty easy to do, but I couldn't find an example of this in Pulumi. Sorry for the noob question, but I'll be super grateful if anyone can point me in the right direction (examples, docs...). Thanks!
    g
    • 2
    • 9
  • i

    important-sandwich-62391

    06/23/2021, 10:56 PM
    If i wanted to “ctx.Export()” a structure in Golang, should I just json.Marshal() a structure and export it as a String() ? or is there a better way to turn a generic go object into something exportable? (eg implment Input interface)
    s
    • 2
    • 1
  • i

    icy-football-94152

    06/24/2021, 11:53 AM
    Is it possible to get up and running as a C# Pulumi user-developer on Windows 10 without installing Chocolaty? I ask because I am currently looking at the convoluted Chocolaty installation page that I have not encountered in 10+ years of .Net development.
    b
    g
    • 3
    • 8
  • i

    icy-football-94152

    06/25/2021, 9:16 AM
    Pulumi Day-2. I am experiencing an Azure 403 authorization exception when running my C# Pulumi automation api program direct from the command line or as a debug run within Visual Studio, the 403 is thrown at the first resource access after stack.UpAsync(). The exception details indicate Pulumi is using the service principal config values I set up in code via stack.SetConfigAsync(). I suspect I have not copied the correct values from the Azure Dashboard because there are some differences in terminology between the Azure dashboard and the following 4 configure values I am providing in code: "azure-native:clientId", "azure-native:clientSecret", "azure-native:tenantId" and "azure-native:subscriptionId". Within the Dashboard the following values are available: Display name Application (client) ID Object ID Directory (tenant) ID Secret-ID Secret value Subscription ID
    b
    • 2
    • 6
  • a

    alert-cartoon-12389

    06/25/2021, 10:05 PM
    Please let me know if pulumi provides any implementation of adding arn:aws:states:::lambda:invoke.waitForTaskToken in state machine AWS. Thanks
  • b

    bright-sandwich-93783

    06/26/2021, 4:06 AM
    Hi all! Day 1 Pulumi user here. Very nooby Go/AWS question / potential documentation error: Pulumi VPC Resource is documented to have an
    Id
    output property. However, when making a vanilla
    vpc, err := ec2.NewVpc(ctx, "staging-vpc", &ec2.VpcArgs{})
    call, and trying to access the
    Id
    output property of
    vpc
    , I am getting a
    vpc.Id undefined (type *ec2.Vpc has no field or method Id)
    . How can I access the Id property of the newly created VPC object, and how should I interpret the documentation going forward?
    • 1
    • 1
  • s

    straight-intern-54129

    06/26/2021, 4:14 AM
    Hellooo! I have been learning Pulumi today. My current dilemma is that I manually deleted an Azure resource group and I want to restart my stack in Pulumi. I tried "pulumi destroy", but that complains that it is unable to delete a resource (because I already did it). But really I just want Pulumi to stop trying to be so clever with the tracking and just wipe the slate clean. Is there something like "pulumi destory --force" to show it that I mean business?
    b
    • 2
    • 2
  • g

    great-sunset-355

    06/26/2021, 10:09 AM
    Hi is there a way to configure a provider? specificall cloudflare? https://www.pulumi.com/docs/reference/pkg/cloudflare/provider/ I'd like to put API token as a secret in pulumi and let it configure itself
    b
    • 2
    • 2
  • s

    straight-magician-37467

    06/26/2021, 9:53 PM
    I’m trying to muddle my way through one of the examples and when I get to step 5 of the second part (Deploy Cloud Run), there’s an error in index.ts
    Property 'status' does not exist on type 'Service'. Did you mean 'statuses'?
    https://github.com/pulumi/examples/blob/master/gcp-ts-docker-gcr-cloudrun/cloud-run-deploy/index.ts#L61 I tried substituting
    rubyService.status.url
    with
    rubyService.statuses[0].url
    but Google was unhappy with the resulting URL. Any idea how I might fix this?
    • 1
    • 1
  • q

    quiet-architect-74241

    06/28/2021, 11:28 AM
    Trying to create a WebApp with a system assigned identity in C#:
    UserAssignedIdentity identity = new UserAssignedIdentity($"{name}ManagedIdentity",
      new UserAssignedIdentityArgs
      {
        ResourceGroupName = resourceGroup.Name,
        ResourceName = $"{name}ManagedIdentity",
      });
    
    new WebApp(name, new WebAppArgs
    {
      Kind = "app,linux",
      ResourceGroupName = resourceGroup.Name,
      ServerFarmId = appServicePlan.Id,
      Reserved = true,
      Identity = new Pulumi.AzureNative.Web.Inputs.ManagedServiceIdentityArgs
      {
        Type = Pulumi.AzureNative.Web.ManagedServiceIdentityType.UserAssigned,
        UserAssignedIdentities =
        {
          {  identity.Id , "resource" }
        }
      },
      ...
    My problem is in this part:
    UserAssignedIdentities =
        {
          {  identity.Id , "resource" }
        }
    [Documentation](https://www.pulumi.com/docs/reference/pkg/azure-native/web/webapp/#managedserviceidentity) of
    userAssignedIdentities
    states: The list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} So the key needs to be the Id of the identity you want to use. Given that
    UserAssignedIdentities
    is of type
    InputMap<object>
    , which consists of a
    string
    and an
    object
    as a key-value pair. Now, I can't use
    identity.Id
    since that is an
    Input<string>
    rather than a string. And a string is expected as the first type of the collection initializer of the
    InputMap<object>
    . I must be missing something. How do I pass the Id of a newly created User Assigned Identity to the WebApp?
    b
    • 2
    • 2
  • f

    flaky-school-82490

    06/28/2021, 2:28 PM
    Trying to write a Unit Test for a storage account. Mocks very much inspired by this tutorial. I am stuck on mocking the account's keys so that Pulumi.AzureNative.Storage.ListStorageAccountKeys returns mocked values. I tried wild-guessing the account api so I could set fake values, to no avail. This is what I naively tried adding to NewResourceAsync:
    // Properties normally created azure-side
    if (args.Type == "azure-native:storage:StorageAccount") 
    {
        // primary keys
        outputs.Add("listStorageAccountKeys:0:keyName", "key1");
        outputs.Add("listStorageAccountKeys:0:permissions", "FULL");
        outputs.Add("listStorageAccountKeys:0:value", "SomeMockValue12345==");
    }
    @billowy-army-68599 Any thoughts on the correct output element formatting here?
    b
    t
    • 3
    • 18
  • i

    icy-football-94152

    06/29/2021, 8:41 AM
    Pulumi and Azure resource-group convention. As a best practice do folks create resource groups to exclusively host resources created by Pulumi? And if the answer is "yes", is that resource-group created via Pulumi calls or should it be pre-created manually via the Azure portal?
    b
    • 2
    • 1
  • b

    bright-truck-37455

    06/29/2021, 11:00 AM
    Hey! Working on GCP - how to I read the gcp:project value from my stack config inside index.ts? I've tried
    project
    and
    gcp:project
    - both fail
    b
    • 2
    • 2
  • i

    incalculable-helicopter-18567

    06/29/2021, 4:19 PM
    I am totally new to Pulumi but like the idea. I have used Ansible a lot on-prem. But I am not sure how Pulumi can be used in an air-gapped on-prem env. Maybe I am missing something obvious here. Are any docs on this?
    a
    • 2
    • 3
  • i

    incalculable-action-69391

    06/30/2021, 2:41 AM
    Hi I am having a serious problem, I am unable to upload a lambda function to aws, and there are ZERO examples of how to do this in the docs
  • i

    incalculable-action-69391

    06/30/2021, 2:41 AM
    aws:lambda:Function (Inspector-Function-jrnpq): error: 1 error occurred: * error creating Lambda Function (1): ValidationException: status code: 400, request id: eda38ac7-511e-46ee-943e-72007533e2fa aws:lambda:Function (Inspector-Function-pzgfy): error: 1 error occurred: * error creating Lambda Function (1): ValidationException: status code: 400, request id: 520409bc-1573-42cf-8fb6-251855dee470 Resources:
Powered by Linen
Title
i

incalculable-action-69391

06/30/2021, 2:41 AM
aws:lambda:Function (Inspector-Function-jrnpq): error: 1 error occurred: * error creating Lambda Function (1): ValidationException: status code: 400, request id: eda38ac7-511e-46ee-943e-72007533e2fa aws:lambda:Function (Inspector-Function-pzgfy): error: 1 error occurred: * error creating Lambda Function (1): ValidationException: status code: 400, request id: 520409bc-1573-42cf-8fb6-251855dee470 Resources:
View count: 3