-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
providers/aws: Document and validate ELB ssl_cert and protocol require #3887
Conversation
LGTM |
if valid { | ||
listeners = append(listeners, l) | ||
} else { | ||
return nil, fmt.Errorf("[ERR] Invalid ssl_certificate_id / Protocol combination. Must be either HTTPS or SSL") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message isn't the clearest, I think. There are two properties mentioned in the first part of the message, and then a statement in the second part about only one of them, but which one isn't mentioned. Also not sure why "protocol" got an uppercase P here.
Suggest instead: "ssl_certificate_id may be set only when protocol is 'https' or 'ssl'".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, I updated the wording in 5cafe74 , thanks!
af99614
to
5cafe74
Compare
providers/aws: Document and validate ELB ssl_cert and protocol require
Is this check case-sensitive? My previously valid Terraform scripts fail to deploy after upgrading to 0.6.7 because I am using "HTTPS" rather than "https" in my listener block. Does AWS really reject "HTTPS" (NB: Given this used to work, I suspect the answer is no). Easy for me to fix this I guess, but I wonder if the code could be a bit more tolerant of what is effectively an enum with the 'wrong' capitalization. |
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. |
While not explicitly documented, the
ssl_certificate_id
attribute of an ELB Listener is only valid if the protocols are eitherSSL
orHTTPS
. If you includessl_certificate_id
in a listener of any other protocol, AWS will not return an error, however, follow upterraform plan
will reveal that theListener
returned will have had it'sssl_certificate_id
omitted.For example:
This will succeed, however, the state file will have an empty
ssl_certificate_id
:which gives us a
plan
loop:With this PR, we get a validation error in Terraform:
This PR is built off of #3863