From 560622eaa40f6628ac9bdd30fcd21320caf15668 Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Sat, 27 Mar 2021 16:24:19 -0400 Subject: [PATCH] chore: update documentation and pin `terraform_docs` version to avoid future changes (#76) --- .github/workflows/pre-commit.yml | 2 +- README.md | 88 +++++++++++++++---------------- examples/complete/README.md | 48 ++++++++--------- examples/notification/README.md | 60 ++++++++++----------- examples/object/README.md | 40 +++++++------- examples/s3-replication/README.md | 50 +++++++++--------- modules/notification/README.md | 43 +++++++-------- modules/object/README.md | 66 +++++++++++------------ 8 files changed, 199 insertions(+), 198 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index efa5a771..7eaa782b 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -94,7 +94,7 @@ jobs: - name: Install pre-commit dependencies run: | pip install pre-commit - curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E "https://.+?-linux-amd64" | head -n1)" > terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/ + curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E "https://.+?-v0.12.0-linux-amd64" | head -n1)" > terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/ curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/ - name: Execute pre-commit # Run all pre-commit checks on max version supported diff --git a/README.md b/README.md index c54432ef..b684853a 100644 --- a/README.md +++ b/README.md @@ -82,71 +82,71 @@ module "s3_bucket" { | Name | Version | |------|---------| -| terraform | >= 0.12.26 | -| aws | >= 3.0 | +| [terraform](#requirement\_terraform) | >= 0.12.26 | +| [aws](#requirement\_aws) | >= 3.0 | ## Providers | Name | Version | |------|---------| -| aws | >= 3.0 | +| [aws](#provider\_aws) | >= 3.0 | ## Modules -No Modules. +No modules. ## Resources -| Name | -|------| -| [aws_elb_service_account](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/elb_service_account) | -| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | -| [aws_s3_bucket](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | -| [aws_s3_bucket_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | -| [aws_s3_bucket_public_access_block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) | +| Name | Type | +|------|------| +| [aws_s3_bucket.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource | +| [aws_s3_bucket_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | resource | +| [aws_s3_bucket_public_access_block.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) | resource | +| [aws_elb_service_account.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/elb_service_account) | data source | +| [aws_iam_policy_document.elb_log_delivery](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| acceleration\_status | (Optional) Sets the accelerate configuration of an existing bucket. Can be Enabled or Suspended. | `string` | `null` | no | -| acl | (Optional) The canned ACL to apply. Defaults to 'private'. Conflicts with `grant` | `string` | `"private"` | no | -| attach\_elb\_log\_delivery\_policy | Controls if S3 bucket should have ELB log delivery policy attached | `bool` | `false` | no | -| attach\_policy | Controls if S3 bucket should have bucket policy attached (set to `true` to use value of `policy` as bucket policy) | `bool` | `false` | no | -| attach\_public\_policy | Controls if a user defined public bucket policy will be attached (set to `false` to allow upstream to apply defaults to the bucket) | `bool` | `true` | no | -| block\_public\_acls | Whether Amazon S3 should block public ACLs for this bucket. | `bool` | `false` | no | -| block\_public\_policy | Whether Amazon S3 should block public bucket policies for this bucket. | `bool` | `false` | no | -| bucket | (Optional, Forces new resource) The name of the bucket. If omitted, Terraform will assign a random, unique name. | `string` | `null` | no | -| bucket\_prefix | (Optional, Forces new resource) Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket. | `string` | `null` | no | -| cors\_rule | List of maps containing rules for Cross-Origin Resource Sharing. | `any` | `[]` | no | -| create\_bucket | Controls if S3 bucket should be created | `bool` | `true` | no | -| force\_destroy | (Optional, Default:false ) A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. | `bool` | `false` | no | -| grant | An ACL policy grant. Conflicts with `acl` | `any` | `[]` | no | -| ignore\_public\_acls | Whether Amazon S3 should ignore public ACLs for this bucket. | `bool` | `false` | no | -| lifecycle\_rule | List of maps containing configuration of object lifecycle management. | `any` | `[]` | no | -| logging | Map containing access bucket logging configuration. | `map(string)` | `{}` | no | -| object\_lock\_configuration | Map containing S3 object locking configuration. | `any` | `{}` | no | -| policy | (Optional) A valid bucket policy JSON document. Note that if the policy document is not specific enough (but still valid), Terraform may view the policy as constantly changing in a terraform plan. In this case, please make sure you use the verbose/specific version of the policy. For more information about building AWS IAM policy documents with Terraform, see the AWS IAM Policy Document Guide. | `string` | `null` | no | -| replication\_configuration | Map containing cross-region replication configuration. | `any` | `{}` | no | -| request\_payer | (Optional) Specifies who should bear the cost of Amazon S3 data transfer. Can be either BucketOwner or Requester. By default, the owner of the S3 bucket would incur the costs of any data transfer. See Requester Pays Buckets developer guide for more information. | `string` | `null` | no | -| restrict\_public\_buckets | Whether Amazon S3 should restrict public bucket policies for this bucket. | `bool` | `false` | no | -| server\_side\_encryption\_configuration | Map containing server-side encryption configuration. | `any` | `{}` | no | -| tags | (Optional) A mapping of tags to assign to the bucket. | `map(string)` | `{}` | no | -| versioning | Map containing versioning configuration. | `map(string)` | `{}` | no | -| website | Map containing static web-site hosting or redirect configuration. | `map(string)` | `{}` | no | +| [acceleration\_status](#input\_acceleration\_status) | (Optional) Sets the accelerate configuration of an existing bucket. Can be Enabled or Suspended. | `string` | `null` | no | +| [acl](#input\_acl) | (Optional) The canned ACL to apply. Defaults to 'private'. Conflicts with `grant` | `string` | `"private"` | no | +| [attach\_elb\_log\_delivery\_policy](#input\_attach\_elb\_log\_delivery\_policy) | Controls if S3 bucket should have ELB log delivery policy attached | `bool` | `false` | no | +| [attach\_policy](#input\_attach\_policy) | Controls if S3 bucket should have bucket policy attached (set to `true` to use value of `policy` as bucket policy) | `bool` | `false` | no | +| [attach\_public\_policy](#input\_attach\_public\_policy) | Controls if a user defined public bucket policy will be attached (set to `false` to allow upstream to apply defaults to the bucket) | `bool` | `true` | no | +| [block\_public\_acls](#input\_block\_public\_acls) | Whether Amazon S3 should block public ACLs for this bucket. | `bool` | `false` | no | +| [block\_public\_policy](#input\_block\_public\_policy) | Whether Amazon S3 should block public bucket policies for this bucket. | `bool` | `false` | no | +| [bucket](#input\_bucket) | (Optional, Forces new resource) The name of the bucket. If omitted, Terraform will assign a random, unique name. | `string` | `null` | no | +| [bucket\_prefix](#input\_bucket\_prefix) | (Optional, Forces new resource) Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket. | `string` | `null` | no | +| [cors\_rule](#input\_cors\_rule) | List of maps containing rules for Cross-Origin Resource Sharing. | `any` | `[]` | no | +| [create\_bucket](#input\_create\_bucket) | Controls if S3 bucket should be created | `bool` | `true` | no | +| [force\_destroy](#input\_force\_destroy) | (Optional, Default:false ) A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. | `bool` | `false` | no | +| [grant](#input\_grant) | An ACL policy grant. Conflicts with `acl` | `any` | `[]` | no | +| [ignore\_public\_acls](#input\_ignore\_public\_acls) | Whether Amazon S3 should ignore public ACLs for this bucket. | `bool` | `false` | no | +| [lifecycle\_rule](#input\_lifecycle\_rule) | List of maps containing configuration of object lifecycle management. | `any` | `[]` | no | +| [logging](#input\_logging) | Map containing access bucket logging configuration. | `map(string)` | `{}` | no | +| [object\_lock\_configuration](#input\_object\_lock\_configuration) | Map containing S3 object locking configuration. | `any` | `{}` | no | +| [policy](#input\_policy) | (Optional) A valid bucket policy JSON document. Note that if the policy document is not specific enough (but still valid), Terraform may view the policy as constantly changing in a terraform plan. In this case, please make sure you use the verbose/specific version of the policy. For more information about building AWS IAM policy documents with Terraform, see the AWS IAM Policy Document Guide. | `string` | `null` | no | +| [replication\_configuration](#input\_replication\_configuration) | Map containing cross-region replication configuration. | `any` | `{}` | no | +| [request\_payer](#input\_request\_payer) | (Optional) Specifies who should bear the cost of Amazon S3 data transfer. Can be either BucketOwner or Requester. By default, the owner of the S3 bucket would incur the costs of any data transfer. See Requester Pays Buckets developer guide for more information. | `string` | `null` | no | +| [restrict\_public\_buckets](#input\_restrict\_public\_buckets) | Whether Amazon S3 should restrict public bucket policies for this bucket. | `bool` | `false` | no | +| [server\_side\_encryption\_configuration](#input\_server\_side\_encryption\_configuration) | Map containing server-side encryption configuration. | `any` | `{}` | no | +| [tags](#input\_tags) | (Optional) A mapping of tags to assign to the bucket. | `map(string)` | `{}` | no | +| [versioning](#input\_versioning) | Map containing versioning configuration. | `map(string)` | `{}` | no | +| [website](#input\_website) | Map containing static web-site hosting or redirect configuration. | `map(string)` | `{}` | no | ## Outputs | Name | Description | |------|-------------| -| this\_s3\_bucket\_arn | The ARN of the bucket. Will be of format arn:aws:s3:::bucketname. | -| this\_s3\_bucket\_bucket\_domain\_name | The bucket domain name. Will be of format bucketname.s3.amazonaws.com. | -| this\_s3\_bucket\_bucket\_regional\_domain\_name | The bucket region-specific domain name. The bucket domain name including the region name, please refer here for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent redirect issues from CloudFront to S3 Origin URL. | -| this\_s3\_bucket\_hosted\_zone\_id | The Route 53 Hosted Zone ID for this bucket's region. | -| this\_s3\_bucket\_id | The name of the bucket. | -| this\_s3\_bucket\_region | The AWS region this bucket resides in. | -| this\_s3\_bucket\_website\_domain | The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records. | -| this\_s3\_bucket\_website\_endpoint | The website endpoint, if the bucket is configured with a website. If not, this will be an empty string. | +| [this\_s3\_bucket\_arn](#output\_this\_s3\_bucket\_arn) | The ARN of the bucket. Will be of format arn:aws:s3:::bucketname. | +| [this\_s3\_bucket\_bucket\_domain\_name](#output\_this\_s3\_bucket\_bucket\_domain\_name) | The bucket domain name. Will be of format bucketname.s3.amazonaws.com. | +| [this\_s3\_bucket\_bucket\_regional\_domain\_name](#output\_this\_s3\_bucket\_bucket\_regional\_domain\_name) | The bucket region-specific domain name. The bucket domain name including the region name, please refer here for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent redirect issues from CloudFront to S3 Origin URL. | +| [this\_s3\_bucket\_hosted\_zone\_id](#output\_this\_s3\_bucket\_hosted\_zone\_id) | The Route 53 Hosted Zone ID for this bucket's region. | +| [this\_s3\_bucket\_id](#output\_this\_s3\_bucket\_id) | The name of the bucket. | +| [this\_s3\_bucket\_region](#output\_this\_s3\_bucket\_region) | The AWS region this bucket resides in. | +| [this\_s3\_bucket\_website\_domain](#output\_this\_s3\_bucket\_website\_domain) | The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records. | +| [this\_s3\_bucket\_website\_endpoint](#output\_this\_s3\_bucket\_website\_endpoint) | The website endpoint, if the bucket is configured with a website. If not, this will be an empty string. | ## Authors diff --git a/examples/complete/README.md b/examples/complete/README.md index 9d43a590..648d8679 100644 --- a/examples/complete/README.md +++ b/examples/complete/README.md @@ -29,49 +29,49 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| -| terraform | >= 0.12.26 | -| aws | >= 3.0 | -| random | ~> 2 | +| [terraform](#requirement\_terraform) | >= 0.12.26 | +| [aws](#requirement\_aws) | >= 3.0 | +| [random](#requirement\_random) | ~> 2 | ## Providers | Name | Version | |------|---------| -| aws | >= 3.0 | -| random | ~> 2 | +| [aws](#provider\_aws) | >= 3.0 | +| [random](#provider\_random) | ~> 2 | ## Modules | Name | Source | Version | |------|--------|---------| -| cloudfront_log_bucket | ../../ | | -| log_bucket | ../../ | | -| s3_bucket | ../../ | | +| [cloudfront\_log\_bucket](#module\_cloudfront\_log\_bucket) | ../../ | | +| [log\_bucket](#module\_log\_bucket) | ../../ | | +| [s3\_bucket](#module\_s3\_bucket) | ../../ | | ## Resources -| Name | -|------| -| [aws_canonical_user_id](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/canonical_user_id) | -| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | -| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | -| [aws_kms_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | -| [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | +| Name | Type | +|------|------| +| [aws_iam_role.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | +| [aws_kms_key.objects](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | resource | +| [random_pet.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource | +| [aws_canonical_user_id.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/canonical_user_id) | data source | +| [aws_iam_policy_document.bucket_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | ## Inputs -No input. +No inputs. ## Outputs | Name | Description | |------|-------------| -| this\_s3\_bucket\_arn | The ARN of the bucket. Will be of format arn:aws:s3:::bucketname. | -| this\_s3\_bucket\_bucket\_domain\_name | The bucket domain name. Will be of format bucketname.s3.amazonaws.com. | -| this\_s3\_bucket\_bucket\_regional\_domain\_name | The bucket region-specific domain name. The bucket domain name including the region name, please refer here for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent redirect issues from CloudFront to S3 Origin URL. | -| this\_s3\_bucket\_hosted\_zone\_id | The Route 53 Hosted Zone ID for this bucket's region. | -| this\_s3\_bucket\_id | The name of the bucket. | -| this\_s3\_bucket\_region | The AWS region this bucket resides in. | -| this\_s3\_bucket\_website\_domain | The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records. | -| this\_s3\_bucket\_website\_endpoint | The website endpoint, if the bucket is configured with a website. If not, this will be an empty string. | +| [this\_s3\_bucket\_arn](#output\_this\_s3\_bucket\_arn) | The ARN of the bucket. Will be of format arn:aws:s3:::bucketname. | +| [this\_s3\_bucket\_bucket\_domain\_name](#output\_this\_s3\_bucket\_bucket\_domain\_name) | The bucket domain name. Will be of format bucketname.s3.amazonaws.com. | +| [this\_s3\_bucket\_bucket\_regional\_domain\_name](#output\_this\_s3\_bucket\_bucket\_regional\_domain\_name) | The bucket region-specific domain name. The bucket domain name including the region name, please refer here for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent redirect issues from CloudFront to S3 Origin URL. | +| [this\_s3\_bucket\_hosted\_zone\_id](#output\_this\_s3\_bucket\_hosted\_zone\_id) | The Route 53 Hosted Zone ID for this bucket's region. | +| [this\_s3\_bucket\_id](#output\_this\_s3\_bucket\_id) | The name of the bucket. | +| [this\_s3\_bucket\_region](#output\_this\_s3\_bucket\_region) | The AWS region this bucket resides in. | +| [this\_s3\_bucket\_website\_domain](#output\_this\_s3\_bucket\_website\_domain) | The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records. | +| [this\_s3\_bucket\_website\_endpoint](#output\_this\_s3\_bucket\_website\_endpoint) | The website endpoint, if the bucket is configured with a website. If not, this will be an empty string. | diff --git a/examples/notification/README.md b/examples/notification/README.md index 44df215a..0927f5eb 100644 --- a/examples/notification/README.md +++ b/examples/notification/README.md @@ -19,55 +19,55 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| -| terraform | >= 0.12.26 | -| aws | >= 3.0 | -| null | >= 2 | -| random | >= 2 | +| [terraform](#requirement\_terraform) | >= 0.12.26 | +| [aws](#requirement\_aws) | >= 3.0 | +| [null](#requirement\_null) | >= 2 | +| [random](#requirement\_random) | >= 2 | ## Providers | Name | Version | |------|---------| -| aws | >= 3.0 | -| null | >= 2 | -| random | >= 2 | +| [aws](#provider\_aws) | >= 3.0 | +| [null](#provider\_null) | >= 2 | +| [random](#provider\_random) | >= 2 | ## Modules | Name | Source | Version | |------|--------|---------| -| all_notifications | ../../modules/notification | | -| lambda_function1 | terraform-aws-modules/lambda/aws | ~> 1.0 | -| lambda_function2 | terraform-aws-modules/lambda/aws | ~> 1.0 | -| s3_bucket | ../../ | | -| sns_topic1 | terraform-aws-modules/cloudwatch/aws//examples/fixtures/aws_sns_topic | | -| sns_topic2 | terraform-aws-modules/cloudwatch/aws//examples/fixtures/aws_sns_topic | | +| [all\_notifications](#module\_all\_notifications) | ../../modules/notification | | +| [lambda\_function1](#module\_lambda\_function1) | terraform-aws-modules/lambda/aws | ~> 1.0 | +| [lambda\_function2](#module\_lambda\_function2) | terraform-aws-modules/lambda/aws | ~> 1.0 | +| [s3\_bucket](#module\_s3\_bucket) | ../../ | | +| [sns\_topic1](#module\_sns\_topic1) | terraform-aws-modules/cloudwatch/aws//examples/fixtures/aws_sns_topic | | +| [sns\_topic2](#module\_sns\_topic2) | terraform-aws-modules/cloudwatch/aws//examples/fixtures/aws_sns_topic | | ## Resources -| Name | -|------| -| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | -| [aws_sqs_queue](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) | -| [aws_sqs_queue_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue_policy) | -| [null_data_source](https://registry.terraform.io/providers/hashicorp/null/latest/docs/data-sources/data_source) | -| [null_resource](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | -| [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | +| Name | Type | +|------|------| +| [aws_sqs_queue.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) | resource | +| [aws_sqs_queue_policy.allow_external](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue_policy) | resource | +| [null_resource.download_package](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | +| [random_pet.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource | +| [aws_iam_policy_document.sqs_external](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | +| [null_data_source.downloaded_package](https://registry.terraform.io/providers/hashicorp/null/latest/docs/data-sources/data_source) | data source | ## Inputs -No input. +No inputs. ## Outputs | Name | Description | |------|-------------| -| this\_s3\_bucket\_arn | The ARN of the bucket. Will be of format arn:aws:s3:::bucketname. | -| this\_s3\_bucket\_bucket\_domain\_name | The bucket domain name. Will be of format bucketname.s3.amazonaws.com. | -| this\_s3\_bucket\_bucket\_regional\_domain\_name | The bucket region-specific domain name. The bucket domain name including the region name, please refer here for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent redirect issues from CloudFront to S3 Origin URL. | -| this\_s3\_bucket\_hosted\_zone\_id | The Route 53 Hosted Zone ID for this bucket's region. | -| this\_s3\_bucket\_id | The name of the bucket. | -| this\_s3\_bucket\_region | The AWS region this bucket resides in. | -| this\_s3\_bucket\_website\_domain | The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records. | -| this\_s3\_bucket\_website\_endpoint | The website endpoint, if the bucket is configured with a website. If not, this will be an empty string. | +| [this\_s3\_bucket\_arn](#output\_this\_s3\_bucket\_arn) | The ARN of the bucket. Will be of format arn:aws:s3:::bucketname. | +| [this\_s3\_bucket\_bucket\_domain\_name](#output\_this\_s3\_bucket\_bucket\_domain\_name) | The bucket domain name. Will be of format bucketname.s3.amazonaws.com. | +| [this\_s3\_bucket\_bucket\_regional\_domain\_name](#output\_this\_s3\_bucket\_bucket\_regional\_domain\_name) | The bucket region-specific domain name. The bucket domain name including the region name, please refer here for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent redirect issues from CloudFront to S3 Origin URL. | +| [this\_s3\_bucket\_hosted\_zone\_id](#output\_this\_s3\_bucket\_hosted\_zone\_id) | The Route 53 Hosted Zone ID for this bucket's region. | +| [this\_s3\_bucket\_id](#output\_this\_s3\_bucket\_id) | The name of the bucket. | +| [this\_s3\_bucket\_region](#output\_this\_s3\_bucket\_region) | The AWS region this bucket resides in. | +| [this\_s3\_bucket\_website\_domain](#output\_this\_s3\_bucket\_website\_domain) | The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records. | +| [this\_s3\_bucket\_website\_endpoint](#output\_this\_s3\_bucket\_website\_endpoint) | The website endpoint, if the bucket is configured with a website. If not, this will be an empty string. | diff --git a/examples/object/README.md b/examples/object/README.md index ca9903a8..764fe569 100644 --- a/examples/object/README.md +++ b/examples/object/README.md @@ -19,45 +19,45 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| -| terraform | >= 0.13 | -| aws | >= 3.0 | -| random | >= 2 | +| [terraform](#requirement\_terraform) | >= 0.13 | +| [aws](#requirement\_aws) | >= 3.0 | +| [random](#requirement\_random) | >= 2 | ## Providers | Name | Version | |------|---------| -| aws | >= 3.0 | -| random | >= 2 | +| [aws](#provider\_aws) | >= 3.0 | +| [random](#provider\_random) | >= 2 | ## Modules | Name | Source | Version | |------|--------|---------| -| object | ../../modules/object | | -| object_complete | ../../modules/object | | -| object_locked | ../../modules/object | | -| s3_bucket | ../../ | | -| s3_bucket_with_object_lock | ../../ | | +| [object](#module\_object) | ../../modules/object | | +| [object\_complete](#module\_object\_complete) | ../../modules/object | | +| [object\_locked](#module\_object\_locked) | ../../modules/object | | +| [s3\_bucket](#module\_s3\_bucket) | ../../ | | +| [s3\_bucket\_with\_object\_lock](#module\_s3\_bucket\_with\_object\_lock) | ../../ | | ## Resources -| Name | -|------| -| [aws_kms_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | -| [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | +| Name | Type | +|------|------| +| [aws_kms_key.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | resource | +| [random_pet.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource | ## Inputs -No input. +No inputs. ## Outputs | Name | Description | |------|-------------| -| this\_s3\_bucket\_arn | The ARN of the bucket. Will be of format arn:aws:s3:::bucketname. | -| this\_s3\_bucket\_id | The name of the bucket. | -| this\_s3\_bucket\_object\_etag | The ETag generated for the object (an MD5 sum of the object content). | -| this\_s3\_bucket\_object\_id | The key of S3 object | -| this\_s3\_bucket\_object\_version\_id | A unique version ID value for the object, if bucket versioning is enabled. | +| [this\_s3\_bucket\_arn](#output\_this\_s3\_bucket\_arn) | The ARN of the bucket. Will be of format arn:aws:s3:::bucketname. | +| [this\_s3\_bucket\_id](#output\_this\_s3\_bucket\_id) | The name of the bucket. | +| [this\_s3\_bucket\_object\_etag](#output\_this\_s3\_bucket\_object\_etag) | The ETag generated for the object (an MD5 sum of the object content). | +| [this\_s3\_bucket\_object\_id](#output\_this\_s3\_bucket\_object\_id) | The key of S3 object | +| [this\_s3\_bucket\_object\_version\_id](#output\_this\_s3\_bucket\_object\_version\_id) | A unique version ID value for the object, if bucket versioning is enabled. | diff --git a/examples/s3-replication/README.md b/examples/s3-replication/README.md index 3e4ab191..54084eee 100644 --- a/examples/s3-replication/README.md +++ b/examples/s3-replication/README.md @@ -21,50 +21,50 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| -| terraform | >= 0.12.26 | -| aws | >= 3.0 | -| random | >= 2.0 | +| [terraform](#requirement\_terraform) | >= 0.12.26 | +| [aws](#requirement\_aws) | >= 3.0 | +| [random](#requirement\_random) | >= 2.0 | ## Providers | Name | Version | |------|---------| -| aws | >= 3.0 | -| aws.replica | >= 3.0 | -| random | >= 2.0 | +| [aws](#provider\_aws) | >= 3.0 | +| [aws.replica](#provider\_aws.replica) | >= 3.0 | +| [random](#provider\_random) | >= 2.0 | ## Modules | Name | Source | Version | |------|--------|---------| -| replica_bucket | ../../ | | -| s3_bucket | ../../ | | +| [replica\_bucket](#module\_replica\_bucket) | ../../ | | +| [s3\_bucket](#module\_s3\_bucket) | ../../ | | ## Resources -| Name | -|------| -| [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | -| [aws_iam_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | -| [aws_iam_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy_attachment) | -| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | -| [aws_kms_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | -| [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | +| Name | Type | +|------|------| +| [aws_iam_policy.replication](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource | +| [aws_iam_policy_attachment.replication](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy_attachment) | resource | +| [aws_iam_role.replication](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | +| [aws_kms_key.replica](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | resource | +| [random_pet.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource | +| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source | ## Inputs -No input. +No inputs. ## Outputs | Name | Description | |------|-------------| -| this\_s3\_bucket\_arn | The ARN of the bucket. Will be of format arn:aws:s3:::bucketname. | -| this\_s3\_bucket\_bucket\_domain\_name | The bucket domain name. Will be of format bucketname.s3.amazonaws.com. | -| this\_s3\_bucket\_bucket\_regional\_domain\_name | The bucket region-specific domain name. The bucket domain name including the region name, please refer here for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent redirect issues from CloudFront to S3 Origin URL. | -| this\_s3\_bucket\_hosted\_zone\_id | The Route 53 Hosted Zone ID for this bucket's region. | -| this\_s3\_bucket\_id | The name of the bucket. | -| this\_s3\_bucket\_region | The AWS region this bucket resides in. | -| this\_s3\_bucket\_website\_domain | The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records. | -| this\_s3\_bucket\_website\_endpoint | The website endpoint, if the bucket is configured with a website. If not, this will be an empty string. | +| [this\_s3\_bucket\_arn](#output\_this\_s3\_bucket\_arn) | The ARN of the bucket. Will be of format arn:aws:s3:::bucketname. | +| [this\_s3\_bucket\_bucket\_domain\_name](#output\_this\_s3\_bucket\_bucket\_domain\_name) | The bucket domain name. Will be of format bucketname.s3.amazonaws.com. | +| [this\_s3\_bucket\_bucket\_regional\_domain\_name](#output\_this\_s3\_bucket\_bucket\_regional\_domain\_name) | The bucket region-specific domain name. The bucket domain name including the region name, please refer here for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent redirect issues from CloudFront to S3 Origin URL. | +| [this\_s3\_bucket\_hosted\_zone\_id](#output\_this\_s3\_bucket\_hosted\_zone\_id) | The Route 53 Hosted Zone ID for this bucket's region. | +| [this\_s3\_bucket\_id](#output\_this\_s3\_bucket\_id) | The name of the bucket. | +| [this\_s3\_bucket\_region](#output\_this\_s3\_bucket\_region) | The AWS region this bucket resides in. | +| [this\_s3\_bucket\_website\_domain](#output\_this\_s3\_bucket\_website\_domain) | The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records. | +| [this\_s3\_bucket\_website\_endpoint](#output\_this\_s3\_bucket\_website\_endpoint) | The website endpoint, if the bucket is configured with a website. If not, this will be an empty string. | diff --git a/modules/notification/README.md b/modules/notification/README.md index 24e3dfc0..8c76a778 100644 --- a/modules/notification/README.md +++ b/modules/notification/README.md @@ -7,46 +7,47 @@ Creates S3 bucket notification resource with all supported types of deliveries: | Name | Version | |------|---------| -| terraform | >= 0.12.6 | -| aws | >= 3.0 | +| [terraform](#requirement\_terraform) | >= 0.12.6 | +| [aws](#requirement\_aws) | >= 3.0 | ## Providers | Name | Version | |------|---------| -| aws | >= 3.0 | +| [aws](#provider\_aws) | >= 3.0 | ## Modules -No Modules. +No modules. ## Resources -| Name | -|------| -| [aws_arn](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/arn) | -| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | -| [aws_lambda_permission](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | -| [aws_s3_bucket_notification](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_notification) | -| [aws_sns_topic_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sns_topic_policy) | -| [aws_sqs_queue_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue_policy) | +| Name | Type | +|------|------| +| [aws_lambda_permission.allow](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource | +| [aws_s3_bucket_notification.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_notification) | resource | +| [aws_sns_topic_policy.allow](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sns_topic_policy) | resource | +| [aws_sqs_queue_policy.allow](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue_policy) | resource | +| [aws_arn.queue](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/arn) | data source | +| [aws_iam_policy_document.sns](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | +| [aws_iam_policy_document.sqs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| bucket | Name of S3 bucket to use | `string` | `""` | no | -| bucket\_arn | ARN of S3 bucket to use in policies | `string` | `null` | no | -| create | Whether to create this resource or not? | `bool` | `true` | no | -| create\_sns\_policy | Whether to create a policy for SNS permissions or not? | `bool` | `true` | no | -| create\_sqs\_policy | Whether to create a policy for SQS permissions or not? | `bool` | `true` | no | -| lambda\_notifications | Map of S3 bucket notifications to Lambda function | `any` | `{}` | no | -| sns\_notifications | Map of S3 bucket notifications to SNS topic | `any` | `{}` | no | -| sqs\_notifications | Map of S3 bucket notifications to SQS queue | `any` | `{}` | no | +| [bucket](#input\_bucket) | Name of S3 bucket to use | `string` | `""` | no | +| [bucket\_arn](#input\_bucket\_arn) | ARN of S3 bucket to use in policies | `string` | `null` | no | +| [create](#input\_create) | Whether to create this resource or not? | `bool` | `true` | no | +| [create\_sns\_policy](#input\_create\_sns\_policy) | Whether to create a policy for SNS permissions or not? | `bool` | `true` | no | +| [create\_sqs\_policy](#input\_create\_sqs\_policy) | Whether to create a policy for SQS permissions or not? | `bool` | `true` | no | +| [lambda\_notifications](#input\_lambda\_notifications) | Map of S3 bucket notifications to Lambda function | `any` | `{}` | no | +| [sns\_notifications](#input\_sns\_notifications) | Map of S3 bucket notifications to SNS topic | `any` | `{}` | no | +| [sqs\_notifications](#input\_sqs\_notifications) | Map of S3 bucket notifications to SQS queue | `any` | `{}` | no | ## Outputs | Name | Description | |------|-------------| -| this\_s3\_bucket\_notification\_id | ID of S3 bucket | +| [this\_s3\_bucket\_notification\_id](#output\_this\_s3\_bucket\_notification\_id) | ID of S3 bucket | diff --git a/modules/object/README.md b/modules/object/README.md index 5a98a454..b8fcacea 100644 --- a/modules/object/README.md +++ b/modules/object/README.md @@ -7,58 +7,58 @@ Creates S3 bucket objects with different configurations. | Name | Version | |------|---------| -| terraform | >= 0.13 | -| aws | >= 3.0 | +| [terraform](#requirement\_terraform) | >= 0.13 | +| [aws](#requirement\_aws) | >= 3.0 | ## Providers | Name | Version | |------|---------| -| aws | >= 3.0 | +| [aws](#provider\_aws) | >= 3.0 | ## Modules -No Modules. +No modules. ## Resources -| Name | -|------| -| [aws_s3_bucket_object](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_object) | +| Name | Type | +|------|------| +| [aws_s3_bucket_object.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_object) | resource | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| acl | The canned ACL to apply. Valid values are private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, and bucket-owner-full-control. Defaults to private. | `string` | `null` | no | -| bucket | The name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified. | `string` | `""` | no | -| cache\_control | Specifies caching behavior along the request/reply chain. | `string` | `null` | no | -| content | Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. | `string` | `null` | no | -| content\_base64 | Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file. | `string` | `null` | no | -| content\_disposition | Specifies presentational information for the object. | `string` | `null` | no | -| content\_encoding | Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. | `string` | `null` | no | -| content\_language | The language the content is in e.g. en-US or en-GB. | `string` | `null` | no | -| content\_type | A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input. | `string` | `null` | no | -| create | Whether to create this resource or not? | `bool` | `true` | no | -| etag | Used to trigger updates. This attribute is not compatible with KMS encryption, kms\_key\_id or server\_side\_encryption = "aws:kms". | `string` | `null` | no | -| file\_source | The path to a file that will be read and uploaded as raw bytes for the object content. | `string` | `null` | no | -| force\_destroy | Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled. | `bool` | `false` | no | -| key | The name of the object once it is in the bucket. | `string` | `""` | no | -| kms\_key\_id | Amazon Resource Name (ARN) of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the aws\_kms\_key resource, use the arn attribute. If referencing the aws\_kms\_alias data source or resource, use the target\_key\_arn attribute. Terraform will only perform drift detection if a configuration value is provided. | `string` | `null` | no | -| metadata | A map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API). | `map(string)` | `{}` | no | -| object\_lock\_legal\_hold\_status | The legal hold status that you want to apply to the specified object. Valid values are ON and OFF. | `string` | `null` | no | -| object\_lock\_mode | The object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE. | `string` | `null` | no | -| object\_lock\_retain\_until\_date | The date and time, in RFC3339 format, when this object's object lock will expire. | `string` | `null` | no | -| server\_side\_encryption | Specifies server-side encryption of the object in S3. Valid values are "AES256" and "aws:kms". | `string` | `null` | no | -| storage\_class | Specifies the desired Storage Class for the object. Can be either STANDARD, REDUCED\_REDUNDANCY, ONEZONE\_IA, INTELLIGENT\_TIERING, GLACIER, DEEP\_ARCHIVE, or STANDARD\_IA. Defaults to STANDARD. | `string` | `null` | no | -| tags | A map of tags to assign to the object. | `map(string)` | `{}` | no | -| website\_redirect | Specifies a target URL for website redirect. | `string` | `null` | no | +| [acl](#input\_acl) | The canned ACL to apply. Valid values are private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, and bucket-owner-full-control. Defaults to private. | `string` | `null` | no | +| [bucket](#input\_bucket) | The name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified. | `string` | `""` | no | +| [cache\_control](#input\_cache\_control) | Specifies caching behavior along the request/reply chain. | `string` | `null` | no | +| [content](#input\_content) | Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. | `string` | `null` | no | +| [content\_base64](#input\_content\_base64) | Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file. | `string` | `null` | no | +| [content\_disposition](#input\_content\_disposition) | Specifies presentational information for the object. | `string` | `null` | no | +| [content\_encoding](#input\_content\_encoding) | Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. | `string` | `null` | no | +| [content\_language](#input\_content\_language) | The language the content is in e.g. en-US or en-GB. | `string` | `null` | no | +| [content\_type](#input\_content\_type) | A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input. | `string` | `null` | no | +| [create](#input\_create) | Whether to create this resource or not? | `bool` | `true` | no | +| [etag](#input\_etag) | Used to trigger updates. This attribute is not compatible with KMS encryption, kms\_key\_id or server\_side\_encryption = "aws:kms". | `string` | `null` | no | +| [file\_source](#input\_file\_source) | The path to a file that will be read and uploaded as raw bytes for the object content. | `string` | `null` | no | +| [force\_destroy](#input\_force\_destroy) | Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled. | `bool` | `false` | no | +| [key](#input\_key) | The name of the object once it is in the bucket. | `string` | `""` | no | +| [kms\_key\_id](#input\_kms\_key\_id) | Amazon Resource Name (ARN) of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the aws\_kms\_key resource, use the arn attribute. If referencing the aws\_kms\_alias data source or resource, use the target\_key\_arn attribute. Terraform will only perform drift detection if a configuration value is provided. | `string` | `null` | no | +| [metadata](#input\_metadata) | A map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API). | `map(string)` | `{}` | no | +| [object\_lock\_legal\_hold\_status](#input\_object\_lock\_legal\_hold\_status) | The legal hold status that you want to apply to the specified object. Valid values are ON and OFF. | `string` | `null` | no | +| [object\_lock\_mode](#input\_object\_lock\_mode) | The object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE. | `string` | `null` | no | +| [object\_lock\_retain\_until\_date](#input\_object\_lock\_retain\_until\_date) | The date and time, in RFC3339 format, when this object's object lock will expire. | `string` | `null` | no | +| [server\_side\_encryption](#input\_server\_side\_encryption) | Specifies server-side encryption of the object in S3. Valid values are "AES256" and "aws:kms". | `string` | `null` | no | +| [storage\_class](#input\_storage\_class) | Specifies the desired Storage Class for the object. Can be either STANDARD, REDUCED\_REDUNDANCY, ONEZONE\_IA, INTELLIGENT\_TIERING, GLACIER, DEEP\_ARCHIVE, or STANDARD\_IA. Defaults to STANDARD. | `string` | `null` | no | +| [tags](#input\_tags) | A map of tags to assign to the object. | `map(string)` | `{}` | no | +| [website\_redirect](#input\_website\_redirect) | Specifies a target URL for website redirect. | `string` | `null` | no | ## Outputs | Name | Description | |------|-------------| -| this\_s3\_bucket\_object\_etag | The ETag generated for the object (an MD5 sum of the object content). | -| this\_s3\_bucket\_object\_id | The key of S3 object | -| this\_s3\_bucket\_object\_version\_id | A unique version ID value for the object, if bucket versioning is enabled. | +| [this\_s3\_bucket\_object\_etag](#output\_this\_s3\_bucket\_object\_etag) | The ETag generated for the object (an MD5 sum of the object content). | +| [this\_s3\_bucket\_object\_id](#output\_this\_s3\_bucket\_object\_id) | The key of S3 object | +| [this\_s3\_bucket\_object\_version\_id](#output\_this\_s3\_bucket\_object\_version\_id) | A unique version ID value for the object, if bucket versioning is enabled. |