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

    rhythmic-finland-36256

    05/26/2020, 6:25 PM
    Marking fields (outputs) of custom components as secret when creating own `ComponentResource`s…
    w
    • 2
    • 12
  • b

    best-lifeguard-91445

    05/26/2020, 7:00 PM
    what is the consensus of storing the pulumi.stack.yml containing secrets (encrypted) in github?
    👍 1
  • w

    wonderful-dog-9045

    05/26/2020, 8:10 PM
    How can I execute
    pulumi stack select
    in interactive mode from nodejs? Using
    childProcess.execSync("pulumi stack select", { stdio: "inherit" } )
    doesn't work, because somehow pulumi automatically goes into non-interactive mode.
    • 1
    • 4
  • q

    quiet-cat-43765

    05/26/2020, 9:01 PM
    👋 I’m here! What’d I miss?
  • q

    quiet-cat-43765

    05/26/2020, 9:02 PM
    Hello people, I am new to pulumi. I have used terraform a bunch but using something like pulumi right inside my python application is amazing.
  • q

    quiet-cat-43765

    05/26/2020, 9:02 PM
    I wanted to know if there is a way to do
    pulumi up
    as a function call inside python? For context, I am creating some infrastructure on the fly for a data pipeline inside airflow which is a written in python.
    b
    • 2
    • 2
  • b

    best-lifeguard-91445

    05/26/2020, 9:25 PM
    Is there a way to get a region abbreviation? I'm looking for the schema 2: us-east-1 => use1
    b
    • 2
    • 3
  • i

    important-appointment-55126

    05/26/2020, 10:02 PM
    hrm somehow i got to a state where an aws policy was created, attempted to update/rename it via the Name property and it was deleted (presumably has be delete-then-create).. and now i have no policy (lab account so nothing else in this account at the current time) however pulumi still thinks it should exist
    g
    • 2
    • 9
  • f

    famous-jelly-72366

    05/27/2020, 7:02 AM
    Is there a good way to refactor into multiple stacks/projects? How to move current state over if e.g. refactoring a module into a separate project/stack?
    f
    a
    • 3
    • 14
  • s

    silly-stone-79070

    05/27/2020, 8:10 AM
    Hi all, I have used pulumi a fair amount in JS. But I have recently started using it in golang. In the golang implementation how do I use outputs, e.g the IP address of a network interface as an input for another object? So far I have been running an Apply on the output, then exporting using
    ctx.Export
    and finally to use it doing
    ctx.GetConfig
    . This just seems like jumping through hoops though so surely there is a better way I don't know about? Cheers
    f
    i
    • 3
    • 5
  • b

    billions-breakfast-36131

    05/27/2020, 11:11 AM
    Hi, does Pulumi have support for ECS Scheduled Tasks (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduled_tasks.html)? I'm struggling to find docs/examples for it.
    b
    • 2
    • 5
  • f

    flat-insurance-25294

    05/27/2020, 11:25 AM
    Hey, so we have decided to put our fully client side rendered SPA inside docker to have neat way to store artifacts (source maps) and keep history in
    AWS.ECR
    . However our current way of deploying is the generic copy assets to S3 and would like to keep that. What is the current best practice in this area. Does pulumi have support for reading a docker image or mounting a container, and access files? Or can we call or is there a way to call docker commands from pulimi, like
    docker cp
    to copy files over to the host (the CI) and then just go through the general Pulimi route of moving assets over? Granted that still needs to mount/create a container out of the image.
  • f

    flat-insurance-25294

    05/27/2020, 11:27 AM
    I guess this is the way
    const container = new docker.Container("frontend", {
        image: ???,
    });
    But https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/docker/#Container doesn’t indicate anything we can do.
  • d

    dazzling-sundown-39670

    05/27/2020, 11:32 AM
    I've created a VPC with
    awsx.ec2.Vpc
    , how can I create a
    aws.elasticache.SubnetGroup
    based on the subnets in that VPC? I've tried some different things, code in thread:
    b
    • 2
    • 27
  • l

    limited-carpenter-34991

    05/27/2020, 11:35 AM
    Hey there, is it possible to save the pulumi state inside gitlab, to use gitlab as the pulumi state backend ?
    b
    • 2
    • 1
  • m

    millions-furniture-75402

    05/27/2020, 1:00 PM
    I’m having trouble with stack references, but I can’t understand what I’m doing wrong. The VPC is pre-existing, and the shared-infra stack `pulumi up`s just fine `catmeme/shared-infra/develop`:
    ...
    
    const parameterVpcId = config.require("parameterVpcId");
    export const privateSubnetIds: [] = config.requireObject("privateSubnetIds");
    export const publicSubnetIds: [] = config.requireObject("publicSubnetIds");
    
    export const vpcId: pulumi.Output<string> = pulumi.output(aws.ssm.getParameter({
      name: parameterVpcId,
    })).value;
    
    const vpc = awsx.ec2.Vpc.fromExistingIds(`${appName}-local-vpc`, {
      vpcId,
      privateSubnetIds,
      publicSubnetIds,
    });
    
    ...
    `catmeme/application/develop-test`:
    ...
    
    const stackDevelop = new pulumi.StackReference("catmeme/shared-infra-develop/develop");
    
    const vpc = awsx.ec2.Vpc.fromExistingIds("bvt", {
      vpcId: stackDevelop.getOutput("vpcId"),
      // @ts-ignore
      privateSubnetIds: stackDevelop.getOutput("privateSubnetIds") as pulumi.Output<string[]>,
      // @ts-ignore
      publicSubnetIds: stackDevelop.getOutput("publicSubnetIds") as pulumi.Output<string[]>,
    });
    
    ...
    I get an error:
    error: Preview failed: resource 'vpc-03489fb5e3c04080d' does not exist
    But the VPC with that ID does exist. For all intents and purposes, shared-infra declared the VPC the same way and there isn’t a problem. What am I missing?
    b
    • 2
    • 3
  • d

    dazzling-sundown-39670

    05/27/2020, 1:38 PM
    Is it possible to have some shared configuration that applies to all stacks?
  • m

    millions-furniture-75402

    05/27/2020, 1:39 PM
    StackReference is one way
    d
    a
    • 3
    • 4
  • m

    millions-furniture-75402

    05/27/2020, 2:26 PM
    How can I get an existing ApplicationLoadBalancer?
    // has missing properties error when I try to use it
    const alb = pulumi.output(<http://aws.lb|aws.lb>.getLoadBalancer({
      // @ts-ignore
      arn: stackSandbox.getOutput("albArn")
    }));
    
    // declares a new ALB
    const alb = new <http://awsx.lb|awsx.lb>.ApplicationLoadBalancer("test-default-lb", {
      // @ts-ignore
      arn: stackSandbox.getOutput("albArn"),
      subnets: stackSandbox.getOutput("publicSubnetIds").apply(v => v),
      vpc
    });
    a
    b
    f
    • 4
    • 34
  • d

    dazzling-sundown-39670

    05/27/2020, 2:41 PM
    Using
    @pulumi/kubernetes/helm/v2
    , how do I add another repo? Using helm I would run
    helm repo add jetstack <https://charts.jetstack.io>
    for example
    b
    • 2
    • 17
  • w

    wide-journalist-154

    05/27/2020, 3:22 PM
    When I run 
    pulumi up
     I get this error:
    Exception: invocation of aws:iam/getPolicyDocument:getPolicyDocument returned an error: grpc: error while marshaling: proto: repeated field Values has nil element
    This is the code from a 
    policy_document
    that is causing the error:
    "resources": [ds_key.arn.apply(lambda arn: f'{arn}')]
    I've tried adding the 
    depends_on
     option to the 
    policy_document
     resource, but it didn't help.
    opts=pulumi.ResourceOptions(depends_on=[ds_key])
    This is one of several places in my pulumi code where I need to access the
    arn
    of another resource to create a
    policy_document
    . I used the
    apply
    function as shown in this code for the key, and added the
    depends_on
    option, but I haven't been able to get any of them to work. I've resorted to "build" functions that create
    arns
    from resource names - a hack I'd like to get rid of and not something that works in the case of keys. Any instructions/suggestions or sample python code you can share would be much appreciated - thanks!
    f
    • 2
    • 6
  • g

    gifted-city-99717

    05/27/2020, 4:19 PM
    Hi! can complex types be used int Pulumi.<stack>.yml? I’d like to assign some specific tags for each stack — eg:
    config:
      aws:region: us-east-2
      tsdb:tags:
        Name: tsdb-dev
        Foo: bar
      tsdb:instanceSize: t2.micro
    m
    • 2
    • 2
  • m

    millions-furniture-75402

    05/27/2020, 7:31 PM
    I’ve changed the names of my github repositories, and they aren’t reflected in the pulumi app. I’ve tried renaming via
    pulumi stack rename organization/new-project-name/stack
    but the proj-group-name in the pulumi app still shows the old name. Is this solveable?
  • m

    mammoth-night-22453

    05/27/2020, 8:14 PM
    Trying to reference nested configuration objects directly, and not having much luck. I'm using C#. For example, given the following configuration:
    config:
      proj:data:
        nonProductionStart: 10.1.0.0
        productionStart: 10.2.0.0
        stacks:
        - name: Sandbox
          peerConnectionName: peerConnectionId
          stackName: org/Sandbox/mono
    I can indeed follow the docs and get a JsonElement first, then get the sub-element as a string using something like
    var data = Configuration.GetObject<JsonElement>("data");
    var stacksAsString = data.GetProperty("stacks");
    But what I really am trying to do is something like:
    var stacks = Configuration.GetObject<List<StackReferenceInfo>>("data.stacks");
    But, this does not appear to work. Is there no way to achieve this without jumping through the JsonElement hoop? I have reviewed https://www.pulumi.com/docs/intro/concepts/config/#structured-configuration and it shows the JsonElement method - perhaps that's the only way?
  • i

    important-appointment-55126

    05/27/2020, 9:01 PM
    If I just want to group a bunch of related resources together within a stack, so they show up thusly in the resource hierarchy, is it best practice to form them into a component? Or is there a simpler way of doing that?
    l
    m
    b
    • 4
    • 16
  • a

    average-receptionist-65239

    05/28/2020, 1:38 AM
    hiya, I'm new to Pulumi. Currently getting a high-level overview rather than deep in the details. I like the idea of using a familiar PL to do the declarative infrastructure! I'm curious if each provider for Pulumi needs a "binding" for each language supported? For example, I came across the following provider: https://github.com/pulumi/pulumi-vault/tree/master/sdk It has subdirs for dotnet, go, nodejs, and python. There seem to be a lot of providers so am wondering if that's a barrier to adoption because of the effort required to add (and more importantly maintain) the PL-specific SDK for each provider? Some other PLs I'm thinking of would be: JVM ones (Java, Scala, Kotlin, Clojure, ...), FP ones (Haskell, OCaml, ...), other popular scripting languages (Ruby, Perl, Bash?, ...). Okay, not Bash 😉 .. or Perl.
    g
    • 2
    • 2
  • a

    average-receptionist-65239

    05/28/2020, 1:43 AM
    On a similar line of thought, I'm wondering if say someone releases a great open-source Pulumi library (e.g. for setting up a production-ready k8s cluster with all the awesome sauce). They write this library in TypeScript. Can I reuse it from Go or do I need a similar library that's written in Go?
    g
    g
    • 3
    • 3
  • a

    average-receptionist-65239

    05/28/2020, 4:04 AM
    Given the above, what's the most popular language for community libraries for Pulumi? I'm inclined towards TypeScript (for type-safety) or Go as it's big in the space. However, the Go bindings look a little awkward (maybe any Go would look that way to me as I'm not that familiar with it). I like the look of the F# bindings as I'm a bit of an FP guy, however, it'd be a bit unusual to reach for .NET in my projects.
    r
    l
    • 3
    • 8
  • d

    dazzling-sundown-39670

    05/28/2020, 1:15 PM
    Sorry for reasking but #aws feels pretty dead. I'm trying to replicate these steps outlined here: https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/aws.md#iam-policy but I get the following error:
    time="2020-05-28T13:10:26Z" level=info msg="Assuming role: arn:aws:iam::503405380068:role/k8s-pulumi-instanceRole-role-9e5a01b"
    time="2020-05-28T13:12:30Z" level=error msg="AccessDenied: User: arn:aws:sts::503405380068:assumed-role/k8s-pulumi-instanceRole-role-9e5a01b/i-0dcb94de93da90dae is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::503405380068:role/k8s-pulumi-instanceRole-role-9e5a01b\n\tstatus code: 403, request id: 33ba5c26-7b45-4234-a762-b2f1ac4d8a42"
    I've put the relevant code here in a gist if you want to check it out: https://gist.github.com/benjick/7c096f5634b34f022adf81469d440d4a Cheers!
  • m

    millions-furniture-75402

    05/28/2020, 2:34 PM
    Is there a recommended way to use a
    .env
    file with an ECS task definition? It looks like
    environment
    supports an array of key value objects, but nothing akin to
    --env-file
    … should I just read in that file locally, and dynamically build the key values array?
    g
    • 2
    • 2
Powered by Linen
Title
m

millions-furniture-75402

05/28/2020, 2:34 PM
Is there a recommended way to use a
.env
file with an ECS task definition? It looks like
environment
supports an array of key value objects, but nothing akin to
--env-file
… should I just read in that file locally, and dynamically build the key values array?
g

gentle-diamond-70147

05/28/2020, 4:57 PM
I think reading the file in and building the array in code is the best/right approach.
m

millions-furniture-75402

05/28/2020, 5:35 PM
Thank you for the confirmation 👍
View count: 1