Skip to content

Commit 6746006

Browse files
tidy up to release (#65)
* admin docs added to the repo * `fmt` used to clean up `outputs.tf`
1 parent 07d4ece commit 6746006

File tree

10 files changed

+183
-62
lines changed

10 files changed

+183
-62
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# I have issues
2+
3+
## I'm submitting a
4+
5+
* [ ] bug report
6+
* [ ] feature request
7+
* [ ] support request
8+
9+
## What is the current behavior
10+
11+
## If this is a bug, how to reproduce? Please include a code sample
12+
13+
## What's the expected behavior
14+
15+
## Environment
16+
17+
* Affected module version:
18+
* OS:
19+
* Terraform version:
20+
21+
## Other relevant info

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# PR o'clock
2+
3+
## Description
4+
5+
Please explain the changes you made here and link to any relevant issues.
6+
7+
### Checklist
8+
9+
* [ ] `terraform fmt` and `terraform validate` both work from the root and `examples/alb_test_fixture` directories (look in CI for an example)
10+
* [ ] Tests for the changes have been added and passing (for bug fixes/features)
11+
* [ ] Test results are pasted in this PR (in lieu of CI)
12+
* [ ] Docs have been added/updated (for bug fixes/features)
13+
* [ ] Any breaking changes are noted in the description above

.travis.yml

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,56 @@
11
language: ruby
2-
sudo: false
2+
sudo: required
33
dist: trusty
4+
services:
5+
- docker
46
rvm:
5-
- 2.4.2
6-
7+
- 2.4.2
78
before_install:
8-
- echo "before_install"
9-
9+
- echo "before_install"
1010
install:
11-
- echo "install"
12-
- gem install bundler --no-rdoc --no-ri
13-
- bundle install
14-
11+
- echo "install"
12+
- gem install bundler --no-rdoc --no-ri
13+
- bundle install
1514
before_script:
16-
- echo 'before_script'
17-
# Get a random region from the awscli and use it through the remainder of the test cycle.
18-
- export AWS_REGION=$(docker run --env AWS_DEFAULT_REGION=us-east-2 --env AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} --env AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} garland/aws-cli-docker aws ec2 describe-regions --query 'Regions[].{Name:RegionName}' --output text | shuf | head -n1)
19-
- export TF_VAR_region=${AWS_REGION}
20-
- export TF_WARN_OUTPUT_ERRORS=1
21-
- echo "using AWS_REGION=${AWS_REGION}"
22-
- curl --silent --output terraform.zip https://releases.hashicorp.com/terraform/0.11.5/terraform_0.11.5_linux_amd64.zip
23-
- sha256sum terraform.zip | grep "131c440263382c79c7f783b70ff35cd1d03eb31c44f7738d153d95a0b8436ac9" -q
24-
- unzip terraform.zip ; rm -f terraform.zip; chmod +x terraform
25-
- mkdir -p ${HOME}/bin ; export PATH=${PATH}:${HOME}/bin; mv terraform ${HOME}/bin/
26-
- terraform -v
27-
15+
- echo 'before_script'
16+
- export AWS_REGION=$(docker run --env AWS_DEFAULT_REGION=us-east-2 --env AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
17+
--env AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} garland/aws-cli-docker aws ec2 describe-regions
18+
--query 'Regions[].{Name:RegionName}' --output text | shuf | head -n1)
19+
- export TF_VAR_region=${AWS_REGION}
20+
- export TF_WARN_OUTPUT_ERRORS=1
21+
- echo "using AWS_REGION=${AWS_REGION}"
22+
- curl --silent --output terraform.zip https://releases.hashicorp.com/terraform/0.11.7/terraform_0.11.7_linux_amd64.zip
23+
- sha256sum terraform.zip | grep "6b8ce67647a59b2a3f70199c304abca0ddec0e49fd060944c26f666298e23418"
24+
-q
25+
- unzip terraform.zip ; rm -f terraform.zip; chmod +x terraform
26+
- mkdir -p ${HOME}/bin ; export PATH=${PATH}:${HOME}/bin; mv terraform ${HOME}/bin/
27+
- terraform -v
2828
script:
29-
- echo 'script'
30-
-
31-
- terraform init
32-
- terraform fmt -check=true
33-
- terraform validate -var "region=${AWS_REGION}" -var "subnets=[]" -var "vpc_id=vpc-abcde012" -var "load_balancer_name=my-lb" -var "log_bucket_name=my-log-bucket" -var "security_groups=[]"
34-
- docker run --rm -v $(pwd):/app/ --workdir=/app/ -t wata727/tflint --error-with-issues
35-
- cd examples/alb_test_fixture
36-
- terraform init
37-
- terraform fmt -check=true
38-
- terraform validate
39-
- cd -
40-
- terraform -v
41-
- bundle exec kitchen test --destroy always
42-
29+
- echo 'script'
30+
- terraform init
31+
- terraform fmt -check=true
32+
- terraform validate -var "region=${AWS_REGION}" -var "subnets=[]" -var "vpc_id=vpc-abcde012"
33+
-var "load_balancer_name=my-lb" -var "log_bucket_name=my-log-bucket" -var "security_groups=[]"
34+
- docker run --rm -v $(pwd):/app/ --workdir=/app/ -t wata727/tflint --error-with-issues
35+
- cd examples/alb_test_fixture
36+
- terraform init
37+
- terraform fmt -check=true
38+
- terraform validate
39+
- cd -
40+
- terraform -v
41+
- bundle exec kitchen test --destroy always
4342
deploy:
44-
# publish to the registry when those APIs are documented
4543
provider: script
4644
script: ci/deploy.sh
4745
on:
4846
branch: master
49-
5047
notifications:
5148
email:
5249
recipients:
53-
50+
5451
on_success: change
5552
on_failure: change
53+
secret:
54+
secure: PVcAmalsUV5cKSU1jVG51nfJaOoy6s9f6ZK7mZlhnl+gNlYumu+e+KURSNS7zAdgdlEJwGwvnOvSuKdWDhR+dRuSmMQT47NwtMMDsWOWUTQff9Dzj1+vcuhwd5tHltjL+WpKWM/t69Ka5nMzmcj2GjMjmGl084dWIZkqGp3AV3MNKIBO4Pv+kLI9iP195FppBgET7kO2EYKTFslyBkXUW4vZvLtICIOhOKUJae6c9QA/gXnKaZSSs42LuEstBtBBnTObLM+MzheT3mQHRG5eARo1JuoGIkgA5yetP6XFrIM6tUuawGkbXDyB0J5Vsi7V9FYKXCy9uUuuUTbOr7JjxvT+NnB0ujWZe+0/7j3aHRhTUD1tt3zjXOMSM3WP8Y+2OkKWCf685vmlHXRfWBmzB6Fi9HAh1P5JnBx7eDIhvelNRjxuqmETX68UIexU0jT8ft3jbm0ctgDIf2rAGM6SLx712lq5YPJVkBPj+W3BrSZVMTI232+i4Ic6vHyF4m1/ZHAEdpJyDQT2f84OEkENEZkzHURmlsm0kIzq+DJ5k5NrXEUjaGdYQKpQsdyJhpAGzVLS5jjDHv6RC3o9v4q9jVq7lf4ppZY3kypz3ZuOem25kkCZbhIwkUtN3ocA3YRvLTMJ07MXc7lRvcZSC1v9Rwd9/tJNwqTiGwRW4atNkUk=
55+
id:
56+
secure: B8lds7kkeef9kAkynrLM7+Em61IUdVUWpr0UdRtSEgp5O0KdvBmE3SVuBiz4wMMVbyhwcMUwPda8kWDbUi+qcPZbMpNnkq900QXrBfbQjynKFR5clO3mAuvl8tlAR2zdg4w/MlBCXrrxceCpcLl0WQ/CgxnVO/+rGZGlsW63jVYfvJFEucdJdHmYTHfmTclHG4/kWn/P9ODTbf2TPrCUIlyJTR00ev6kNBmnEj8mDa5yy8LS/8l511ybBBA6W1w7u7hPOJXTpOVY84SnqcHzYkwyYmjUsQ+n9IcESxsJjzviz1Z5c/raRQox8zYG/utcIXpM6rm5QYtDrH6Ud4Gq/vpz3a4O9RqncJEWKQLaqeG5945MCf6qlC82tF/8Fj78oZOhiLEeG2I7nSHWOZ9ylcmtCJSVjJ4agAwZ8k6Vw2t4l/DAkIb0ATaYpzcnn0xA5YAjMHqK8HSRM9KWKdL6fz2/5AdN5raFhPNibwvdf4RnTIduJSlFILKBihRzlloGtSud4r1Zo+CIVYodqlkmYwC+6iV5hcktnVEsfrWg2gA0l5EymWh62T4pgBqM/kjDOqEOHukuWvNZwljjnXthjwR2PYw1qAFLtXULWJPyfEnpL0OW1CH1t22olhpuWgV4X50SdUaT3Z1HdnPLuVJ1ew97w6g6AX0u/4GDAyqwQ2c=

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
66
project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [[v3.3.0](https://github.com/terraform-aws-modules/terraform-aws-alb/compare/v3.2.0...v3.3.0)] - 2018-05-04]
9+
10+
### Added
11+
12+
* `target_group_arn_suffixes` added to support monitoring through CloudWatch (props, @jeff-everett 🤗)
13+
* Contributor Covenant gives guidelines on contributions.
14+
* Issues and PR templates.
15+
816
## [v3.2.0] - 2018-03-28
917

1018
### Changed

CONTRIBUTING.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Contributing
2+
3+
When contributing to this repository, please first discuss the change you wish to make via issue,
4+
email, or any other method with the owners of this repository before making a change.
5+
6+
Please note we have a code of conduct, please follow it in all your interactions with the project.
7+
8+
## Pull Request Process
9+
10+
1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
11+
2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
12+
3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
13+
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.
14+
15+
## Code of Conduct
16+
17+
### Our Pledge
18+
19+
In the interest of fostering an open and welcoming environment, we as
20+
contributors and maintainers pledge to making participation in our project and
21+
our community a harassment-free experience for everyone, regardless of age, body
22+
size, disability, ethnicity, gender identity and expression, level of experience,
23+
nationality, personal appearance, race, religion, or sexual identity and
24+
orientation.
25+
26+
### Our Standards
27+
28+
Examples of behavior that contributes to creating a positive environment
29+
include:
30+
31+
* Using welcoming and inclusive language
32+
* Being respectful of differing viewpoints and experiences
33+
* Gracefully accepting constructive criticism
34+
* Focusing on what is best for the community
35+
* Showing empathy towards other community members
36+
37+
Examples of unacceptable behavior by participants include:
38+
39+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
40+
* Trolling, insulting/derogatory comments, and personal or political attacks
41+
* Public or private harassment
42+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
43+
* Other conduct which could reasonably be considered inappropriate in a professional setting
44+
45+
### Our Responsibilities
46+
47+
Project maintainers are responsible for clarifying the standards of acceptable
48+
behavior and are expected to take appropriate and fair corrective action in
49+
response to any instances of unacceptable behavior.
50+
51+
Project maintainers have the right and responsibility to remove, edit, or
52+
reject comments, commits, code, wiki edits, issues, and other contributions
53+
that are not aligned to this Code of Conduct, or to ban temporarily or
54+
permanently any contributor for other behaviors that they deem inappropriate,
55+
threatening, offensive, or harmful.
56+
57+
### Scope
58+
59+
This Code of Conduct applies both within project spaces and in public spaces
60+
when an individual is representing the project or its community. Examples of
61+
representing a project or community include using an official project e-mail
62+
address, posting via an official social media account, or acting as an appointed
63+
representative at an online or offline event. Representation of a project may be
64+
further defined and clarified by project maintainers.
65+
66+
### Enforcement
67+
68+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
69+
reported by contacting the project team at [email protected]. All
70+
complaints will be reviewed and investigated and will result in a response that
71+
is deemed necessary and appropriate to the circumstances. The project team is
72+
obligated to maintain confidentiality with regard to the reporter of an incident.
73+
Further details of specific enforcement policies may be posted separately.
74+
75+
Project maintainers who do not follow or enforce the Code of Conduct in good
76+
faith may face temporary or permanent repercussions as determined by other
77+
members of the project's leadership.
78+
79+
### Attribution
80+
81+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
82+
available at [http://contributor-covenant.org/version/1/4][version]
83+
84+
[homepage]: http://contributor-covenant.org
85+
[version]: http://contributor-covenant.org/version/1/4/

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ ruby '2.4.2'
44

55
source 'https://rubygems.org/' do
66
gem 'awspec', '~> 1.4.2'
7-
gem 'kitchen-terraform', '~> 3.2'
7+
gem 'kitchen-terraform', '~> 3.3'
88
gem 'kitchen-verifier-awspec', '~> 0.1.1'
99
end

README.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
A Terraform module containing common configurations for an AWS Application Load
44
Balancer (ALB) running over HTTP/HTTPS. Available through the [terraform registry](https://registry.terraform.io/modules/terraform-aws-modules/alb/aws).
55

6-
| Branch | Build status |
7-
| --- | --- |
6+
| Branch | Build status |
7+
| ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
88
| master | [![build Status](https://travis-ci.org/terraform-aws-modules/terraform-aws-alb.svg?branch=master)](https://travis-ci.org/terraform-aws-modules/terraform-aws-alb) |
99

1010
## Assumptions
@@ -34,8 +34,8 @@ to the ASG immediately or will result in failure. The value of `target_group[n][
3434
The use-case presented here appears almost identical to how one would use an ELB
3535
but we inherit a few bonuses by moving to ALB like the ability to leverage WAF.
3636
[AWS's documentation](https://aws.amazon.com/elasticloadbalancing/applicationloadbalancer/) has a more
37-
exhastive set of reasons. Alternatively, if using ALB with ECS look no further than
38-
the [hashicorp example](https://github.com/terraform-providers/terraform-provider-aws/blob/master/examples/ecs-alb).
37+
exhaustive set of reasons. Alternatively, if using ALB with ECS look no further than
38+
the [Hashicorp example](https://github.com/terraform-providers/terraform-provider-aws/blob/master/examples/ecs-alb).
3939

4040
## Resources, inputs, outputs
4141

@@ -68,28 +68,21 @@ module "alb" {
6868

6969
This module has been packaged with [awspec](https://github.com/k1LoW/awspec) tests through [kitchen](https://kitchen.ci/) and [kitchen-terraform](https://newcontext-oss.github.io/kitchen-terraform/). To run them:
7070

71-
1. Install [rvm](https://rvm.io/rvm/install) and the ruby version specified in the [Gemfile](https://github.com/terraform-aws-modules/terraform-aws-alb/tree/master/Gemfile).
72-
2. Install bundler and the gems from our Gemfile:
71+
1. Install [rvm](https://rvm.io/rvm/install) and the ruby version specified in the [Gemfile](https://github.com/terraform-aws-modules/terraform-aws-alb/tree/master/Gemfile).
72+
2. Install bundler and the gems from our Gemfile:
7373

7474
```bash
7575
gem install bundler && bundle install
7676
```
7777

78-
3. Ensure your AWS environment is configured (i.e. credentials and region) for test and set TF_VAR_region to a valid AWS region (e.g. `export TF_VAR_region=${AWS_REGION}`).
79-
4. Test using `bundle exec kitchen test` from the root of the repo.
78+
3. Ensure your AWS environment is configured (i.e. credentials and region) for test and set TF_VAR_region to a valid AWS region (e.g. `export TF_VAR_region=${AWS_REGION}`).
79+
4. Test using `bundle exec kitchen test` from the root of the repo.
8080

8181
## Contributing
8282

83-
Report issues/questions/feature requests on in the [Issues](https://github.com/terraform-aws-modules/terraform-aws-alb/issues) section.
83+
Report issues/questions/feature requests on in the [issues](https://github.com/terraform-aws-modules/terraform-aws-alb/issues/new) section.
8484

85-
Pull requests are welcome! Ideally create a feature branch and issue for every
86-
individual change made. These are the steps:
87-
88-
1. Fork the repo to a personal space or org.
89-
2. Create your feature branch from master (`git checkout -b my-new-feature`).
90-
3. Commit your awesome changes (`git commit -am 'Added some feature'`).
91-
4. Push to the branch (`git push origin my-new-feature`).
92-
5. Create a new Pull Request and tell us about your changes.
85+
Full contributing [guidelines are covered here](https://github.com/terraform-aws-modules/terraform-aws-alb/blob/master/CONTRIBUTING.md).
9386

9487
## IAM Permissions
9588

@@ -103,7 +96,7 @@ The [changelog](https://github.com/terraform-aws-modules/terraform-aws-alb/tree/
10396
## Authors
10497

10598
Created and maintained by [Brandon O'Connor](https://github.com/brandoconnor) - [email protected].
106-
Many thanks to [the contributers listed here](https://github.com/terraform-aws-modules/terraform-aws-alb/graphs/contributors)!
99+
Many thanks to [the contributors listed here](https://github.com/terraform-aws-modules/terraform-aws-alb/graphs/contributors)!
107100
108101
## License
109102

examples/alb_test_fixture/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = "= 0.11.5"
2+
required_version = "= 0.11.7"
33
}
44

55
provider "aws" {

outputs.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ output "target_group_arns" {
4444
}
4545

4646
output "target_group_arn_suffixes" {
47-
description = "ARN suffixes of our target groups - can be used with CloudWatch."
48-
value = "${slice(concat(aws_lb_target_group.main.*.arn_suffix, list("")), 0, var.target_groups_count)}"
49-
}
47+
description = "ARN suffixes of our target groups - can be used with CloudWatch."
48+
value = "${slice(concat(aws_lb_target_group.main.*.arn_suffix, list("")), 0, var.target_groups_count)}"
49+
}
5050

5151
output "target_group_names" {
5252
description = "Name of the target group. Useful for passing to your CodeDeploy Deployment Group."

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v3.2.0
1+
v3.3.0

0 commit comments

Comments
 (0)