forked from cloudposse/terraform-aws-amplify-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
36 lines (32 loc) · 1.46 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
data "aws_ssm_parameter" "github_pat" {
name = var.github_personal_access_token_secret_path
with_decryption = true
}
locals {
prefix = one(var.attributes)
domains = { for k, v in var.domains : join("-", [local.prefix, k]) => v }
}
module "amplify_app" {
source = "../../"
access_token = data.aws_ssm_parameter.github_pat.value
description = var.description
repository = var.repository
platform = var.platform
oauth_token = var.oauth_token
auto_branch_creation_config = var.auto_branch_creation_config
auto_branch_creation_patterns = var.auto_branch_creation_patterns
basic_auth_credentials = var.basic_auth_credentials
build_spec = var.build_spec
enable_auto_branch_creation = var.enable_auto_branch_creation
enable_basic_auth = var.enable_basic_auth
enable_branch_auto_build = var.enable_branch_auto_build
enable_branch_auto_deletion = var.enable_branch_auto_deletion
environment_variables = var.environment_variables
custom_rules = var.custom_rules
iam_service_role_enabled = var.iam_service_role_enabled
iam_service_role_arn = var.iam_service_role_arn
iam_service_role_actions = var.iam_service_role_actions
environments = var.environments
domains = local.domains
context = module.this.context
}