2023-06-19 12:40:53 -04:00
|
|
|
terraform {
|
|
|
|
required_providers {
|
|
|
|
aws = {
|
|
|
|
source = "hashicorp/aws"
|
|
|
|
version = "~> 5.3"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
provider "aws" {
|
|
|
|
|
2023-10-02 16:43:12 -04:00
|
|
|
region = var.region
|
2023-06-19 12:40:53 -04:00
|
|
|
|
|
|
|
|
|
|
|
# Configure Terraform to plan
|
|
|
|
# against localstack Docker container
|
|
|
|
# instead of AWS
|
|
|
|
access_key = "ak"
|
|
|
|
secret_key = "sk"
|
|
|
|
skip_credentials_validation = true
|
|
|
|
skip_metadata_api_check = true
|
|
|
|
skip_requesting_account_id = true
|
|
|
|
|
|
|
|
endpoints {
|
|
|
|
iam = "http://localstack:4566"
|
|
|
|
sts = "http://localstack:4566"
|
|
|
|
s3 = "http://localstack:4566"
|
|
|
|
ec2 = "http://localstack:4566"
|
|
|
|
ssm = "http://localstack:4566"
|
|
|
|
rds = "http://localstack:4566"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Just in case I want to use a service account
|
|
|
|
#assume_role {
|
|
|
|
# role_arn = "arn:aws:iam::AWSACCOUNT:role/ROLE"
|
|
|
|
# session_name = "Temporary IaC provisioning role"
|
|
|
|
#}
|
|
|
|
}
|