Giter Club home page Giter Club logo

terraform-aws-glue's Introduction

I'm on social networking:

I'm certified with the next certificates:

terraform-aws-glue's People

Contributors

borususriharshavardhan avatar gmirsky avatar guidopili avatar mkushal avatar sebastianua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

terraform-aws-glue's Issues

Unable to add multiple conditions using logical.

glue_trigger_predicate = [ {

conditions = {
job_name = module.glue_generic_ing_validation_pipeline.glue_job_id
state = var.state
},

logical = "AND"

conditions =  {
  job_name         = module.glue_generic_cur_validation_pipeline.glue_job_id
  state            = var.state
  } 
}

]

The piece of code does not work, am I missing anything?

Updating to 2.14.3 throws "Unsupported argument"

Title says it all, multiple unsupported args for existing glue resouces created by this module.

Tf config

module "datawarehouse_glue_connection" {
  source                 = "SebastianUA/glue/aws"
  enable_glue_connection = true
  glue_connection_name   = var.connection_name
  glue_connection_connection_properties = {
    JDBC_CONNECTION_URL = "jdbc:postgresql://${local.datwarehousespec.reporting_database_endpoint}/${local.datwarehousespec.datwarehouse_database_name}"
    PASSWORD            = data.vault_generic_secret.data_warehouse_admin_user.data["password"]
    USERNAME            = data.vault_generic_secret.data_warehouse_admin_user.data["username"]
  }
  glue_connection_physical_connection_requirements = [{
    availability_zone      = local.datwarehousespec.reporting_db_one_private_subnet_az
    security_group_id_list = local.datwarehousespec.data-warehouse-security_group
    subnet_id              = local.datwarehousespec.reporting_db_one_private_subnet
  }]

}

Error log


  on .terraform/modules/datawarehouse_glue_connection/glue_catalog_database.tf line 41, in resource "aws_glue_catalog_database" "glue_catalog_database":
  41:       region = lookup(target_database.value, "region", null)

An argument named "region" is not expected here.

Error: Unsupported argument

  on .terraform/modules/datawarehouse_glue_connection/glue_catalog_database.tf line 45, in resource "aws_glue_catalog_database" "glue_catalog_database":
  45:   tags = merge(

An argument named "tags" is not expected here.

Error: Invalid resource type

  on .terraform/modules/datawarehouse_glue_connection/glue_data_quality_ruleset.tf line 4, in resource "aws_glue_data_quality_ruleset" "glue_data_quality_ruleset":
   4: resource "aws_glue_data_quality_ruleset" "glue_data_quality_ruleset" {

The provider hashicorp/aws does not support resource type
"aws_glue_data_quality_ruleset".

Output "glue_user_defined_function_create_date" is breaking the module

Hi,

The output "glue_user_defined_function_create_date" is correctly implemented according to the Hashicorp AWS provider documentation. Unfortunately, the documentation is wrong as the code uses "create_time" instead of "create_date".
The documentation will be fixed in AWS provider v3.71.0 (hashicorp/terraform-provider-aws#22381) but this leads to the need of a fix at outputs.tf accordingly:

output "glue_user_defined_function_create_time" {
  description = "The time at which the function was created."
  value       = element(concat(aws_glue_user_defined_function.glue_user_defined_function.*.create_time, [""]), 0)
}

Currently, the whole module seems to be unusable due to the wrong output value.
I am not allowed to push a new branch including this change for creation of a pull request.

Best,
Michael

Error: Too many schema_change_policy blocks

Hi,

I try to configure a Glue crawler by setting a "schema_change_policy".
How is the input "glue_crawler_schema_change_policy" to be filled correctly? Inputting a list of maps (default is []), e.g.

glue_crawler_schema_change_policy = [
    {
      delete_behavior = "LOG",
      update_behavior = "UPDATE_IN_DATABASE"
    }
  ]

this leads to Error: Too many schema_change_policy blocks.

From my point of view, it cannot be iterated by using for_each as that leads to several blocks like

  schema_change_policy {
    delete_behavior = <VALUE>
  }

  schema_change_policy {
    update_behavior = <VALUE>
  }

Any help is appreciated.

Thanks,
Michael

When enable_glue_connection is set to false (default), the connections variable is set to [""] causing InvalidInputException

I am trying to create a glue job, I don't need to create any connections here therefore I don't set the glue_job_connections variable. However the module builds a connection list anyway looking like this -> [""]. This causes a InvalidInputExcpetion.

I think this has to do with line 11 of glue_job.tf of the module

connections = var.glue_job_connections != null && !var.enable_glue_connection ? var.glue_job_connections : concat(var.glue_job_additional_connections, [element(concat(aws_glue_connection.glue_connection.*.id, [""]), 0)])

When glue_job_connections is not set and enable_glue_connection is false (default), the concat function ends up generating [""] which AWS does not seem to like, it wants [] or connection var be not set at all.

A work around is to set the glue_job_connections = [] but it will be great if the module doesn't create a connection list with the empty string.

My code:

module "glue_etl_job" {
  source                     = "SebastianUA/glue/aws"
  name                       = var.glue_etl_job_name
  environment                = var.env
  enable_glue_job            = true
  glue_job_name              = var.glue_etl_job_name
  glue_job_role_arn          = var.glue_iam_service_role_arn
  glue_job_number_of_workers = 3
  glue_job_worker_type       = "G.1X"
  glue_job_glue_version      = "3.0"
  # enable_glue_connection     = false 
  # glue_job_connections       = [] <------- work around

  glue_job_execution_property = [
    {
      max_concurrent_runs = 1
    }
  ]
  glue_job_command = [
    {
      script_location = local.glue_script_s3_path
      name            = "glueetl"
    }
  ]
  glue_job_default_arguments = { "--job-bookmark-option" = "job-bookmark-enable" }

  enable_glue_workflow = true
  glue_workflow_name   = var.glue_etl_workflow_name
}

Crawler automation

Hi, I am trying to work on an automation for glue crawlers. I am able to use for_each for the crawler names, the problem is I cannot use the same for s3_path since it will be unique to each crawler. I am trying to find a way if I can automation both the crawler_names and s3_paths?

Error: error creating Glue Job (aws_glue_generic_cur_pipeline_v1_test): InvalidInputException: Connections list should not be null or empty. on .terraform\modules\glue_generic_cur_pipeline_v1\glue_job.tf line 4, in resource "aws_glue_job" "glue_job": 4: resource "aws_glue_job" "glue_job"

The resolution to this is to comment the "connections" line.

resource "aws_glue_job" "glue_job" {
count = var.enable_glue_job ? 1 : 0

name = var.glue_job_name != "" ? lower(var.glue_job_name) : "${lower(var.name)}-glue-job-${lower(var.environment)}"
role_arn = var.glue_job_role_arn

description = var.glue_job_description
connections = var.glue_job_connections != null && !var.enable_glue_connection ? var.glue_job_connections : concat(var.glue_job_additional_connections, [element(concat(aws_glue_connection.glue_connection.*.id, [""]), 0)])

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.