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

    bitter-river-54082

    02/22/2021, 12:24 PM
    Hey, I have a stack contains an aws vpc, instance and a provisioner I created using this example, which runs a script on the instance after it was created. The script requires all vpc's resources (subnets, gateways, etc.) to be created before executing. My deployment keeps failing because the script is starting execution before all NAT gateways were created (I do not define the vpc's NAT gateways myself, they are being created automatically by pulumi as part of vpc creation) The provisioner's dependencies :
    dependsOn: [
            ec2.servicesInstance,
    The instance's dependencies :
    dependsOn: [
            vpc.vpc,
    Why the script is not awaiting execution until all vpc resources are up? How can I fix it?
    b
    f
    • 3
    • 12
  • i

    important-pizza-29356

    02/22/2021, 2:44 PM
    Is it possible to create a new project dynamically with this API from inside a python code ( not with
    pulumi up
    )? https://www.pulumi.com/docs/reference/pkg/gcp/organizations/project/
    b
    r
    • 3
    • 4
  • m

    millions-furniture-75402

    02/22/2021, 2:55 PM
    Can I declare Pulumi tags in a declarative way, e.g.
    Pulumi.yaml
    vs interactive
    pulumi stack tag
    commands?
    b
    • 2
    • 3
  • b

    big-apartment-95438

    02/22/2021, 3:05 PM
    anyone know why when creating k8s namespace a suffix is added? on an EKS cluster:
    // Create a Kubernetes Namespace
    const argoNamespace = new k8s.core.v1.Namespace("argo", {}, {provider: clusterProvider});
    Actual name: argo-fmzcuekx
    b
    • 2
    • 3
  • a

    able-dinner-12335

    02/22/2021, 3:50 PM
    Hey there, is anybody familiar with using Pulumi to setup Azure Function Apps? I am trying to configure the function within our function app using the next gen Azure provider but it doesn't seem to agree with the syntax. Anybody spot the issue? Cheers!
    var functionResource = new Pulumi.AzureNextGen.Web.V20200601.WebAppFunction("functionResource", new Pulumi.AzureNextGen.Web.V20200601.WebAppFunctionArgs
                    {
                        Config = {
                         "bindings"{
                                { "cardinality", "many" },
                                { "connection", "RootManageSharedAccessKey" },
                                { "consumerGroup", "$Default" },
                                { "dataType", "" },
                                { "direction", "in" },
                                { "eventHubName", datadogEventHub.Name },
                                { "name", "eventHubMessages" },
                                { "type", "eventHubTrigger" }
                          },
                        Files =
                                    {
                            {
                                "index.js", "<https://github.com/DataDog/datadog-serverless-functions/blob/master/azure/activity_logs_monitoring/index.js>"
                                    },
                        },
                        FunctionName = $"{datadogFunctionApp.Name}/EventHubTrigger-DataDog",
                        Name = $"{datadogFunctionApp.Name}/EventHubTrigger-DataDog",
                        ResourceGroupName = RGName
                    });
    b
    • 2
    • 9
  • d

    damp-tiger-87899

    02/22/2021, 4:20 PM
    Hi, we have an internal system that provides a REST API (create, read, update, delete) to manage users & roles. We would like to write Pulumi custom resources for this internal system, e.g: we would like to implement a resource called User and a resource called Role. What is the simplest way to do this? Is there any tutorial for this? We use TypeScript.
    🙌 1
    w
    m
    • 3
    • 3
  • a

    able-dinner-12335

    02/22/2021, 8:18 PM
    Hi, has anybody experienced issues with overwriting a block blob file that already exists in an Azure Storage account? I'm trying to use the below statement, it works on the first upload of the zip package. It will fail on Subsequent runs
    var blob = new Blob($"zip-{reg}", new BlobArgs
                    {
                        StorageAccountName = storageAccount.Name,
                        StorageContainerName = container.Name,
                        Type = "Block",
                        Source = new FileArchive("./functionapp"),
                        Name = "function_sourcecode"
                    });
    The first run creates the block blob as expected. Fails on subsequent runs with: error: Running program 'C:\Repos\Pulumi\deployment\bin\Debug\netcoreapp3.1\deployment.dll' failed with an unhandled exception: System.InvalidOperationException: Expected Pulumi.AssetOrArchive but got System.String deserializing Pulumi.Azure.Storage.Blob.source at Pulumi.Serialization.Converter.ConvertObject(String context, Object val, Type targetType) at Pulumi.Serialization.Converter.ConvertValue(String context, Value value, Type targetType, ImmutableHashSet`1 resources) at Pulumi.Deployment.CompleteResourceAsync(Resource resource, Boolean remote, Func`2 newDependency, ResourceArgs args, ResourceOptions options, ImmutableDictionary`2 completionSources) at Pulumi.Deployment.Runner.<>c__DisplayClass9_0.<<WhileRunningAsync>g__HandleCompletion|0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Pulumi.Deployment.Runner.WhileRunningAsync()
    🙌 1
    b
    • 2
    • 7
  • m

    mammoth-honey-6147

    02/22/2021, 8:45 PM
    Has anyone got any examples of converting outputs to strings?
    l
    w
    • 3
    • 25
  • s

    sparse-dog-88757

    02/22/2021, 8:46 PM
    Hello, is there a way to create an API that is tied to an organization, but not any particular user? (like for automating deployments)
    b
    • 2
    • 3
  • s

    stocky-student-96739

    02/22/2021, 9:16 PM
    When Pulumi runs a Kubernetes Job, it exits based on the completion state of the Job. Is it also possible to stream the stdout of the Job somehow?
    b
    • 2
    • 2
  • l

    lemon-machine-35564

    02/23/2021, 12:24 AM
    Greetings! We have a Pulumi project inside another Pulumi project. So project1/project2. With separate index.ts files, Pulumi.yml’s etc. Is there any problem with that? Does
    pulumi up
    go looking for ts files when you run it?
    b
    • 2
    • 3
  • b

    big-apartment-95438

    02/23/2021, 8:10 AM
    When spinning up an EKS cluster, do you provide a constant image id (AMI)? If yes - how do you manage you image, how to you keep it updated to prevent vulnerability exposure? if not - how do you make sure you don't have unexpected breaking changes when you apply changes?
    b
    • 2
    • 1
  • c

    colossal-potato-56488

    02/23/2021, 1:36 PM
    Hey, everyone. I’m trying to find examples how can I create a
    redis
    and a
    postgres
    service on a custom kubernetes cluster (I’ve only found it for AWS or Azure). Is there any? Thanks!
    d
    • 2
    • 5
  • c

    chilly-hospital-92934

    02/23/2021, 1:42 PM
    Hello, How to implement handling credentials providers in our own resource providers? In official resource providers it is done by pass:
    acc1 = alicloud.Provider("acc1", region="cn-beijing")
    __opts__=pulumi.ResourceOptions(provider=acc1) to object of resource.
    How to do similar solution to our own resource providers?
    👀 1
    b
    a
    • 3
    • 3
  • b

    big-apartment-95438

    02/23/2021, 3:47 PM
    When using Helm chart and OCI registries with the experimental OCI support: https://helm.sh/docs/topics/registries/ Does anyone know if pulumi supports that in https://www.pulumi.com/docs/reference/pkg/kubernetes/helm/v3/chart/#version_nodejs?
    b
    • 2
    • 4
  • r

    refined-journalist-70469

    02/23/2021, 4:22 PM
    What is the best abstraction to use when making decisions based on the current stack within a project? For example, if in a dev stack don't create a kubernetes cluster, but if in production create cluster.
    b
    • 2
    • 5
  • l

    lemon-machine-35564

    02/23/2021, 5:27 PM
    Question about StackReferences - getting this error:
    error: resource 'urn:pulumi:development-jeffrichie::service::pulumi:pulumi:StackReference::vpc/development' registered twice (read and read)
    What is the recommended pattern when working in a relatively large project where you need to reference things like VPC CIDR’s, etc all over the place?
    b
    • 2
    • 11
  • p

    proud-pizza-80589

    02/23/2021, 5:45 PM
    I tried to add a user to our org, and they got the invite, could accept it and join the org, but then they got a 404. The org is not in their account (tried logging in and out again). The invite is listed as accepted on the org settings page. I Also revoken and reinvited, exact same thing happened.
    b
    b
    • 3
    • 4
  • b

    better-secretary-59658

    02/23/2021, 6:49 PM
    I am attempting to create a compute environment for aws batch. Each time I get an error with 'object already exists'. In addition, Would anyone know why this would occur? I tried deleting the stack and was successful. This appears to be happening during the first generation of the stack.
    b
    • 2
    • 7
  • w

    wide-parrot-89490

    02/23/2021, 8:29 PM
    Hi all. I'm trying to figure out a way to split a Pulumi stack into smaller parts that I could
    preview
    and
    up
    individually if needed (it's a large stack, sometimes we know exactly what changes we want and expect). I thought I could do that using ComponentResources in combination with
    pulumi up|preview --target [--target-dependents]
    , but so far no luck: when I
    pulumi preview --target arn:of:my:ComponentResource
    pulumi only looks at the
    ComponentResource
    and ignores its children. Am I trying to use the wrong tool here? Is there a way to do a partial `preview`/`up` in a stack by selecting a group or component, without having to point to every particular resource?
  • c

    colossal-australia-65039

    02/23/2021, 9:02 PM
    is there a way to make the automation API output preview/up diffs to the console in color?
  • b

    bumpy-easter-72049

    02/23/2021, 9:27 PM
    is it possible to create a resource, then update that resource later in the same stack? (for context, azure diagnostic settings need to be created, then GET’d to know what specific logs you can enable, then updated again with the types of logs from the GET result)
    l
    g
    • 3
    • 2
  • f

    full-artist-27215

    02/23/2021, 9:51 PM
    Hello 👋 Just started kicking the tires on Pulumi, and so far it's really great. I've got it successfully talking with Localstack by creating a custom provider, but I've got to then explicitly pass that provider in for all the resources I create. The end goal is to be able to have as high-fidelity a local dev/testing environment as we can, using the same Pulumi code we use to deploy to production. Ideally, I'd like to somehow set that provider as "the default" early on in the processing of things (i.e., pick the Localstack provider or the real AWS provider) so I don't have lots of
    opts = pulumi.ResourceOptions(provider=my_provider)
    calls scattered about. Are there any recommended approaches to dealing with this? (We're using the Python SDK) Thanks in advance! 🙇
    l
    b
    • 3
    • 13
  • t

    tall-needle-56640

    02/23/2021, 10:20 PM
    Getting error: "panic: fatal: An assertion has failed: cannot complete a resource 'urn😛ulumi:dev:😛r-mgmt:😛ulumi:pulumi:Stack::pr-mgmt-dev' whose registration isn't pending" This code
    var packageCreated = functionApp.Name.Apply(async n =>
    {
        return await ZipDeployAsync(publishDirectory, n, resourceGroupName);
    });
    var outputs = packageCreated.Apply(p =>
    {
        return (IDictionary<string, object?>)new Dictionary<string, object?>
        {
            { "packageCreated", p },
        };
    });
    RegisterOutputs(outputs);
    results in this error:
    panic: fatal: An assertion has failed: cannot complete a resource 'urn:pulumi:dev::pr-mgmt::pulumi:pulumi:Stack::pr-mgmt-dev' whose registration isn't pending
    
    goroutine 156 [running]:
    <http://github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.failfast(...)|github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.failfast(...)>
            D:/a/pulumi/pulumi/src/github.com/pulumi/pulumi/sdk/go/common/util/contract/failfast.go:23
    <http://github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.Assertf(0xc001b2c000|github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.Assertf(0xc001b2c000>, 0x1f5c58e, 0x40, 0xc0017b7928, 0x1, 0x1)
            D:/a/pulumi/pulumi/src/github.com/pulumi/pulumi/sdk/go/common/util/contract/assert.go:33 +0x1ad
    <http://github.com/pulumi/pulumi/pkg/v2/resource/deploy.(*stepExecutor).ExecuteRegisterResourceOutputs(0xc0009efb00|github.com/pulumi/pulumi/pkg/v2/resource/deploy.(*stepExecutor).ExecuteRegisterResourceOutputs(0xc0009efb00>, 0x2b4e8705338, 0xc001bf4e20)
    What am I doing wrong? Is it a bug for a user to see an "assertion failed" message? Workaround
    [Output] public Output<bool> PackageCreated { get; set; }
    s
    • 2
    • 2
  • h

    hundreds-stone-38001

    02/23/2021, 10:27 PM
    I'm trying to use the import functionality to generate the C# for a lambda in AWS.
    $ pulumi import aws:lambda/function:Function my-imported-lambda MyLambdaOnAWS
    Previewing import (dev)
    
    View Live: <https://app.pulumi.com/.../import-test/dev/previews/>...
    
         Type                    Name                Plan       Info
     +   pulumi:pulumi:Stack     import-test-dev     create     1 error
     =   └─ aws:lambda:Function  my-imported-lambda  import     1 error
     
    Diagnostics:
      aws:lambda:Function (my-imported-lambda):
        error: Preview failed: diffing urn:pulumi:dev::import-test::aws:lambda/function:Function::my-imported-lambda: handler and runtime must be set when PackageType is Zip
     
      pulumi:pulumi:Stack (import-test-dev):
        error: preview failed
    Any suggestion on how to deal with the error "handler and runtime must be set when PackageType is Zip"
  • c

    clever-cartoon-41433

    02/23/2021, 10:40 PM
    Pulumi currently hanging on Gitlab CI/CD 😕
  • c

    clever-cartoon-41433

    02/23/2021, 10:41 PM
    Trying to run it via a docker container and it's not working ;_;
  • c

    clever-cartoon-41433

    02/23/2021, 11:23 PM
    Does it have something to do with needing helm? I've tried installing helm in the dockerfile like a hundred different ways. it should really error instead of just hang if that's the case
    b
    • 2
    • 58
  • c

    clever-cartoon-41433

    02/23/2021, 11:24 PM
    Literally spent all day trying to solve this issue
  • e

    elegant-oil-67420

    02/24/2021, 2:32 AM
    Hi, any idea about how to fix this error
Powered by Linen
Title
e

elegant-oil-67420

02/24/2021, 2:32 AM
Hi, any idea about how to fix this error
View count: 1