Terraform
Terraform
Providers
providers = {
aws.target = aws.uw2
aws.primary = aws.uw2
}Backend
[[AWS]]
Flags
Lifecycle
Last updated
providers = {
aws.target = aws.uw2
aws.primary = aws.uw2
}Last updated
terraform {
# variables can't be used here
backend "s3" {
bucket = "development-1b-terraform-state"
key = "development/terraform.tfstate"
region = "us-west-2"
dynamodb_table = "development-1b-terraform-state"
encrypt = true
}
}data "aws_iam_policy_document" "allow_e2e_access" {
provider = aws.target
statement {
sid = "AllowE2ES3Access"
effect = "Allow"
resources = [
"arn:aws:s3:::1b-management-e2e-reports",
"arn:aws:s3:::1b-management-e2e-reports/*",
]
actions = [
"s3:PutObject",
]
}
statement {
sid = "AllowE2ECloudWatchAccess"
effect = "Allow"
resources = ["*"]
actions = [
# used to upload data points for Latency and Uptime
"cloudwatch:PutMetricData",
]
}
}
resource "aws_iam_policy" "allow_e2e_access" {
provider = aws.target
name = "allow-e2e-access"
description = "Allows e2e access to the AWS resources it needs"
policy = data.aws_iam_policy_document.allow_e2e_access.json
}terraform plan --parallelism=100TF_CLI_ARGS_plan="--parallelism=100"lifecycle {
ignore_changes = [
tags,
]
}