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

    broad-translator-40115

    06/09/2022, 6:37 AM
    Hi, everyone 👋 We're using Pulumi to set up a new project (and we absolutely love it). Though, we hit an issue that's giving us a bit of gray hair (something that was easily achieved using the Serverless framework). We have a lambda that is very read-extensive, thus, "caching" some data in-memory between invocations is what we're trying to achieve. Simplified example:
    let cachedValue = '';
    
    exports.handler = async () => {
      if (cachedValue) {
        return cachedValue;
      }
    
      const newValue = await getSomeNewValue();
      cachedValue = newValue;
      return newValue;
    }
    But this doesn't seem to work with Pulumi 😬 We have a callback defined like:
    let cachedValue = '';
    
    export const handler: aws.lambda.Callback<Event, unknown> = async (event, context, callback) => {
      // ...
    }
    And we're using it as an AppSync resolver:
    const cbFunction = new aws.lambda.CallbackFunction('cb', {
      runtime: 'nodejs14.x',
      callback: handler,
    }
    
    const dataSource = new aws.appsync.DataSource('some-data-source', {
      ...
      lambdaConfig: {
        functionArn: cbFunction.arn,
      },
    });
    But we cannot make this mechanism work. The
    cachedValue
    is refreshed on each invocation. I know Pulumi does function serialization, which is a concept I'm still trying to wrap my head around. Any quick tips on how to access the execution environment in a lambda like this? (Also, yes, I'm aware it's not a reliable way to do caching, lambdas are supposed to be stateless, data is not safe, etc etc). We do have a use case for this, though. Any help would be appreciated 😁
    • 1
    • 1
  • c

    crooked-cat-6983

    06/09/2022, 12:29 PM
    Hey guys, I'm using pulumi to create AWS resources, in this scenario I'm trying to create a role and policy and keep getting this error:
    aws:iam:Policy (cloud-discovery):
        error: unable to validate AWS AccessKeyID and/or SecretAccessKey - see <https://pulumi.io/install/aws.html> for details on configuration
    
    Exited with code exit status 255
    I am able to use these credentials to create resources manually so I don't really understand what's the issue with creating them with pulumi. I'm also not able to find any info on this error online. my code:
    const podRolePolicy = new aws.iam.Policy(appName, {
    	name: appName,
    	policy: {
    		Version: '2012-10-17',
    		Statement: [
    			{
    				Effect: 'Allow',
    				Action: 'sts:AssumeRole',
    				Resource: '*', 
    			},
    			{
    				Effect: 'Allow',
    				Resource: '*',
    				Action: 'secretsmanager:GetSecretValue',
    				Condition: {
    					StringEquals: {
    						'aws:ResourceTag/APPLICATION': 'APP',
    					},
    				},
    			},
    		],
    	},
    })
    If some can supply some info on this error it would be very much appriciated.
    l
    • 2
    • 1
  • q

    quick-wolf-8403

    06/09/2022, 12:47 PM
    I've got my stack into a state I can't seem to recover from by deleting a service manually. Pulumi wants to remove an IamPolicy for the missing service. Refresh completes but does not resolve the problem. Destroy or Up error out trying to delete the IamPolicy for the missing service--that fails, saying the service doesn't exist.
    l
    • 2
    • 7
  • j

    jolly-church-88521

    06/09/2022, 2:25 PM
    When my project has multiple VPC’s, shall I use stack per VPC or it’s better to create all VPC’s in one stack?
    b
    • 2
    • 2
  • n

    narrow-translator-93508

    06/09/2022, 4:40 PM
    Hello guys, I have an issue with the
    Pulumi K8S operator
    , especially this error message
    No permalink found
    , I'm using a GCS backend FYI
  • n

    narrow-translator-93508

    06/09/2022, 4:40 PM
    {
        "level": "error",
        "ts": "2022-06-09T16:33:51.377Z",
        "logger": "controller_stack",
        "msg": "No permalink found.",
        "Request.Namespace": "default",
        "Request.Name": "hello-stack-6c5ede73",
        "Namespace": "default",
        "error": "failed to get permalink",
        "errorVerbose": "failed to get permalink\<http://ngithub.com/pulumi/pulumi/sdk/v3/go/auto.init\n\t/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.30.0/go/auto/stack.go:694\nruntime.doInit\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/proc.go:6498\nruntime.doInit\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/proc.go:6475\nruntime.doInit\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/proc.go:6475\nruntime.doInit\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/proc.go:6475\nruntime.doInit\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/proc.go:6475\nruntime.main\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/proc.go:238\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/asm_amd64.s:1581|ngithub.com/pulumi/pulumi/sdk/v3/go/auto.init\n\t/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.30.0/go/auto/stack.go:694\nruntime.doInit\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/proc.go:6498\nruntime.doInit\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/proc.go:6475\nruntime.doInit\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/proc.go:6475\nruntime.doInit\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/proc.go:6475\nruntime.doInit\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/proc.go:6475\nruntime.main\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/proc.go:238\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.17.8/x64/src/runtime/asm_amd64.s:1581>",
        "stacktrace": "<http://github.com/pulumi/pulumi-kubernetes-operator/pkg/controller/stack.(*ReconcileStack).Reconcile\n\t/home/runner/work/pulumi-kubernetes-operator/pulumi-kubernetes-operator/pkg/controller/stack/stack_controller.go:319\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:214|github.com/pulumi/pulumi-kubernetes-operator/pkg/controller/stack.(*ReconcileStack).Reconcile\n\t/home/runner/work/pulumi-kubernetes-operator/pulumi-kubernetes-operator/pkg/controller/stack/stack_controller.go:319\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:214>"
    }
    s
    • 2
    • 6
  • f

    flaky-area-92692

    06/09/2022, 5:49 PM
    Anybody knows who to talk to to bump the priority of an issue? 🙂 https://github.com/pulumi/pulumi-google-native/issues/203 this one is really impeding us and no news since the 12th of Jan….
    b
    • 2
    • 2
  • s

    swift-battery-95026

    06/09/2022, 6:12 PM
    Hi! Trying to write a dynamic provider in Typescript in a Rush monorepo (using PNPM as the package manager), hitting
    Cannot find module '.pnpm/...'
    errors. Seems like this isn't documented but is a known issue (found here in Pulumi Slack and here in PNPM Discord). Anyone have any experience here / workarounds? Or can I just not use anything involving function serialization in my monorepo?
  • b

    billowy-oxygen-65892

    06/09/2022, 10:28 PM
    Hello, i am trying to create a new project using pulumi but for some reason it is not picking up my aws credentials. When deploying an existing project it reads creds fine. Any ideas?
    l
    m
    +2
    • 5
    • 20
  • b

    billowy-oxygen-65892

    06/09/2022, 10:28 PM
    error: unable to validate AWS AccessKeyID and/or SecretAccessKey
  • b

    blue-tailor-71836

    06/10/2022, 3:50 AM
    Hi, we are extracting the provider information using the stackReference, but when i disabled the default provider, StackReference also required the provider information to pass on. What is the reason to pass the provider itself in stackReference and what would be the way to pass the provider information into StackReference itself?
    // create provider
    const gkeStack = new pulumi.StackReference(`{stack-name}/${pulumi.getStack()}`);
    const provider = new k8s.Provider("k8s", { kubeconfig: gkeStack.getOutput("kubeconfig"), namespace: "{namespace}" });
    Default provider for 'pulumi:pulumi:StackReference' disabled. 'pulumi:pulumi:StackReference' must use an explicit provider
    l
    • 2
    • 13
  • b

    brief-carpenter-29515

    06/10/2022, 7:23 AM
    👋 Hi everyone! I try to make a database in gcp, but I always have a timeout and then I always have a stale state. I can't understand what I'm supposed to do, Am I missing something?
    error: post-step event returned an error: failed to save snapshot: renewing lease: [403] The provided update token has expired.
    all the troubleshooting tells me to do is delete the resource and presumably try again.... But the database call takes too long and the token expires?
    b
    • 2
    • 15
  • b

    bulky-agent-73210

    06/10/2022, 7:27 AM
    Hi, I’m using the inline Golang SDK. When running stack.Up(…), is there a way to detect if there were any changes in the resources after command is finished?
    e
    • 2
    • 1
  • d

    dry-salesmen-32588

    06/10/2022, 10:54 AM
    Hi, using pulumi (and .net) and resource resolves has been quite a pain for us, - currently we are now seeing issues in code that hasn't been changed in ~ 1½ years, but all of a sudden some resources are not resolved properly, even within output.all output.tuple. we've even attempted to provoke it by slowing down the code with random sleeps, console outputs etc. and does indeed seem to work. so theres some sort of "race-condition" regarding resource resolving thats not working correctly. would love some feedback on the issue.
    e
    • 2
    • 41
  • l

    little-apartment-30401

    06/10/2022, 11:01 AM
    “i wonder where the name pulumi came from” is not a question i should have asked dall-e, sorry.
    g
    • 2
    • 1
  • n

    narrow-translator-93508

    06/10/2022, 5:33 PM
    Hi, is there an example out there of combined usage of
    Github Actions
    [CI] +
    Pulumi Operator
    [CD]? How do I tell the
    pulumi k8s operator
    which revision to pull from
    docker registry
    ?
    l
    q
    • 3
    • 4
  • b

    billions-hospital-77217

    06/10/2022, 7:15 PM
    Did the aws-csharp code generation change? The documentation doesn't say anything about this, but I'm getting a totally different project now. I'm no longer getting any MyStack.cs file, and the Program.cs file is:
    using Pulumi;
    using Pulumi.Aws.S3;
    using System.Collections.Generic;
    
    await Deployment.RunAsync(() =>
    {
       // Create an AWS resource (S3 Bucket)
       var bucket = new Bucket("my-bucket");
       
       // Export the name of the bucket
       return new Dictionary<string, object?>
       {
          ["bucketName"] = bucket.Id
       };
    });
    Where before it was:
    using System.Threading.Tasks;
    using Pulumi;
    
    class Program
    {
        static Task<int> Main() => Deployment.RunAsync<MyStack>();
    }
    c
    b
    • 3
    • 4
  • p

    proud-cricket-86351

    06/10/2022, 7:25 PM
    Is there a reason why pulumi didn’t promote itself at Platform Con? since Pulumi can be used for an internal developer platform through the automation API?
    b
    • 2
    • 2
  • b

    blue-leather-96987

    06/10/2022, 8:27 PM
    Just curious, I noticed that the "native" plugins for AWS and GCP are missing an "Import" section. Does that mean we can't import existing resources into the native libraries and we should be using the classic instead?
    e
    • 2
    • 1
  • b

    breezy-laptop-42679

    06/11/2022, 2:40 PM
    Can anyone please share a sample reusing github workflow file for pulumi preview?
    c
    • 2
    • 5
  • a

    agreeable-notebook-99278

    06/12/2022, 1:00 AM
    Hi all — Is it possible to simplify this or do I have to always list all properties on
    staticSite
    to get to them? I.e. first I tried
    .all([staticSite]).apply([{id, name, defaultHostname}])
    -> error
    example_ts.ts
    p
    a
    b
    • 4
    • 7
  • a

    able-dentist-35553

    06/13/2022, 4:04 AM
    where is the best place to ask about support?
    b
    d
    • 3
    • 2
  • f

    famous-leather-72830

    06/13/2022, 10:01 AM
    Hey everyone. Is it currently possible to properly rehydrate resources via
    StackReference
    ? I am following the micro-service methodology, and keeping my eks cluster (created with
    @pulumi/eks
    in a separate project from the apps that will run on it. My goal is to make each project create their own AWS Managed Node Group, however it requires to provide a direct
    eks.Cluster
    object, and upon viewing the logic of creation,
    aws.eks.Cluster.get
    doesn't provide sufficient properties. Any help would be appreciated, as it's a massive blocker for me.
    d
    r
    • 3
    • 7
  • g

    gentle-camera-53119

    06/13/2022, 1:43 PM
    Hi Team, I am trying to create Azure Service principles in C# but I am getting this error
    error CS0234: The type or namespace name 'AzureAD' does not exist in the namespace 'Pulumi' (are you missing an assembly reference?) [/Users/XXXXX/XXX/pulumi/cazure/cazure.csproj
    m
    • 2
    • 4
  • m

    millions-account-72180

    06/13/2022, 1:54 PM
    Hi all. I have put together an initial version of a component resource for installing Twingate connectors into GCP. It seems to be working for basic usage. It is here: https://github.com/activatedio/pulumi-google-twingate What are some recommended practices for handling namespaces and project names? This is a component provided by my company, so the NPM organization is “activatedio”, as is the GitHub, Given it is a pulumi component for installing Twingate on GCP, the npm module can be “@activatedio/pulumi-gcp-twingate”. Go is straightforward with the git path. What are the recommendations for .Net and Python?
    b
    b
    • 3
    • 15
  • w

    wonderful-painting-69130

    06/13/2022, 2:51 PM
    Hi, I have been looking into using pulumi for a serverless app using AppSync and DynamoDB. To get started, I have decided to use the following template to get started, so authentication etc is handled for me: https://github.com/SimonHoiberg/saas-template Going through the project, it looks like a lot of work to set up just a single table with CRUD operations for a given entity. It it possible for anyone to provide a simple CRUD example for a given test entity in the context of the github repo linked? I have a hard time finding examples online, which I can use to figure it out myself. E.g. for a table to store an entity with a create operation, to me it looks like the steps are: • Create model in back-end/src/types • Create file and export "create" function in back-end/src/dynamodb/ • Create type and mutation in back-end/resources/schema/schema.graphql • Add table, set dynamoDBTables and export table id in back-end/resources/pulumi/dynamodb.ts • Create folder for each CRUD operation containing source-file and callback-file in back-end/resources/pulumi/resolvers/ So for a single operation, a folder with these two files: (back-end/resources/pulumi/resolvers/create-test-entity/create-test-entity.ts) and (back-end/resources/pulumi/resolvers/create-test-entity/source.ts) • Call setup<entity>Source file in back-end/resources/pulumi/appSync.ts Creating just the CRUD operations for a single entity is a lot of folders, files and code, and I still haven't even figured out how to pass parameters from the source.ts file to its corresponding callback handler (E.g. the object to be put in the database). Can it be as complex as I make it out to be?
  • a

    able-train-72108

    06/13/2022, 3:27 PM
    Hello, I remember at PulumiUP event, someone (I think it was @quiet-wolf-18467) shared with me a tool that convert CRD to pulumi class, but I cannot find it again (or there is no such thing and I have terrible memory)
  • q

    quiet-wolf-18467

    06/13/2022, 3:28 PM
    https://github.com/pulumi/crd2pulumi
    ❤️ 1
    a
    l
    • 3
    • 2
  • h

    high-kilobyte-58002

    06/13/2022, 4:10 PM
    Hello, How can i open an enterprise support ticket?
    b
    • 2
    • 4
  • e

    eager-lawyer-9843

    06/13/2022, 4:43 PM
    I am not sure if slack or github issues is better but I have been dealing with issue for several days now, trying everything I can find in github issues, stack overflow and my own debugging in an attempt to find a solution but I am stuck I have an issue with
    pulumi up
    not being able to find the AWS credentials
    Error: invocation of aws:ec2/getVpc:getVpc returned an error: unable to validate AWS AccessKeyID and/or SecretAccessKey - see https://pulumi.io/install/aws.html for details on configuration
    I have a profile setup in my aws credentials file and I can view the config when using the CLI but cannot get it to work with the pulumi. I had it working before but for some reason it has stopped working and I cannot find any changes that would have caused it, at least through git. FYI, I am using a monorepo for all my services and using symlinks to pull in the
    package.json
    and
    node_modules
    (though even removing that has not helped). My
    Pulumi.stack.yaml
    in each service directory has the
    aws:profile
    and
    aws:region
    set
    b
    b
    • 3
    • 10
Powered by Linen
Title
e

eager-lawyer-9843

06/13/2022, 4:43 PM
I am not sure if slack or github issues is better but I have been dealing with issue for several days now, trying everything I can find in github issues, stack overflow and my own debugging in an attempt to find a solution but I am stuck I have an issue with
pulumi up
not being able to find the AWS credentials
Error: invocation of aws:ec2/getVpc:getVpc returned an error: unable to validate AWS AccessKeyID and/or SecretAccessKey - see https://pulumi.io/install/aws.html for details on configuration
I have a profile setup in my aws credentials file and I can view the config when using the CLI but cannot get it to work with the pulumi. I had it working before but for some reason it has stopped working and I cannot find any changes that would have caused it, at least through git. FYI, I am using a monorepo for all my services and using symlinks to pull in the
package.json
and
node_modules
(though even removing that has not helped). My
Pulumi.stack.yaml
in each service directory has the
aws:profile
and
aws:region
set
b

billowy-army-68599

06/13/2022, 4:45 PM
can you run
pulumi about
?
e

eager-lawyer-9843

06/13/2022, 4:45 PM
CLI          
Version      3.34.1
Go Version   go1.18.3
Go Compiler  gc

Plugins
NAME    VERSION
nodejs  unknown

Host     
OS       darwin
Version  12.4
Arch     x86_64

This project is written in nodejs: executable='/usr/local/bin/node' version='v16.14.0'

Backend        
Name           <http://pulumi.com|pulumi.com>
URL            <https://app.pulumi.com/rfab>
User           rfab
Organizations  rfab, rivet

Pulumi locates its logs in /var/folders/gt/8l3t_j7n1bg4wx8d_rfyg6v00000gn/T/ by default
warning: Failed to get information about the Pulumi program's plugins: Could not find either /Users/ryanfabela/development/work/dpb/main/infrastructure/yarn.lock or /Users/ryanfabela/development/work/dpb/main/infrastructure/package-lock.json
warning: Failed to get information about the current stack: No current stack
I added the symlink for the yarn.lock file:
CLI
Version      3.34.1
Go Version   go1.18.3
Go Compiler  gc

Plugins
NAME    VERSION
aws     5.7.2
docker  3.2.0
nodejs  unknown

Host
OS       darwin
Version  12.4
Arch     x86_64

This project is written in nodejs: executable='/usr/local/bin/node' version='v16.14.0'

Backend
Name           <http://pulumi.com|pulumi.com>
URL            <https://app.pulumi.com/rfab>
User           rfab
Organizations  rfab, rivet

Dependencies:
NAME            VERSION
@pulumi/pulumi  3.34.0
@pulumi/aws     5.7.2
@pulumi/awsx    0.40.0
@types/node     14.18.21

Pulumi locates its logs in /var/folders/gt/8l3t_j7n1bg4wx8d_rfyg6v00000gn/T/ by default
warning: Failed to get information about the current stack: No current stack
This happens even when I have removed the symlinks and installed everything directly in the services directory
b

billowy-army-68599

06/13/2022, 5:19 PM
@eager-lawyer-9843 can you update pulumi-aws to
5.8.0
b

broad-dog-22463

06/13/2022, 5:19 PM
Hi @eager-lawyer-9843 - so you can do 1 of 2 things here: 1. Upgrade to 5.8.0 where we removed all credentials validation as it was before 2. set
aws:skipCredentialsValidation true
and it should work for you
e

eager-lawyer-9843

06/13/2022, 5:23 PM
you are a gentleman and a scholar. Thank you. That fixed it
b

broad-dog-22463

06/13/2022, 5:24 PM
Sorry about the issue @eager-lawyer-9843 - I have a PR WIP to fix these up atm https://github.com/pulumi/pulumi-aws/pull/2004
e

eager-lawyer-9843

06/13/2022, 5:25 PM
no problem, I appreciate the quick response. Thank you for the link
b

broad-dog-22463

06/13/2022, 5:26 PM
Let us know if any other issues!
🙌 1
View count: 3