Comments (4)
Please unpublish this from the registry until this is fixed?
from terraform-aws-elb.
Yes, this is a known limitation of Terraform. It does not support dynamically computed values in nested block structures. Read this comment - hashicorp/terraform#16582 (comment).
For the time being, I recommend using a static variable (${var...}
)or hard-coded values instead of using data-sources or resources.
@sysadmiral While this module has an issue (current bug) it is working properly in general, so it won't be unpublished from the registry.
from terraform-aws-elb.
I'm seeing the same issue when I try to use a variable in the listener block. The variable is passed into the containing module having been retrieved from a data block. eg. in main.tf
of hte module piwik
:
module "elb" {
source = "terraform-aws-modules/elb/aws"
name = "elb-${var.name}"
subnets = ["${var.elb_subnets}"]
security_groups = ["${module.security.elb_security_group}"]
internal = false
listener = [
{
instance_port = "80"
instance_protocol = "HTTP"
lb_port = "80"
lb_protocol = "HTTP"
},
{
instance_port = "80"
instance_protocol = "HTTP"
lb_port = "443"
lb_protocol = "HTTPS"
ssl_certificate_id = "${var.ssl_certificate_id}"
},
]
health_check = [
{
target = "HTTP:80/"
interval = 30
healthy_threshold = 2
unhealthy_threshold = 2
timeout = 5
},
]
number_of_instances = 1
instances = ["${module.instance.id}"]
tags = "${var.tags}"
}
I'm passing ssl_certificate_id
into the module having retrieved it using a data source:
data "aws_acm_certificate" "app_cert" {
domain = "${var.certificate_domain}"
}
module 'piwik' {
source = "/path/to/module"
...
ssl_certificate_id = "${data.aws_acm_certificate.app_cert.arn}"
}
Is there no way to make this work?
R.
from terraform-aws-elb.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
from terraform-aws-elb.
Related Issues (20)
- 1.3.0 does not work anymore HOT 2
- Unexpected type string in list HOT 7
- access logs should be a map not a list HOT 4
- how to use ssl_certificate_id with this module HOT 4
- module.elb.module.elb_attachment.aws_elb_attachment.this destruction ignore aws lifecycle create_before_destroy HOT 2
- v2.0.0 HOT 10
- access_logs is required not optional HOT 2
- Unable to set access_logs HOT 3
- No Enable/Disable Option HOT 7
- Error on adding SSL ceritifcate HOT 3
- Doesn't appear to support an aws_acm_certificate? HOT 2
- "health_check" not suitable map of string required. HOT 4
- No way to attach ssl_certificate_id from module output- work only with plain-text based input HOT 4
- Warning: Provider source not supported in Terraform v0.12 HOT 2
- Optional parameter: ssl_certificate_id HOT 2
- Minor typo update in outputs.tf message for elb id description HOT 4
- ELB cannot be attached to multiple subnets in the same AZ. HOT 3
- Using a datasource for the ssl_certificate_id in the listener breaks the module HOT 8
- pattern for adding autoscaling group instances HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-aws-elb.