Skip to content

Ben Giddins

My feedback

3 results found

  1. 15 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    Hi we working to enhance the the use of Triggers and Functions in Terraform, but this effort still several quarters away. Feel free to reach on in the interim in case of any questions and happy to help. 

    An error occurred while saving the comment
    Ben Giddins commented  · 

    I went through the exercise today of deploying a database trigger that calls a function using mongodbatlas_event_trigger.

    There's no mechanism to deploy the function code through Terraform - the above resource needs you to first create a JavaScript function either through the UI or CLI, and refer to it by an ID you extract from the URL in the UI.

    Basically it would be great if mongodbatlas_event_trigger could be a little more like aws_lambda_function where I could bring in the function's JavaScript file from a path or an S3 bucket (we use an S3 bucket for Lambda zips in our workflow).

    This is what my Lambda tfs look like:

    data "aws_s3_object" "my_lambda_function" {
    bucket = var.s3_bucket_deployment
    key = "lambda/go1.x/web/my_lambda_function.zip"
    }

    resource "aws_lambda_function" "my_lambda_function" {
    function_name = "${var.deployment}_my_lambda_function"
    s3_bucket = data.aws_s3_object.my_lambda_function.bucket
    s3_key = data.aws_s3_object.my_lambda_function.key
    s3_object_version = data.aws_s3_object.my_lambda_function.version_id

    ...

    Would be great to be able to grab a .js from the path or S3 and publish the function either in it's own resource or as part of mongodbatlas_event_trigger.

  2. 26 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    planned  ·  1 comment  ·  Atlas » Terraform Provider  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Ben Giddins supported this idea  · 
  3. 15 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Ben Giddins commented  · 

    That actually makes a lot of sense - we actually already have a provisioning Lambda written in Go to create a number of views used in our application - we can extend this to create the indexes as well.

    An error occurred while saving the comment
    Ben Giddins commented  · 

    Agreed - our entire infrastructure is built out using Terraform - it's an aberration to have to manually create indexes on collections when we can create search indexes using Terraform.

    Ben Giddins supported this idea  · 

Feedback and Knowledge Base