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

    worried-queen-62794

    10/20/2020, 9:50 PM
    How can I use an output property in a function like
    aws.ec2.get_network_interface
    which doesn't define it's properties as inputs but rather the raw types, i.e. str?
    l
    • 2
    • 4
  • w

    worried-queen-62794

    10/20/2020, 10:39 PM
    Is there a way to force an output to be stable? It's not my provider so I can't edit it there.
  • w

    worried-queen-62794

    10/20/2020, 10:43 PM
    Alternatively, if the preview says that there is going to be a replacement because of an output property but that output property doesn't actually change will the resource be replaced or not?
    l
    g
    • 3
    • 4
  • l

    little-cartoon-10569

    10/20/2020, 11:00 PM
    Does anyone know if there is a bash prompt for Pulumi? I'd love to add the name of the current stack into my bash-git-prompt code...
    • 1
    • 2
  • b

    brief-spoon-92183

    10/21/2020, 11:37 AM
    Hi everyone, is there a way to reference a resource ID within
    itself
    ? (here's an example) I'm creating an Elastic Search Domain, and the
    accessPolicies
    requires a
    Resource
    ARN, which I don't know how to construct to match the domain ID (see screenshot):
    • 1
    • 5
  • b

    billions-forest-38488

    10/21/2020, 12:52 PM
    Hi - does anyone know how I can add additional tasks to a
    pulumi destroy
    command, for example: only when destroying a stack, I'd also like to run a bit of code to cleanup some third-party resources... in this case, cleanup a Logentries logset/log - thanks! (I'm using Python if that helps..)
    l
    • 2
    • 3
  • h

    high-morning-17948

    10/21/2020, 9:26 PM
    Hi, I'm having issues creating a jobDefinition for a batch process. I keep getting the following error:
    aws:batch:JobDefinition (booksloth-import-dev-importLauncher-job-definition):
        error: 1 error occurred:
            * : Error executing request, Exception : The validated object is null, RequestId: 3b39ec6f-fcaf-4ea9-bb13-52991d45c6c1
            status code: 400, request id: 3b39ec6f-fcaf-4ea9-bb13-52991d45c6c1 "booksloth-import-dev-importLauncher-job-definition"
    Any suggestion of what I'm missing for the creation. Here's the code snippet for creating the resource
    /**
         * Define Job definition Container properties
         * See {@link <https://docs.aws.amazon.com/batch/latest/APIReference/API_ContainerProperties.html> |  AWSContainerProperties}
         * for reference
         */
        const containerProperties = jobRole.arn.apply(arn => {
          return JSON.stringify({
            image: imgName,
            command: ['node', 'index.js'],
            memory: 2000, // in MiB
            jobRoleArn: arn,
            environment: [
              { name: 'NODE_ENV', value: config.stage },
              { name: 'APP_VARS', value: appVars },
              { name: 'BOOKSLOTH_API_VARS', value: bookslothApiVars },
            ],
          })
        });
    
        console.log({ containerProperties })
        /**
         * Create Batch Job Defintion
         */
        const jobDefinition = new aws.batch.JobDefinition(`${config.prefix}-${serviceName}-job-definition`, {
          name: `${config.prefix}-${serviceName}-job-definition`,
          type: 'container',
          containerProperties,
          retryStrategy: { attempts: 3 }
        }, {
          dependsOn: [
            jobRoleECSPolicyAttachment,
            jobRoleBookQueueAccess,
            jobRoleUserbooklistQueueAccess
          ]
        });
    🙏 1
    g
    g
    • 3
    • 12
  • f

    famous-area-1376

    10/22/2020, 6:25 AM
    Hi, I'm trying to evaluate if pulumi is a good tool for our company use. I have a simple usecase where I want to 1) Create ECR in AWS, 2) Push a container image to said ECR, 3) Create AWS Batch Job Definition (+Job Queue) based on the image pushed to ECR. I tried doing this with the Python version but I can't figure out how to do it. There's this for node.js: https://www.pulumi.com/blog/building-and-publishing-docker-images-to-a-private-amazon-ecr-repository/ but I can't find the matching tools for Python. So the issue I have is specifically on the part how to push the image to ECR and get reference to that. I think I know how to create the AWS resources, but the image needs to exist in the ECR first before I can create the Job Definition since it requires a reference to it. Only way is node.js or am I missing something in Python tooling?
    l
    • 2
    • 2
  • j

    jolly-camera-35709

    10/22/2020, 6:52 AM
    anybody knows how to join string and resource output in python with pulumi?
  • j

    jolly-camera-35709

    10/22/2020, 6:54 AM
    or in general, how to join string and resource output as input to other resource?
  • j

    jolly-camera-35709

    10/22/2020, 6:55 AM
    for example, when I create container group, I wanted to set image like this
  • j

    jolly-camera-35709

    10/22/2020, 6:57 AM
    image='{}/{}-build:{}'.format(container_registry.login_server, project_name,  tag)
  • j

    jolly-camera-35709

    10/22/2020, 6:58 AM
    in python, it's simply a format to join strings, but here it uses the output from container_registry, so the image became "<pulumi.output.Output object at 0x7fb1d850a550>/myproject:202010191642\n"
    l
    • 2
    • 2
  • b

    breezy-butcher-78604

    10/22/2020, 3:15 PM
    is it possible to be logged to pulumi (via the CLI) with two different accounts? eg i'd like to be able to switch between my work account and personal account but running
    pulumi login
    again just logs me in with the existing account (my work one)
    l
    • 2
    • 1
  • b

    brief-spoon-92183

    10/22/2020, 5:02 PM
    Has anyone tried deploying multiple Elastic Search domains? How did you solve the problem of existing
    AWSServiceRoleForAmazonElasticsearchService
    ? The error looks like this:
    Error creating service-linked role with name <http://es.amazonaws.com|es.amazonaws.com>: InvalidInput: Service role name AWSServiceRoleForAmazonElasticsearchService has been taken in this account, please try a different suffix.
    I followed the
    VPC based ES
    example in the docs. Any ideas how to either reuse the existing role, or create a new one for each ES domain? Thanks
    r
    • 2
    • 10
  • m

    many-spring-73557

    10/22/2020, 6:43 PM
    I am creating a
    gcp.cloudrun.DomainMapping
    . Every time I
    pulumi up
    , it says there’s a change to metadata annotations
    serving.knative.dev/creator
    and
    serving.knative.dev/lastModifier
    which match my username. This results in GCP destroying and re-creating the DomainMapping each time, which I don’t want. How can I keep this from happening? One thing I’ve found is I can
    ignoreChanges: ["metadata.annotations"]
    which is pretty good - but I do have some annotations that should actually get picked up by pulumi. I haven’t found a way to target those specific annotations that I want to ignore
  • b

    breezy-butcher-78604

    10/23/2020, 4:51 AM
    i have the following scenario and am looking for advice on the best way to proceed. • I have a stack containing some EC2 instances and associated security groups, roles and an ALB etc • I applied a stack update that was going to replace the vast majority of the resources mentioned above (moving them into a different VPC) • The update failed after a few of the replacement resources were created in the new VPC (for a valid reason) • The following update is now trying to "complete deletion from previous update", in particular a security group, but it is failing because the group still has the old ALB in it (which would have been deleted in the first update had it succeeded). • I now cannot apply any updates to this stack since changes will only occur after completing the previous deletes is there a way I can tell pulumi to not try completing the pending deletes until after the rest of the stack has updated? is there another approach i can use to fix this stack? I'd rather not have to destroy and recreate it if I can avoid it
    g
    • 2
    • 12
  • j

    jolly-camera-35709

    10/23/2020, 6:14 AM
    hey guys, how do you make this
  • j

    jolly-camera-35709

    10/23/2020, 6:14 AM
    environment_variables Mapping[str, str]
  • j

    jolly-camera-35709

    10/23/2020, 6:16 AM
    I tried this syntax but not work
  • j

    jolly-camera-35709

    10/23/2020, 6:16 AM
    environment_variables=[
      'BRANCH_NAME': 'master',
     ]
    r
    k
    • 3
    • 3
  • n

    nutritious-shampoo-16116

    10/23/2020, 8:14 AM
    anybody dealt with assume role with AWS? I have a weird problem where I can assume my role usig awscli but Pulumi is throwing errors, here you can find a gist https://gist.github.com/MattBlack85/4b33328edd7873209e7dfc9454e3aa44
  • n

    nutritious-shampoo-16116

    10/23/2020, 8:16 AM
    I think this may be related to how a new provider is instantiated?
  • n

    nutritious-shampoo-16116

    10/23/2020, 8:17 AM
    all of the points I see in the error look valid to me and they work very well with awscli
  • n

    nutritious-shampoo-16116

    10/23/2020, 8:54 AM
    ok, that was very weird, apparently the date containing
    :
    is not valid and the provider cannot be instantiated properly, the error message in this case is very misleading
  • c

    colossal-monkey-98692

    10/23/2020, 3:31 PM
    Using a dynamic provisioner the changeToken does not seem to be triggering a replacement for me. Anyone encounter this before?
    • 1
    • 2
  • b

    bitter-application-91815

    10/23/2020, 5:42 PM
    Hey folks, is it possible to create a customMetric via pulumi for aws, i see api for a metricAlarm but nothing around customMetric (needed for autoscaling ecs services based on sqs msgs count)
    w
    • 2
    • 9
  • a

    alert-beard-9601

    10/23/2020, 8:21 PM
    I'm having a strange issue where rds instances I'm making will not be created with identifierPrefix because for some reason it thinks the identifier value is set even though it's not and this database doesn't exist yet.
    • 1
    • 2
  • h

    high-morning-17948

    10/23/2020, 8:36 PM
    Hi, Did the
    <docker://pulumi/actions>
    had any updates because now my Github Actions deployment is failing because it doesn't find
    Pulumi.yml
    . I haven't changed my scripts recently and if I run it locally with
    pulumi up
    it works has expected.
    b
    • 2
    • 5
  • s

    steep-toddler-98503

    10/23/2020, 9:42 PM
    Hi guys, someone has a example to test the pulumi code for the infra, i am using golang but im no expert in tests :(
    b
    • 2
    • 2
Powered by Linen
Title
s

steep-toddler-98503

10/23/2020, 9:42 PM
Hi guys, someone has a example to test the pulumi code for the infra, i am using golang but im no expert in tests :(
b

billowy-army-68599

10/23/2020, 9:52 PM
Does this help? https://github.com/pulumi/examples/tree/master/testing-unit-go
s

steep-toddler-98503

10/24/2020, 6:54 PM
I will take a look Taanks
View count: 1