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

    strong-air-37156

    03/19/2021, 12:35 PM
    Hi everyone! I'm not sure if this is the right channel but I'm facing the following problem. I developed a stack on my account and at some point transferred it under the organization of my company using the UI. When I clicked "transfer" the UI gave me a 500 internal server error message but the stack got indeed transferred. However now it's completely broken and nothing I do fixes it. All pulumi commands show this error:
    error: could not deserialize deployment: decrypting secret value: [404] Not Found: Stack 'mzcloud/dev' not found
  • s

    strong-air-37156

    03/19/2021, 12:38 PM
    Is there something I can do on my side to fix it? I have tried `stack export`/`stack import` and also running
    pulumi stack change-secrets-provider default
    but the error persists
  • s

    strong-air-37156

    03/19/2021, 12:56 PM
    I found a similar problem in this issue and posted the solution for future reference https://github.com/pulumi/pulumi/issues/3086
  • s

    strong-air-37156

    03/19/2021, 12:56 PM
    This sounds like something that should be done automatically when transferring a stack though?
    c
    • 2
    • 5
  • a

    ancient-night-64850

    03/19/2021, 2:32 PM
    Does anyone know how to get this command to return the subscription ID as a string? (using typescript) azure_native.authorization.getClientConfig()
  • a

    ancient-night-64850

    03/19/2021, 2:33 PM
    I keep getting this error: Calling [toString] on an [Output<T>] is not supported.\n\nTo get the value of an Output<T> as an Output<string>
  • a

    ancient-night-64850

    03/19/2021, 2:34 PM
    const clientConfig = pulumi.output(azure_native.authorization.getClientConfig());  var azureSubscriptionId = clientConfig.subscriptionId
  • b

    bored-oyster-3147

    03/19/2021, 2:34 PM
    you have to either await it or apply it, or pass it forward as an Output<T>. Output<T> is evaluated asynchronously
  • b

    bored-oyster-3147

    03/19/2021, 2:36 PM
    checkout here: https://www.pulumi.com/docs/intro/concepts/inputs-outputs/
  • a

    ancient-night-64850

    03/19/2021, 2:53 PM
    const clientConfig = pulumi.output(azure_native.authorization.getClientConfig()); var azureSubscriptionId = clientConfig.apply(config => config.subscriptionId); produced this: Error: invocation of azure-native:authorization:getClientConfig returned an error: transport is closing at Object.callback (C:\source\repos\pulumi\DevOps.Infrastructure.Stacks\azure\net-core\web\node_modules\@pulumi\pulumi\runtime\invoke.js:139:33) What am I doing wrong?
    b
    • 2
    • 20
  • h

    helpful-van-82564

    03/19/2021, 3:13 PM
    Hi, I have an issue where I'm trying to update masterAuthorizedNetworksConfig in a gke cluster I've previously imported (I'm adding a cidr block) but it falls over with panic: fatal: An assertion has failed: Expected diff to not require deletion or replacement during Update of urn....
  • h

    helpful-van-82564

    03/19/2021, 3:14 PM
    I've tried the workaround from https://github.com/pulumi/pulumi/issues/4019 but it's not made a difference. I did do this change successfully on another cluster that was also imported
  • b

    billowy-laptop-45963

    03/19/2021, 4:02 PM
    Is there a canonical way of doing a simple http request?
    m
    • 2
    • 3
  • m

    millions-judge-24978

    03/19/2021, 7:48 PM
    Hi, can I configure the secrets provider in the project settings (
    Pulumi.yaml
    ) instead of each stack configuration, similar to how I can specify
    backend:
    there? I haven't been able to find this in the docs.
    g
    • 2
    • 1
  • p

    proud-pizza-80589

    03/19/2021, 9:01 PM
    I’m renaming/rebuilding some of my stacks, but i want to
    pulumi config cp
    (which works within a stack) but it does not create any files when i use
    -s
    of a different project, any idea how to get the config copied over? It’s like 50 settings including 20 secrets, very time consuming to reset them
    r
    • 2
    • 3
  • w

    wet-noon-14291

    03/19/2021, 11:20 PM
    How do I set up a parent/child relation with nested component resources? This is sort of the code I have (simplified):
    ResourceB extends pulumi.ComponentResource {
        constructor(name: string, options: pulumi.ComponentResourceOptions) {
            super("....", name, options);
        }
    }
    
    ResourceA extends pulumi.ComponentResource {
        constructor(name: string) {
            super("....", name, {});
            new ResourceB(name, { parent: this });
        }
    }
    With this code I would expect to get the following resource graph:
    (stack) -> A -> B
    instead I get
    (stack) -> A
            \-> B
    What do I do wrong? How do I get the first graph?
    b
    l
    • 3
    • 28
  • p

    polite-shoe-79877

    03/21/2021, 8:34 AM
    How do i create an azure subscription. Iam using this: https://www.pulumi.com/docs/reference/pkg/azure/core/subscription/ when i try
    const subscription = new Subscription("subscription", 
    {
            subscriptionName: "subscription"
    })
    i get the following error: error: azure:core/subscription:Subscription resource 'sub' has a problem: "subscription_id": one of
    billing_scope_id,subscription_id
    must be specified
    when i try to specify with either subscription_id or billing_scope_id it must be specified with an already exisiting subscription id.
  • c

    clever-byte-21551

    03/21/2021, 3:09 PM
    I found a terraform provider that I want to use via pulumi https://github.com/fluxcd/terraform-provider-flux What’s the easiest way to do that? (I’m using golang)
    w
    b
    • 3
    • 6
  • t

    tall-scientist-89115

    03/21/2021, 7:39 PM
    When building a helm chart, the secret is replaced every
    pulumi up
    , resulting in a lot of churn on my stateful set. Is there a way to stop this from happening? I've tried using
    values: { existingKeySecret: secret.id }
    and had similar results.
    Untitled
  • n

    numerous-artist-1705

    03/21/2021, 8:32 PM
    hi all, is partial resource adoption supported in some way? E.G. I have a storage account, part of its configuration includes a network firewall, all is one unique resource in Pulumi (Azure). Is there any way to import an existing storage account and let pulumi create/destroy/update only the network firewall (as properties of the storage resource)? thank you (I'm using .NET, but I figured the question is generic)
    b
    • 2
    • 6
  • f

    fierce-market-40669

    03/21/2021, 10:11 PM
    When using pulumi, do developers still use Ansible to configure the instances? Is there a product like pulumi but for container or VM configuration?
    l
    • 2
    • 5
  • b

    brash-airline-37413

    03/21/2021, 11:22 PM
    Let’s say you have a app.test.yaml, app.dev.yaml and app.prod.yaml stack - is it possible to have a configuration option which affects all 3 but is only declared in one place such as pulumi.yaml?
    w
    • 2
    • 3
  • b

    breezy-butcher-78604

    03/22/2021, 2:14 AM
    are there any plans for a Snowflake provider in Pulumi? I can see there's already a terraform provider however I"ve not used it so not sure how complete or suitable it is
    w
    f
    e
    • 4
    • 5
  • c

    clever-byte-21551

    03/22/2021, 8:05 AM
    I created my own plugin how can I install it? let’s say I have the binary and I just want to use it plugin install --server still requires it to exist somewhere I tried to copy to ~/.pulumi/plugins like other plugins but I can’t find the plugin using 
    pulumi plugin ls
    w
    • 2
    • 4
  • d

    damp-school-17708

    03/22/2021, 11:16 AM
    What is the general 'good practise' or consensus (if any) around environments and environments promotion? Do you use dotenv (or similar) or use the stack as an environment? I am tempted to go for the second option and name everything after the stack.
    l
    • 2
    • 3
  • w

    worried-knife-31967

    03/22/2021, 11:35 AM
    Has anyone mocked the
    Pulumi.Config
    in c# for unit testing? doesn't appear to be going through the mocks at the moment 😕
    l
    • 2
    • 8
  • p

    prehistoric-coat-10166

    03/22/2021, 11:37 AM
    To mock `Pulumi.Config`it must be done via
    PULUMI_CONFIG
    environment variable for example I have the following utility method I use for my unit tests
    public static void WithConfig(Dictionary<string, object> config)
        {
            var values = System.Text.Json.JsonSerializer.Serialize(config, new System.Text.Json.JsonSerializerOptions()
            {
            });
    
            Environment.SetEnvironmentVariable("PULUMI_CONFIG", values);
        }
    Which I can then use in my test like so
    WithConfig(new Dictionary<string, object>()
    {
        { "key:value", "test-value" },
    });
    👍 1
  • b

    bland-army-56447

    03/22/2021, 11:44 AM
    I’m struggling a bit with importing resources and am not sure what’s the issue. I created AWS ECR using this code:
    apiECRRepo, err := ecr.NewRepository(ctx, "fooapp-api-pulumi", nil)
    if err != nil {
    	return err
    }
    ctx.Export("apiRepoUrl", apiECRRepo.RepositoryUrl)
    
    uiECRRepo, err := ecr.NewRepository(ctx, "fooapp-ui-pulumi", nil)
    if err != nil {
    	return err
    }
    ctx.Export("uiRepoUrl", uiECRRepo.RepositoryUrl)
    Now I’m trying out the import feature using this code:
    apiECRRepo, err := ecr.NewRepository(ctx, "fooapp-api-pulumi-b730658", nil, pulumi.Import(pulumi.ID("fooapp-api-pulumi-b730658")))
    if err != nil {
    	return err
    }
    ctx.Export("apiRepoUrl", apiECRRepo.RepositoryUrl)
    
    uiECRRepo, err := ecr.NewRepository(ctx, "fooapp-ui-pulumi-b25077e", nil, pulumi.Import(pulumi.ID("fooapp-ui-pulumi-b25077e")))
    if err != nil {
    	return err
    }
    ctx.Export("uiRepoUrl", uiECRRepo.RepositoryUrl)
    The repos were created with the name
    fooapp-...
    and then Pulumi added some lil hash/id whatever. I’m not sure if this belongs to the name/id now or not. The error I get:
    Diagnostics:
      aws:ecr:Repository (fooapp-api-pulumi-b730658):
        warning: inputs to import do not match the existing resource; importing this resource will fail
    
      aws:ecr:Repository (fooapp-ui-pulumi-b25077e):
        warning: inputs to import do not match the existing resource; importing this resource will fail
    So my question is: What inputs do not match? I can also see by
    [diff: ~name]; 1 warning
    that it seems the name differs. But is there any way to show me the diff? Then I could get an idea on what’s the issue but nope. If I jun the command with
    -j
    to get JSON output I can see the diff but it says
    "detailedDiff": null
    Great 😅
  • b

    better-shampoo-48884

    03/22/2021, 11:48 AM
    I'm wondering about remote backends (and local for that matter) in relation to Projects and Stacks - it doesn't seem like the .pulumi folder differentiates between projects when placing stacks, they all seem to end up in the same folder.. which basically means I cannot have a stack with the same name in two different projects - which kindof sucks when I want to have one project for baseline infra + one project for kubernetes baseline config and standard services.
    d
    • 2
    • 1
  • b

    better-shampoo-48884

    03/22/2021, 11:48 AM
    my concept of stacks is stack name => environment. (incidentally, re: @damp-school-17708)
Powered by Linen
Title
b

better-shampoo-48884

03/22/2021, 11:48 AM
my concept of stacks is stack name => environment. (incidentally, re: @damp-school-17708)
View count: 1