Skip to content

Commit

Permalink
Merge pull request #3 from byu-oit/change-bucketname
Browse files Browse the repository at this point in the history
changed the s3 backend bucket name
  • Loading branch information
Blake Morgan authored Dec 5, 2019
2 parents 371e5e0 + 6128371 commit 91f7acb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Terraform module that creates an S3 bucket and DynamoDB table for backend state
```hcl
module "backend-s3" {
source = "github.com/byu-oit/terraform-aws-backend-s3"
version = "1.0.0"
version = "1.0.1"
}
```

Run `terraform apply` to create the S3 bucket and DynamoDB table for storing state files. Then add:
```hcl
terraform {
backend "s3" {
bucket = "terraform-state-<account_number>"
bucket = "terraform-state-storage-<account_number>"
lock_table = "terraform-state-lock-<account_number>"
key = "my-cool-app.tfstate"
region = "us-west-2"
Expand All @@ -26,7 +26,7 @@ to configure your terraform backend to the newly created S3 bucket and DynamoDB
## Input
| Variable | Default | Description |
| --- | --- | --- |
| bucket_name | terraform-state-<account_number> | S3 bucket name for state file storage |
| bucket_name | terraform-state-storage-<account_number> | S3 bucket name for state file storage |
| dynamodb_table_name | terraform-state-lock-<account_number> | DynamoDB table name for state file locking|

## Output
Expand Down
1 change: 0 additions & 1 deletion examples/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ provider "aws" {

module "backend-s3" {
source = "../"
version = "1.0.0"
}

output "s3" {
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
data "aws_caller_identity" "current" {}

locals {
default_bucket_name = "terraform-state-${data.aws_caller_identity.current.account_id}"
default_bucket_name = "terraform-state-storage-${data.aws_caller_identity.current.account_id}"
default_dynamodb_table_name = "terraform-state-lock-${data.aws_caller_identity.current.account_id}"
}

Expand Down

0 comments on commit 91f7acb

Please sign in to comment.