sebastianua / terraform-aws-glue Goto Github PK
View Code? Open in Web Editor NEWGlue module for AWS provider
Glue module for AWS provider
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?
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".
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
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
}
}
]
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
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
}
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?
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)])
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.