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

    fast-island-38778

    09/16/2022, 6:15 AM
    the http listener is pointing to the correct target group already, is there a way for the https listener to point to the same target group?
  • b

    bright-orange-69401

    09/16/2022, 7:29 AM
    🌱 Bazel & Pulumi 🌱 I’m looking for feedback on using Bazel (or Buck, Pants, Please) as a build system together with Pulumi Has anybody had success with it ? Is it possible to integrate Pulumi in the overall build process or is it always a separate binary that needs to be managed on its own ? Is it possible to prevent unnecessary
    pulumi up
    when dependencies haven’t changed much ?
    s
    • 2
    • 3
  • f

    few-mechanic-54967

    09/16/2022, 3:05 PM
    Can anyone give me an example for creating vpc using awsx. For now I create vpc using aws classic. I just need 1 route table(have 3 subnets public associate) and 1 route table(have 3 subnets private associate). How this code translate/if i want using awsx. ``````
    g
    s
    • 3
    • 10
  • s

    steep-toddler-94095

    09/16/2022, 9:17 PM
    anyone seen this error before? i can't find any documentation on what
    aws:context
    even means
    error: Missing required configuration variable 'aws:context'
    I'm just trying to use the
    getBucketObject
    function
    getBucketObject(
      {
        bucket: "bucketName",
        key: `/blah/blah.json`,
      },
      {
        provider: new Provider("us-east-2", {
          assumeRole: awsConfig.requireObject("assumeRole"),
          allowedAccountIds: awsConfig.requireObject("allowedAccountIds"),
          region: "us-east-2",
        }),
      }
    )
    s
    • 2
    • 2
  • f

    fast-island-38778

    09/16/2022, 10:55 PM
    Does Pulumi have the ability to generate all the iam permissions necessary for running the deployment script?
    b
    • 2
    • 4
  • f

    flat-journalist-57447

    09/17/2022, 10:53 AM
    dear sir you look like My Brother I am Ravi sekhar from vizag india I have interest program Developer. I know HTML,CSS,JAVA,
  • s

    sticky-country-73582

    09/17/2022, 4:47 PM
    Hi, I have created an API
    Deployment
    and its
    Stage
    using the
    stage_name
    argument of the deployment resource. Now I want to do lookup for the stage and add access logging to it. How can I get the stage resource from this setup, i.e., what would be the
    id
    in the
    get
    method for
    Stage
    lookup in https://www.pulumi.com/registry/packages/aws/api-docs/apigateway/stage/#look-up?
    s
    • 2
    • 5
  • c

    calm-horse-33012

    09/17/2022, 6:21 PM
    Hey everyone, I'm trying to setup an API Gateway with an integration to an AWS Service, but I'm currently encountering an issue when using
    awsx.apigateway.API
    . 1. You can't set a role, which is required, for integrations, I get this error: "Unable to put integration on 'ANY' for resource at path '/integration': Role ARN must be specified for AWS integrations" a. Looking at this example, it seems we should be able to set
    credentialsArn
    ?
    • 1
    • 1
  • s

    sparse-intern-71089

    09/18/2022, 12:49 AM
    This message was deleted.
    b
    • 2
    • 1
  • f

    fast-island-38778

    09/18/2022, 1:57 PM
    when i was using https://github.com/iann0036/iamlive in proxy mode to generate the iam policies, i got this error
    error: performing HTTP request: Get "<https://api.pulumi.com/api/stacks/><my_org>/<my_app>/staging": x509: "iamlive CA" certificate is not trusted
    any fixes would be appreciated!
  • t

    thankful-father-68341

    09/18/2022, 2:39 PM
    https://medium.com/@abvijaykumar/list/c876b77c29da
  • b

    billowy-horse-79629

    09/19/2022, 12:19 PM
    Does someone encounter some weird behavior with updating ReplicationGroup ElasticCache state ? I’m trying to change my ReplicationGroup instance type from
    cache.t3.small
    to
    cache.m5.large
    . The pulumi preview works great, then the pulumi update succeed but when looking in AWS console, the instancetype is still
    cache.t3.small
    , and the replication instances aren’t in modifying state. Very weird… Thanks !
    l
    • 2
    • 2
  • e

    early-keyboard-41388

    09/19/2022, 4:56 PM
    Hi, trying to add
    lambda.Permission
    for an Api Gateway call with
    stageVariables
    , but getting an error in the
    function
    name.
    new aws.lambda.Permission(
          'permission-resource,
          {
            action: 'lambda:InvokeFunction',
            function: interpolate`arn:aws:lambda:${awsRegion}:${callerIdentityOutput.accountId}:function:${apiLambda.name}:\${stageVariables.GRAPHQL_ALIAS}`,
            principal: '<http://apigateway.amazonaws.com|apigateway.amazonaws.com>',
            sourceArn: interpolate`arn:aws:execute-api:${awsRegion}:${callerIdentityOutput.accountId}:${this.api.id}/*/${postMethod.httpMethod}${resource.path}`,
          },
          { parent: postMethod },
        );
    The the addition of
    ${stageVariables.GRAPHQL_ALIAS}
    is not working. How is it done correctly?
    w
    • 2
    • 10
  • b

    billowy-plastic-61471

    09/20/2022, 10:35 AM
    Hi, how to get the AccessKey Secret when initially creating an IAM user with Pulumi? Here’s the code:
    new aws.iam.AccessKey(
      'test-access-key',
      { user: testIamUser.name }
    )
    And here’s the
    pulumi up
    Output:
    accessKey              : {
      id    : "AKIA3U6R3XXXXX2UPF44"
      secret: [secret]
    }
    How do I initially get that
    [secret]
    value ❓ Thanks
    ✅ 1
    l
    • 2
    • 3
  • v

    victorious-church-57397

    09/20/2022, 12:07 PM
    hey team, we're trying to use the awsx/lb/ApplicationLoadBalancer package (https://www.pulumi.com/registry/packages/awsx/api-docs/lb/applicationloadbalancer/) but it doesnt seem to actually exist as documented. the specific part we're trying to use is the dropInvalidHeaderFields argument, but it doesn't exist on the provider I'm importing:
    import { ApplicationLoadBalancer } from '@pulumi/awsx/lb';
    s
    e
    • 3
    • 21
  • w

    witty-vegetable-61961

    09/20/2022, 4:08 PM
    Hi all I am using pukumi to spin up aws resources. What's the difference between the aws awsnative nuget packages?
    m
    l
    • 3
    • 3
  • a

    ambitious-daybreak-8631

    09/21/2022, 6:00 AM
    Hi I'm trying the example (https://www.pulumi.com/docs/aws/cloudwatch/) in this document for creating a cloudwatch alarm, how can I configure the instanceid and instance name in metricalarm. Thanks for the help.
    const metricAlarm = new aws.cloudwatch.MetricAlarm("mymetricalarm", {
        comparisonOperator: "GreaterThanOrEqualToThreshold",
        evaluationPeriods: 2,
        metricName: "CPUUtilization",
        namespace: "AWS/EC2",
        period: 120,
        statistic: "Average",
        unit:"Percent",        
        threshold: 0.5,
        alarmDescription: "This metric monitors ec2 cpu utilization"
    });
    l
    • 2
    • 2
  • f

    few-mechanic-54967

    09/22/2022, 2:19 AM
    Can anyone help me how to pass vpc.id to get network acl? Thanks for the help
    l
    b
    • 3
    • 9
  • s

    steep-lamp-20408

    09/22/2022, 3:17 AM
    Hey all, I need to generate a static outbound IP address for my AWS Lambda deployed with Pulumi. I read this article from AWS : https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/generate-a-static-ou[…]mbda-function-amazon-vpc-and-a-serverless-architecture.html Is it possible with Pulumi to do so?
    l
    • 2
    • 9
  • s

    sticky-jordan-27156

    09/23/2022, 8:14 AM
    Hello, I'm trying to create a new AWS role policy but something is wrong in my json:
    let _policy =
            let args =
                Iam.RolePolicyArgs (
                    Policy =
                        input
                            """
    {
        "Version": "2012-10-17",
        "Statement": [{
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": "arn:aws:logs:*:*:*"
        }]
    }
    """,
                    Role = io lambdaRole.Id
                )
    
            Iam.RolePolicy ($"{loweredProjectName}-log-policy", args)
    Leads to
    aws:iam:RolePolicy (autograph-log-policy):
        error: aws:iam/rolePolicy:RolePolicy resource 'project-log-policy' has a problem: "policy" contains an invalid JSON policy. Examine values at 'RolePolicy.Policy'.
    I'm not sure why. Any ideas?
    s
    b
    • 3
    • 4
  • c

    crooked-appointment-9302

    09/24/2022, 6:04 PM
    I’m struggling to set up a certificate for a Cloudfront distribution. Firstly, it’s not clear from the documentation that the certificate needs to be in
    us-east-1
    . The table here: https://www.pulumi.com/registry/packages/aws/api-docs/cloudfront/distribution/#distributionviewercertificate …says that it’s necessary if you are setting
    acm_certificate_arn
    , but I’m setting
    iam_certificate_id
    where it doesn’t state that requirement. Once I figured that out, I’m drawing a blank on how to get this done. I read this article here, which made it seem simple: https://www.pulumi.com/blog/deploy-to-multiple-regions/ So I just create a region and pass it in to the resources I want to create in the other region, right? Well when I do that, I get:
    error: unable to validate AWS credentials. Make sure you have:
    
    • Set your AWS region, e.g. `pulumi config set aws:region us-west-2`
    pulumi refresh
    works fine, though, so it’s not a credentials issue as far as I can see. I’ve tried removing the region from the Pulumi config, from the AWS config, I’ve tried manually passing in the primary region to all my other resources… no matter what I do, as soon as I try to use the approach from the article, it stops me from getting anywhere at all. What am I missing? Edit: Figured it out. When you create a provider with
    Provider('foo', region='us-east-1')
    , it discards any other configuration. So if you are using a non-default AWS profile, then you end up using a completely different profile and you need to use
    Provider('foo', region='us-east-1', profile='bar')
    instead.
  • r

    rhythmic-fireman-45324

    09/25/2022, 3:22 AM
    Hi I'm struggling with unit testing lambda resource. Always get error when unit testing stack that have a lambda callbackFunction...
    ReferenceError: You are trying to `import` a file after the Jest environment has been torn down
          at getStackResource (node_modules/@pulumi/resource.ts:1116:36)
          at new Resource (node_modules/@pulumi/resource.ts:300:39)
          at new CustomResource (node_modules/@pulumi/resource.ts:780:9)
          at new Role (node_modules/@pulumi/iam/role.ts:306:9)
          at Object.construct (node_modules/@pulumi/iam/index.ts:111:24)
    ReferenceError: You are trying to `import` a file after the Jest environment has been torn down.
          at node_modules/@pulumi/runtime/closure/createClosure.ts:417:48
          at node_modules/@pulumi/pulumi/runtime/closure/createClosure.js:21:71
          at Object.<anonymous>.__awaiter (node_modules/@pulumi/pulumi/runtime/closure/createClosure.js:17:12)
    TypeError: stack.getStackResource is not a function
    // Lambda
    export const func = new aws.lambda.CallbackFunction("test", {
      callback: async (ev, ctx) => {
        return {
          statusCode: 200,
          body: `Hello, world!`,
        };
      },
    });
  • r

    rhythmic-fireman-45324

    09/25/2022, 6:41 AM
    👆This issue is caused by requiring a module within a function in pulumi's
    createClosure.js
    . I moved this line outside the function to the top of the module, and it works now. However I'm wondering what's a better solution?
  • m

    microscopic-painting-1312

    09/26/2022, 6:33 PM
    I’m having some issues with awsx.ecs.FargateTaskDefinition in python. 1. pulumi creates a log group but doesn’t actually use that group. I end up having to manually pass a log_configuration to FargateTaskDefinition, which results in a second log group (the first with pulumi’s auto-naming doesn’t get used). 2. I have to pass a policy to execution_role in FargateTaskDefinition to allow CreateLogGroup, CreateLogStream, and PutLogEvents Not sure if these are related or if they are issues on my end
    s
    • 2
    • 5
  • s

    steep-lamp-20408

    09/27/2022, 6:17 AM
    Hey all, I’m using AWSSx package to create a AWS VPC as @little-cartoon-10569 kindly suggested in this conversation. I don’t understand the documentation though (https://www.pulumi.com/registry/packages/awsx/api-docs/ec2/vpc/): how I can get the ID of the VPC I create? For example:
    from pulumi_awsx import ec2
    
    vpc = ec2.Vpc(resource_name="my-vpc")
    print(vpc.id)
    ... outputs
    None
    . Any idea?
    b
    l
    • 3
    • 21
  • f

    few-mechanic-54967

    09/27/2022, 7:22 AM
    Hii All, What is equal create_before_destroy(terraform) in pulumi? Thanks for answer
    b
    • 2
    • 2
  • g

    glamorous-egg-43736

    09/27/2022, 2:21 PM
    Hello, everyone! I was wondering if Pulumi could propagate resource creation between environments... AWS CloudFormation, for instance, doesn't do it. We would need to create a CI/CD infrastructure, among with other AWS services (CodeCommit, Code Pipeline and CodBuild) or third party tools (Jenkins, Gitlab etc.). So, is it possible to replicate the same resource in many AWS accounts, for example? Thanks for any help. 🙂
    m
    b
    • 3
    • 3
  • b

    boundless-tomato-68419

    09/27/2022, 6:08 PM
    Hi everyone! I just started with Pulumi and i was wondering if someone tried to have 2 different Pulumi stacks(projects) with one file for shared services/resources? I see that it is possible by exporting some values from the stacks but can i actually achieve this without it? The end goal would be to have some of the resources included in a class within a standalone configuration file and then used in the index.js files just as an instance. All suggestions would be appreciated.🙏
    l
    • 2
    • 4
  • c

    chilly-magazine-6129

    09/27/2022, 7:36 PM
    👋 Hey folks - we've just released the beta version of Klotho (klo.dev), we've been working on it for the past year, and it's deeply integrated with new/existing Pulumi workflows (by design). Would love to hear your thoughts!
    • 1
    • 1
  • p

    plain-arm-32800

    09/28/2022, 10:23 AM
    Is there a way to stop an ec2 instance using the automation API?
    l
    • 2
    • 3
Powered by Linen
Title
p

plain-arm-32800

09/28/2022, 10:23 AM
Is there a way to stop an ec2 instance using the automation API?
l

little-cartoon-10569

09/28/2022, 7:45 PM
Not using the api itself. An automation-api program can call the AWS SDK, which has functions for this.
🙌 1
p

plain-arm-32800

09/29/2022, 9:05 AM
Thanks tenwit, I ended up using your solution. Although I find the lack of such function strange.
l

little-cartoon-10569

09/29/2022, 7:03 PM
There isn't a Pulumi function to send a HTTP request to an API gateway either... Pulumi is a provisioning tool. It doesn't provide APIs for using the provisioned resources.
View count: 2