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

    chilly-computer-67665

    08/21/2020, 9:24 AM
    Hi! I was wondering if I can use pulumi to manage package installs on my VMs? I was able to set up pulumi to create my VM, and further to control Docker on my VM, but inbetween I need to install docker on my VM, and I couldn't find any way to do that. I'm using Go, if that matters.
    n
    b
    • 3
    • 7
  • w

    wonderful-window-14544

    08/21/2020, 2:08 PM
    Hello, I’m doing research about infra as a code tools. Already tried some things (create project, deploy stack, ...). Look promising but I have question about managing machine with application with persistent storage (e.g. mysql, rabbitmq, ...). Pulumi drop and create a new machine by default. Is there any solution how to manage machine without drop and create?. Or some docs about this problem.
    m
    • 2
    • 9
  • c

    chilly-hairdresser-56259

    08/21/2020, 3:45 PM
    Is there a place to see whats on the roadmap for Pulumi? For instance I would like to see if HashiCorp Packer is apart of the roadmap
    b
    p
    w
    • 4
    • 7
  • b

    bitter-dentist-28132

    08/21/2020, 8:21 PM
    is there any tooling yet for dealing with tiered deployments? i.e. if i need to deploy my app, it will run the code to make sure the vpc, k8s cluster, etc are provisioned?
    g
    • 2
    • 15
  • d

    damp-secretary-81951

    08/21/2020, 8:24 PM
    Does Pulumi support string substitutions in userData?, e.g.
    --stack ${AWS::StackName} --region ${AWS::Region}
    b
    • 2
    • 9
  • t

    thankful-holiday-28161

    08/21/2020, 8:59 PM
    Is there a way to delete Pulumi stacks from the Pulumi dashboard? Right now I think I'm doing it from the command line (and I think I need to be in the directory where the Pulumi.stack.yaml file is located), but I think I might have deleted Pulumi.stack.yaml and I don't know what to do. Otherwise, is there a way to clone down the Pulumi stack yaml definition and then delete it?
    s
    • 2
    • 1
  • l

    loud-soccer-66701

    08/22/2020, 3:57 PM
    hello here thinking about organizing pulumi around "middleware" pattern and existing components (https://www.pulumi.com/docs/intro/concepts/programming-model/#components) the idea is to create flexible workflows by combining inputs/outputs of components and creating a chains where parts can be easily replaced examples:
    [getLatestSemverDockerTag, updateKubernetesDeployment, notifySlackConsumers]
    , [
    generateTagFromProjectHash, buildAnddeployDockerImage, redeployEC2Instances, ...]
    the aim is - to maintain separate pieces of code dvided by components, toavoid duplication and so on, you know how it goes in software developers world questions: - does it make sense? is there a more preferrable way of building pipelines from composable pieces? - how do you do it currently? any best practices?
    a
    • 2
    • 2
  • c

    curved-kangaroo-20109

    08/23/2020, 3:21 AM
    Hi! I could use some help with Pulumi design patterns. I have a resource output that changes which resources are later created. Is there a preferred best approach? Use case: Create Auth0 resource (outputs client id), build a static website that requires the client id in the environment (yarn build), upload website build folder to S3 I see a couple of ways to do this. 1. Dynamic provider: Use a dynamic provider that takes the client id output and builds the website and uploads the folder to s3 (using the AWS API) 2. Micro-stacks with external build step: Project A creates an auth0 resource. Project B uses aws.s3.BucketObjects to upload the website. Run a build command between a & b These are both quite ugly. There must be a simpler solution. Any thoughts or suggestions?
    l
    k
    • 3
    • 4
  • c

    chilly-rainbow-79265

    08/24/2020, 11:43 AM
    Hi, Is there any way to provide cassandra cluster using pulumi ? means cluster scaling and all such ops.
  • w

    wonderful-window-14544

    08/24/2020, 12:58 PM
    Hello, I have
    pulumi.Output<RunCommandResult>;
    object filled but cannot and need some data to file but cannot grab values as strings. Need to write output to local file. Is there any way?
  • b

    best-lifeguard-91445

    08/24/2020, 2:40 PM
    after running 
    pulumi up
     and completes successfully, my stack continues to show changes on the next invocation of`pulumi preview` and 
    pulumi up
    → [feature/devops/baffle-ha-732 ≡ +0 ~10 -0 !]› pulumi up
    Previewing update (dev):
         Type                             Name                    Plan        Info
         pulumi:pulumi:Stack              aws-dev                             14 messages
         ├─ awsx:x:ecs:EC2TaskDefinition  use1-dev-registrar-api
     +-  │  └─ aws:ecs:TaskDefinition     use1-dev-registrar-api  replace     [diff: ~containerDefinitions]
         └─ awsx:x:ecs:EC2Service         use1-dev-registrar-api
     ~      └─ aws:ecs:Service            use1-dev-registrar-api  update      [diff: ~taskDefinition]
    Details:
    ++aws:ecs/taskDefinition:TaskDefinition: (create-replacement)
                [id=use1-dev-registrar-api]
                [urn=urn:pulumi:dev::aws::awsx:x:ecs:EC2TaskDefinition$aws:ecs/taskDefinition:TaskDefinition::use1-dev-registrar-api]
                [provider=urn:pulumi:dev::aws::pulumi:providers:aws::default_2_4_0::ef2f3133-efd2-4f21-a3ed-67550c0c8b97]
              ~ containerDefinitions: "[secret]" => "[secret]"
            +-aws:ecs/taskDefinition:TaskDefinition: (replace)
                [id=use1-dev-registrar-api]
                [urn=urn:pulumi:dev::aws::awsx:x:ecs:EC2TaskDefinition$aws:ecs/taskDefinition:TaskDefinition::use1-dev-registrar-api]
                [provider=urn:pulumi:dev::aws::pulumi:providers:aws::default_2_4_0::ef2f3133-efd2-4f21-a3ed-67550c0c8b97]
              ~ containerDefinitions: "[secret]" => "[secret]"
            ~ aws:ecs/service:Service: (update)
                [id=arn:aws:ecs:us-east-1:382762964374:service/use1-dev-registrar-api-6d44494]
                [urn=urn:pulumi:dev::aws::awsx:x:ecs:EC2Service$aws:ecs/service:Service::use1-dev-registrar-api]
                [provider=urn:pulumi:dev::aws::pulumi:providers:aws::default_2_4_0::ef2f3133-efd2-4f21-a3ed-67550c0c8b97]
              ~ taskDefinition: "arn:aws:ecs:us-east-1:382762964374:task-definition/use1-dev-registrar-api:226" => output<string>
            --aws:ecs/taskDefinition:TaskDefinition: (delete-replaced)
                [id=use1-dev-registrar-api]
                [urn=urn:pulumi:dev::aws::awsx:x:ecs:EC2TaskDefinition$aws:ecs/taskDefinition:TaskDefinition::use1-dev-registrar-api]
                [provider=urn:pulumi:dev::aws::pulumi:providers:aws::default_2_4_0::ef2f3133-efd2-4f21-a3ed-67550c0c8b97]
    w
    • 2
    • 4
  • v

    victorious-helmet-11068

    08/24/2020, 3:27 PM
    hi there!
  • v

    victorious-helmet-11068

    08/24/2020, 3:28 PM
    Today I’m rebuilding a GKE cluster.So I destroyed the old and re-applied the same code.
  • v

    victorious-helmet-11068

    08/24/2020, 3:28 PM
    I get:
  • v

    victorious-helmet-11068

    08/24/2020, 3:28 PM
    " The network “fhd-network-4663654" does not have available private IP space in 10.0.0.0/8 to reserve a /14 block for containers for cluster”
  • v

    victorious-helmet-11068

    08/24/2020, 3:28 PM
    I’m quite lost… suggestions?
    g
    • 2
    • 4
  • c

    chilly-rainbow-79265

    08/24/2020, 6:19 PM
    Hi, I don't know whether it's already covered or not. I'm trying to create / find a solution, where I will create a cassandra/es cluster with pulumi. The idea is kind of a kubernetes operator, where when I scale, the nodes will be added to the cluster(including the configuration and all). I was reading through the docs and found out that there is something called component and using that we can have abstraction. But is it possible to have methods for componants ?
    type Cassandra struct {
        pulumi.ResourceState
    }
    
    func NewCassandra(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*MyComponent, error) {
        cassandra := &Cassandra{}
        err := ctx.RegisterComponentResource("pkg:index:NewCassandra", name, cassandra, opts...)
        if err != nil {
            return nil, err
        }
    
        return cassandra, nil
    }
    Here is it possible to some how, I can add a method for
    cassandra.Scale()
    or more preferably, when I increase the node from 1-2 it'll get added to the cluster, that means, the state change event from the engine, should it be possible to do something there. Main thing I want is the capability to plug the scale method with increase/decrease number of nodes. ie, if I change the number of nod*es from 1 -> 2 it should trigger a scale up* op, and if 2-> 1 it should do scale down + destroy the vm.
    • 1
    • 1
  • s

    stocky-spoon-28903

    08/24/2020, 6:23 PM
    func (c *Cassandra) AMethod(/* params */) error {
        // ...
    }
  • s

    stocky-spoon-28903

    08/24/2020, 6:24 PM
    (You also probably want your
    NewCassandra
    function to return
    *Cassandra
    rather than
    *MyComponent
    c
    • 2
    • 1
  • c

    chilly-magazine-6129

    08/24/2020, 6:24 PM
    How can I get the uploaded lambda .zip file that Pulumi generates? I'd like to run it locally with some of the packages that simulate lambdas offline
  • d

    damp-secretary-81951

    08/24/2020, 8:00 PM
    What’s the process for sharing a Pulumi stack w/ someone else on my team? 1. Add them as a user to my Pulumi org 2. Have them pull down &
    cd
    into our git repo 3. Will
    pulumi up
    work at that point? I can only find docs for initializing a new stack, not starting to use an existing one
    b
    • 2
    • 2
  • h

    hundreds-musician-51496

    08/24/2020, 8:38 PM
    Regarding the StackReference resource - how do I ensure the output from a given reference is available? Does pulumi offer a way to run
    up
    on a stack and all its dependencies (i.e., all the stacks that it references as resources)?
    l
    • 2
    • 3
  • w

    wet-noon-14291

    08/24/2020, 9:22 PM
    One thing that I have seen on twitter as well as I've been asked myself while trying to promote pulumi is the concern around how up to date pulumi is? If something changes in azure (as it is in my case), how fast will pulumi be able to react and add support? It is a valid concern I would say, but I don't think it is a major issue. It would be nice with an official post addressing that explaining why it most likely isn't a concern.
    w
    k
    • 3
    • 7
  • f

    few-shoe-6011

    08/24/2020, 9:44 PM
    Hi, I'm using pulumi/kubernetes in nodejs and I'm a little confused why the deployment name is showing up as
    [secret]
    . Any idea? I am using a secret from pulumi to populate a kubernetes secret that is eventually mounted as a volume on the deployment, but I don't understand why that would cause the name to be masked.
    const envSecret = new kx.Secret(`${env}-api-secret`, {
      stringData: {
        ...
        GOOGLE_APPLICATION_CREDENTIALS: config.requireSecret('GOOGLE_APPLICATION_CREDENTIALS'),
      }
    });
    ...
    export const deployment_name = deployment.metadata.name;
    l
    • 2
    • 3
  • d

    damp-secretary-81951

    08/24/2020, 11:30 PM
    Is there any way to specify a different entrypoint for a particular stack? For instance, I want my dev, staging & prod stacks to all use
    index.js
    , but my
    quick-demo
    stack to use
    quick-demo.js
    instead.
    l
    • 2
    • 1
  • n

    nice-football-42636

    08/25/2020, 10:50 AM
    Hi guys. I'm working with the
    .NET SDK
    and I would like to know, if there is a way to access the current stack name (selected via
    pulumi cli
    ) before running the deployment. I found in the source code a property
    Deployment.Stack
    but it throws an exception if I try to access it before running the deployment. I need to do that in order to run deployment of 2 stacks in one azure dev ops pipeline through one project (we use monolithic approach to project/stacks structure). So I would like to access the currently selected stack and based on that run deployment of specific stack from code. (I know I can access it via
    PULUMI_STACK
    environment variable but I don't want to rely on some deep internal implementation details but rather use some top level api to access the stack name).
  • s

    straight-branch-26699

    08/25/2020, 1:47 PM
    Hi Team, We are looking at provisioning AWS resources. Is there a way to pick aws cli profiles from Pulumi config files for the same
    m
    h
    • 3
    • 3
  • g

    gifted-cat-21399

    08/25/2020, 4:59 PM
    Hello! Having issues trying to run Pulumi in Azure Pipelines. Our Pulumi project has a reference to a nuget package that we call "PulumiFactory" that sits in our private nuget repository on an installation of Artifactory. We can run Pulumi up locally but not in the Azure Pipeline. In Azure, we are using the Pulumi extension, hence Pulumi task. We have access to our Artifactory repository of nuget packages. I've retrieved the necessary nuget package successfully using a variety of methods in a task before attempting the Pulumi task in the pipeline. The baked-in Pulumi build script still seeks the "missing" package via nuget.org and obviously cannot find it as it's in another source. We wish not to abandon our approach of using this custom Pulumi Factory we've built and reference in the project. The error in the pipeline is basically the following: D:\a\1\s\DevOpsDevTest\XXX-USC-DEV-RG\XXX-USC-DEV-RG.csproj : error NU1101: Unable to find package OurCompany.PulumiFactory. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget.org. Can anyone help with this? Pulumi in Azure Pipelines, Pulumi referencing custom nuget package in our own Artifactory.
    w
    c
    • 3
    • 3
  • m

    many-psychiatrist-74327

    08/25/2020, 9:15 PM
    👋 Hello! I’m relatively new to Pulumi and have a presumably basic question: how do I get the kubeconfig file after creating a k8s cluster in EKS (in Python)? I want to: (1) create an EKS cluster, and then (2) deploy an app onto it. For (2), I need to pass the cluster’s information, otherwise I get an error of the form:
    unable to load Kubernetes client configuration from kubeconfig file
    . I see that in Crosswalk for AWS, the
    @pulumi/eks
    (nodejs) package would let me export
    cluster.kubeconfig
    (docs). But I don’t see anything similar for Python! And the Cluster Resource itself doesn’t seem to have any Output that has the necessary information to set my
    kubeconfig
    or otherwise create a Provider to use in my Kubernetes resources. Please help!
    b
    b
    • 3
    • 6
  • h

    handsome-zebra-11018

    08/26/2020, 2:45 AM
    I am looking to attach an existing nfs volume to container in EKS cluster.  The NFS volume already attached to all nodes on EKS cluster and wanted to attach it with container. Can anyone recommend how it can be done using pulumi?
    containers: [
                  {
                    name: appServerLabel,
                    image: config.get("docker_image") + ":" + config.get("docker_image_tag"),
                    ports: [{name: "http", containerPort: 80},{name: "https", containerPort: 443}],
                    volumeMounts: [
                      {
                          name: "volume-bigdisk",
                          mountPath: "/logs/"
                      }
                    ],
                  }
               ],
    volumes: [
                  {
                    name: "volume-bigdisk",
                    server: "servername*****",
                    path: "/af_appserver/VAF/bigdisk",
                    readOnly: false
                  }
             ]
    I am getting below error
    ame: string; server: string; path: string; readOnly: boolean; }[]; }' is not assignable to type 'PodSpec'.
                        Types of property 'volumes' are incompatible.
                          Type '{ name: string; server: string; path: string; readOnly: boolean; }[]' is not assignable to type 'Input<Input<Volume>[]>'.
                            Type '{ name: string; server: string; path: string; readOnly: boolean; }[]' is not assignable to type 'Input<Volume>[]'.
                              Type '{ name: string; server: string; path: string; readOnly: boolean; }' is not assignable to type 'Input<Volume>'.
                                Object literal may only specify known properties, and 'server' does not exist in type 'Input<Volume>'.
    g
    • 2
    • 4
Powered by Linen
Title
h

handsome-zebra-11018

08/26/2020, 2:45 AM
I am looking to attach an existing nfs volume to container in EKS cluster.  The NFS volume already attached to all nodes on EKS cluster and wanted to attach it with container. Can anyone recommend how it can be done using pulumi?
containers: [
              {
                name: appServerLabel,
                image: config.get("docker_image") + ":" + config.get("docker_image_tag"),
                ports: [{name: "http", containerPort: 80},{name: "https", containerPort: 443}],
                volumeMounts: [
                  {
                      name: "volume-bigdisk",
                      mountPath: "/logs/"
                  }
                ],
              }
           ],
volumes: [
              {
                name: "volume-bigdisk",
                server: "servername*****",
                path: "/af_appserver/VAF/bigdisk",
                readOnly: false
              }
         ]
I am getting below error
ame: string; server: string; path: string; readOnly: boolean; }[]; }' is not assignable to type 'PodSpec'.
                    Types of property 'volumes' are incompatible.
                      Type '{ name: string; server: string; path: string; readOnly: boolean; }[]' is not assignable to type 'Input<Input<Volume>[]>'.
                        Type '{ name: string; server: string; path: string; readOnly: boolean; }[]' is not assignable to type 'Input<Volume>[]'.
                          Type '{ name: string; server: string; path: string; readOnly: boolean; }' is not assignable to type 'Input<Volume>'.
                            Object literal may only specify known properties, and 'server' does not exist in type 'Input<Volume>'.
g

gorgeous-egg-16927

08/26/2020, 3:40 PM
volumes
doesn’t include the
server
field, so that’s why the type checker is complaining. https://www.pulumi.com/docs/reference/pkg/kubernetes/core/v1/pod/#volume
path
is also incorrect
Oh, I think you put a few of the args in the wrong spot. This is probably what you want:
containers: [
            {
                name: appServerLabel,
                image: config.get("docker_image") + ":" + config.get("docker_image_tag"),
                ports: [{name: "http", containerPort: 80},{name: "https", containerPort: 443}],
                volumeMounts: [
                    {
                        name: "volume-bigdisk",
                        mountPath: "/logs/"
                    }
                ],
            }
        ],
        volumes: [
            {
                name: "volume-bigdisk",
                nfs: {
                    server: "servername*****",
                    path: "/af_appserver/VAF/bigdisk",
                    readOnly: false
                }
            }
        ]
h

handsome-zebra-11018

08/27/2020, 2:08 AM
Thanks.. it worked.
View count: 2