Skip to content

Commit

Permalink
Updates Provider versions (#10)
Browse files Browse the repository at this point in the history
* bumps Terraform version to `0.13`
* bmps AWS Module to `3.4`
* bumps Archive Provider to `2.0`

* Remove S3 region as it is not supported in the v3.x AWS provider

* documentation
  * use underscores for module examples
  * updates example versions

Co-authored-by: Taylor Dolezal <onlydole@gmail.com>
  • Loading branch information
ksatirli and onlydole authored Sep 4, 2020
1 parent 4af0bbc commit 8efa44f
Show file tree
Hide file tree
Showing 20 changed files with 46 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-quality-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:

env:
TERRAFORM_VERSION: 0.12.20
TERRAFORM_VERSION: 0.13.2
TERRAFORM_ACTIONS_COMMENT: true

jobs:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 1.1.4 (2020-06-11)
# 1.1.4 (2020-06-11)

* Updates documentation and examples (#9) ([9d3dfd7](https://github.com/operatehappy/terraform-aws-s3-bucket/commit/9d3dfd7)), closes [#9](https://github.com/operatehappy/terraform-aws-s3-bucket/issues/9)

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

## Requirements

This module requires Terraform version `0.12.20` or newer.
This module requires Terraform version `0.13.0` or newer.

## Dependencies

Expand All @@ -32,9 +32,9 @@ This module depends on a correctly configured [AWS Provider](https://www.terrafo
Add the module to your Terraform resources like so:

```hcl
module "simple-example" {
module "simple_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"
name = "oh-demo-simple-example"
Expand All @@ -59,7 +59,6 @@ Additional usage examples are available in the `examples` directory via [GitHub]
| acceleration_status | Acceleration Status of S3 Bucket | `string` | n/a |
| name | Name of S3 Bucket | `string` | n/a |
| policy | Policy (JSON) Document of S3 Bucket | `string` | n/a |
| region | Region of S3 Bucket | `string` | n/a |
| acl | Canned ACL of S3 Bucket | `string` | `"private"` |
| cors_rule | Map of CORS Rules of S3 Bucket | `any` | `{}` |
| create_readme | Toggle creation of `README.md` in root of S3 Bucket | `bool` | `true` |
Expand Down
8 changes: 4 additions & 4 deletions examples/complex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ A _complex_ configuration of the `terraform-aws-s3-bucket` Module could look lik

```hcl
// create S3 Bucket to be used as logging target
module "complex-example-target" {
module "complex_example_target" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"
name = "oh-demos-complex-example-target"
acl = "log-delivery-write"
Expand All @@ -32,9 +32,9 @@ module "complex-example-target" {
}]
}
module "complex-example" {
module "complex_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"
name = "oh-demos-complex-example"
Expand Down
8 changes: 4 additions & 4 deletions examples/complex/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "complex-example-target" {
module "complex_example_target" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"
name = "oh-demos-complex-example-target"
acl = "log-delivery-write"

Expand All @@ -10,9 +10,9 @@ module "complex-example-target" {
}]
}

module "complex-example" {
module "complex_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"

name = "oh-demos-complex-example"

Expand Down
8 changes: 4 additions & 4 deletions examples/logging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ A _logging_ configuration of the `terraform-aws-s3-bucket` Module could look lik

```hcl
// create S3 Bucket to be used as logging target
module "logging-example-target" {
module "logging_example_target" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"
name = "oh-demos-logging-example-target"
acl = "log-delivery-write"
}
module "logging-example" {
module "logging_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"
name = "oh-demos-logging-example"
Expand Down
8 changes: 4 additions & 4 deletions examples/logging/main.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module "logging-example-target" {
module "logging_example_target" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"
name = "oh-demos-logging-example-target"
acl = "log-delivery-write"
}

module "logging-example" {
module "logging_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"

name = "oh-demos-logging-example"

Expand Down
4 changes: 2 additions & 2 deletions examples/object-lock-configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ For a list of installation instructions, see the [Readme document](https://regis
An _object-lock_ configuration of the `terraform-aws-s3-bucket` Module could look like this:

```hcl
module "object-lock-configuration-example" {
module "object_lock_configuration_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"
name = "oh-demos-object-lock-configuration-example"
Expand Down
4 changes: 2 additions & 2 deletions examples/object-lock-configuration/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "object-lock-configuration-example" {
module "object_lock_configuration_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"

name = "oh-demos-object-lock-configuration-example"

Expand Down
4 changes: 2 additions & 2 deletions examples/server-side-encryption/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ For a list of installation instructions, see the [Readme document](https://regis
A _server-side-encryption_ configuration of the `terraform-aws-s3-bucket` Module could look like this:

```hcl
module "server-side-encryption-example" {
module "server_side_encryption_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"
name = "oh-demos-server-side-encryption-example"
Expand Down
4 changes: 2 additions & 2 deletions examples/server-side-encryption/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "server-side-encryption-example" {
module "server_side_encryption_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"

name = "oh-demos-server-side-encryption-example"

Expand Down
4 changes: 2 additions & 2 deletions examples/simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ For a list of installation instructions, see the [Readme document](https://regis
A _simple_ configuration of the `terraform-aws-s3-bucket` Module could look like this:

```hcl
module "simple-example" {
module "simple_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"
name = "oh-demo-simple-example"
Expand Down
4 changes: 2 additions & 2 deletions examples/simple/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "simple-example" {
module "simple_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"

name = "oh-demos-simple-example"

Expand Down
4 changes: 2 additions & 2 deletions examples/versioning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ For a list of installation instructions, see the [Readme document](https://regis
A _versioning_ configuration of the `terraform-aws-s3-bucket` Module could look like this:

```hcl
module "versioning-example" {
module "versioning_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"
name = "oh-demos-versioning-example"
Expand Down
4 changes: 2 additions & 2 deletions examples/versioning/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "versioning-example" {
module "versioning_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"

name = "oh-demos-versioning-example"

Expand Down
4 changes: 2 additions & 2 deletions examples/website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ For a list of installation instructions, see the [Readme document](https://regis
A _website_ configuration of the `terraform-aws-s3-bucket` Module could look like this:

```hcl
module "website-example" {
module "website_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"
name = "oh-demos-website-example"
Expand Down
8 changes: 4 additions & 4 deletions examples/website/main.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module "website-example" {
module "website_example" {
source = "operatehappy/s3-bucket/aws"
version = "1.1.4"
version = "1.2.0"

name = "oh-demos-website-example"

website = [{
website = {
index_document = "index.html"
error_document = "error.html"
routing_rules = <<EOF
Expand All @@ -18,7 +18,7 @@ module "website-example" {
}]
EOF
redirect_all_requests_to = null
}]
}

cors_rule = {
allowed_headers = ["*"]
Expand Down
2 changes: 0 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ resource "aws_s3_bucket" "bucket" {

acceleration_status = var.acceleration_status

region = var.region

request_payer = var.request_payer

// replication_configuration will be added in a future release
Expand Down
6 changes: 3 additions & 3 deletions terraform.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
terraform {
required_version = ">= 0.12.20"
required_version = ">= 0.13.0"

required_providers {
aws = "> 2.10.0"
template = "> 1.0.0"
aws = "~> 3.4"
template = "~> 2.0"
}
}
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,6 @@ variable "request_payer" {
default = "BucketOwner"
}

variable "region" {
type = string
description = "Region of S3 Bucket"
default = null
}

variable "server_side_encryption_configuration" {
type = map
description = "Server-side Encryption (SSE) Configuration of S3 Bucket"
Expand Down

0 comments on commit 8efa44f

Please sign in to comment.