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
general
  • f

    full-artist-27215

    11/10/2022, 4:12 PM
    Am I correct in thinking that with the current project-level configuration (i.e., https://www.pulumi.com/blog/project-config-mvp) it is not possible to create a type specification for a configuration object, even though objects can definitely exist in a configuration file? The error message I'm getting (
    value must be one of "string", "integer", "boolean", "array"
    ) suggests that's not allowed.
    b
    • 2
    • 5
  • n

    nutritious-memory-95521

    11/10/2022, 4:13 PM
    Hi! We're writing a native provider in Go. My team mate has a problem, how do you hook a debugger to the provider's executable?
    b
    • 2
    • 7
  • h

    hallowed-printer-89159

    11/10/2022, 4:43 PM
    Hey everyone, I was wondering, if you have a few example for SshPublicKey I need to create a SSH public key to connect with de VM on GCP but I have an error when I am creating the resource
    const sshKey = new SshPublicKey('test', {
        expirationTimeUsec: '250000',
        key: '',
        project: 'example',
        user: '<mailto:----@univision.net|----@univision.net>',
    });
    The types for SshPublicKey is but the Args are not enough clear and I got Error creating SSHPublicKey: googleapi: Error 400: SSH key is expired.
    /**
     * Create a SshPublicKey resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name: string, args: SshPublicKeyArgs, opts?: pulumi.CustomResourceOptions);
    b
    • 2
    • 15
  • r

    ripe-russia-4239

    11/10/2022, 9:28 PM
    Hi, reposting from #dotnet… When writing tests against a Pulumi stack that calls a Get or List Function, what are the names of the Output(s) I need to populate in order for an
    Apply()
    on the result to return a stubbed value? How do I go about finding this out, even? E.g. given a call in my stack like this, what do I need to stub out in my tests to make it work?
    Output<string> connectionString = ListNamespaceKeys.Invoke(new ListNamespaceKeysInvokeArgs
    {
        AuthorizationRuleName = authorisationRule.Name,
        NamespaceName = _eventHubNamespace.Name,
        ResourceGroupName = ResourceGroupName
    }, _invokeOptions).Apply(o => Output.CreateSecret(o.PrimaryConnectionString));
    • 1
    • 1
  • l

    little-cartoon-10569

    11/10/2022, 11:44 PM
    Is it possible to merge stack-level configuration values into project-level configuration objects? Consider Pulumi.yaml:
    config:
      obj1:
        value:
          prop1: val1
          prop2: val2
    And Pulumi.stack.yaml
    config:
      obj1:
        prop2: val20
        prop3: val3
    I'm seeing all the stack level values in my stack, but prop1 is gone. I'm guessing it's just using the stack object, completely overwriting the default project-level object.
    e
    • 2
    • 1
  • b

    brainy-beach-36627

    11/11/2022, 7:55 AM
    Hi everyone ! We are trying to apply gitops principles to Pulumi (with the pulumi kubernetes operator), and so far I am struggling with our code structure. At first we tried the following structure for our stacks :
    ├── myApp
    │   ├── index.ts
    │   ├── Pulumi.yaml
    │   ├── Pulumi.staging.yaml
    │   └── Pulumi.prod.yaml
    └── ...
    And we configured pulumi-kubernetes-operator to watch the myApp folder and deploy changes. So, we needed to create one branch per environment because we had only one folder for all environments. This is commonly known as an anti pattern when applied to gitops. Then we decided to try this other solution :
    ├── myApp
    |   ├── staging
    |       ├── Pulumi.yaml
    │       └── Pulumi.staging.yaml
    |   ├── prod
    |       ├── Pulumi.yaml
    │       └── Pulumi.prod.yaml
    |   ├── pulumi-module
    │       └── index.ts
    └── ...
    We have one folder per environment and we avoid code duplication by adding a dependency to the pulumi-module folder. But this structure is way more complicate to manage in local for our developments. Any thoughts about this 2 solutions ? Does someone manage to do it differently ?
    l
    • 2
    • 1
  • g

    gorgeous-country-43026

    11/11/2022, 8:24 AM
    Well, this was confusing for a while @billowy-army-68599
    r
    b
    • 3
    • 3
  • f

    full-soccer-21780

    11/11/2022, 11:31 AM
    Hi everyone! We are trying to understand well how to structure pulumi project where I will have: • EKS cluster and VPC with private / public subnet • Load balancer in public subnet • Cloud application DNS pointing to public Load balancer • CI/CD written in helm charts yaml • if possible, have pulumi state backend I wonder if there is such example project how to put this piece together, because I think the structure will be quite different than how we organise terraform modules? • I need to support 3 different envs for my application cluster: staging, dev, prod. Any production grade pulumi example for full-fledge cluster will be very appreciated. Doesn't have to be in AWS.
    b
    • 2
    • 4
  • e

    early-plastic-49211

    11/11/2022, 1:37 PM
    Sometimes, I need to "resolve" Inputs / Outputs with Apply to do some checks that do not actually require me to return another value based on those Inputs / Outputs (like
    x.Apply(x => $"https://{x}")
    ). Right now, to do this, I do something like the following, but it feels wrong. Is there a better way to do that?
    Input<string> variableToResolve; // Just to show you the type, let's assume there's a value
    
    _ = variableToResolve.Apply(x =>
    {
      methodRequiringValueAsString(x);
      return true; // This feels hacky
    });
    Also, let's say I wanted to verify what the value of
    x
    is, would it be valid to throw an exception inside the Apply block?
    e
    • 2
    • 4
  • d

    damp-honey-93158

    11/11/2022, 3:56 PM
    Hi, question about Custom vs Component Resources. I'm creating wrapper classes that aggregate cloud resources, should I be using ComponentResource or CustomResource as my super class? The documentation seems to push me towards the ComponentResource - how does a weary programmer decide on such things? 🙂 Thank you!
    e
    • 2
    • 3
  • l

    lively-needle-84406

    11/11/2022, 7:43 PM
    I am currently using Pulumi to write my companies disaster recovery automation. I have everything set up in AWS using Pulumi (VPC, EKS, IAM, Kubernetes cluster configured). I now want to use Typescript to make several HTTP requests (to GitHub) to download some files locally during the
    pulumi up
    and apply these files as helm charts via the k8s.helm.v3.Chart resource. How can I make the Pulumi runtime honor my requests to GitHub, and then apply/track ~20 helm charts? Others have mentioned Dynamic Providers & Component Resources, but I have not yet got these to work successfully. Any ideas? P.S. almost to the point of writing a separate script that gets ran in my CI/CD that does this (but I would lose any tracking capabilities of Pulumi for these charts)
    b
    • 2
    • 2
  • a

    alert-midnight-11504

    11/11/2022, 8:15 PM
    Is anyone around for support / help. I’m at my wits end trying to do basic things like provisioning our GCP workload identity pool / providers. Keep getting errors like
    Error creating WorkloadIdentityPoolProvider: googleapi: Error 409: Requested entity already exists
    . But if use Pulumi to
    .get
    a resource to check if it exists the CLI also throws an error.
  • t

    thankful-gpu-3329

    11/12/2022, 3:56 PM
    Hey all–I’m running into strange protobuf-related issues stemming from
    @pulumi/pulumi
    – https://joeysharesthings.com/rTT3tZ
    b
    • 2
    • 6
  • g

    glamorous-answer-86536

    11/13/2022, 7:26 AM
    Hey everyone 🙂 I am running into an issue where I cannot create resources in a newly created account, see here. Any ideas? I figured out that setting skip_credentials_validation to True solves the problem. I am wondering whether this is a bug or to be expected? If not a bug, could someone explain why skipping the credentials validation here is mandatory?
  • c

    careful-apartment-69053

    11/13/2022, 2:49 PM
    Hey folks! I have been trying to get pulumi up and running for POC on Monday for my team. I have tried on my development windows 10 without luck, then deployed a brand new windows 11 vm in azure. I can't get past the grpcio installation phase on either. The logging is just terrible, does anyone have any suggestions so I can try to make this a success.
    e
    p
    • 3
    • 7
  • p

    plain-hair-43030

    11/13/2022, 5:58 PM
    Hey, I'm playing around with the pulumi-github provider and trying to import a repository using
    pulumi import github:repository:Repository p pulumi/pulumi
    . sadly this results in
    error: Preview failed: unrecognized resource type (Read): github:repository:Repository
    An earlier attempt resulted in
    error: import type "github:Repository" is not a valid resource type token. Type tokens must be of the format <package>:<module>:<type> - refer to the import section of the provider resource documentation.
    That led me to look further at https://www.pulumi.com/registry/packages/github/api-docs/repository/, but I don't see info there on how to import, neither is there a module name being shown (in contrast to other some other - larger - providers such as for gcp which do are splitted up into different modules). So what is the correct invocation I need to import some existing github repository into my pulumi code?
    e
    • 2
    • 1
  • d

    dry-receptionist-10179

    11/13/2022, 6:01 PM
    I noticed a new feature EventBridge->scheduler (removing dependency of needing EventRules to schedule). Is this supported by pulumi?
  • m

    most-state-94104

    11/13/2022, 7:08 PM
    Hello 👋 my team uses uses GitHub-Flow for branch management, with a single main branch which is sequentially deployed to the different pulumi stacks once feature branches are merged in. I’m investigating how to best implement feature flags. I couldn’t see any examples online so I created a demo repo using a very simple AWS python project consisting of only buckets. I was hoping for some feedback before I share with my team (and perhaps more widely if people think it would be helpful 🙂 )
    b
    • 2
    • 13
  • f

    fierce-ability-58936

    11/13/2022, 9:43 PM
    Just shaving the yak. Wanted to create an ECS service on ec2. https://pkg.go.dev/github.com/pulumi/pulumi-awsx/sdk@v1.0.0-testplsignore.0/go/awsx/ecs#NewEC2Service easy, right? For some reason NetworkConfiguration is required, even though I passed NetworkMode: "bridge" to the task definition args. Oh well, let's do https://pkg.go.dev/github.com/pulumi/pulumi-awsx/sdk@v1.0.0-testplsignore.0/go/awsx/ecs#NewEC2TaskDefinition so that it takes care of the log group and iam roles and use plain ecs.NewService. No, it still creates a task definition with "awsvpc" network mode. Oh well: https://github.com/pulumi/pulumi-awsx/blob/master/awsx/ecs/ec2TaskDefinition.ts#L127 Ok, let's just transform that resource using pulumi.Transformations, and...it doesn't work https://github.com/pulumi/pulumi/issues/6948 Now is it easier to create my own component or fix awsx, or ask for it to be fixed? 🙂
    e
    • 2
    • 1
  • r

    refined-printer-32244

    11/13/2022, 11:23 PM
    hey! i'm using pulumi for some personal things to get a handle on it and I'm having a heck of a time in Go from converting various
    Output
    values to concrete values. everything I find online seems to call methods that don't exist for me or don't seem to work as the stuff I find online says. currently, I have an output named
    projectName
    on one stack, and I use a stack reference to get that value from from the other stack as a
    pulumi.AnyOutput
    and then use that with
    .AsStringOutput()
    to give me a
    pulumi.StringOutput
    (it's a string, this seems to work fine). however, i'm trying to take that value and pass it into a
    digitalocean.LookupProject
    where the
    Name
    arg expects
    *string
    . I've tried a bunch of iterations, including
    ApplyT
    with a
    func(projName string) *string
    , but I just can't seem to get the value the lookup expects. I'm also having a hard time taking
    pulumi.StringOutput
    to
    string
    at times as well. it sounds like it's supposed to be
    ApplyT
    , but that just returns an output that gets me back into the same
    pulumi.StringOutput
    . anyone have some tips for me?
    l
    b
    • 3
    • 23
  • m

    most-mouse-38002

    11/14/2022, 12:17 PM
    With self hosted backends (e.g Azure blob storage) stack names are globally unique and not grouped under projects? Is that intentional?
    e
    • 2
    • 5
  • d

    dazzling-kilobyte-32990

    11/14/2022, 1:27 PM
    Couldnt find an answer to this in the Pulumi docs - we have a Terraform provider for our Feature Flagging platform, and wanted to understand if there was an easy way to bring this into the Pulumi ecosystem without having a lift a bunch of code?
    e
    b
    • 3
    • 5
  • d

    damp-painting-47843

    11/14/2022, 2:33 PM
    Does pulumi destroy use the index.ts file? I’m creating a certification validation and thinking about whether I have to guard it somehow.
    e
    • 2
    • 10
  • s

    salmon-hairdresser-65532

    11/14/2022, 4:32 PM
    Hey there, Using the
    awsx.ec2.Vpc
    with disabled default providers, I always get the error
    Default provider for 'awsx' disabled. 'awsx:ec2:DefaultVpc' must use an explicit provider.
    although I defined an explicit provider for the resource. An extremely simple example to reproduce the error (default providers are disabled in the config):
    import pulumi
    import pulumi_aws as aws
    import pulumi_awsx as awsx
    
    west = aws.Provider("provider", region="us-east-1")
    
    awsx.ec2.Vpc("vpc", opts=pulumi.ResourceOptions(provider=west))
    Does anyone have the same problem or know a solution? @elegant-window-55250
    e
    b
    g
    • 4
    • 9
  • c

    cool-dress-96114

    11/14/2022, 11:04 PM
    Hi all, question about
    output.ApplyT
    . How do you error handle with it in the Golang SDK? I’d rather not panic if I can help it. Docs don’t say a ton https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi#OutputState.ApplyT
    f
    b
    • 3
    • 7
  • l

    little-soccer-5693

    11/15/2022, 12:18 AM
    within a pulumi program is there a way to differentiate between a "pulumi up" from a "pulumi destroy" ? i see there is a pulumi.Context.DryRun()* to determine whether it is a preview or not, but it isn't clear how to determine what operation is being run. * https://github.com/pulumi/pulumi/blob/master/sdk/go/pulumi/context.go#L220
    l
    b
    +2
    • 5
    • 8
  • h

    hallowed-horse-57635

    11/15/2022, 2:31 AM
    IaC Scan related - Are there any tools/solutions in the market that can scan pulumi generated code for any of the languages especially TS / finding that tools like Synk don't support pulumi? (i am aware that the policy as code from pulumi may be used for similare use cases)
  • f

    fierce-ability-58936

    11/15/2022, 3:13 AM
    What's the use case for https://www.pulumi.com/registry/packages/aws/api-docs/ec2/vpc/#look-up ? This one is not that getvpc (which is the lookupvpc) https://www.pulumi.com/registry/packages/aws/api-docs/ec2/getvpc/
    • 1
    • 1
  • e

    early-analyst-76866

    11/15/2022, 7:51 AM
    Hey team, I am new to Pulumi and I am stuck on one usecase where I want to show the user the actual property value in my stack trace. My current stack output is this:
    Current stack outputs (1):
                                  OUTPUT  VALUE
                                                   vid     vpc-0515230c3d5f949a8
    I am able to reference my stack using
    stack_ref = pulumi.StackReference("PulumiPlay-dev")
    but I am not sure how to print the value of vid now. I have tried using the
    get_output
    method but it is not returning anything.
    e
    s
    • 3
    • 8
  • w

    white-lizard-28216

    11/15/2022, 10:59 AM
    👋 Hi everyone!
Powered by Linen
Title
w

white-lizard-28216

11/15/2022, 10:59 AM
👋 Hi everyone!
View count: 3