I have a Glue job resource defined in module A, now I want to import it and use the job name in module B, how can I achieve this?
I tried something like, in the module B:
variable "example_glue_name" {
type = string
}
data "aws_glue_job" "example_glue_name" {
example_glue_name = var.example_glue_name
}
then:
module "B"{
source = .....
...
example_glue_name = module.A.example_glue_name
}
But I got error: Unsupported argument, │ An argument named "example_glue_job_name" is not expected here.
, I read the docs here: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/glue_script
It looks like terraform doesn't support data "aws_glue_job"
, it only has something like data "aws_glue_script"
, but it's not clear how to reference the glue name....
anyone what's the correct way to do this? Thanks.