https://pulumi.com logo
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

    enough-butcher-66045

    12/31/2020, 12:30 AM
    - task: Pulumi@1
          inputs:
            azureSubscription: 'Test (bla-bla)'
            command: "up"
            cwd: "MyProject.Infrastructure/"
            stack: 'dev'
            args: '--yes'
        - script:
            echo "##vso[task.setvariable variable=test;isOutput=true]$(pulumi stack output test)"
          displayName: 'Set stack outputs as variables'
          name: 'pulumi'
        - bash: |
            echo "Using an input-macro works: $(test)"
    Hi peeps, a question. If I run
    pulumi stack output test
    it gives me the output I'm expecting, and I can see in the logs that the pulumi outputs are correctly being registered
  • e

    enough-butcher-66045

    12/31/2020, 12:31 AM
    but when I try to output them it seems like they're not being set properly
  • e

    enough-butcher-66045

    12/31/2020, 12:31 AM
    any thoughts?
  • e

    enough-butcher-66045

    12/31/2020, 1:52 AM
    ok, the script that outputs the variables needs to be in the correct workingDirectory (which in this case is MyProject.Infrastructure)
    b
    • 2
    • 1
  • c

    curved-waitress-45592

    01/01/2021, 1:41 AM
    good evening, I am trying to create a Kubs
    PersistentVolumeClaim
    object and then refer its name in another object (a
    CronJob
    )
  • c

    curved-waitress-45592

    01/01/2021, 1:42 AM
    sadly I can't refer to the
    resource_name
    I used because Pulumi changes names... which is fine. But how to get the name? I the
    .id
    field of the resource almost get me there but it includes the namespace in there. I just want the "new" name.
    d
    b
    • 3
    • 13
  • c

    curved-waitress-45592

    01/01/2021, 1:52 AM
    One last question: we did our Docker image build using a deploy.sh script before, and we could get some great build performance using the simple
    --cache-from
    argument when calling
    docker build .
    . We'd usually do something like
    --cache-from=<http://registry.com/dir/image:latest|registry.com/dir/image:latest>
    and then update the latest tag to the newly built and pushed image.
  • c

    curved-waitress-45592

    01/01/2021, 1:53 AM
    Right now I am using
    class Image(pulumi.ComponentResource)
  • c

    curved-waitress-45592

    01/01/2021, 1:53 AM
    which has nothing that leverages caching
  • c

    curved-waitress-45592

    01/01/2021, 1:55 AM
    any idea on leveraging this --cache-from property while keep Pulumi in charge of our image building?
    w
    • 2
    • 1
  • b

    bright-printer-59109

    01/03/2021, 1:36 PM
    Kinda curious, I used pulumi to bootstrap an aws typescript project and when it didn’t find my credentials the error included a link to a terraform help guide, heh. Are some pieces of pulumi built on top of terraform?
    c
    b
    • 3
    • 7
  • f

    full-dress-10026

    01/03/2021, 11:40 PM
    Pulumi thinks it needs to replace my
    aws:ecs:TaskDefinition
    on every
    up
    run even though nothing has changed. Looking at the diff output for the containerDefinitions parameter on the TaskDefinition, I can see the only difference is on both my containers,
    mountPoints
    ,
    portMappings
    ,
    user
    , and
    volumesFrom
    currently exist as empty arrays (except user which is
    "0"
    ) and do not exist in the desired TaskDefinition. I am not setting these properties.
    • 1
    • 1
  • j

    jolly-lunch-12979

    01/04/2021, 12:33 PM
    Does the
    --show-reads
    property not work correctly for diffs? Whenever I do a
    preview --diff
    it shows reads without that flag set.
  • c

    cuddly-xylophone-65881

    01/04/2021, 12:45 PM
    Hi all, is it possible to create a single stack that spans multiple cloud environments? I need to create a vpn connection between AWS and Azure. Would be nice if I could put the code for both ends of this setup in a single stack.
    b
    • 2
    • 5
  • s

    swift-hamburger-98290

    01/04/2021, 5:11 PM
    Can one shorten the random suffix on the resource names? Maybe with
    ResourceTransformations
    (dotnet azure sdk)? Thanks
  • i

    important-appointment-55126

    01/04/2021, 5:21 PM
    I’m having a real challenge figuring out the right way to validate a certificate which has multiple alternative names - That will result in multiple DNS validation records being generated.. i think this will handle that, but i want the resulting
    CertificateValidation
    resource to be used in a
    Depends
    later in the program so that the Cloudfront CDN isn’t created before validation is complete…
    s.cert.DomainValidationOptions.ApplyT(func(opts []acm.CertificateDomainValidationOption) (*acm.CertificateValidation, error) {
                    var fqdns pulumi.StringArray
                    for i, opt := range opts {
                            certValidationDomain, err := route53.NewRecord(ctx, fmt.Sprintf("%s-%d-validation", s.hostname, i), &route53.RecordArgs{
                                    Name:    pulumi.String(*opt.ResourceRecordName),
                                    Type:    pulumi.String(*opt.ResourceRecordType),
                                    Records: pulumi.StringArray{pulumi.String(*opt.ResourceRecordValue)},
                                    ZoneId:  s.zoneId, // zone.ID(),
                                    Ttl:     <http://pulumi.Int|pulumi.Int>(600),
                            })
                            if err != nil {
                                    return nil, fmt.Errorf("create route53 validation record failed: %v", err)
                            }
                            fqdns = append(fqdns, certValidationDomain.Fqdn)
                    }
    
                    return acm.NewCertificateValidation(ctx, "certValidation", &acm.CertificateValidationArgs{
                            CertificateArn:        s.cert.Arn,
                            ValidationRecordFqdns: fqdns,
                    }, pulumi.Provider(s.usEast1))
            })
    • 1
    • 1
  • i

    important-appointment-55126

    01/04/2021, 6:30 PM
    i can have it return
    CertificateArn
    but
    ApplyString
    converts that
    StringOutput
    to an
    AnyOutput
    it appears, which i can’t then use as the input for creating the distribution
  • a

    astonishing-quill-88807

    01/04/2021, 7:23 PM
    I've got an issue where I'm trying to specify
    delete_before_replace
    but Pulumi seems to be ignoring that advice and still trying to create the resource before deleting the original. In this case it's a Vault Mount that is part of a component resource. I've tried passing the resource options to the entire component, and to just the Mount resource with no luck.
  • a

    astonishing-quill-88807

    01/04/2021, 7:37 PM
    Nevermind, I figured out what my issue was. I had changed the URN prefix for the component resource.
  • s

    straight-librarian-43739

    01/04/2021, 8:43 PM
    what’s the canonical way to get a reference to an
    awsx
    object when all you have is the
    aws
    version, without creating any extraneous resources? For example I have an ecs Cluster (created via
    aws
    ) that I wanted to use as the cluster for a Fargate service created using the
    awsx
    modules, but when I do a
    new awsx.ecs.Cluster
    and pass in the existing
    cluster
    as an argument, Pulumi creates some extra security groups
    w
    • 2
    • 5
  • b

    bumpy-motorcycle-53357

    01/04/2021, 9:06 PM
    how do i get the URN for a given resource? I'm trying to use an Alias to move a resource around, but can't seem to get the URN right. I don't see it listed on the pulumi site project.
    b
    g
    • 3
    • 3
  • l

    loud-shampoo-49194

    01/05/2021, 7:37 AM
    pulumi config set
    seems to sort my yaml file - is there any way to turn that behavior off? I prefer logical grouping for a structured config over alphabetical order. I have a few encrypted secrets which I set through the console while config values are added manually with a logical grouping.
    👍 1
  • a

    aloof-hamburger-47707

    01/05/2021, 9:43 AM
    Hi all! I tried to join this Slack yesterday, but couldn't - I am unable to deploy an EventGridSubscription to Azure, anyone have experience with this? Because I couldn't join slack, I created a Github Issue that actually describes my problem here: https://github.com/pulumi/pulumi/issues/6048 The error I get:
    azure-nextgen:eventgrid/v20200101preview:EventSubscription (EventSubscription):
        error: Code="InvalidRequest" Message="This event subscription operation is not supported using this API call. Please use the proper API and try again."
    Help!
    🙈 1
    l
    p
    • 3
    • 7
  • t

    thousands-london-78260

    01/05/2021, 11:00 AM
    Hey I'm trying to setup an ECS fargate Service with multiple portMappings (listeners) and running into this https://github.com/pulumi/pulumi-aws/issues/1258. I tried figuring out where the problem comes from but I think it's more deeply architectural in that networkListeners only has one NetworkListener per container instead of an array, so it's probably a larger fix. Until such time...has anybody found a successful workaround to have a ECS Service listen on multiple ports via a LB?
    b
    s
    • 3
    • 6
  • e

    elegant-window-55250

    01/05/2021, 2:10 PM
    Hello everyone! I've had some fun this weekend trying to make some components that can help setting up a simple Wordpress site using Google Cloud Platform and Cloud Run – would love some feedback! https://github.com/cobraz/pulumi-wordpress
    b
    • 2
    • 3
  • e

    elegant-window-55250

    01/05/2021, 4:00 PM
    I'm using
    pulumi/docker
    , and can't find a way to skip building a Dockerfile. In my use-case; I have a mono-repo with 10+ Dockerfiles, and most builds they don't have any changes, therefore I would like to skip building them. I've been looking at the documentation, but haven't been able to find a way to introduce that. Wondering if
    context
    variable is what I should use, or if its even supported?
  • c

    clever-plumber-29709

    01/05/2021, 7:36 PM
    Hey guys, about the
    pulumi import
    cli command, i think the docs can be improved a bit. The usage is
    pulumi import [type] [name] [id] [flags]
    but only the flags are explained, is not said anywhere what
    type
    means, or how can you know what is the type you are supposed to use for some specific resource or where you can found it. And the others, name, and id, are more intuitive, but still the docs say nothing about them Also i saw that some resoucerces, like aws. now include a section with the proper cli command for import them ,but others like github, don't have it. I was specifically looking to import a github repo, but was unable to find how.
    b
    l
    • 3
    • 14
  • m

    many-spring-73557

    01/05/2021, 9:47 PM
    Does pulumi support GCP logging buckets? According to [this GCP documentation](https://cloud.google.com/blog/products/management-tools/cloud-logging-adds-log-buckets-feature) it appears that Cloud Logging Buckets are distinct from Storage Buckets. I see that Pulumi has a
    gcp.logging.ProjectBucketConfig
    but I don’t see a way to create Logging Buckets - only
    gcp.storage.Bucket
    • 1
    • 1
  • w

    wet-noon-14291

    01/05/2021, 11:14 PM
    Have anyone experience
    pulumi stack ls -a
    not returning all the stacks? I'm using azure as backend at the moment and running that command only returns two out of many more stacks. This is run inside a docker container (which I can explain why if needed) with the environment variables to login set from the current shell. Running the same command outside docker returns the expected result.
    g
    • 2
    • 7
  • c

    clever-plumber-29709

    01/06/2021, 12:35 AM
    Is is possible to use outputs as names for other resources? I'm trying something like:
    resourceB = PulumiResource(Output.concat(resourceA.name, "-something"), other_paramethers...)
    but on the preview it apprear as:
    Name
     <pulumi.output.Output object at 0x7f6fde8f8b80>-something
    Haven't been able to test, if in the actual execution it will be interpreted or not
    g
    • 2
    • 1
Powered by Linen
Title
c

clever-plumber-29709

01/06/2021, 12:35 AM
Is is possible to use outputs as names for other resources? I'm trying something like:
resourceB = PulumiResource(Output.concat(resourceA.name, "-something"), other_paramethers...)
but on the preview it apprear as:
Name
 <pulumi.output.Output object at 0x7f6fde8f8b80>-something
Haven't been able to test, if in the actual execution it will be interpreted or not
g

gentle-diamond-70147

01/06/2021, 12:40 AM
No, resource names must be known at preview time, so they must be regular strings, not outputs.
View count: 1