Comments (9)
How exactly does it fail? Show the error message.
from terraform-aws-elb.
- module.elb_new.aws_elb.this: "listener.0.instance_port": required field is not set
- module.elb_new.aws_elb.this: "listener.0.instance_protocol": required field is not set
- module.elb_new.aws_elb.this: "listener.0.lb_port": required field is not set
- module.elb_new.aws_elb.this: "listener.0.lb_protocol": required field is not set
from terraform-aws-elb.
when i remove the ssl_certificate_id
or add it as static string, all good
from terraform-aws-elb.
It looks like the issue is in Terraform - hashicorp/terraform-provider-aws#48 .
You need to make sure that you create aws_iam_server_certificate
before passing its value to ssl_certificate_id
. You need to avoid using calculated values (eg, data sources, resources, modules), because Terraform does not build dependency between aws_elb
and ssl_certificate_id
values.
This code will work:
listener = [
{
instance_port = "8020"
instance_protocol = "HTTP"
lb_port = "443"
lb_protocol = "SSL"
ssl_certificate_id = "arn:aws:iam::815361859851:server-certificate/terraform-test"
},
]
as well as this:
listener = [
{
instance_port = "8020"
instance_protocol = "HTTP"
lb_port = "443"
lb_protocol = "SSL"
ssl_certificate_id = "${var.cert_arn}"
},
]
# ...
}
variable "cert_arn" { default = "arn:aws:iam::815361859851:server-certificate/terraform-test" }
from terraform-aws-elb.
Anton, question:
i create the whole core (vpc, sgs, elbs, subnets) in one play
but then i can't do it anymore because i need the cert first...
do you have an idea how to mange this?
thanks
from terraform-aws-elb.
I would create a certificate during the first run. Create VPC and the rest in the second run. There are several things in Terraform like this, which can't be executed all-in-one. You can script this, of course.
from terraform-aws-elb.
@antonbabenko , are you saying it's impossible to create a monolithic config file for a service? By that I mean, all resources are generated and so we have no actual values for anything, like vpc_id?
from terraform-aws-elb.
@gnydick You can use a monolithic config file for a service and include data-sources in all non-complex arguments. listener
has a complicated type map
(or list of maps
) and therefore computed values are not allowed there (limitation of Terraform).
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
- Listeners variable use seems to be a bug that doesn't work now HOT 4
- 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.