From f1d2e3c5a8f6baaca56283c36b56343a5aa3d277 Mon Sep 17 00:00:00 2001 From: Matteo De Wint Date: Sun, 14 Jan 2024 21:11:21 +0100 Subject: [PATCH] fix: improve terraform example code --- README.md | 9 +++++++++ terraform/main.tf | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/README.md b/README.md index 9980ca9..bdabf28 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,15 @@ The Terraform configuration can also be included in your own project as a module: ```terraform +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 4.0" + } + } +} + provider "aws" { region = "eu-west-1" } diff --git a/terraform/main.tf b/terraform/main.tf index 581c610..c7d697f 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -28,6 +28,12 @@ variable "use_wildcard_certificate" { description = "Use a wildcard certificate (*.example.com)" } +variable "enable_dynamodb_locking" { + type = bool + default = false + description = "Create a DynamoDB table for locking" +} + variable "enable_basic_auth" { type = bool default = false @@ -49,6 +55,7 @@ module "s3pypi" { bucket = var.bucket domain = var.domain use_wildcard_certificate = var.use_wildcard_certificate + enable_dynamodb_locking = var.enable_dynamodb_locking enable_basic_auth = var.enable_basic_auth providers = {