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

    early-intern-90238

    01/03/2020, 10:43 PM
    in Kubernetes
  • e

    early-intern-90238

    01/03/2020, 10:43 PM
    I am thinking recreating the entire yml in Pulumi is probably a pain and not a good idea...
  • e

    early-intern-90238

    01/03/2020, 10:55 PM
    I guess I could use Helm...freaking hate helm though...
    c
    g
    • 3
    • 4
  • w

    wet-sunset-4939

    01/04/2020, 1:56 AM
    Hello All, I'm facing 2 issues when provision the Azure API Management: The provision is really take time and the Azure DevOps and Pulumi got timeout however, the resource eventually created on Azure. So the state on Azure and Pulumi are not matched. The second issue I got is not able to specify the Consumption sku in the setting. Please help if you have any solution. Thanks and Have a good day to all.
    s
    • 2
    • 3
  • b

    bright-orange-69401

    01/04/2020, 6:25 AM
    I'm looking for guidelines regarding how to work with
    serverless
    and
    pulumi
    side by side Serverless does a good job at providing code boilerplate and packaging functions but Pulumi far outclasses it when it comes to infrastructure provisioning. What's the best way to make those two work together ? Should I just add a "Managed By" tag to my resources depending on wether they were deployed by Serverless or Pulumi ? How do I automatically import in my Pulumi stack resources that were created by Serverless ? Is it better to not use Serverless's deployment features altogether ?
    m
    s
    • 3
    • 3
  • f

    flat-insurance-25294

    01/04/2020, 3:55 PM
    Does anyone know how to automatically tag everything on AWS created by pulumi so it becomes easy to find all resources created somewhere for staging or other stacks? And is there a way to set configs programatically?
    l
    • 2
    • 2
  • f

    flat-insurance-25294

    01/04/2020, 10:18 PM
    I could find any resources on this, and I’ve asked before but no answer; How do you set configs and secrets programmatically. Using Typescript, looking at Config module, it has no setters. Technically what I need to do is to create stacks on the fly. The concept of pre-defined stacks seems like a broken idea. It’s useful for stuff like production. But not useful if you’re trying to deploy an isolated environment while reusing parts of existing resources. Say I want to reuse an existing ECR (AWS) but or an entire new stack. I would have to create a new stack create a new yaml file for the stack fill said yaml file with the configs and then apply said stack. Preferably, I would have just wanted to say
    pulumi up new-stack-123 <bunch of env variables>
  • f

    flat-insurance-25294

    01/04/2020, 10:27 PM
    Is there a way to turn
    pulumi.Output*<*string[]*>*
    into a
    pulumi.Input*<*string*>[]*
    ?
    w
    • 2
    • 20
  • f

    flat-insurance-25294

    01/04/2020, 10:44 PM
    I’ve solved it like
    let q  = outputArray.apply((servers) => {
         let output: pulumi.Output<string>[] = servers.map(s => pulumi.output(s))
        return output 
    }
    )
    But not comfortable with it.
  • f

    flat-insurance-25294

    01/04/2020, 10:44 PM
    Wish it was clearer how Pulumi lifts all these promises. https://www.pulumi.com/docs/intro/concepts/programming-model/#outputs-and-strings aren’t super clear about the magic going on.
  • f

    flat-insurance-25294

    01/05/2020, 12:11 AM
    Also is there an approach to
    get_or_create()
    ? Say a few stacks depend on a resource, but if it doesn’t exist it can get them. And other stacks can do the same, that way I don’t rely on running a specific stack first.
  • b

    bright-orange-69401

    01/06/2020, 12:35 AM
    How do you manage DNS-related resources in Pulumi ? I have a Route53
    Zone
    which is global (ex: example.com) then I have
    Record
    for each environment (ex: dev.example.com, etc.) Should I create a
    core
    stack for the
    Zone
    and a
    dev
    stack for my dev
    Record
    ? If so, how do I indicate in my
    __main__.py
    which resources should be deployed according to the stack that's currently selected ? Is there a native mechanism or should I just hack about ?
    g
    b
    f
    • 4
    • 7
  • r

    red-football-97286

    01/06/2020, 4:22 PM
    Hoping someone can help me. I'm running through this guide on Stack Reference, https://github.com/pulumi/examples/tree/master/aws-py-stackreference When I create department under the company directory, it won't allow me to create
    pulumi stack init dev
    as it says it already exists. What am I doing wrong?
    g
    b
    • 3
    • 7
  • b

    boundless-monkey-50243

    01/06/2020, 4:54 PM
    How can I turn an existing Fargate cluster into something that can work with
    @pulumi/awsx
    ? I can't find a "getCluster" method or anything.
    getDefault
    helpfully wants to create one for me, but we've already got existing infrastructure.
    h
    • 2
    • 3
  • b

    billions-glass-17089

    01/06/2020, 8:41 PM
    been reading the docs, but don't see examples of how one might go about writing test specs, did I miss it somewhere?
    • 1
    • 1
  • h

    handsome-truck-95168

    01/06/2020, 8:58 PM
    I've got an assertion failure that I don't understand:
    panic: fatal: An assertion has failed: Expected diff to not require deletion or replacement during Update of urn:pulumi:deploy-test::deploy::aws:ecs/service:Service::xxx
    I replaced dependencies for the Service, could that be the problem?
    w
    • 2
    • 8
  • s

    stocky-island-3676

    01/08/2020, 11:11 AM
    How can we restrict a Pulumi access-token to stacks of one Git repository? We’re going to use Pulumi in CI for our microservices. Each microservice’s deployment config is in its own Git repository. In the CI, we would like to use one service-account, here worked around with restricted access-tokens, for each microservice.
    c
    • 2
    • 6
  • b

    better-actor-92669

    01/08/2020, 11:48 AM
    message has been deleted
  • b

    big-potato-91793

    01/08/2020, 3:29 PM
    Do you have any ETA for getting the 1.8.1 container image of pulumi?
    b
    s
    • 3
    • 5
  • m

    millions-judge-24978

    01/08/2020, 5:22 PM
    Is there a way to provide a custom tag when using the
    @pulumi/docker
    buildAndPushImage()
    (for example, a GIT_SHA), rather than the autogenerated tag that is created?
    • 1
    • 1
  • p

    prehistoric-account-60014

    01/08/2020, 5:31 PM
    Is it possible to detect when Pulumi is running in watch mode to change resource behavior? For example, could a custom docker image resource be made that detects when Pulumi is running in watch mode and whenever there’s a change to source files, instead of rebuilding the image it syncs the files through a volume, allowing for stuff like hot-reloading? This would not be dissimilar from what Tilt and Skaffold allow you to do.
    g
    • 2
    • 4
  • c

    careful-market-30508

    01/08/2020, 10:10 PM
    Where is the code for core of pulumi in (https://github.com/pulumi) ? - Is it using terraform ?
    b
    • 2
    • 5
  • c

    careful-market-30508

    01/08/2020, 11:39 PM
    Is it necessary to have pulumi cli installed for my program that uses pulumi client library to run ?
    w
    • 2
    • 1
  • o

    orange-ghost-99337

    01/09/2020, 7:33 AM
    is there a way to set common config to use for all stacks?
    b
    p
    • 3
    • 16
  • c

    cold-coat-35200

    01/09/2020, 10:42 AM
    hi, I'm currently using Github provider to login to the pulumi console, how can I use the email provider to log in? I can't see an option to add an email based identity in the settings, just cloudflare, gitlab etc., tried the forget password option, but it says that I only have the Github provider for that email, so I'm unable to change password.
  • f

    flat-insurance-25294

    01/09/2020, 12:15 PM
    @white-balloon-205 Sorry I asked before, but not sure if you got it. Is there a way to create or refer to a resource? In this case it’s groups and users (aws IAM). I want to access a group and a user and create either if they don’t exist and add user to the said group if the association isn’t already set.
    b
    • 2
    • 12
  • l

    little-energy-64187

    01/09/2020, 12:59 PM
    Is there a way to specify the target k8s cluster for
    query-kubernetes
    ? like with a k8s.Provider eg
  • b

    bright-orange-69401

    01/09/2020, 1:29 PM
    How should I got about making my own Pulumi provider from an existing Terraform provider ? I've taken a look at the pulumi bridge repository: https://github.com/pulumi/pulumi-tf-provider-boilerplate/ A lot of stuff seems hard-coded for internal pulumi purposes... I'd like to make a
    pulumi-snowflake
    provider, can someone give me some guidance here ? 🙂
    b
    • 2
    • 14
  • r

    red-football-97286

    01/09/2020, 4:37 PM
    Is there a way to pass two arguments using the
    apply
    method with Python?
    template = lambda Topic, Endpoint: { "AWSTemplateFormatVersion": "2010-09-09",
        "Resources": {
            "MySubscription": {
                "Type": "AWS::SNS::Subscription",
                "Properties": {
                    "Protocol": "email",
                    "Endpoint": Endpoint,
                    "TopicArn": Topic
                },
            }
        }
    }
    
    sns_email = cloudformation.Stack(
        "Cloudformation-email",
        template_body = (template(sns_topic.arn, Endpoint))
    )
    g
    • 2
    • 1
  • i

    incalculable-engineer-92975

    01/09/2020, 7:08 PM
    I'm trying to use structured config w/pulumi 1.8.1 and not getting anywhere, I keep getting invalid JSON errors: 
    config:
    a
    • 2
    • 9
Powered by Linen
Title
i

incalculable-engineer-92975

01/09/2020, 7:08 PM
I'm trying to use structured config w/pulumi 1.8.1 and not getting anywhere, I keep getting invalid JSON errors: 
config:
The error I’m getting is: Error: Configuration ‘test:repos’ value ‘[object Object],[object Object]’ is not a valid JSON object
If I remove the list of items and just use a single entry that also doesn’t work
a

acoustic-florist-12628

01/09/2020, 7:35 PM
If you're using TypeScript, I believe you need to define an interface for the object in order for requireObject to know how to construct it. For example, if you define an interface myType, you then call requireObject<myType>, or if your config has a list of those objects, requireObject<myType[]>. This page gives a good example of how to get objects from the config file in various languages: https://www.pulumi.com/docs/intro/concepts/config/#structured-configuration
i

incalculable-engineer-92975

01/09/2020, 8:16 PM
Yep, tried that. No love from Pulumi.
Replacing YAML w/a JSON string DOES work though
obviously w/slightly different config syntax
a

acoustic-florist-12628

01/09/2020, 8:26 PM
hmmm, maybe it's a bug 🤔
I think the yaml format works if you have a setup like this: Pulumi.<stack>.yaml:
config:
  aws:region: us-east-1
  configtest:app-names: |-
    foo-app
  configtest:repos:
    - name: "root"
      account: "xxxxx"
      untaggedExpireDays: 7
      mutableTags: true
      trustRelationships: [ "xxxxx", "xxxxx", "xxxxx", "xxxxx", "xxxxx" ]
    - name: "dev"
      account: "xxxxx"
      untaggedExpireDays: 14
      mutableTags: true
      trustRelationships: [ "xxxxx", "xxxxx", "xxxxx", "xxxxx", "xxxxx" ]
index.ts:
import * as pulumi from "@pulumi/pulumi";

interface Repo {
    name: string,
    account: string,
    untaggedExpireDays: number,
    mutableTags: boolean,
    trustRelationships: string[]
}

const config = new pulumi.Config();
const objects = config.requireObject<Repo[]>("repos");

console.log(objects);
i

incalculable-engineer-92975

01/09/2020, 10:01 PM
ok, i’ll try again. thanks!
View count: 2