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

    worried-city-86458

    09/27/2019, 5:03 AM
    Also, it would be nice to turn off warnings like:
    warning: extensions/v1beta1/PodSecurityPolicy is not supported by Kubernetes 1.16+ clusters. Use policy/v1beta1/PodSecurityPolicy instead.
  • l

    limited-rainbow-51650

    09/27/2019, 8:04 AM
    I have a small question but more for the people who create(d) the Pulumi website. Could you tell me how, or with which tool the animated terminal images are created like in the
    Create > Deploy > Manage
    section of the front page?
    b
    • 2
    • 5
  • f

    fancy-translator-86814

    09/27/2019, 9:55 AM
    Hi. Today, when I run
    pulumi up
    , I got notification for update:
    warning: A new version of Pulumi is available. To upgrade from version '1.1.0' to '1.2.0', run
       $ brew upgrade pulumi
    or visit <https://pulumi.com/docs/reference/install/> for manual instructions and release notes.
    but in actual, when I run
    brew upgrade pulumi
    ,
    $ brew upgrade pulumi
    Error: pulumi 1.1.0 already installed
    This is a bit annoying. Is this lag comes from brew? Is it possible not to show this update message?
    g
    • 2
    • 2
  • w

    worried-musician-21478

    09/27/2019, 12:26 PM
    Hello ! I'm having an issue with pulumi since today (i haven't done the 1.2.0 update). When creating an api-gateway with awsx for a new stack, it get stucks on "creating" on aws:apigateway:RestApi, and in AWS a new duplicated gateway pops up every 2 minutes until I cancel the deployment... The code did not change since the last successful deployment on another stack this morning. Did you ever come across this issue ?
    b
    • 2
    • 3
  • s

    stale-park-1622

    09/27/2019, 2:08 PM
    why is the following code, creating 6 resources instead of 3? If I understood the api correctly, i can create a ECR repository and pass it into the buildAndPushImage
    export function createApiImage(name: string, port: number, contextDir: string): {repositoryUrl: pulumi.Output<string>, image: awsx.ecr.RepositoryImage} {
      
      const gitCommit = 'e0e5162';
    
      // set up ECR Lifecycle Policies (<https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html>) 
      // remove any images that are older than one week that are untagged
      const repository = new awsx.ecr.Repository(`pulumi-${pulumi.getStack()}-repository`, {
        lifeCyclePolicyArgs: {
          rules: [{
              selection: "untagged",
              maximumAgeLimit: 7,
          }],
        }
      });
    
      // And publish its URL, so we can push to it if we'd like.
      const repositoryUrl = repository.repository.repositoryUrl;
    
      const build: docker.DockerBuild = {
        context: contextDir, // context is a path to a directory to use for the Docker build context
        dockerfile: path.join(contextDir, './docker/api.v2.Dockerfile'), // dockerfile may be used to override the default Dockerfile name and/or location
        args: {
          EXPOSE_PORT: String(port),
        },
      };
    
      // Invoke 'docker' to actually build the DockerFile that is in the folder relative to
      // this program. Once built, push that image up to the ECR repo.
      //const image = repository.buildAndPushImage(build);
      const image = awsx.ecr.buildAndPushImage(
        `${name}:${gitCommit}`,
        build,
        {
          repository: repository.repository,
        }
      );
    
      return {repositoryUrl, image};
    }
    → pulumi up
    Previewing update (dev):
    
         Type                           Name                          Plan
     +   pulumi:pulumi:Stack            dev                    create
     +   ├─ awsx:ecr:Repository         dev-api-image:e0e5162  create
     +   │  └─ aws:ecr:LifecyclePolicy  dev-api-image:e0e5162  create
     +   └─ awsx:ecr:Repository         pulumi-dev-repository         create
     +      ├─ aws:ecr:Repository       pulumi-dev-repository         create
     +      └─ aws:ecr:LifecyclePolicy  pulumi-dev-repository         create
    
    Resources:
        + 6 to create
    
    Do you want to perform this update?
      yes
    > no
      details
    t
    h
    • 3
    • 8
  • f

    flat-guitar-86436

    09/27/2019, 5:39 PM
    I’m looking to add tests around my Pulumi programs.. what’s the current status on integration testing? I found: https://github.com/pulumi/pulumi/issues/2287 https://www.pulumi.com/blog/testing-your-infrastructure-as-code-with-pulumi/#deployment-testing
    • 1
    • 5
  • s

    stale-park-1622

    09/27/2019, 5:45 PM
    Is it possible to tag an image after its been build like the following suggestion from aws? https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-ecr-image.html The issue is, when I build the docker image using the following:
    const image = awsx.ecr.buildAndPushImage(
        `${name}:${gitCommit}`,
        build,
        {
          repository: repository.repository,
        }
      );
    it always add the 'latest' tag. I want to tag it with a git commit hash. Is there a function like 'tagAndPushImage'?
  • d

    damp-book-35965

    09/27/2019, 5:52 PM
    I'm using the awsx apigateway package to get started and it is great..But it creates a public API..is there a way to make the access limited while still using awsx. I know the pulumi-aws will support this but wanted to use awsx. Preferably unaccessible other than a certain whitelisted range of IPs rather than needing an API key to access the API ?
    w
    • 2
    • 5
  • b

    billowy-laptop-45963

    09/27/2019, 6:30 PM
    is it possible to hook into pulumi update/create/destroy events and for example make a final backup before destroy?
    w
    • 2
    • 1
  • b

    brash-plastic-65797

    09/27/2019, 6:35 PM
    I’m using pulumi.StackReference and it seems that when I add calls to getOutput I’m getting Javascript Heap errors (out of memory) when running “pulumi up”, any smoking guns?
    w
    • 2
    • 24
  • a

    adamant-dress-73325

    09/27/2019, 7:34 PM
    We are seeing pulumi take 3+ minutes to read aws:ec2:Vpc and subnets during an update? This is slowing our deployments quite a bit, any reason this might be happening?
    const vpc = awsx.ec2.Vpc.fromExistingIds("vpc", {
      privateSubnetIds: vpcPrivateSubnetIds,
      publicSubnetIds: vpcPublicSubnetIds,
      vpcId
    });
    b
    w
    a
    • 4
    • 6
  • c

    cool-egg-852

    09/27/2019, 8:41 PM
    I think I am running into an recursive issue. I have a Deployment with a pod that depends upon the Service name. Because the Service is autonamed, I can’t hardcode the value. With this, the Deployment is not created because the Service is attempting to wait for it’s selector to be ready.
    • 1
    • 1
  • f

    flat-guitar-86436

    09/27/2019, 8:48 PM
    pulumi: warning: A new version of Pulumi is available. To upgrade from version '1.1.0' to '1.2.0', run 
           $ brew upgrade pulumi
        or visit <https://pulumi.com/docs/reference/install/> for manual instructions and release notes.
    I’m running pulumi in ci, is there a way to remove the warning?
    g
    w
    • 3
    • 4
  • e

    elegant-dress-88912

    09/28/2019, 10:20 AM
    is there option to deploy/destroy single resource with pulumi (like with
    -target
    option for terraform)?
    c
    • 2
    • 5
  • e

    elegant-dress-88912

    09/28/2019, 10:31 AM
    for
    pulumi up [template|url] [flags]
    - what actually this
    [template|url]
    part means?
  • b

    bitter-spoon-36677

    09/28/2019, 1:10 PM
    When I run
    pulumi up
    I'm getting this error:
    error: could not get cloud url: unmarshalling credentials file: unexpected end of JSON input
    I am using version 1.1.0 on a Mac EDIT: fixed it by deleting the ~/.pulumi folder
  • c

    cold-car-23440

    09/28/2019, 10:27 PM
    pulumi destroy doesn’t seem to respect the dependency graph. it’s attempting to destroy a vnet before destroying the NICs and subnet in azure. Any ideas?
  • c

    cold-car-23440

    09/28/2019, 10:27 PM
    Do you want to perform this destroy? yes
    Destroying (dev):
    
         Type                               Name              Status                  Info
         pulumi:pulumi:Stack                pulumi-vault-dev                          
     -   ├─ azure:network:VirtualNetwork    puluminet         **deleting failed**     error: Plan apply failed: deleting urn:pulumi:dev::pulumi-vault::azure:network/virtualNetwork:VirtualNetwork::
     -   ├─ azure:msi:UserAssignedIdentity  consulmsi         deleted                 
     -   ├─ azure:network:NetworkInterface  vault-nic-0       deleting...             
     -   ├─ azure:network:NetworkInterface  consul-nic-1      deleting...             
     -   ├─ azure:network:NetworkInterface  vault-nic-2       deleting...             
     -   ├─ azure:core:ResourceGroup        vault-cluster-rg  deleting...             
     -   ├─ azure:network:NetworkInterface  vault-nic-1       deleting...             
     -   ├─ azure:msi:UserAssignedIdentity  vaultmsi          deleted                 
     -   ├─ azure:network:Subnet            hcsubnet          deleting...             
     -   ├─ azure:network:NetworkInterface  consul-nic-2      deleting...             
     -   ├─ azure:network:NetworkInterface  consul-nic-3      deleting...             
     -   ├─ azure:network:NetworkInterface  consul-nic-4      deleting...             
     -   └─ azure:network:NetworkInterface  consul-nic-0      deleting...
    w
    • 2
    • 2
  • m

    miniature-chef-87843

    09/29/2019, 4:48 AM
    If I wanted to do a Serverless Fx-esque simple SSR'd webapp that's AWS focused with Lambda + ApiGateway + S3 + Route 53 (and possibily Cloudfront), is there a recommend example/package I should use?
    @pulumi/cloud
    seems to have the the nice
    HttpServer
    abstraction, but it's not clear what the status of that package is. It sounds like
    @pulumi/awsx?
    would be the next best consideration here, but it's not clear how I'd put all these pieces together simply
  • m

    miniature-chef-87843

    09/29/2019, 4:54 AM
    Ha, doing some reading it looks like https://www.pulumi.com/docs/guides/crosswalk/aws/api-gateway/ should cover my use case pretty comprehensively. Is there any quirks I should expect, especially when wiring up the render handler function? I know pulumi does some fancy callback tracing
  • w

    worried-city-86458

    09/29/2019, 7:29 PM
    I'm very excited to see https://github.com/pulumi/pulumi/commit/9374c374c3d3a96fc2ae1e715da511b4125b6628 Are nightly or prerelease packages available somewhere?
    w
    • 2
    • 8
  • n

    nice-cat-91582

    09/29/2019, 7:30 PM
    anyone have a good idea of how to test a manually defined CallbackFunction? The built function has some Ouputs compiled in it, so it's not working for me to just call the function directly
    w
    • 2
    • 1
  • e

    early-intern-90238

    09/30/2019, 12:10 AM
    Hi guys, anyone know why I get a ##[error]Docker run failed with exit code 255 when using the pulumi/actions for GitHub? It seems to generate the preview fine...
  • e

    early-intern-90238

    09/30/2019, 12:21 AM
    nevermind, I got it...that was easy...
    g
    • 2
    • 2
  • b

    broad-pencil-85643

    09/30/2019, 6:02 AM
    Hi, I'm evaluating Pulumi, coming from Terraform. I'm looking for advice on how I could structure Pulumi projects/stacks based on what we currently have. Right now we use sort of a monolithic infrastructure repo, split by environment (e.g., dev, staging, prod). So for example if I've got a Node.js-based Elastic Beanstalk API application (we use AWS), we have a Terraform configuration at
    dev/applications/api-content
    ,
    staging/applications/api-content
    , and
    prod/applications/api-content
    . Each of these directories have their own Terraform configs that might describe an S3 bucket or two, the EB app, an EB environment (or two), DBs, etc. Importantly, they're not all the same underlying infrastructure/resources. Initially I figured re-creating this setup could be done by having, e.g., an
    api-content
    project with
    dev
    ,
    staging
    , and
    prod
    stacks. But since, for example, there might not be an S3 bucket in the
    dev
    stack whereas there is in
    staging
    and
    prod
    , it started to look like there would be a lot of if/else statements in my Pulumi source files. Do you think it might make more sense to create a project per environment, each with a single stack? That way I could ensure the Pulumi source is tailored specifically to each environment, and can still have something like a common project/stack that each environment pulls from for conventions/components shared between these environments.
    b
    c
    +2
    • 5
    • 6
  • b

    billions-lock-80282

    09/30/2019, 1:50 PM
    Hi, can I convert an Output<string> to a normal string. I need the gke kubeconfig variable in string format.
    r
    n
    • 3
    • 19
  • s

    stocky-nail-30268

    09/30/2019, 3:55 PM
    Hey folks, I'm beginning to explore a bit around deployment testing, and using the example in this blog post:
    <https://www.pulumi.com/blog/testing-your-infrastructure-as-code-with-pulumi/#deployment-testing>
    , hit an issue straight away. I've just copied the code verbatim from that post, and it seems I'm hitting an issue with
    ../github.com/pulumi/pulumi/pkg/resource/deploy/providers/registry.go:326:30: multiple-value uuid.NewV4() in single-value context
    . Seems to be an issue with
    satori/go.uuid
    returning
    err
    for
    NewV4()
    as well, but I feel like others would have come across this issue too, so, have I got something obviously wrong?
    b
    • 2
    • 10
  • s

    stocky-xylophone-20575

    09/30/2019, 4:27 PM
    Hi , i am trying to run gcp cloud-run via pulumi , but i am unable to figure out where i can pass provider (
    google-beta
    ) in calling for creating cloud run
    my_endpoint = cloudrun.Service("my_api_endpoint",
                                        spec={
                                            "containers": [
                                                {"image":"<http://gcr.io/endpoints-release/endpoints-runtime-serverless:1|gcr.io/endpoints-release/endpoints-runtime-serverless:1>"}
                                            ]
                                        },
                                        location="us-east1", metadata={"namespace": "myproject"},)
    , i keep getting 400 error for this , still dont the reason but speculating this could be a starting point
    • 1
    • 1
  • a

    acceptable-army-69872

    09/30/2019, 4:40 PM
    Amazon has "solution stacks" for deploying complex things into your environment. I was asked to look into WAF, and found this aws link: https://docs.aws.amazon.com/solutions/latest/aws-waf-security-automations/deployment.html, is there a clean way to deploy / managed those resources with pulumi? Or if I want to use those stacks I essentially have to have multiple deployment methods? https://docs.aws.amazon.com/solutions/latest/aws-waf-security-automations/deployment.html
    f
    • 2
    • 3
  • b

    brave-angle-33257

    09/30/2019, 6:49 PM
    just upgraded to pulumi 1.2 now getting errors on
    google-protobuf
    w
    • 2
    • 8
Powered by Linen
Title
b

brave-angle-33257

09/30/2019, 6:49 PM
just upgraded to pulumi 1.2 now getting errors on
google-protobuf
Diagnostics:
  pulumi:pulumi:Stack (api-ecs-services-us-east-2-dev-auth):
    error: Running program '/data/pulumi/infra/aws/api/api-ecs-services' failed with an unhandled exception:                                                                                                                      
    AssertionError: Assertion failed
        at new goog.asserts.AssertionError (/data/pulumi/node_modules/google-protobuf/google-protobuf.js:79:876)
        at Object.goog.asserts.doAssertFailure_ (/data/pulumi/node_modules/google-protobuf/google-protobuf.js:80:257)
        at Object.goog.asserts.assert [as assert] (/data/pulumi/node_modules/google-protobuf/google-protobuf.js:81:83)
        at jspb.BinaryEncoder.writeDouble (/data/pulumi/node_modules/google-protobuf/google-protobuf.js:329:67)
        at jspb.BinaryWriter.writeDouble (/data/pulumi/node_modules/google-protobuf/google-protobuf.js:351:300)
        at proto.google.protobuf.Value.serializeBinaryToWriter (/data/pulumi/node_modules/google-protobuf/google/protobuf/struct_pb.js:383:12)                                                                                                  
        at jspb.BinaryWriter.writeMessage (/data/pulumi/node_modules/google-protobuf/google-protobuf.js:353:336)
        at jspb.Map.serializeBinary (/data/pulumi/node_modules/google-protobuf/google-protobuf.js:274:356)
        at proto.google.protobuf.Struct.serializeBinaryToWriter (/data/pulumi/node_modules/google-protobuf/google/protobuf/struct_pb.js:189:7)                                                                                                  
        at jspb.BinaryWriter.writeMessage (/data/pulumi/node_modules/google-protobuf/google-protobuf.js:353:336)
reverted to 1.1, same issue.. but just cropped up - not sure what deal is here, error msg not helpful, any ideas folks ?
w

white-balloon-205

09/30/2019, 7:31 PM
I tried a fresh install and can't reproduce myself. You could try backing up you `package-lock.json`and re-installing dependencies to see if you ended up with some bad combination of dependencies in your lock file somehow?
b

brave-angle-33257

09/30/2019, 11:26 PM
yea i have refreshed them a couple times, i posted to the git issue also
i’ll try again in morning to see if maybe someone updated a dependency.. i havent been committing package-lock.json
the issue cropped up today when I bumped from 1.1 to 1.2 pulumi, which caused me to refresh all dependencies.. since then both 1.2 and reverting back to 1.1 are having trouble
so, yea does seem likely could be related to a dependency error being introduced
ah - found it, i was passing in an undefined var into the ECS params somewhere.. that apparently caused the error, but obviously is very hard to know that. I updated the github issue with my findings but left it open in case you wish to improve the error/error handling
View count: 1