main
ronnic 2 years ago
parent 87bb8471fa
commit 29084320b6

6
.gitignore vendored

@ -0,0 +1,6 @@
.terraform.lock.hcl
terraform.tfstate
terraform.tfstate.backup
.terraform/terraform.tfstate
.terraform/modules/modules.json
.terraform/providers/registry.terraform.io/hashicorp/aws/5.37.0/linux_amd64/terraform-provider-aws_v5.37.0_x5

@ -0,0 +1 @@
Subproject commit 3a1c80b29fdf8fc682d2749456ec36ecbaf4ce14

@ -4,7 +4,7 @@ provider "aws" {
terraform { terraform {
backend "s3" { backend "s3" {
bucket = "nr-tfstate" bucket = "ronnic-tfstate"
key = "global/state/terraform.tfstate" key = "global/state/terraform.tfstate"
region = "us-west-1" region = "us-west-1"
dynamodb_table = "nr_tfstate_lock" dynamodb_table = "nr_tfstate_lock"
@ -12,6 +12,31 @@ terraform {
} }
} }
module "terraform_tfstate" { module "aws_s3_bucket" {
source = "http://192.168.1.27:3003/ronnic/tf-modules.git?ref=main//state" source = "terraform-aws-modules/s3-bucket/aws"
}
bucket = "ronnic-tfstate"
versioning = {
enabled = true
}
server_side_encryption_configuration = {
rule = {
apply_server_side_encryption_by_default = {
sse_algorithm = "AES256"
}
}
}
}
resource "aws_dynamodb_table" "terraform_locks" {
name = "nr_tfstate_lock"
billing_mode = "PAY_PER_REQUEST"
hash_key = "LockID"
attribute {
name = "LockID"
type = "S"
}
}

Loading…
Cancel
Save