Skip to content
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

removed deprecated s3_website module #41

Merged
merged 3 commits into from
Jan 4, 2024
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
61 changes: 31 additions & 30 deletions modules/aws/s3/s3_website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<h3 align="center">S3 Website Bucket Module (Deprecated)
</h3>
<p align="center">
This module is depreciated. Utilized the module for a S3 <a href="/modules/aws/s3/bucket">bucket</a> instead.
This module is depreciated. Utilized the module for a S3 <a href="/modules/aws/s3/bucket">bucket</a> instead.
<br />
<a href="https://github.com/zachreborn/terraform-modules"><strong>Explore the docs »</strong></a>
<br />
Expand All @@ -47,7 +47,7 @@
<details>
<summary>Table of Contents</summary>
<ol>
<li><a href="#usage">Usage</a></li>
<li><a href="#migration">Migration</a></li>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#providers">Providers</a></li>
<li><a href="#modules">Modules</a></li>
Expand All @@ -62,8 +62,29 @@


<!-- USAGE EXAMPLES -->
## Usage
The S3 bucket module can now be utilized to create and maintain a static website.
## Migration
The S3 `bucket` module can now be utilized to create and maintain a static website.

Move the state of any modules utilizing `s3_website` to the `s3/bucket` module using a `moved` block. See the following hashicorp [refactoring](https://developer.hashicorp.com/terraform/language/modules/develop/refactoring) documentation for information on how to perform this.

Match up the resources and components from the `s3_website` module to the `s3/bucket` module

- [s3_website module](https://github.com/zachreborn/terraform-modules/tree/v2.15.0/modules/aws/s3/s3_website)
- [bucket module](https://github.com/zachreborn/terraform-modules/tree/main/modules/aws/s3/bucket)

An example of a S3 website utilizing the `s3/bucket` module:
```
module "example_org_website_bucket" {
source = "github.com/zachreborn/terraform-modules//modules/aws/s3/bucket"
bucket = "example.org"
enable_website = true
tags = {
created_by = "<YOUR_NAME>"
environment = "prod"
terraform = "true"
}
}
```

_For more examples, please refer to the [Documentation](https://github.com/zachreborn/terraform-modules)_

Expand All @@ -74,48 +95,28 @@ _For more examples, please refer to the [Documentation](https://github.com/zachr
<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0.0 |
No requirements.

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.0.0 |
No providers.

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_s3_bucket.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
| [aws_s3_bucket_policy.public_website_access](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | resource |
| [aws_s3_bucket_website_configuration.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_website_configuration) | resource |
No resources.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_bucket"></a> [bucket](#input\_bucket) | (Required, Forces new resource) The name of the bucket. If omitted, Terraform will assign a random, unique name. Must be lowercase and less than or equal to 63 characters in length. A full list of bucket naming rules may be found here. | `string` | n/a | yes |
| <a name="input_error_document"></a> [error\_document](#input\_error\_document) | (Optional) An absolute path to the document to return in case of a 4XX error. | `string` | `"error.html"` | no |
| <a name="input_index_document"></a> [index\_document](#input\_index\_document) | (Required, unless using redirect\_all\_requests\_to) Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders. | `string` | `"index.html"` | no |
| <a name="input_policy"></a> [policy](#input\_policy) | (Optional) The text of the policy. Although this is a bucket policy rather than an IAM policy, the aws\_iam\_policy\_document data source may be used, so long as it specifies a principal. For more information about building AWS IAM policy documents with Terraform, see the AWS IAM Policy Document Guide. Note: Bucket policies are limited to 20 KB in size. | `string` | `null` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | (Optional) A mapping of tags to assign to the bucket. | `map(any)` | <pre>{<br> "created_by": "Jake Jones",<br> "environment": "prod",<br> "terraform": "true"<br>}</pre> | no |
No inputs.

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_s3_bucket_arn"></a> [s3\_bucket\_arn](#output\_s3\_bucket\_arn) | n/a |
| <a name="output_s3_bucket_domain_name"></a> [s3\_bucket\_domain\_name](#output\_s3\_bucket\_domain\_name) | n/a |
| <a name="output_s3_bucket_id"></a> [s3\_bucket\_id](#output\_s3\_bucket\_id) | n/a |
| <a name="output_s3_bucket_region"></a> [s3\_bucket\_region](#output\_s3\_bucket\_region) | n/a |
| <a name="output_s3_hosted_zone_id"></a> [s3\_hosted\_zone\_id](#output\_s3\_hosted\_zone\_id) | n/a |
No outputs.

<!-- END_TF_DOCS -->

<!-- LICENSE -->
Expand Down
37 changes: 0 additions & 37 deletions modules/aws/s3/s3_website/main.tf

This file was deleted.

27 changes: 0 additions & 27 deletions modules/aws/s3/s3_website/outputs.tf

This file was deleted.

36 changes: 0 additions & 36 deletions modules/aws/s3/s3_website/variables.tf

This file was deleted.

Loading