Skip to content

Commit

Permalink
Update syntax to work with modern Terraform (#26)
Browse files Browse the repository at this point in the history
* provider blocks and versions

* skip the weird adding an empty list and then compacting, just use the variables directly

* require terraform version 0.13 or greater
  • Loading branch information
lavaturtle authored Nov 1, 2021
1 parent 2ef3f3b commit 2ea5dde
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
4 changes: 2 additions & 2 deletions loader.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ resource "aws_lambda_function" "loader" {
timeout = 900

vpc_config {
subnet_ids = compact(concat(var.lambda_loader_subnet_ids, list("")))
security_group_ids = compact(concat(var.lambda_loader_security_group_ids, list("")))
subnet_ids = var.lambda_loader_subnet_ids
security_group_ids = var.lambda_loader_security_group_ids
}

environment {
Expand Down
4 changes: 0 additions & 4 deletions providers.tf

This file was deleted.

1 change: 0 additions & 1 deletion s3.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Additional provider configuration for region your controlshift platform lives within.
provider "aws" {
version = "~> 2.0"
alias = "controlshift"
region = var.controlshift_aws_region
}
Expand Down
21 changes: 21 additions & 0 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
terraform {
required_version = ">= 0.13"
required_providers {
archive = {
source = "hashicorp/archive"
}
aws = {
source = "hashicorp/aws"
version = "~> 2.0"
}
http = {
source = "hashicorp/http"
}
random = {
source = "hashicorp/random"
}
template = {
source = "hashicorp/template"
}
}
}

0 comments on commit 2ea5dde

Please sign in to comment.