Commit 6c053baf authored by Rob Greenwood's avatar Rob Greenwood

upgrade to terraform v0.12

parent d77e949b
.terraform
resource "aws_dynamodb_table" "remote_state_locking" { resource "aws_dynamodb_table" "remote_state_locking" {
name = "${var.name}" name = var.name
read_capacity = "${var.dynamodb_read_capacity}" read_capacity = var.dynamodb_read_capacity
write_capacity = "${var.dynamodb_write_capacity}" write_capacity = var.dynamodb_write_capacity
hash_key = "LockID" hash_key = "LockID"
attribute { attribute {
...@@ -9,3 +9,4 @@ resource "aws_dynamodb_table" "remote_state_locking" { ...@@ -9,3 +9,4 @@ resource "aws_dynamodb_table" "remote_state_locking" {
type = "S" type = "S"
} }
} }
terraform {
required_version = ">= 0.12"
}
resource "aws_s3_bucket" "remote_state" { resource "aws_s3_bucket" "remote_state" {
bucket = "${var.name}" bucket = var.name
acl = "private" acl = "private"
versioning { versioning {
...@@ -47,6 +47,7 @@ data "aws_iam_policy_document" "remote_state_always_enc" { ...@@ -47,6 +47,7 @@ data "aws_iam_policy_document" "remote_state_always_enc" {
} }
resource "aws_s3_bucket_policy" "remote_state" { resource "aws_s3_bucket_policy" "remote_state" {
bucket = "${aws_s3_bucket.remote_state.id}" bucket = aws_s3_bucket.remote_state.id
policy = "${data.aws_iam_policy_document.remote_state_always_enc.json}" policy = data.aws_iam_policy_document.remote_state_always_enc.json
} }
variable "name" {} variable "name" {
}
variable "dynamodb_read_capacity" { variable "dynamodb_read_capacity" {
default = "1" default = "1"
...@@ -7,3 +8,4 @@ variable "dynamodb_read_capacity" { ...@@ -7,3 +8,4 @@ variable "dynamodb_read_capacity" {
variable "dynamodb_write_capacity" { variable "dynamodb_write_capacity" {
default = "1" default = "1"
} }
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