Skip to content

Commit

Permalink
Merge pull request #264 from trussworks/v12-readme
Browse files Browse the repository at this point in the history
add upgrade instructions to v12
  • Loading branch information
carterjones authored Apr 14, 2022
2 parents e35506a + e35fa4d commit 6315b60
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ Logging from the following services is supported for both cases as well as in AW
* [RedShift](https://aws.amazon.com/redshift/)
* [S3](https://aws.amazon.com/s3/)

## Terraform Versions

Terraform 0.13. Pin module version to ~> 10.X Submit pull-requests to main branch.

Terraform 0.12. Pin module version to ~> 8.X . Submit pull-requests to terraform12 branch.

## Usage for a single log bucket storing logs from all services

```hcl
Expand Down Expand Up @@ -172,6 +166,32 @@ No modules.

## Upgrade Paths

### Upgrading from 11.x.x to 12.x.x

Version 12.x.x enables the use of version 4 of the AWS provider. Terraform provided [an upgrade path](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/version-4-upgrade) for this. To support the upgrade path, this module now includes the following additional resources:

* `aws_s3_bucket_policy.aws_logs`
* `aws_s3_bucket_acl.aws_logs`
* `aws_s3_bucket_lifecycle_configuration.aws_logs`
* `aws_s3_bucket_server_side_encryption_configuration.aws_logs`
* `aws_s3_bucket_logging.aws_logs`
* `aws_s3_bucket_versioning.aws_logs`

As part of this upgrade, you will need to perform the following imports. Replace `example` with the name you're using when calling this module and replace `your-bucket-name-here` with the name of your bucket (as opposed to an S3 bucket ARN). Also note the inclusion of `,private` when importing the new `aws_s3_bucket_acl` Terraform resource.

```sh
terraform import module.example.aws_s3_bucket_policy.aws_logs your-bucket-name-here
terraform import module.example.aws_s3_bucket_acl.aws_logs your-bucket-name-here,private
terraform import module.example.aws_s3_bucket_lifecycle_configuration.aws_logs your-bucket-name-here
terraform import module.example.aws_s3_bucket_server_side_encryption_configuration.aws_logs your-bucket-name-here
terraform import module.example.aws_s3_bucket_logging.aws_logs your-bucket-name-here
terraform import module.example.aws_s3_bucket_versioning.aws_logs your-bucket-name-here
```

### Upgrading from 10.x.x to 11.x.x

Version 11.x.x removes the use of the `Automation` tag with a value of `"Terraform"`. If you would like to continue using the `Automation` tag, you can define it directly in `var.tags`.

### Upgrading from 9.0.0 to 10.x.x

Version 10.x.x removes the `region` variable as it will pull from the region that your AWS session is associated with.
Expand Down

0 comments on commit 6315b60

Please sign in to comment.