I would like to use the output (object) as a attribute of another resources. I have the module like below:
locals {
lb_domain = {
lb_public = {
domain = "dev.example.net"
},
lb_internal = {
domain = "dev.internal.example.net"
}
}
module "dev_acm" {
source = "terraform-aws-modules/acm/aws"
version = "3.5.0"
for_each = local.lb_domain
domain_name = each.value.domain
zone_id = data.aws_route53_zone.this.id
}
And output of this module. this is the object, I would like to use this for another resources module.dev_acm
:
+ dev_acm = {
+ lb_internal = {
+ acm_certificate_arn = (known after apply)
+ acm_certificate_domain_validation_options = [
+ {
+ domain_name = "dev.internal.example.net"
+ resource_record_name = (known after apply)
+ resource_record_type = (known after apply)
+ resource_record_value = (known after apply)
},
]
+ acm_certificate_status = (known after apply)
+ acm_certificate_validation_emails = (known after apply)
+ distinct_domain_names = [
+ "dev.internal.example.net",
]
+ validation_domains = (known after apply)
+ validation_route53_record_fqdns = [
+ (known after apply),
]
}
+ lb_public = {
+ acm_certificate_arn = (known after apply)
+ acm_certificate_domain_validation_options = [
+ {
+ domain_name = "dev.example.net"
+ resource_record_name = (known after apply)
+ resource_record_type = (known after apply)
+ resource_record_value = (known after apply)
},
]
+ acm_certificate_status = (known after apply)
+ acm_certificate_validation_emails = (known after apply)
+ distinct_domain_names = [
+ "dev.example.net",
]
+ validation_domains = (known after apply)
+ validation_route53_record_fqdns = [
+ (known after apply),
]
}
}
How I can use acm_certificate_arn
public lb_public
in the output for another services?
Something like that: module.dev_acm.lb_internal.acm_certificate_arn