https://pulumi.com logo
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
  • r

    ripe-park-70944

    01/21/2022, 12:26 PM
    hiya, does anyone know a way to view the full requests and responses to/from the azure api from the pulumi cli? I'm getting a 401 from the Azure auth while attempting an
    import
    , I've tried adding all of
    --debug --verbose 9  --logtostderr --logflow
    to the
    import
    command, but there's no trace of the exact request made or logging of the client id / client secret, just loads of noise. I've triple checked and the configured auth parameters work using the same
    client_credentials
    grant flow in a postman query to the azure auth and then management api so I'm looking to double check that the commands Pulumi is sending to azure are what I'd expect and check them for issues (maybe bad escaping on the password or something like that)
  • b

    bored-barista-23480

    01/21/2022, 1:10 PM
    Hi folks, I'm trying to create custom resources in a Pulumi script written in Python using dynamic resource providers. But I can't figure out how to add outputs that aren't also inputs. The Pulumi documentation is not really helpful and I can't find a Python example of a dynamic resource with additional outputs. I found a good explanation on how to write dynamic providers on YouTube but it's in TypeScript. Does someone know how to do this?
    e
    • 2
    • 10
  • h

    high-leather-15669

    01/21/2022, 2:44 PM
    Hello, I am trying to create a Disk Encryption Set in Azure, and get the following error:
    cannot check existence of resource '/subscriptions/xxx/resourceGroups/%2Fsubscriptions%xx%2FresourceGroups%2Fxxx/providers/Microsoft.Compute/diskEncryptionSets/des-xxx': status code 400, {"error":{"code":"InvalidApiVersionParameter","message":"The api-version '2020-12-01' is invalid. The supported versions are '2021-04-01,2021-01-01,2020-10-01,2020-09-01,2020-08-01,2020-07-01,2020-06-01,2020-05-01,2020-01-01,2019-11-01,2019-10-01,2019-09-01,2019-08-01,2019-07-01,2019-06-01,2019-05-10,2019-05-01,2019-03-01,2018-11-01,2018-09-01,2018-08-01,2018-07-01,2018-06-01,2018-05-01,2018-02-01,2018-01-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'."}}
    Any idea why? (also posted on the #azure channel, but haven't had a response)
    s
    • 2
    • 3
  • s

    sticky-airline-40485

    01/21/2022, 3:15 PM
    hi folks, this might be a dumb/already answered questions, but is there a way to modify existing resources? For example, I have an AWS S3 bucket, I do a resource lookup with
    Bucket bucket = Bucket.Get("bucket", "my-bucket")
    ; but then how do I modify
    bucket
    , for example, to enable Versioning?
    bucket.Versioning = ...
    gives an error because
    Versioning
    is read-only. Stuck on this for several hours now 😞
    p
    m
    • 3
    • 22
  • s

    sticky-exabyte-94099

    01/21/2022, 4:45 PM
    I have appsettings.json files in my .net project that my project is reading from. But then I´m settings some AppSettings in code. Should I just skip the appSettings.json files completely and just have it all in Pulumi code?
    var App = new AzureNative.Web.WebApp("myapp", new AzureNative.Web.WebAppArgs
    {
        ResourceGroupName = ResourceGroup.Apply(t => t.Name),
        Location = ResourceGroup.Apply(t => t.Location),
        ServerFarmId = AppServicePlan.Id,
        SiteConfig = new AzureNative.Web.Inputs.SiteConfigArgs
        {
            AppSettings = {
                new AzureNative.Web.Inputs.NameValuePairArgs{
                    Name = "WEBSITE_RUN_FROM_PACKAGE",
                    Value = BlazorCodeBlobEndpoint,
                },
                new AzureNative.Web.Inputs.NameValuePairArgs{
                    Name = "ASPNETCORE_ENVIRONMENT",
                    Value = Deployment.Instance.StackName.ToLower(),
                },
                //Abp.io
                    new AzureNative.Web.Inputs.NameValuePairArgs{
                    Name = "App:SelfUrl", //<-- So do this
                    Value = MyEndpoint,
                }
            },
        },
        Tags =
        {
            { "environment", StackName },
        },
    });
    and not in appSettings.json
    {
      "App": {
        "SelfUrl": "<https://me.com>",
       ... etc
    }
    And should I then get rid of every settings in appSettings.json?
    b
    • 2
    • 3
  • a

    able-hair-32695

    01/21/2022, 11:21 PM
    With Generics coming to GoLang in 1.18, will this make it possible for Pulumi.String and Pulumi.Bool to go away?
    👀 2
    e
    • 2
    • 1
  • s

    sticky-exabyte-94099

    01/22/2022, 12:25 PM
    Can you somehow config a resource after its created? I need to add the URL of a WebApp to its Appsettings.. so basically create it, get its own URL and add it to its config? Like I detail in this question. This is how I´m trying to use it.. #azureNative #webApp
    e
    • 2
    • 1
  • b

    billions-lawyer-5518

    01/22/2022, 5:42 PM
    Hi folks, I am trying to connect to docker which is running on GCP - VM using docker provider. But its getting failed to due to connection establishment. Is there anyway we can pass remote connection args to it or is there anyway I can establish the connection ?
    const remoteInstance = new docker.Provider(
      "remote",
      {
        host: interpolate`<ssh://user>@${externalIP}:22`,
      },
      { dependsOn: dockerInstallation }
    );
  • t

    thousands-student-41479

    01/22/2022, 6:26 PM
    Looking for suggestions for a Greenfield project. The application is going to be Serverless and Event driven leveraging Azure cloud. Has anyone used Pulumi for automating build and deployment for Azure Functions? Any challenges towards maintenance, scalability? Also, how easy it would be to move code from Azure Functions to other provider such as AWS Lambda while using Pulumi? Appreciate, if someone has used it in production and share his experience. TIA
  • m

    magnificent-lifeguard-15082

    01/23/2022, 10:29 AM
    Hello! 👋 Is there a way to prevent pulumi from formatting the stack yml files when it runs? (seems to do it even on an
    up
    ) It conflicts with my prettier config and I'd rather not just ignore pulumi*.yml files and have consistency across all of our yaml.
    e
    • 2
    • 2
  • p

    proud-pizza-80589

    01/23/2022, 12:33 PM
    Got a bit of a pickle, we are all in on pulumi and the automation api, but now i have to do an install (k8s resources), on premise, with no internet. And i want to keep it as simple as possible and not revert to helm charts. So i would need local state and no or a simple local secret manager. Is that even possible?
    e
    • 2
    • 4
  • m

    magnificent-lifeguard-15082

    01/23/2022, 9:28 PM
    Trying to create a dynamic resource and getting the following. any way I can get more info?
    error: Error: Remote object was not 'function': {"type":"object","className":"Function","description":"Function","objectId":"{\"injectedScriptId\":2,\"id\":287}"}
    • 1
    • 1
  • w

    witty-honey-13693

    01/24/2022, 4:10 AM
    Hi All Iam trying to create / fetch (string format) the Azure Function Host keys through Pulumi. Tried different methods but nothing worked. Finally i was able to fetch the host keys through Powershell command. But is there a way to execute this powershell command in my pulumi stack. Refer to the the image below.
    p
    • 2
    • 3
  • w

    witty-honey-13693

    01/24/2022, 4:13 AM
  • r

    rough-intern-34947

    01/24/2022, 12:39 PM
    Hi everyone, new users here, excited to start working w/ Pulumi 🙂
    👋 2
  • s

    steep-beach-52652

    01/24/2022, 5:21 PM
    Hello, is there a way to configur AWS ECS fargate autoscaling using pulumi?
    o
    • 2
    • 3
  • b

    bored-table-20691

    01/24/2022, 5:52 PM
    I see an issue trying to install the Command module:
    $ pulumi plugin install resource command v3.0.0
    [resource plugin command-3.0.0] installing
    error: [resource plugin command-3.0.0] downloading from : 403 HTTP error fetching plugin from <https://get.pulumi.com/releases/plugins/pulumi-resource-command-v3.0.0-darwin-amd64.tar.gz>
    s
    • 2
    • 15
  • w

    worried-author-3242

    01/24/2022, 6:01 PM
    hello, people! I am using Pulumi auto to apply my golang pulumi code in a aws ec2 and I noticed every time pulumi auto gets run a new services resource-aws-v4.25.0 and pulumi-language-go gets up but even when pulumi finishes its execution theses services are still active. Does anyone know the reason for this behavior? pulumi/plugins/resource-aws-v4.25.0/pulumi-resource-aws 127.0.0.1:39809 pulumi-language-go  127.0.0.1:39810
  • b

    bored-table-20691

    01/24/2022, 6:27 PM
    I’m seeing some behavior I don’t understand with
    local.Command
    . Here is my entire Pulumi program:
    package main
    
    import (
    	"<http://github.com/pulumi/pulumi-command/sdk/go/command/local|github.com/pulumi/pulumi-command/sdk/go/command/local>"
    	"<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi|github.com/pulumi/pulumi/sdk/v3/go/pulumi>"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    
    		_, err := local.NewCommand(ctx, "test", &local.CommandArgs{
    			Create: pulumi.String("./create.sh hello"),
    			Delete: pulumi.String("./destroy.sh goodbye"),
    			Environment: pulumi.StringMap{
    				"foo":  pulumi.String("bar"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    
    		return nil
    	})
    }
    Here is `create.sh`:
    #!/bin/bash
    
    echo "hello: $1" >> /tmp/pulumi_log.txt
    and `destroy.sh`:
    #!/bin/bash
    
    echo "goodbye: $1" >> /tmp/pulumi_log.txt
    When I run
    pulumi up
    the first time, I get the
    hello: …
    in the log file. If I run
    pulumi destroy
    , I get the
    goodbye: ...
    in the log file. However, if I were to change the
    environment
    , nothing happens, the script does not seem to execute at all (nothing gets added to the log file. Is this expected? Am I doing something wrong?
    s
    • 2
    • 12
  • f

    fancy-egg-38667

    01/24/2022, 8:08 PM
    pulumi state delete
    only deletes the resource from the pulumi stack, right? It doesn't delete the resource on AWS
    e
    • 2
    • 2
  • m

    miniature-quill-86620

    01/24/2022, 10:17 PM
    Hello. I am new to Pulumi. I have a question. Do I need to restart Azure Function Apps manually after the redeployment of the stack via Pulumi?
    g
    • 2
    • 5
  • b

    bored-table-20691

    01/24/2022, 11:18 PM
    In continuation of my adventures with
    local.Command
    (in
    pulumi-command
    ), I’m seeing some odd behavior in regards to
    stderr
    when the command itself fails. Specifically, if my command script fails (exits with a non-zero code), I get this reported on my status:
    Diagnostics:
      command:local:Command (my-script):
        error: exit status 1
    
      pulumi:pulumi:Stack (mystack-dev):
        error: update failed
    But
    stderr
    is never set. Specifically, I’ve tried the following:
    ctx.Export("stdout", cmd.Stdout)
    	ctx.Export("stderr", cmd.Stderr)
    
    	pulumi.All(cmd.Stdout, cmd.Stderr).ApplyT(func(args []interface{}) string {
    		stdout := args[0].(string)
    		stderr := args[1].(string)
    
    		fmt.Println("stdout", stdout)
    		fmt.Println("stderr", stderr)
    
    		return ""
    	})
    But none of this prints out. I also tried just stdout and stderr individually, and no dice. If, however, the command exits successfully (with a zero error code), then stdout/stderr complete successfully. My main use case is one of debugging - I want to know why my script fails and that information exists in
    stderr
    , but I cannot access it in the case I need it, which is when it fails 🙂 Am I doing something wrong?
    g
    • 2
    • 3
  • t

    thankful-table-80113

    01/25/2022, 1:27 AM
    👋
    👋 2
  • b

    brave-room-27374

    01/25/2022, 3:40 AM
    Hi, I am using 
    apple M1
     and getting 
    403 HTTP error fetching plugin
     while doing 
    pulumi up
    , basically, I can't install kubernetes plugin
    😀 ➜  pulumi plugin install resource kubernetes v1.0.6
    [resource plugin kubernetes-1.0.6] installing
    error: [resource plugin kubernetes-1.0.6] downloading from : 403 HTTP error fetching plugin from <https://get.pulumi.com/releases/plugins/pulumi-resource-kubernetes-v1.0.6-darwin-arm64.tar.gz>
    I followed the document on 
    troubleshooting
     but that does not work as well https://www.pulumi.com/docs/troubleshooting/#i-dont-have-access-to-an-intel-based-computer  any further guide to make it work on apple M1 chip?
    g
    • 2
    • 1
  • r

    rapid-raincoat-36492

    01/25/2022, 4:29 AM
    What's the best way in Pulumi to manage internal TLS certificates for something like Vault? https://www.pulumi.com/registry/packages/command/ looks promising, but I'm not sure if there's a more standard way
    b
    l
    • 3
    • 5
  • b

    bored-barista-23480

    01/25/2022, 12:42 PM
    Hi folks! I have some trouble using transformations on a K8s config file. It's essentially the same as in this [Example](https://www.pulumi.com/docs/guides/adopting/from_kubernetes/) (under Configuration Transformations). I check for the kind of the resource and if it is a certain type I change a value. But I get the error:
    TypeError: 'ResourceTransformationArgs' object is not subscriptable
    . I could not find any mention of this error specific to this class. I also could't find any helpful examples of how to use transformations other than the mentioned one. Anyone have a clue why it does not work and how to fix it?
    p
    • 2
    • 10
  • w

    worried-lifeguard-96134

    01/25/2022, 3:07 PM
    HI, we want to try to use pulumi, I've read some compression for pulumi vs teraform , we need to write iaas code for gcp azure and aws, what as the benefit of using pulumi against the native iaas sdk's?
    m
    s
    • 3
    • 12
  • s

    salmon-printer-16080

    01/26/2022, 5:13 AM
    Hey guys, has anyone here successfully passed an Azure
    UserAssignedIdentity
    into a
    WebApp
    before in TS? I am having a lot of trouble. The example I have here, shows I can add a UAI to a webapp when I hardcode the id as the property, with a value of
    {}
    as stated by the documentation here: https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapp/#managedserviceidentity _(I found that even the docs mentions that the second property should be
    user_assigned_identities
    but that doesnt work even with hardcoding, so ive fallen back to the ARM template output from a pre-created resource which seems to work)_ The entire string looks like this:
    let identity: any = {
                type: "UserAssigned",
                userAssignedIdentities: {
                    "/subscriptions/<sub-id>/resourcegroups/<rg>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<uai-name>" : {}
                }
            }
    However, I cannot get the actual UAI id into the identity object due to the property of
    userAssignedIdentities
    not accepting an
    Output<string>
    as a property type. Using
    [UAI]: {}
    to try cast the identity does not work either as it tries to cast it to a string. How does everyone else do it?
    e
    b
    • 3
    • 5
  • l

    limited-island-40412

    01/26/2022, 11:03 AM
    Hi, I’m currently searching for a possibility to create enrollmentgroups for a azure device provisioning service (dps). It’s possible to create the dps and dps certificates, but I can’t find the enrollment configuration in the pulumi API docs. (REST API: https://docs.microsoft.com/en-us/rest/api/iot-dps/service/enrollment-group/create-or-update) Has anyone an idea how to achieve this?
    g
    a
    • 3
    • 2
  • b

    billions-lawyer-5518

    01/26/2022, 11:03 AM
    Hi folks, I am trying to connect to docker which is running on GCP - VM using docker provider. But its getting failed to due to connection establishment. Is there anyway we can pass remote connection args to it or is there anyway I can establish the connection ?
    const remoteInstance = new docker.Provider(
      "remote",
      {
        host: interpolate`<ssh://user>@${externalIP}:22`,
      },
      { dependsOn: dockerInstallation }
    );
    g
    • 2
    • 7
Powered by Linen
Title
b

billions-lawyer-5518

01/26/2022, 11:03 AM
Hi folks, I am trying to connect to docker which is running on GCP - VM using docker provider. But its getting failed to due to connection establishment. Is there anyway we can pass remote connection args to it or is there anyway I can establish the connection ?
const remoteInstance = new docker.Provider(
  "remote",
  {
    host: interpolate`<ssh://user>@${externalIP}:22`,
  },
  { dependsOn: dockerInstallation }
);
g

great-queen-39697

01/27/2022, 3:13 PM
Sorry for the delay! Are you defining any environment variables or any Pulumi configuration variables? What's the error you're getting?
b

billions-lawyer-5518

01/27/2022, 3:29 PM
Hi @great-queen-39697, Thanks for getting back.
config:
  docker:host: npipe:////.//pipe//docker_engine
This is the config I have in the
Pulumi.dev.yaml
file. When I try to run the above code It was asking for a key verification in a pop up window. Or Is their any example available to connect to remote docker instance ?.
g

great-queen-39697

01/27/2022, 3:34 PM
Try this: https://github.com/pulumi/examples/blob/master/gcp-ts-docker-gcr-cloudrun/cloud-run-deploy/index.ts#L16-L21
It's a connection string to the registry, but hopefully you can use that as a starting point to extrapolate from while I'm hunting for a better example
👍 1
Are you trying to connect as part of your program to run commands?
b

billions-lawyer-5518

01/27/2022, 3:38 PM
Yes, I want to run containers.
const selenoidImage = new docker.RemoteImage(
  "selenoid-image",
  {
    name: "aerokube/selenoid:1.10.7",
  },
  {
    provider: remoteInstance,
  }
);

const selenoidContainer = new docker.Container(
  "selenoid-container",
  {
    image: selenoidImage.name,
    ports: [{ internal: 4444, external: 4444 }],
    name: "selenoid",
  },
  {
    provider: remoteInstance,
  }
);
View count: 2