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-family-43281

    12/13/2018, 7:38 PM
    i'm not sure which one is gonna be run first, so i would need to check if the kinesis stream already exists in order to avoid creating it
  • e

    early-family-43281

    12/13/2018, 7:39 PM
    so imagine i run pulumiA first, and it created the kinesis stream
  • e

    early-family-43281

    12/13/2018, 7:40 PM
    then i run pulumiB, which checks for existence of said kinesis strem. it exists, so it does not create it
  • e

    early-family-43281

    12/13/2018, 7:40 PM
    then, i update something on pulumiA and run it again
  • e

    early-family-43281

    12/13/2018, 7:40 PM
    as stream already exists, i do not do a new aws.kinesis.Stream
  • e

    early-family-43281

    12/13/2018, 7:40 PM
    and the result is that pulumi thinks i want to delete that stream
  • e

    early-family-43281

    12/13/2018, 7:41 PM
    not sure if it makes sense what i'm trying to do
  • e

    early-family-43281

    12/13/2018, 7:41 PM
    šŸ˜„
    w
    • 2
    • 15
  • g

    glamorous-printer-66548

    12/13/2018, 10:30 PM
    hey folks, there seems to be bigger bug being introduced with
    "@pulumi/kubernetes": "0.18.0",
    or
    "@pulumi/pulumi": "0.16.7",
    https://github.com/pulumi/pulumi/issues/2170#issuecomment-447143452
    m
    • 2
    • 1
  • m

    miniature-potato-84713

    12/14/2018, 12:07 AM
    Is this the channel to ask/discuss implementation details? Or is there another one, more dedicated for such conversations?
    c
    • 2
    • 3
  • m

    miniature-potato-84713

    12/14/2018, 12:15 AM
    Problem I have a bunch of static html websites that need hosting. Other infrastructure is already in AWS (S3 buckets or EC2). However, because the web-pages need to respond to the client’s
    Accept-Language
    header or a saved cookie, I think we’ll have to do some URL rewriting (to ensure transparency and SEO). For example,
    foo.bla/site.html
    should forward to
    foo.bla/en/site.html
    by default, or whatever language the header/cookie contained. Solutions 1. Client-side Javascript ā€œcloakingā€ etc are off the table, I think. Doesn’t play well with SEO and is annoying for clients. 2. Use AWS S3 and web-page redirect: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html 3. Host the site in a Kubernetes container with nginx/apache. Of 2. and 3. I am leaning towards 2. because it’s probably easiest to set up for now. Both could be implemented using PÅ«lumi, and that would be the right way to go about it. What are your thoughts, and does PÅ«lumi handle the redirect configurations for 2.?
    w
    c
    • 3
    • 9
  • b

    billowy-businessperson-60383

    12/14/2018, 8:12 AM
    hi guys, where can i find the documentation for pulumi python
    šŸ¤— 1
    c
    w
    a
    • 4
    • 4
  • f

    faint-motherboard-95438

    12/14/2018, 1:41 PM
    Hello, I was wondering what would be the best way to handle some applications specific users/credentials with pulumi ? ie. postgres Before diving too deep in researches I could use some thoughts from you guys šŸ™‚
    b
    g
    w
    • 4
    • 5
  • b

    better-rainbow-14549

    12/14/2018, 5:59 PM
    is there any way to get an azure subscription ID from one of the resources? they should know it right?
    w
    • 2
    • 1
  • b

    better-rainbow-14549

    12/14/2018, 8:39 PM
    + ā”œā”€ kubernetes:apiextensions.kubernetes.io:CustomResourceDefinition azureassignedidentities.aadpodidentity.kubernetes.io creating failed error: Plan apply failed: the server could not find the requested resource
    c
    • 2
    • 4
  • e

    early-musician-41645

    12/14/2018, 11:24 PM
    I've created a new stack as a user in my org, but it's showing up under my user account, not my team/org account. Is there a CLI action to transfer it or rename the stack so that it is accessible from org-stacks?
  • e

    early-musician-41645

    12/14/2018, 11:26 PM
    nevermind, I just exported+imported and prefixed with my org's name
    šŸ‘ 1
  • e

    early-musician-41645

    12/14/2018, 11:26 PM
    that seems to have worked
  • b

    billowy-television-23506

    12/15/2018, 11:24 PM
    I’ve been playing with wiring up Pulumi as a CD step in Azure DevOps. They use the web based Visual Studio Code editor for the output of each step. VSC highlights urls and lets you ctrl+click them to launch a browser. Super convenient. It’d be cool to be able to use/do that from that from https://app.pulumi.com. Don't know if it's on the road map
    w
    • 2
    • 2
  • i

    important-carpenter-15282

    12/16/2018, 4:49 AM
    Ran my first
    pulumi up
    and this is magical.
    ✨ 3
    ā¤ļø 4
  • a

    abundant-airplane-93796

    12/16/2018, 9:21 PM
    can anyone point me to a code example of creating a custom pulumi resource - ie, wrapping up a call to a 3rd party api, or wrapping a command line tool?
    c
    • 2
    • 2
  • f

    faint-motherboard-95438

    12/17/2018, 5:44 PM
    @white-balloon-205 It seems like the
    gcp
    Cluster
    resource is unable to scale up an already existing cluster by changing its
    nodeCount
    or maybe I’m missing something ?
    Type                                 Name                                       Status                   Info
         pulumi:pulumi:Stack                  REDACTED
         └─ REDACTED:Cluster  REDACTED-cluster
     +-     └─ gcp:container:Cluster          REDACTED                   **replacing failed**    [diff: ~initialNodeCount]; 1 error
    
    Diagnostics:
      gcp:container:Cluster (REDACTED):
        error: Plan apply failed: googleapi: Error 409: Already exists: projects/REDACTED/zones/REDACTED/clusters/REDACTED-cluster., alreadyExists
    a
    o
    g
    • 4
    • 29
  • d

    delightful-waiter-79687

    12/17/2018, 8:32 PM
    USPs of Pulumi
    - How different is Pulumi from JenkinsX?
    g
    • 2
    • 1
  • s

    shy-finland-77998

    12/18/2018, 7:41 PM
    hello world
    Just discovered Pulumi. Holy wow. LOVE the value offer here. Going to be playing with this tonight. I’ve got a use case where we’re going to start spinning up an env. per pull request in Github. So going to try out that use case using Pulumi. šŸš€
    ā¤ļø 3
    c
    • 2
    • 2
  • c

    colossal-thailand-53880

    12/19/2018, 2:39 AM
    Does anyone have experience with the Pulumi Github App? I've added it to a repository, but aren't seeing anything show up on Pull Requests. Is there any specific config needed to activate it?
    c
    • 2
    • 7
  • a

    average-summer-30977

    12/19/2018, 7:12 AM
    Hello there!
    šŸ‘‹ 3
  • g

    gifted-island-55702

    12/19/2018, 9:12 AM
    Hi! I have an issue with Kubernetes provider. According to documentation (https://pulumi.io/quickstart/kubernetes/setup.html) it’s possible to use a provider that doesn’t use local
    ~/.kube
    config but rather configuration exported for example from GKE cluster:
    f
    w
    c
    • 4
    • 16
  • f

    faint-motherboard-95438

    12/19/2018, 10:56 AM
    @white-balloon-205 I have a weird behaviour. I’m provisioning a gke cluster with pulumi, no issue here. But if I try to delete it (removing it from the stack), the update went well, everything is flagged as deleted and exit without error, yet the cluster is still there in gke. Is this a problem with the terraform provider under the hood, or is it a feature or intended (and if so should be explicitly mentioned) ?
    s
    • 2
    • 8
  • j

    jolly-lifeguard-22556

    12/19/2018, 2:16 PM
    Hey everyone! I've been working on a Pulumi program that targets a Kubernetes cluster and am a little confused as to how providers work when targeting a Helm chart. On all the other K8s objects (Deployment, Service, etc) I can explicitly set the provider on the CustomResourceOptions but the Helm Chart exposes ComponentResourceOptions which takes a Record of keyed providers. It's not really clear from the docs how these keys are supposed to be used. I just want to ensure that the Helm resource is correctly targeting the Kubernetes instance from my provider but right now I'm seeing it attempt to target whatever context is currently set in my local kubeconfig
    w
    • 2
    • 2
  • g

    gifted-island-55702

    12/19/2018, 3:03 PM
    Hello again! Today when I was trying to setup multi-stack configuration with exporting kubeconfig to another stack I found a strange issue with assembling kubeconfig yaml used as an export. This example shows how to create that kubeconfig: https://github.com/pulumi/examples/blob/master/gcp-ts-gke/cluster.ts#L27-L56. What I tried is to replace this part of the code:
    export const k8sConfig = pulumi.
        all([ k8sCluster.name, k8sCluster.endpoint, k8sCluster.masterAuth ]).
        apply(([ name, endpoint, auth ]) => {
            const context = `${gcp.config.project}_${gcp.config.zone}_${name}`;
            return `apiVersion: v1...
    with:
    export const k8sConfig = pulumi.
        all([ k8sCluster.project, k8sCluster.region, k8sCluster.zone, k8sCluster.name, k8sCluster.endpoint, k8sCluster.masterAuth ]).
        apply(([ project, region, zone, name, endpoint, auth ]) => {
            const location = region || zone
            const context = `${project}_${location}_${name}`
            return `apiVersion: v1...
    w
    • 2
    • 10
Powered by Linen
Title
g

gifted-island-55702

12/19/2018, 3:03 PM
Hello again! Today when I was trying to setup multi-stack configuration with exporting kubeconfig to another stack I found a strange issue with assembling kubeconfig yaml used as an export. This example shows how to create that kubeconfig: https://github.com/pulumi/examples/blob/master/gcp-ts-gke/cluster.ts#L27-L56. What I tried is to replace this part of the code:
export const k8sConfig = pulumi.
    all([ k8sCluster.name, k8sCluster.endpoint, k8sCluster.masterAuth ]).
    apply(([ name, endpoint, auth ]) => {
        const context = `${gcp.config.project}_${gcp.config.zone}_${name}`;
        return `apiVersion: v1...
with:
export const k8sConfig = pulumi.
    all([ k8sCluster.project, k8sCluster.region, k8sCluster.zone, k8sCluster.name, k8sCluster.endpoint, k8sCluster.masterAuth ]).
    apply(([ project, region, zone, name, endpoint, auth ]) => {
        const location = region || zone
        const context = `${project}_${location}_${name}`
        return `apiVersion: v1...
Please, notice that I in my version below I used a project, region and zone from
k8sCluster
object instead of project config. When I did that, pulumi was finding changes to be deployed every time I run
pulumi update
even though there were no changes in my code. When I added some debug logging I found out that when it checks the updates,
project
variable doesn’t contain a plain string value but instead an object (it’s printed in my debug output as
[object ...]
). Is it a bug?
@white-balloon-205 do you have any hints about my issue?
w

white-balloon-205

12/19/2018, 11:15 PM
If you are seeing
[object Object]
it typically means you are attempting to toString an
Output
. Instead, you need to use
output.apply(x => x.toString())
or similar. For example to log the Output you would want to do
output.apply(console.log)
. The value of these `Output`s is not known unti the deployment has happened, which is why these are wrapped inside
Output
instead of just string values. The
pulumi.all
and
pulumi.apply
above are part of taking all of these Outputs and using them to construct a new string value for the kubeconfig.
Some quality-of-life improvements in this area coming as part of https://github.com/pulumi/pulumi/issues/2206.
g

gifted-island-55702

12/19/2018, 11:21 PM
I am actually using pulumi.all šŸ™‚
OK, I think I know what causes this behaviour. This is my code:
export const k8sConfig = pulumi.
    all([ cluster.project, cluster.name, cluster.endpoint, cluster.masterAuth, cluster.region, cluster.zone ]).
    apply(([ project, name, endpoint, auth, region, zone ]) => {
        const location = region || zone
        const context = `${project}_${location}_${name}`
        return `apiVersion: v1
clusters:
.....
So this should generate the kubeconfig for the k8s provider. As you can see I use either
region
or
zone
depending on the actual cluster (regional vs zonal) to create the context name. In my case the cluster is zonal, and
region
is undefined. In this scenario whenever I run
pulumi update
it always shows there is a change in my k8s provider due to a change in kubeconfig even though there was no change in the code.
When I remove
region
(which in my scenario always has
undefined
value) then it work correctly
I know I can just remove region but I wanted to add that code to a reusable function that might be called for both types of clusters (regional/zonal)
So the question is if the behaviour described above is a bug or not @white-balloon-205?
View count: 1