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

    sticky-receptionist-53934

    09/08/2020, 6:04 PM
    I wonder if dependency tracking works as it should, seems like transitivity is not working, for example I have a resource B depending on A, and a resource C depending on B, when I do pulumi up, both resource A and C are created in parallel, is this expected?
    m
    • 2
    • 9
  • a

    astonishing-quill-88807

    09/08/2020, 7:00 PM
    I'm trying to use an
    apply
    function to update a cloud-init data structure, but for some reason it seems that the apply function isn't getting reliably executed before launching an instance. The code is here: https://github.com/mitodl/ol-infrastructure/blob/consul_component/src/ol_infrastructure/infrastructure/operations/consul.py#L191-L218
    • 1
    • 2
  • a

    astonishing-quill-88807

    09/08/2020, 7:01 PM
    Any recommendations on what I'm doing wrong?
  • b

    bitter-application-91815

    09/08/2020, 7:31 PM
    Am I correct in saying awsx is only available in node ?
    g
    • 2
    • 2
  • a

    astonishing-quill-88807

    09/08/2020, 7:37 PM
    Is it possible to combine two outputs into a single call to apply? For example, I have a resource with a public and private key output which I want to add into a dictionary and dump to a YAML output in one step.
    g
    b
    • 3
    • 5
  • l

    limited-ability-67435

    09/08/2020, 7:40 PM
    Hey guys, Pulumi is looking super cool. Is there any nice third-party blogs about it I could read up on to get an. outside perspective?
    m
    s
    • 3
    • 3
  • n

    narrow-jackal-57645

    09/09/2020, 2:50 AM
    Q: I would like to ask if anyone has run into a similar error like this: 1) Create a user and a Role
    import * as aws from "@pulumi/aws";
    
    const getAccountARN = (accountId: string, resource: string = "*") => {
      return `arn:aws:iam::${accountId}:${resource}`
    }
    
    interface UserList {
      [username: string]: aws.iam.User;
    }
    
    const accountID = "437763615564"
    
    let users: UserList = {};
    
    // create 1 user
    const user1 = new aws.iam.User("user1", {
      name: "user1"
    });
    
    users["user1"] = user1;
    
    // create a new role with sts:AssumeRole for those users
    const assumeRolePolicy = aws.iam.getPolicyDocument({
      statements: [{
        effect: "Allow",
        actions: ["sts:AssumeRole"],
        principals: [{
          type: "AWS",
          identifiers: Object.keys(users).map((username) => {
            return getAccountARN(accountID, `user/${username}`)
          })
        }]
      }]
    });
    
    const role = new aws.iam.Role("devs", {
      assumeRolePolicy: assumeRolePolicy.then(policy => policy.json),
      name: "super-uber-devs"
    }, {
      dependsOn: Object.values(users)
    });
    2) apply then add another user:
    const user2 = new aws.iam.User("user2", {
      name: "user2"
    });
    
    users["user2"] = user2;
    apply and got error:
    Updating (testo):
         Type                 Name                      Status                  Info
         pulumi:pulumi:Stack  iam-infrastructure-testo  **failed**              1 error
     +   ├─ aws:iam:User      user2                     created                 
     ~   └─ aws:iam:Role      devs                      **updating failed**     [diff: ~assumeRolePolicy]; 1 error
     
    Diagnostics:
      pulumi:pulumi:Stack (iam-infrastructure-testo):
        error: update failed
     
      aws:iam:Role (devs):
        error: 1 error occurred:
        	* updating urn:pulumi:testo::iam-infrastructure::aws:iam/role:Role::devs: Error Updating IAM Role (super-uber-devs) Assume Role Policy: MalformedPolicyDocument: Invalid principal in policy: "AWS":"arn:aws:iam::437763615564:user/user2"
        	status code: 400, request id: 3359e6d9-7d65-4e87-a000-0b19be9173ca
     
    Resources:
        + 1 created
        2 unchanged
    What's the best way to ensure that role would wait until the new user resource is successfully created before updating its
    assumeRolePolicy
    . I was attempting to use
    dependsOn
    to achieve that but it does not work out as I expected. Any guidance is greatly appreciated
    k
    g
    w
    • 4
    • 32
  • w

    worried-stone-50514

    09/09/2020, 4:08 AM
    Hi Team, We are trying to authenticate to Azure AD using a service principal assigned to an application. For this application we have granted it Microsoft Graph Directory Read Only API Permissions access however this does not seem to be working. But when we grant it read permissions to the legacy Azure Active Directory Graph API, it works. Has anyone had a similar issue to this well and do we know when the Microsoft Graph Directory Read Only API support will be available? Thanks in advance
  • b

    bitter-application-91815

    09/09/2020, 10:32 AM
    is it possible to migrate a community account to a paid one without having to create a new account and transfer stacks over to the newly created paid account from the paid one
    b
    g
    • 3
    • 6
  • l

    limited-rainbow-51650

    09/09/2020, 12:26 PM
    {
                parent: this,
                aliases: [
                    { parent: pulumi.rootStackResource }
                ],
                transformations: [pluginConfigurator]
            }
    Yesterday, I added a transformation callback function to add environment variables to the container spec of a Kubernetes
    StatefulSet
    resource. Today, I wanted to re-parent this
    StatefulSet
    under it’s parent custom resource class. So I added the
    parent
    and
    aliases
    as above. But with this in place, I get the stack trace:
    pulumi:pulumi:Stack: (same)
        [urn=urn:pulumi:development::orthanc::pulumi:pulumi:Stack::orthanc-development]
    error: Running program '/Users/ringods/Projects/osimis/devops-sessions/pulumi/orthanc' failed with an unhandled exception:
    Error: Transformations cannot currently be used to change the `parent` of a resource.
        at new Resource (/Users/ringods/Projects/osimis/devops-sessions/pulumi/orthanc/node_modules/@pulumi/pulumi/resource.js:124:27)
        ...
    My transformation is not changing the
    parent
    at all. How can I get rid of this error?
    g
    • 2
    • 3
  • g

    gray-city-50684

    09/09/2020, 5:45 PM
    @gorgeous-egg-16927 I tried to use the crd2pulumi tool and ran into a problem (thread)
    b
    w
    • 3
    • 16
  • d

    damp-secretary-81951

    09/09/2020, 5:54 PM
    What are the best practices for storing persistent API keys (for API Gateway) in Pulumi? I want to be sure when I update my lambda function, my customers’ API keys don’t change, b/c they’re defined in code.
    const customer1ApiKey = new aws.apigateway.ApiKey("customer-1", {});
    Would it be better to store these API key values in my stack config?
    l
    g
    • 3
    • 4
  • a

    astonishing-quill-88807

    09/09/2020, 7:32 PM
    What's the exit hatch for a stack with a snapshot integrity failure?
  • a

    astonishing-quill-88807

    09/09/2020, 7:44 PM
    Nevermind, found the
    --disable-integrity-checking
    flag.
  • s

    square-rose-64819

    09/09/2020, 9:07 PM
    been getting this error pretty consistently, anyone know what the issue could be? using the latest version of pulumi:
  • s

    square-rose-64819

    09/09/2020, 9:07 PM
    panic: nil context
        goroutine 83 [running]:
        net/http.(*Request).WithContext(...)
        	/opt/hostedtoolcache/go/1.14.4/x64/src/net/http/request.go:358
        <http://golang.org/x/net/context/ctxhttp.Do|golang.org/x/net/context/ctxhttp.Do>(0x0, 0x0, 0x5473a40, 0xc0010b4600, 0xe579395829c4e5cd, 0x10, 0x32943a0)
        	/home/runner/go/pkg/mod/golang.org/x/net@v0.0.0-20200625001655-4c5254603344/context/ctxhttp/ctxhttp.go:27 +0x324
        <http://golang.org/x/oauth2/internal.doTokenRoundTrip(0x0|golang.org/x/oauth2/internal.doTokenRoundTrip(0x0>, 0x0, 0xc0010b4600, 0x48, 0xc0006120a0, 0x18)
        	/home/runner/go/pkg/mod/golang.org/x/oauth2@v0.0.0-20200107190931-bf48bf16ab8d/internal/token.go:232 +0x7b
        <http://golang.org/x/oauth2/internal.RetrieveToken(0x0|golang.org/x/oauth2/internal.RetrieveToken(0x0>, 0x0, 0xc000048780, 0x48, 0xc0006120a0, 0x18, 0x395ecf5, 0x23, 0xc000d3c8b0, 0x1, ...)
        	/home/runner/go/pkg/mod/golang.org/x/oauth2@v0.0.0-20200107190931-bf48bf16ab8d/internal/token.go:202 +0xdf
        <http://golang.org/x/oauth2.retrieveToken(0x0|golang.org/x/oauth2.retrieveToken(0x0>, 0x0, 0xc00032c850, 0xc000d3c8b0, 0xc000d3c980, 0x15, 0x381e7e0)
        	/home/runner/go/pkg/mod/golang.org/x/oauth2@v0.0.0-20200107190931-bf48bf16ab8d/token.go:157 +0x92
        <http://golang.org/x/oauth2.(*tokenRefresher).Token(0xc0005d07b0|golang.org/x/oauth2.(*tokenRefresher).Token(0xc0005d07b0>, 0x10dc2ad, 0x3910f5d, 0x6)
        	/home/runner/go/pkg/mod/golang.org/x/oauth2@v0.0.0-20200107190931-bf48bf16ab8d/oauth2.go:270 +0x1de
        <http://golang.org/x/oauth2.(*reuseTokenSource).Token(0xc001094840|golang.org/x/oauth2.(*reuseTokenSource).Token(0xc001094840>, 0x0, 0x0, 0x0)
        	/home/runner/go/pkg/mod/golang.org/x/oauth2@v0.0.0-20200107190931-bf48bf16ab8d/oauth2.go:304 +0xa8
        <http://golang.org/x/oauth2.(*Transport).RoundTrip(0xc0005e21a0|golang.org/x/oauth2.(*Transport).RoundTrip(0xc0005e21a0>, 0xc000b90200, 0x0, 0x0, 0x0)
        	/home/runner/go/pkg/mod/golang.org/x/oauth2@v0.0.0-20200107190931-bf48bf16ab8d/transport.go:45 +0x9e
        <http://github.com/hashicorp/terraform-plugin-sdk/helper/logging.(*transport).RoundTrip(0xc0005e21c0|github.com/hashicorp/terraform-plugin-sdk/helper/logging.(*transport).RoundTrip(0xc0005e21c0>, 0xc000b90200, 0xc000d3cc20, 0x1, 0x1)
        	/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.11.0/helper/logging/transport.go:27 +0x164
        <http://github.com/terraform-providers/terraform-provider-google-beta/google-beta.(*retryTransport).RoundTrip(0xc000a82540|github.com/terraform-providers/terraform-provider-google-beta/google-beta.(*retryTransport).RoundTrip(0xc000a82540>, 0xc00090f700, 0x0, 0x0, 0x0)
        	/home/runner/go/pkg/mod/github.com/pulumi/terraform-provider-google-beta@v0.0.0-20200727210524-5e1c545f84af/google-beta/retry_transport.go:125 +0x2c5
        net/http.send(0xc00090f600, 0x3ee3b60, 0xc000a82540, 0xbfce6ede4b5aa590, 0x71b07f8e8, 0x5473e80, 0xc00000f388, 0xbfce6ede4b5aa590, 0x1, 0x0)
        	/opt/hostedtoolcache/go/1.14.4/x64/src/net/http/client.go:252 +0x43e
        net/http.(*Client).send(0xc000a82510, 0xc00090f600, 0xbfce6ede4b5aa590, 0x71b07f8e8, 0x5473e80, 0xc00000f388, 0x0, 0x1, 0x14e6d62)
        	/opt/hostedtoolcache/go/1.14.4/x64/src/net/http/client.go:176 +0xfa
        net/http.(*Client).do(0xc000a82510, 0xc00090f600, 0x0, 0x0, 0x0)
        	/opt/hostedtoolcache/go/1.14.4/x64/src/net/http/client.go:699 +0x44a
        net/http.(*Client).Do(...)
        	/opt/hostedtoolcache/go/1.14.4/x64/src/net/http/client.go:567
        <http://google.golang.org/api/internal/gensupport.SendRequest|google.golang.org/api/internal/gensupport.SendRequest>(0x0, 0x0, 0xc000a82510, 0xc00090f600, 0xc000da7320, 0x5e, 0x0)
        	/home/runner/go/pkg/mod/google.golang.org/api@v0.26.0/internal/gensupport/send.go:42 +0x23d
        <http://google.golang.org/api/cloudresourcemanager/v1.(*ProjectsGetCall).doRequest(0xc000da74f0|google.golang.org/api/cloudresourcemanager/v1.(*ProjectsGetCall).doRequest(0xc000da74f0>, 0x390e896, 0x4, 0x0, 0x100c9a8, 0x30)
        	/home/runner/go/pkg/mod/google.golang.org/api@v0.26.0/cloudresourcemanager/v1/cloudresourcemanager-gen.go:6532 +0x75e
        <http://google.golang.org/api/cloudresourcemanager/v1.(*ProjectsGetCall).Do(0xc000da74f0|google.golang.org/api/cloudresourcemanager/v1.(*ProjectsGetCall).Do(0xc000da74f0>, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        	/home/runner/go/pkg/mod/google.golang.org/api@v0.26.0/cloudresourcemanager/v1/cloudresourcemanager-gen.go:6544 +0xa1
        <http://github.com/terraform-providers/terraform-provider-google-beta/google-beta.resourceGoogleProjectServiceRead(0xc00001af50|github.com/terraform-providers/terraform-provider-google-beta/google-beta.resourceGoogleProjectServiceRead(0xc00001af50>, 0x34fd300, 0xc00043bc00, 0xc00001af50, 0x0)
        	/home/runner/go/pkg/mod/github.com/pulumi/terraform-provider-google-beta@v0.0.0-20200727210524-5e1c545f84af/google-beta/resource_google_project_service.go:160 +0x17e
        <http://github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Refresh(0xc000a21320|github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Refresh(0xc000a21320>, 0xc000bb2640, 0x34fd300, 0xc00043bc00, 0xc000989b18, 0x1, 0x3713b40)
        	/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.11.0/helper/schema/resource.go:516 +0x16f
        <http://github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Refresh(0xc0000fc800|github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Refresh(0xc0000fc800>, 0xc000da77d8, 0xc000bb2640, 0xc000a40300, 0xc000544a20, 0xc000d90000)
        	/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.11.0/helper/schema/provider.go:333 +0x8f
        <http://github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.(*Provider).Read(0xc000a0fba0|github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.(*Provider).Read(0xc000a0fba0>, 0x3f1aea0, 0xc000db0660, 0xc000bb25f0, 0xc000a0fba0, 0x3476701, 0xc000baf500)
        	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.5.4/pkg/tfbridge/provider.go:751 +0x716
        <http://github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Read_Handler.func1(0x3f1aea0|github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Read_Handler.func1(0x3f1aea0>, 0xc000db0660, 0x37e2780, 0xc000bb25f0, 0x382efa0, 0x549faa8, 0x3f1aea0, 0xc000db0660)
        	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.5.1-0.20200701223250-45d2fa95d60b/proto/go/provider.pb.go:1902 +0x86
        <http://github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x3f1aea0|github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x3f1aea0>, 0xc000db03c0, 0x37e2780, 0xc000bb25f0, 0xc000d889c0, 0xc000d889e0, 0x0, 0x0, 0x3ee2fe0, 0xc0001cbbc0)
        	/home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x2eb
        <http://github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Read_Handler(0x389fc80|github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Read_Handler(0x389fc80>, 0xc000a0fba0, 0x3f1aea0, 0xc000db03c0, 0xc0000bde00, 0xc0000b1ea0, 0x3f1aea0, 0xc000db03c0, 0xc000ba0900, 0x201)
        	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.5.1-0.20200701223250-45d2fa95d60b/proto/go/provider.pb.go:1904 +0x14b
        <http://google.golang.org/grpc.(*Server).processUnaryRPC(0xc000a0fa00|google.golang.org/grpc.(*Server).processUnaryRPC(0xc000a0fa00>, 0x3f52fc0, 0xc000782480, 0xc000942b00, 0xc000a6ac30, 0x545f560, 0x0, 0x0, 0x0)
        	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.28.0/server.go:1082 +0x50a
        <http://google.golang.org/grpc.(*Server).handleStream(0xc000a0fa00|google.golang.org/grpc.(*Server).handleStream(0xc000a0fa00>, 0x3f52fc0, 0xc000782480, 0xc000942b00, 0x0)
        	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.28.0/server.go:1405 +0xcc9
        <http://google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00056c020|google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00056c020>, 0xc000a0fa00, 0x3f52fc0, 0xc000782480, 0xc000942b00)
        	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.28.0/server.go:746 +0xa1
        created by <http://google.golang.org/grpc.(*Server).serveStreams.func1|google.golang.org/grpc.(*Server).serveStreams.func1>
        	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.28.0/server.go:744 +0xa1
    b
    • 2
    • 12
  • s

    square-rose-64819

    09/09/2020, 9:08 PM
    FWIW I recently had to downgrade node from ~14.9 to 12.18 due to other grpc issues
    f
    • 2
    • 3
  • l

    little-cartoon-10569

    09/10/2020, 4:10 AM
    I've had to reinstall from scratch. My
    pulumi preview
    is complaining about not having the aws plugin, but it's not telling me what version to install (I think it used to), and I don't know where to look for versions of the aws plugin. The issue that best describes the problem says that the error message should include the verison number. Plus the link to the trouble-shooting topic is out of date 😞
    g
    • 2
    • 14
  • b

    best-france-51653

    09/10/2020, 9:25 AM
    Hello All, trying to create a k8s secret using pulumi and golang. I put a data string in stack, like this config: aws:mysecret: secure: _v1:_long__hash_here_ How can I get a value of this string to put it NewSecret function? e.g awsMySecret, err := corev1.NewSecret(ctx, "my-aws-secret", &corev1.SecretArgs{ Metadata: metav1.ObjectMetaArgs{ Name: pulumi.String("my-aws-secret"), }, Type: pulumi.String("kubernetes.io/dockerconfigjson"), Data: pulumi.GetConfig("aws", "mysecret"), --> ? that won't work since it needs SecretArgs has Data StringMapInput }) also it's not really clear if pulumi will decrypt the secret if I use GetConfig. I found some function, like GetSecret, but there is no documentation related
    b
    • 2
    • 5
  • m

    miniature-scientist-54855

    09/10/2020, 10:20 AM
    Hi, i'd like to use some of the go-functions i'm creating for my pulumi-stack also "manually". For that, i've created a second go-file and added a main-function there. However if i do that, i get something like this:
  • m

    miniature-scientist-54855

    09/10/2020, 10:20 AM
    # pulumi-gke
        ./main.go:33:6: main redeclared in this block
            previous declaration at ./somefile.go:114:6
        error: an unhandled error occurred: program exited with non-zero exit code: 2
  • m

    miniature-scientist-54855

    09/10/2020, 10:22 AM
    Any idea how to make it possible?
    l
    • 2
    • 1
  • d

    damp-elephant-82829

    09/10/2020, 1:01 PM
    Hello guys, anyone has experiencing in using the mock module for pulumi ? https://github.com/pulumi/pulumi/issues/5295
  • w

    worried-umbrella-80893

    09/10/2020, 3:14 PM
    Is app.pulumi.com slow (or down) for anyone?
  • i

    important-appointment-55126

    09/10/2020, 3:18 PM
    very slow at least; still hasn’t finished loading for me
  • w

    worried-umbrella-80893

    09/10/2020, 3:19 PM
    Fun fact, you can't use pulumi to do config atm since app.pulumi isn't loading.
  • l

    loud-battery-37784

    09/10/2020, 3:20 PM
    Status page says all is well 🤔 https://status.pulumi.com/
  • l

    loud-battery-37784

    09/10/2020, 3:22 PM
    What’s weird is I’m getting some of the payload. It just looks like the main bundle isn’t coming down right now.
    l
    • 2
    • 2
  • i

    important-appointment-55126

    09/10/2020, 3:25 PM
    even a
    pulumi stack
    takes ~10 seconds atm
  • i

    important-appointment-55126

    09/10/2020, 3:25 PM
    i suspect a learning opportunity will be forthcoming 🙂
Powered by Linen
Title
i

important-appointment-55126

09/10/2020, 3:25 PM
i suspect a learning opportunity will be forthcoming 🙂
View count: 1