Commit c56f082f authored by Anton Babenko's avatar Anton Babenko

Minor formatting, cleanups, readme

parent dc9864d5
{{ if .Versions -}}
<a name="unreleased"></a>
## [Unreleased]
{{ if .Unreleased.CommitGroups -}}
{{ range .Unreleased.CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{ else }}
{{ range .Unreleased.Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{ end -}}
{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
{{ if .CommitGroups -}}
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{ else }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
{{- if .Versions }}
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
{{ range .Versions -}}
{{ if .Tag.Previous -}}
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
{{ end -}}
{{ end -}}
{{ end -}}
\ No newline at end of file
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/terraform-aws-modules/terraform-aws-s3-bucket
options:
header:
pattern: "^(.*)$"
pattern_maps:
- Subject
# EditorConfig is awesome: http://EditorConfig.org
# Uses editorconfig to maintain consistent coding styles
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 80
trim_trailing_whitespace = true
[*.{tf,tfvars}]
indent_size = 2
indent_style = space
[*.md]
max_line_length = 0
trim_trailing_whitespace = false
[Makefile]
tab_width = 2
indent_style = tab
[COMMIT_EDITMSG]
max_line_length = 0
\ No newline at end of file
.terraform
# Created by https://www.gitignore.io/api/terraform terraform.tfstate
# Edit at https://www.gitignore.io/?templates=terraform *.tfstate*
terraform.tfvars
### Terraform ###
# Local .terraform directories
**/.terraform/*
# .tfstate files
*.tfstate
*.tfstate.*
# Crash log files
crash.log
# Ignore any .tfvars files that are generated automatically for each Terraform run. Most
# .tfvars files are managed as part of configuration and so should be included in
# version control.
#
# example.tfvars
# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json
# Include override files you do wish to add to version control using negated pattern
#
# !example_override.tf
# End of https://www.gitignore.io/api/terraform
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.17.0
hooks:
- id: terraform_fmt
- id: terraform_docs
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: check-merge-conflict
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.PHONY: changelog release
changelog:
git-chglog -o CHANGELOG.md --next-tag `semtag final -s minor -o`
release:
semtag final -s minor
This diff is collapsed.
...@@ -14,11 +14,11 @@ module "aws_s3_bucket" { ...@@ -14,11 +14,11 @@ module "aws_s3_bucket" {
bucket = "s3-tf-example-cors" bucket = "s3-tf-example-cors"
acl = "private" acl = "private"
cors_rule_inputs =[ cors_rule_inputs = [
{ {
allowed_headers = ["*"] allowed_headers = ["*"]
allowed_methods = ["PUT","POST"] allowed_methods = ["PUT", "POST"]
allowed_origins = ["https://s3-website-test.hashicorp.com","https://s3-website-test.hashicorp.io"] allowed_origins = ["https://s3-website-test.hashicorp.com", "https://s3-website-test.hashicorp.io"]
expose_headers = ["ETag"] expose_headers = ["ETag"]
max_age_seconds = 3000 max_age_seconds = 3000
}, },
......
...@@ -14,12 +14,12 @@ module "aws_s3_bucket" { ...@@ -14,12 +14,12 @@ module "aws_s3_bucket" {
bucket = "s3-tf-example-versioning" bucket = "s3-tf-example-versioning"
acl = "private" acl = "private"
versioning_inputs = [ versioning_inputs = [
{ {
enabled = true enabled = true
mfa_delete = null mfa_delete = null
}, },
] ]
} }
\ No newline at end of file
...@@ -14,7 +14,7 @@ module "aws_s3_bucket" { ...@@ -14,7 +14,7 @@ module "aws_s3_bucket" {
bucket = "s3-tf-example-website" bucket = "s3-tf-example-website"
acl = "private" acl = "private"
website_inputs = [ website_inputs = [
{ {
index_document = "index.html" index_document = "index.html"
error_document = "error.html" error_document = "error.html"
...@@ -30,7 +30,7 @@ website_inputs = [ ...@@ -30,7 +30,7 @@ website_inputs = [
}] }]
EOF EOF
} }
] ]
} }
\ No newline at end of file
...@@ -169,7 +169,7 @@ resource "aws_s3_bucket" "this" { ...@@ -169,7 +169,7 @@ resource "aws_s3_bucket" "this" {
} }
} }
} }
/* /*
dynamic "object_lock_configuration" { dynamic "object_lock_configuration" {
for_each = var.object_lock_configuration_inputs == null ? [] : var.object_lock_configuration_inputs for_each = var.object_lock_configuration_inputs == null ? [] : var.object_lock_configuration_inputs
......
output "id" { output "id" {
description = "The name of the bucket." description = "The name of the bucket."
value = "${element(concat(aws_s3_bucket.this.*.id, list("")), 0)}" value = element(concat(aws_s3_bucket.this.*.id, list("")), 0)
} }
output "arn" { output "arn" {
description = "The ARN of the bucket. Will be of format arn:aws:s3:::bucketname." description = "The ARN of the bucket. Will be of format arn:aws:s3:::bucketname."
value = "${element(concat(aws_s3_bucket.this.*.arn, list("")), 0)}" value = element(concat(aws_s3_bucket.this.*.arn, list("")), 0)
} }
output "bucket_domain_name" { output "bucket_domain_name" {
description = "The bucket domain name. Will be of format bucketname.s3.amazonaws.com." description = "The bucket domain name. Will be of format bucketname.s3.amazonaws.com."
value = "${element(concat(aws_s3_bucket.this.*.bucket_domain_name, list("")), 0)}" value = element(concat(aws_s3_bucket.this.*.bucket_domain_name, list("")), 0)
} }
output "bucket_regional_domain_name" { output "bucket_regional_domain_name" {
description = "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." description = "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."
value = "${element(concat(aws_s3_bucket.this.*.bucket_regional_domain_name, list("")), 0)}" value = element(concat(aws_s3_bucket.this.*.bucket_regional_domain_name, list("")), 0)
} }
output "hosted_zone_id" { output "hosted_zone_id" {
description = "The Route 53 Hosted Zone ID for this bucket's region." description = "The Route 53 Hosted Zone ID for this bucket's region."
value = "${element(concat(aws_s3_bucket.this.*.hosted_zone_id, list("")), 0)}" value = element(concat(aws_s3_bucket.this.*.hosted_zone_id, list("")), 0)
} }
output "region" { output "region" {
description = "The AWS region this bucket resides in." description = "The AWS region this bucket resides in."
value = "${element(concat(aws_s3_bucket.this.*.region, list("")), 0)}" value = element(concat(aws_s3_bucket.this.*.region, list("")), 0)
} }
output "website_endpoint" { output "website_endpoint" {
description = "The website endpoint, if the bucket is configured with a website. If not, this will be an empty string." description = "The website endpoint, if the bucket is configured with a website. If not, this will be an empty string."
value = "${element(concat(aws_s3_bucket.this.*.website_endpoint, list("")), 0)}" value = element(concat(aws_s3_bucket.this.*.website_endpoint, list("")), 0)
} }
output "website_domain" { output "website_domain" {
description = "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. " description = "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. "
value = "${element(concat(aws_s3_bucket.this.*.website_domain, list("")), 0)}" value = element(concat(aws_s3_bucket.this.*.website_domain, list("")), 0)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment