Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,39 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
project adheres to [Semantic Versioning](http://semver.org/).

## [v2.5.0] - 2018-03-07

### Added

* `target_type` variable for targeting IPs rather than instances (nice, @angusfz 👌)
* Added variables for controlling front door ALB listening ports (thanks, @egarbi ✨)
* output for `target_group_name` for external consumption (boom! @ndench 🐱‍🐉)

### Changed

* Clarified variable description and bucket policy (right on, @angstwad 👏)
* Docs and var description updates (everything helps, @tehmaspc 🦑)

## [v2.4.0] - 2018-01-19

* Remove `region` input. If you'd like to customise the AWS provider configuration, this is supported using the new `providers` input which is a core Terraform feature. [Read more.](https://www.terraform.io/docs/modules/usage.html#providers-within-modules)
### Added

* `alb_arn_suffix` output added for external consumption. (props, @mbolek 🐱‍🏍)
* variables to control listener ports (wunderbar, @egarbi 🙌)

### Changed

* Remove `region` input. If you'd like to customise the AWS provider configuration,
this is supported using the new `providers` input which is a core Terraform feature.
[Read more.](https://www.terraform.io/docs/modules/usage.html#providers-within-modules)
* update CI to use terraform 0.11.2 and KT 3.1.0.
* `alb_arn_suffix` output added for external consumption.
* Several formatting changes to adhere to convention.

## [v2.3.2] - 2017-12-18

### Added

* ARN outputs of listeners for reuse outside the module. (thanks, proj4spes! 👌)
* ARN outputs of listeners for reuse outside the module. (thanks, @proj4spes! 👌)

## [v2.3.1] - 2017-11-27

Expand Down Expand Up @@ -117,7 +138,8 @@ project adheres to [Semantic Versioning](http://semver.org/).

### Changed

* Restructured project templates to alb dir to add testing. This is a breaking change so upping major version.
* Restructured project templates to alb dir to add testing. This is a breaking
change so upping major version.
* Redundant examples dir removed
* Updated documentation

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ This module has been packaged with [awspec](https://github.com/k1LoW/awspec) tes
1. Install bundler and the gems from our Gemfile:

```bash
gem install bundler; bundle install
gem install bundler && bundle install
```

1. 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}`).
Expand Down
4 changes: 1 addition & 3 deletions examples/test_fixtures/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ data "aws_caller_identity" "current" {}

data "aws_availability_zones" "available" {}

data "aws_region" "current" {
current = true
}
data "aws_region" "current" {}
45 changes: 20 additions & 25 deletions test/integration/default/test_alb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,29 @@
state_file = 'terraform.tfstate.d/kitchen-terraform-default-aws/terraform.tfstate'
tf_state = JSON.parse(File.open(state_file).read)
principal_account_id = tf_state['modules'][0]['outputs']['principal_account_id']['value']
# rubocop:enable LineLength
account_id = tf_state['modules'][0]['outputs']['account_id']['value']
vpc_id = tf_state['modules'][0]['outputs']['vpc_id']['value']
security_group_id = tf_state['modules'][0]['outputs']['sg_id']['value']
account_id = tf_state['modules'][0]['outputs']['account_id']['value']
region = tf_state['modules'][0]['outputs']['region']['value']
ENV['AWS_REGION'] = region
# this must match the format in examples/test_fixtures/locals.tf
log_bucket_name = 'logs-' + region + '-' + account_id
policy = "{
\"Version\": \"2012-10-17\",
\"Statement\": [
{
\"Sid\": \"AllowToPutLoadBalancerLogsToS3Bucket\",
\"Effect\": \"Allow\",
\"Principal\": {
\"AWS\": \"arn:aws:iam::#{principal_account_id}:root\"
},
\"Action\": \"s3:PutObject\",
\"Resource\": \"arn:aws:s3:::#{log_bucket_name}/#{log_location_prefix}/AWSLogs/#{account_id}/*\"
}
]
}"
# rubocop:enable LineLength
log_object = "#{log_location_prefix}/AWSLogs/#{account_id}/ELBAccessLogTestFile"
vpc_id = tf_state['modules'][0]['outputs']['vpc_id']['value']
security_group_id = tf_state['modules'][0]['outputs']['sg_id']['value']

describe alb('test-alb') do
it { should exist }
Expand All @@ -42,25 +56,6 @@

describe s3_bucket(log_bucket_name) do
it { should exist }
# rubocop:disable LineLength
it { should have_object("#{log_location_prefix}/AWSLogs/#{account_id}/ELBAccessLogTestFile") }
it do
should have_policy <<~POLICY
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowToPutLoadBalancerLogsToS3Bucket",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::#{principal_account_id}:root"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::#{log_bucket_name}/#{log_location_prefix}/AWSLogs/#{account_id}/*"
}
]
}
POLICY
end
# rubocop:enable LineLength
it { should have_object(log_object) }
it { should have_policy(policy) }
end
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.4.0
v2.5.0