Skip to content

Commit

Permalink
bucket_name
Browse files Browse the repository at this point in the history
  • Loading branch information
bryborge committed Oct 13, 2023
1 parent 2e96f84 commit cf6c33a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion aws/live/production/blog/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module "s3_bucket_site" {
aws_account_id = local.account_id
aws_region = local.region
environment = local.env
domain_name = var.domain_name
bucket_name = var.bucket_name
index_html = var.index_html
error_html = var.error_html
}
2 changes: 1 addition & 1 deletion aws/live/production/blog/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
domain_name = "bryborge.com"
bucket_name = "bryborge-blog"
index_html = "index.html"
error_html = "404.html"
2 changes: 1 addition & 1 deletion aws/live/production/blog/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ variable "environment" {
description = "The environment to deploy to."
}

variable "domain_name" {
variable "bucket_name" {
type = string
description = "The name of the s3 bucket."
}
Expand Down
2 changes: 1 addition & 1 deletion aws/modules/s3-bucket-site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ No modules.
|------|-------------|------|---------|:--------:|
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS account to deploy to. | `string` | n/a | yes |
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | The AWS region this is hosted in. | `string` | n/a | yes |
| <a name="input_domain_name"></a> [domain\_name](#input\_domain\_name) | The domain name for the website. | `string` | n/a | yes |
| <a name="input_bucket_name"></a> [bucket\_name](#input\_bucket\_name) | The name of the s3 bucket. | `string` | n/a | yes |
| <a name="input_environment"></a> [environment](#input\_environment) | The environment to deploy to. | `string` | n/a | yes |
| <a name="input_error_html"></a> [error\_html](#input\_error\_html) | The name of the object key when a 4XX class error occurs (e.g., '404.html'). | `string` | n/a | yes |
| <a name="input_index_html"></a> [index\_html](#input\_index\_html) | The name of the index document to serve as a static site (e.g., 'index.html'). | `string` | n/a | yes |
Expand Down
4 changes: 2 additions & 2 deletions aws/modules/s3-bucket-site/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ data "aws_iam_policy_document" "website_policy" {
identifiers = ["*"]
}
resources = [
"arn:aws:s3:::${var.domain_name}/*",
"arn:aws:s3:::${var.domain_name}"
"arn:aws:s3:::${var.bucket_name}/*",
"arn:aws:s3:::${var.bucket_name}"
]
}
}
2 changes: 1 addition & 1 deletion aws/modules/s3-bucket-site/s3.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "aws_s3_bucket" "website" {
bucket = var.domain_name
bucket = var.bucket_name
}

resource "aws_s3_bucket_acl" "website" {
Expand Down
4 changes: 2 additions & 2 deletions aws/modules/s3-bucket-site/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ variable "environment" {
description = "The environment to deploy to."
}

variable "domain_name" {
variable "bucket_name" {
type = string
description = "The domain name for the website."
description = "The name of the s3 bucket."
}

variable "index_html" {
Expand Down

0 comments on commit cf6c33a

Please sign in to comment.