-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[services][terraform] Move current config to dev/
Summary: Currently our terraform is designed to set up localstack. This diff splits the config into dev/ and remote/ directories, and moves the current config into dev/. This is so we can add remote/ and set up a remote AWS account. Shared resources (DDB tables and S3 buckets) are held in `modules/shared/` directory as a terraform module. Also updated the AWS terraform provider - the old one was outdated Test Plan: Set up localstack and make sure it was populated by terraform ``` cd services && yarn reset-local-cloud awslocal dynamodb list-tables ``` Reviewers: jon, varun, michal Reviewed By: jon Subscribers: ashoat, tomek Differential Revision: https://phab.comm.dev/D8567
- Loading branch information
Showing
11 changed files
with
74 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
locals { | ||
aws_settings = ({ | ||
region = "us-east-2" | ||
access_key = "fake" | ||
secret_key = "fake" | ||
|
||
skip_credentials_validation = true | ||
skip_metadata_api_check = true | ||
skip_requesting_account_id = true | ||
s3_use_path_style = true | ||
|
||
override_endpoint = "http://localhost:4566" | ||
}) | ||
} | ||
|
||
provider "aws" { | ||
region = local.aws_settings.region | ||
access_key = local.aws_settings.access_key | ||
secret_key = local.aws_settings.secret_key | ||
|
||
skip_credentials_validation = local.aws_settings.skip_credentials_validation | ||
skip_metadata_api_check = local.aws_settings.skip_metadata_api_check | ||
skip_requesting_account_id = local.aws_settings.skip_requesting_account_id | ||
s3_use_path_style = local.aws_settings.s3_use_path_style | ||
|
||
dynamic "endpoints" { | ||
for_each = local.aws_settings.override_endpoint[*] | ||
content { | ||
dynamodb = endpoints.value | ||
s3 = endpoints.value | ||
} | ||
} | ||
} | ||
|
||
# Shared resources between local dev environment and remote AWS | ||
module "shared" { | ||
source = "../modules/shared" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ terraform { | |
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = "~> 4.9.0" | ||
version = "~> 5.7.0" | ||
} | ||
} | ||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
terraform { | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = "~> 5.7.0" | ||
} | ||
} | ||
} |
File renamed without changes.