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

    red-match-15116

    05/12/2021, 5:04 PM
    @gifted-student-18589 this is so cool! 🙌🏽 https://twitter.com/doitadrian/status/1392413050528014337
    ❤️ 5
    g
    • 2
    • 2
  • r

    ripe-knife-11053

    05/12/2021, 5:37 PM
    What’s the best way to create “presets” in Pulumi in Python? For example, I want to create GCP projects with certain defaults (e.g. don’t create the default network), but I still want to allow end users to override those defaults and at the same time dont’ want to maintain a ton of boilerplate if I don’t have to.
    b
    s
    r
    • 4
    • 27
  • c

    curved-cartoon-90054

    05/12/2021, 6:02 PM
    Hi need help understanding how pulumi terraform bridge works all of our resource provisioning in aws is currently done via terraform i came across this git repo https://github.com/pulumi/pulumi-terraform-bridge is it possible to use our existing terraform scripts and deploy using pulumi ?
    b
    • 2
    • 1
  • c

    cuddly-father-4905

    05/12/2021, 7:13 PM
    Is there a reason why some resources are allowed to have a colon in their Pulumi name, whereas others aren't? e.g.
    Project
    from `@pulumi/gcp/organizations`:
    new Project('project:dev', { ...config })
    is invalid, whereas
    IAMBinding
    from `@pulumi/gcp/projects`:
    new IAMBinding('iam:my-role', { ...config })
    is valid
    b
    • 2
    • 10
  • c

    colossal-australia-65039

    05/12/2021, 8:39 PM
    is anyone else having the issue where
    pulumi preview --diff
    does not actually show the diff but only within arrays, e.g.
    ~ spec: {
              ~ template: {
                  ~ spec: {
                      ~ containers: [
                          ~ [0]: {
                                 // there should be something here but it's empty!!
                                }
                        ]
                    }
                }
            }
  • r

    rough-window-15889

    05/12/2021, 10:48 PM
    Does Pulumi State Delete delete the resource in the cloud provider as well as from the stack? Manually deleted a parent resource hoping to create a replacement but left with lots of errors and issues so looking at deleting the child resources.
    l
    • 2
    • 3
  • r

    rough-window-15889

    05/12/2021, 11:21 PM
    What’s a recommended recourse for manual deletion of parent resource from cloud provider? I manually deleted a resource and removed it from the code, but it has children resources that need to be deleted as well. When I try to run Pulumi up it tried to delete the children but fails saying the resource refers to a missing parents. Is there an easy workaround for this? Should I manually edit the stack and replace the parent resource with the stack as the parent? The end result I would like is to completely delete the resource and children from the cloud provider and stack.
    l
    c
    r
    • 4
    • 12
  • b

    brash-airline-37413

    05/13/2021, 6:33 AM
    I’m trying to create a test and getting the error “PromiseRejectionHandledWarning: Promise rejection was handled asynchronously”
    import { Vpc } from '@pulumi/awsx/ec2';
    import { describe, it } from 'mocha';
    
    describe('Network', () => {
      const myvpc: Vpc = new Vpc('test', {
        cidrBlock: '10.0.0.0/16',
      });
    
      it('should use correct cidr address', (done) => {
        myvpc.vpc.cidrBlock.apply(vpc => {
          done();
        });
      });
    });
    full error is
    Network
    (node:84386) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)
    (Use `node --trace-warnings ...` to show where the warning was created)
    (node:84386) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 4)
    Does anybody know what is happening here?
  • e

    early-truck-24471

    05/13/2021, 11:43 AM
    Hi, Is there a way to separate environment using different sub-folder keep the main file in the root folder and the for example project structure:
    └── project
        ├── __main__.py
        ├── Pulumi.yaml
        └── environments
            └──PROD
                ├── Pulumi.prod1.yaml
                ├── Pulumi.prod2.yaml
            └──STG
                ├── Pulumi.stg1.yaml
                ├── Pulumi.stg2.yaml
    b
    f
    • 3
    • 13
  • d

    dazzling-kilobyte-32990

    05/13/2021, 12:45 PM
    Is there an easy way using Crosswalk with ECS to specify a container port that is different to the load balancer port of 80?
    b
    • 2
    • 14
  • b

    brash-kite-78002

    05/13/2021, 1:06 PM
    Hello Everyone! Is there any way to get a resource value from a chart? For instance, I'm using a Cilium chart, and I need to make some PSPs for Hubble UI. I don't want to hardcode the service account name, so I want to somehow take it from the chart I'm using in the code. Thanks!
  • l

    lemon-machine-35564

    05/13/2021, 4:11 PM
    I’m using
    aws.cloudwatch.MetricAlarm
    to create a resource and I keep getting
    Type 'string' is not assignable to type 'Input<number>'.
    for many of the inputs. Note, this is just the example listed on https://www.pulumi.com/docs/reference/pkg/aws/cloudwatch/metricalarm/
    • 1
    • 1
  • g

    green-musician-49057

    05/13/2021, 5:32 PM
    Does using
    pulumi config set
    do anything aside from updating the yaml file? Is it safe to update the yaml directly? (I've been assuming it is safe)
    b
    b
    l
    • 4
    • 4
  • f

    fast-vegetable-68654

    05/13/2021, 5:40 PM
    What's the difference between a
    ComponentResource
    and a function wrapping a group of resources? Why would you reach for one over the other?
    b
    • 2
    • 1
  • l

    lively-wire-16126

    05/13/2021, 6:01 PM
    So I'm trying to implement a dynamic resource provider to create an AWS resource with the
    aws-sdk
    because I want to use a feature that isn't available in the terraform/pulumi resources yet. I'm using explicitly created providers to assume roles to manage resources in multiple AWS accounts, but I can't figure out how to make sure my component resource is using credentials for the correct AWS account. I found this: https://www.pulumi.com/blog/dynamic-providers/#provider-credentials But I don't actually understand what that means in terms of, like, how to actually instantiate the AWS sdk resources with the correct credentials. Does anyone have an example of what this looks like in practice?
  • l

    lively-wire-16126

    05/13/2021, 6:02 PM
    I tried passing
    { provider: myProvider }
    as the
    CustomResourceOptions
    but that doesn't seem to do it.
  • f

    full-dress-10026

    05/13/2021, 7:19 PM
    Is there a way to get the Pulumi version in Typescript?
    c
    r
    • 3
    • 10
  • f

    full-artist-27215

    05/13/2021, 8:42 PM
    question about component resources and registering new outputs... is there special syntax for accessing those outputs later? I have code like this to register the output:
    self.register_outputs({
        "endpoint":
        pulumi.Output.concat(
            "redis://",
            self.cluster.cache_nodes[0].address,
            ":",
            str(self.cluster.cache_nodes[0].port)
        )
    })
    but when I go to use it like this:
    cache.endpoint
    I end up with the following:
    AttributeError: 'Cache' object has no attribute 'endpoint'
    (this is all Python, BTW). Thanks in advance 🙇
    l
    • 2
    • 3
  • f

    full-artist-27215

    05/13/2021, 9:37 PM
    Bit of a related question about patterns for managing `pulumi.Output`s... several AWS resources, to use an example, are configured by passing a JSON object as a string. Many times, the values in that JSON object are outputs from other resources. Often, you can do this pretty simply, like so:
    role.arn.apply(lambda arn: json.dumps({"foo": arn}))
    When you have multiple things that need to be interpolated, things get a little more complicated:
    pulumi.Output.all(
       foo.arn,
       bar.arn,
       baz.arn
    ).apply(
        lambda args: json.dumps({
            "foo": args[0],
            "bar": args[1],
            "baz": args[2]
        })
    )
    While that's awkward, it's doable when you have all the `pulumi.Output`s that you need readily at hand. I'm using `ComponentResource`s to model my domain. In general, I'd like to be able to pass a dictionary of values into my
    ComponentResource
    , and then have it merge that with another dictionary of default values within the
    ComponentResource
    itself. Then, this merged dictionary would need to be converted into a JSON string to pass to the low-level Resource.
    env = {
       "foo": "my_foo",
       "message": "hello world"
    }
    
    pulumi.Output.all(
       foo.arn,
       bar.arn,
       baz.arn
    ).apply(
        lambda args: json.dumps({
            "foo": args[0],
            "bar": args[1],
            "baz": args[2],
            **env
        })
    )
    If that inner "default values" dictionary is the one that contains the
    pulumi.Output
    values, then I can control things with
    pulumi.Output.all
    , as shown above. If I've got
    pulumi.Output
    values in that dictionary that I'm merging in, though, it's not clear how I can generically manage things. I'm curious if others have run into similar situations, or if people have some patterns for managing such data (generic, if possible; Python-specific works too). Thanks in advance.
    l
    r
    • 3
    • 6
  • g

    gorgeous-minister-41131

    05/13/2021, 9:51 PM
    Anyone know off-hand if a resource transformation, say with a kubernetes resource, can use a Promise/Output when assigning something to the map value, or does it have to run in a callback?
  • g

    gorgeous-minister-41131

    05/13/2021, 10:03 PM
    Also is there a way to preserve comments in the YAML config files with
    pulumi config
    or
    pulumi update
    etc?
  • g

    gorgeous-minister-41131

    05/13/2021, 10:04 PM
    It's kind of annoying having to move sections of markup into another file or not being able to temporarily turn off a config etc without pulumi coming through and wiping it away. I like the automatic format/cleanup but removing comments seems no bueno... not sure if it's easy to even implement that.
  • g

    gorgeous-minister-41131

    05/13/2021, 10:05 PM
    https://github.com/pulumi/pulumi/issues/5235#issuecomment-822354844 seems to be this issue
  • e

    enough-truck-34175

    05/13/2021, 11:31 PM
    Is there a strategy for encrypting Kubernetes secret resources? There is sensitive data in them being saved in state that I would like to protect. The output value can be encrypted, but the input is not encrypted.
    s
    g
    • 3
    • 8
  • l

    little-cartoon-10569

    05/14/2021, 4:45 AM
    I'm using the cloudinit provider and I'm getting this warning:
    warning: urn😛ulumi:stack😛roject:aws:PublicProxy$cloudinit:index/config:Config::stack verification warning: Deprecated Resource
    I can't see it in the code anywhere, and there's no additional info.
    b
    • 2
    • 6
  • g

    gorgeous-country-43026

    05/14/2021, 9:31 AM
    I'm wondering what are the potential problems I might face if I override the Kubernetes metadata name in my declarations? This means my Kubernetes resources will get the exact name I provide and not the one which is the resource name plus generated string? There's several reasons why I would want to do it but I wonder if this will lead me to some kind of world of hurt?
    b
    g
    • 3
    • 3
  • a

    astonishing-monitor-96741

    05/14/2021, 12:26 PM
    Is there a way to add an image tag to a Pulumi.Docker.Image and NOT have it add the Pulumi hash to it? I'm trying to add my own app hash as a tag (because the image rebuilds all the time) but when Pulumi concatenates them its running over the character limit:
    ecrblahblah/repo:38989f9f92096e33d3d8505a833f7cf4aaf30a12afec448f895394aefc1e4372-570125e6816fe0b91a5e7c432a3cc0581d864ad49a3f68a7074e00369321cac4
    b
    • 2
    • 3
  • o

    orange-lawyer-86718

    05/14/2021, 12:33 PM
    It looks like Pulumi doesn't yet support AWS OpsWorks for Chef Automate. Is that accurate?
  • b

    big-architect-71258

    05/14/2021, 6:55 PM
    Perhaps someone from Pulumi can have look at the Issue created on GitHub, which describes an odd behavior of Pulumi after a resource has been imported on the new
    pulumi preview
    . https://github.com/pulumi/pulumi-azure/issues/890
  • g

    green-knife-34770

    05/15/2021, 2:22 PM
    Hello, I am deploying (pulumi up) from new m1 macbook using
    awsx.ecs.Image.fromDockerBuild
    and when the image gets running on AWS it throws
    standard_init_linux.go:219: exec user process caused: exec format error
    . So I found this article where using dockers buildx resolves the issue. My question is, how can I use buildx with pulumi? (Even better exactly within
    awsx.ecs.Image.fromDockerBuild
    ) I saw only mention for a new Pulumi blog article exactly about that, but it hasn’t come up yet. Thank you for your time!
    🆙 1
    🙏 1
    p
    • 2
    • 1
Powered by Linen
Title
g

green-knife-34770

05/15/2021, 2:22 PM
Hello, I am deploying (pulumi up) from new m1 macbook using
awsx.ecs.Image.fromDockerBuild
and when the image gets running on AWS it throws
standard_init_linux.go:219: exec user process caused: exec format error
. So I found this article where using dockers buildx resolves the issue. My question is, how can I use buildx with pulumi? (Even better exactly within
awsx.ecs.Image.fromDockerBuild
) I saw only mention for a new Pulumi blog article exactly about that, but it hasn’t come up yet. Thank you for your time!
🆙 1
🙏 1
p

proud-art-41399

05/15/2021, 3:05 PM
I was trying the same (mainly for caching purpose) and didn't find a Pulumi way. I ended up with running
docker buildx install
before
pulumi up.
In my case this was via a setup-buildx-action in GitHub Actions workflow.
View count: 2