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
aws
  • b

    broad-dog-22463

    05/26/2022, 6:51 PM
    Friends, we have been working hard on testing internally but we are glad to say that AWSx is in a great state for you to take for a test drive 🙂 We would love the feedback based on the scenarios we cover - you can find a lot of examples in the
    examples
    folder. We really welcome any feedback 🙂
  • a

    acoustic-spring-42110

    05/27/2022, 4:05 PM
    Is it possible to mix aws and awsx components? I have a cluster in awsx, and a vpc defined the old way.. I'm looking for a way to tell the new cluster to use the existing vpc (it's not the default one) and I'm not totally sure how to do it.
  • s

    straight-laptop-81153

    05/27/2022, 5:34 PM
    @acoustic-spring-42110 Of course you can do so! At the end of the day they are both talking to the same Resources Manager API. Are your cluster/vpc living in two different stacks?
  • a

    acoustic-spring-42110

    05/27/2022, 5:35 PM
    The same stack! And I think I discovered that I can just import the
    vpc
    and wrap it like this (typescript):
    const vpc = new awsx.ec2.Vpc("vpc", {vpc: infraRef.getOutput("vpc") as any})
  • a

    acoustic-spring-42110

    05/27/2022, 5:35 PM
    any side-effects of doing it that way?
    l
    • 2
    • 1
  • s

    straight-laptop-81153

    05/27/2022, 5:41 PM
    If it's working then all good, it shouldn't have any side-effect! You need to make sure it doesn't create a new vpc tho
  • s

    strong-helmet-83704

    05/27/2022, 8:38 PM
    After upgrading to
    pulumi-aws-5.5.0
    I started getting this error during venv initialization
    TypeError: Descriptors cannot not be created directly.
        If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
        If you cannot immediately regenerate your protos, some other possible workarounds are:
         1. Downgrade the protobuf package to 3.20.x or lower.
         2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
        More information: <https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates>
    After rolling back to
    pulumi-aws-5.4.0
    in my project requirements[.]txt it goes away.
    s
    • 2
    • 2
  • c

    crooked-microphone-43180

    05/28/2022, 5:19 PM
    I'm having quota issues with my Lambda functions because they all pull in the whole
    node_modules
    folder. One function might use one package while another doesn't but function serialization doesn't discriminate what packages are being used. This means that they all grow in size as more packages are included in the stack/project. Has anyone ran across this issue? The compressed zip can't be over 50MB and when uncompressed, over 250MB. I know you can instead utilize a container to run the Lambda function, but how would you call aws functions inside of it (like
    s3.putObject
    ) without just importing the aws-cli and executing it?
    g
    • 2
    • 5
  • f

    few-easter-31331

    05/30/2022, 7:45 PM
    message has been deleted
  • f

    few-easter-31331

    05/30/2022, 7:45 PM
    facing the same issue, if someone has a clue
  • c

    curved-kitchen-24115

    05/31/2022, 10:27 PM
    Hi there 👋🏼 how do I have pulumi use the instance profile for the ec2 instance it's running on? Unfortunately my google-fu is failing me 😔 I expect y'all are delegating to the go client; I'm under the impression that will fallback to the meta data url but that doesn't seem to be happening.
    l
    • 2
    • 8
  • l

    limited-rain-96205

    06/01/2022, 12:20 AM
    Hi all. From the AWS console, it’s easy to create a new IAM Role with an AWS service as a trusted entity, without having to type in a trust policy document. However, I’m having trouble figuring out how to do this in Pulumi — every example has the trusted entities policy document as a string literal (into assumeRolePolicy). This is very undesirable, as it essentially requires that you create the Role by hand first, using the AWS console, so that you know what the Service name needs to be. Is there any way to just have Pulumi look this up automatically like the console does?
    l
    • 2
    • 4
  • w

    witty-helmet-38026

    06/01/2022, 8:54 AM
    Hi, how do I create a Dashboard widget with filtered logs from logs Insight. I have managed to do by clicking around in the console, but can’t find out how to do it using pulumi :/. Disse the widget JSON that is created by clicking.
    {
      “widgets”: [
        {
          “type”: “log”,
          “x”: 0,
          “y”: 0,
          “width”: 24,
          “height”: 17,
          “properties”: {
            “query”: “SOURCE ‘/aws/lambda/log-group-name | filter LogLevel = \“Error\” | limit 10",
            “region”: “eu-west-1",
            “stacked”: false,
            “title”: “Errors”,
            “view”: “table”
          }
        }
      ]
    }
    • 1
    • 1
  • b

    big-potato-91793

    06/01/2022, 2:16 PM
    👋 I’m trying to create a Global Aurora Postgre DB with the
    aws classic
    provider of pulumi. For some reason, even if I add
    dependsOn
    my primary
    RDSCluster
    to point to the
    GlobalCluster
    it seems that pulumi never really wait that the cluster has been created. So instead of having a cluster with multiple regions, we god cluster that are separated and never linked together. Any idea of what I’m doing wrong?
  • f

    fast-florist-41572

    06/01/2022, 2:19 PM
    Anyone had issues where removing a property doesn't actually see it being removed. I have removed
    KeyName
    from an ec2 instance created and it refuses to see it being deleted. Even if I do a refresh on the state. I am able to change it and it knows it has changed.
  • f

    fast-florist-41572

    06/01/2022, 2:23 PM
    What is even more bizarre, is if I remove the field and it recreates the instance, it still attaches the KeyName of what was deleted
  • f

    famous-needle-81667

    06/01/2022, 3:06 PM
    Hello everyone, trying to port some changes from Terraform to Pulumi and run into an issue: This is EC2 instance spec in terraform. I have a templated bash script into which I inject loadbalancer DNS name.
    user_data                   = base64encode(
        templatefile("../templates/bash_script.sh.tftpl", {
            internal_lb_dns_name = aws_lb.aws-internal-load-balancer.dns_name
          }
        )
      )
    How to achieve similar results with pulumi? If it was not a templated file it would be easy, namely:
    UserData:            pulumi.StringPtr(base64.StdEncoding.EncodeToString(bashScriptContent))
    However, I need to inject some variables into that script that will be known once some resources got created. Any help would be appreciated, this is a part of my Master's Degree thesis and it would be a shame that this cannot be solved in Pulumi 😄 //EDIT, I'm writing in Golang
    w
    • 2
    • 2
  • q

    quick-telephone-15244

    06/01/2022, 5:32 PM
    is there a way to explicitly set the provider version?
    pulumi plugin ls
    as well as dumping
    requirements.txt
    (and checking my venv by activating it and running
    pip freeze
    ) all report
    pulumi-aws
    as
    5.6.0
    however when i try to
    pulumi up
    it keeps trying to use
    default_5_4_0
    which is no bueno
    w
    • 2
    • 6
  • q

    quick-telephone-15244

    06/01/2022, 5:32 PM
    not really sure i understand why it's trying to use an older provider version when it doesn't exist in the host environment
  • b

    big-potato-91793

    06/01/2022, 7:49 PM
    I was wondering it someone it that problem. I create an
    aws.rds.GlobalCluster
    resource. I assign it to my
    aws.rds.Cluster
    using the outputs of the first resource. For some reason, pulumi create the Global cluster but seems to never pass the
    globalClusterIdentifier
    to the
    aws.rds.Cluster
    resulting at having regional cluster.
  • c

    clean-rose-47860

    06/02/2022, 12:36 PM
    HI, I have a series of SSM parameters that are using a KMS key id that is being referenced from another stack. In pseudo below.
    export const appSettingsKeyArn = environmentStackRef.getOutput("appSettingsKeyArn");
    
    var param = new aws.ssm.Parameter('name', {
      name: 'name',
      type: 'String',
      value: 'value',
      keyId: appSettingsKeyArn,
    });
    Everything in the stack is created fine, the system is working as it should be. However, everytime I run
    pulumi up
    it is attempting to update the SSM parameter resources with a new
    keyId
    Looking in the details of the plan, I can see that the key id is never stored in state, so pulumi is constantly trying to update it. Does anybody know why this is happening?
    l
    • 2
    • 6
  • s

    straight-laptop-81153

    06/03/2022, 1:14 AM
    Hi Folks! I was wondering if there is a way to set up an ECS Fargate Scheduled Task?
  • q

    quaint-book-39362

    06/05/2022, 1:18 AM
    what would be the recommended way to use aws-sdk v3 within a
    aws.lambda.CallbackFunction
    ? learning pulumi and found i can use the lambda runtime’s v2 sdk through `aws.sdk`(from
    @pulumi/aws
    )
    • 1
    • 2
  • q

    quaint-book-39362

    06/05/2022, 1:18 AM
    this is with a typescript project
  • f

    full-receptionist-30203

    06/05/2022, 6:46 PM
    👋 Hello, team! Evaluating Pulumi for a largely serverless organization that has had some issues with SAM. In the context of Pulumi, I'm running into issues installing dependencies in python. Is there are pattern to do this with Pulumi? AWS Lambda documentation is recommending essentially vendoring the packages at the root of the codebase. I still find it strange that Lambda doesn't manage dependencies at all. If anyone has recommendations on how to handle this (as long as layers) I'd be very interested!
    s
    • 2
    • 2
  • q

    quaint-guitar-13446

    06/06/2022, 7:01 AM
    @broad-dog-22463 You replied to my message on GitHub about awsx and
    ephemeralStorage
    . I have updated to
    @pulumi/awsx:1.0.0-beta.7
    so that I can try to leverage support for ephemeral storage. I'm running into an issue when provisioning:
    error: Error: invocation of aws:ec2/getVpc:getVpc returned an error: invoking aws:ec2/getVpc:getVpc: 1 error occurred:
            * no matching EC2 VPC found
    
    // snipped
    
    Error: failed to register new resource REDACTED [awsx:ecs:FargateService]: 2 UNKNOWN: invocation of aws:ec2/getVpc:getVpc returned an error: invoking aws:ec2/getVpc:getVpc: 1 error occurred:
            * no matching EC2 VPC found
    Neither one of
    awsx.ecs.FargateService
    or
    aws.ecs.Cluster
    can receive a
    vpc
    property.
    b
    • 2
    • 20
  • q

    quaint-guitar-13446

    06/06/2022, 7:02 AM
    The classic versions do take a
    vpc
    property. So I'm a bit lost here
  • f

    full-receptionist-30203

    06/06/2022, 8:24 PM
    Hi all, I’m trying to merge two zip files but AssetArchive doesn’t seem to support this. Is there an alternative way to merge two
    pulumi.FileArchive
    at the same path?
    l
    • 2
    • 3
  • p

    purple-megabyte-83002

    06/07/2022, 7:29 PM
    Hello, I'm using Pulumi to setup all my AWS account, sometimes I'd like to tweak a small setting for example a Policy but when I
    pulumi up
    it will also build and deploy a new docker image. As expected from my pulumi script, but my intention this time it just to tweak the setting not to deploy a new docker image of the same code, what is the recommended way to handle such a case ?
    l
    • 2
    • 1
  • p

    purple-megabyte-83002

    06/07/2022, 10:18 PM
    im using this to build my image
    // Step 3: Build and publish a Docker image to a private ECR registry.
    const ApiImage = awsx.ecs.Image.fromDockerBuild('api-image', {
      context: path.resolve(__dirname, '../../../../'),
      dockerfile: path.resolve(__dirname, '../../', 'Dockerfile'),
    });
    Is there a way to make it build a new docker image only if the content of the context has changed ? like storing a SHA256 hash of the folder contents and checking against it to decide to build or reuse last one ?
    l
    • 2
    • 1
Powered by Linen
Title
p

purple-megabyte-83002

06/07/2022, 10:18 PM
im using this to build my image
// Step 3: Build and publish a Docker image to a private ECR registry.
const ApiImage = awsx.ecs.Image.fromDockerBuild('api-image', {
  context: path.resolve(__dirname, '../../../../'),
  dockerfile: path.resolve(__dirname, '../../', 'Dockerfile'),
});
Is there a way to make it build a new docker image only if the content of the context has changed ? like storing a SHA256 hash of the folder contents and checking against it to decide to build or reuse last one ?
l

little-cartoon-10569

06/08/2022, 12:26 AM
I don't think there is, within the Pulumi logic. I think I found a GitHub issue about this, a while ago.
View count: 1