-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
[#98] Add a flag to redirect HTTP traffic to HTTPS #218
[#98] Add a flag to redirect HTTP traffic to HTTPS #218
Conversation
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.
Thanks @sestrella
Looks good. I have a couple of suggestions.
Let us know when it can be moved out of draft.
d1f2073
to
06847ed
Compare
@joe-niland thank you for the review, I addressed most of the comments, however, I would like to do some testing on a project before flagging this PR as "Ready for Review" |
|
||
data "aws_lb_listener" "http" { | ||
count = local.enabled && var.loadbalancer_redirect_http_to_https ? 1 : 0 | ||
load_balancer_arn = var.loadbalancer_is_shared ? var.shared_loadbalancer_arn : one(aws_elastic_beanstalk_environment.default.0.load_balancers) |
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.
@joe-niland I tried to avoid hard-coding the 0
index here, however, it didn't work:
one(aws_elastic_beanstalk_environment.default.*.load_balancers)
On the other hand, I noticed the 0
index is hard-coded on the load_balancers
output, so I'm using the same approach for now.
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.
What was the error you saw with the above?
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.
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.
Sorry this was my mistake - in the example code I was thinking of something else and forgot the indexing was there just because count is used on the eb environment resource. This seems fine now.
@joe-niland I did some local testing and it seems to work fine, this is the rule added to the HTTP listener: |
/rebuild-readme |
@sestrella would you mind adding this new var to |
@joe-niland done |
/test all |
/rebuild-readme |
@sestrella just a minor thing in the BATS test to look at |
Also @sestrella could you please run the following:
|
@sestrella or change your PR to allow edits by maintainers: https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment/actions/runs/4121415576/jobs/7117081418 |
@joe-niland I updated the |
/test all |
@sestrella can you please update the version constraint in examples/**/versions.tf also? |
/test bats |
/test readme |
/test terratest |
@sestrella since you changed the main versions.tf again you'll need to regenerate the readme as well |
@joe-niland sorry for taking so long updating the README file, I got a weird error running
After taking a closer look, I realized that readme/deps step downloads the wrong binary for the arm64 architecture:
Anyway, I found a workaround and I'm planning to report this issue to cloudposse/build-harness later. |
/test all |
Thanks for your contribution and patience @sestrella. Regarding the aws provider version constraint, was this updated by the make target? |
@joe-niland thank you for the code review and guidance! About:
I realized this version was coming from the |
Thanks for clarifying! |
what
why
redirect
action via the general optionsreferences