|
3 | 3 | # |
4 | 4 | ######### invoke_aft_account_provisioning_framework ######### |
5 | 5 |
|
6 | | -# Validate Request Lambda Permissions |
7 | | -resource "aws_iam_role" "aft_lambda_aft_account_provisioning_framework_validate_request" { |
8 | | - name = "aft-account-provisioning-framework-validate-request-lambda-role" |
9 | | - assume_role_policy = templatefile("${path.module}/iam/trust-policies/lambda.tpl", { none = "none" }) |
10 | | -} |
11 | | - |
12 | | -resource "aws_iam_role_policy_attachment" "aft_account_provisioning_framework_validate_request" { |
13 | | - count = length(local.lambda_managed_policies) |
14 | | - role = aws_iam_role.aft_lambda_aft_account_provisioning_framework_validate_request.name |
15 | | - policy_arn = local.lambda_managed_policies[count.index] |
16 | | -} |
17 | | - |
18 | | -resource "aws_iam_role_policy" "aft_invoke_aft_account_provisioning_framework_validate_request" { |
19 | | - name = "aft-lambda-invoke-aft-account-provisioning-framework-validate-request-policy" |
20 | | - role = aws_iam_role.aft_lambda_aft_account_provisioning_framework_validate_request.id |
21 | | - policy = templatefile("${path.module}/iam/role-policies/lambda-aft-account-provisioning-framework.tpl", { |
22 | | - data_aws_partition_current_partition = data.aws_partition.current.partition |
23 | | - data_aws_region_aft-management_name = data.aws_region.aft_management.name |
24 | | - data_aws_caller_identity_aft-management_account_id = data.aws_caller_identity.aft_management.account_id |
25 | | - aft_sns_topic_arn = var.aft_sns_topic_arn |
26 | | - aft_failure_sns_topic_arn = var.aft_failure_sns_topic_arn |
27 | | - aws_kms_key_aft_arn = var.aft_kms_key_arn |
28 | | - }) |
29 | | -} |
30 | | - |
31 | | -# Get Account Info Lambda Permissions |
32 | | -resource "aws_iam_role" "aft_lambda_aft_account_provisioning_framework_get_account_info" { |
33 | | - name = "aft-account-provisioning-framework-lambda-get-account-info-role" |
34 | | - assume_role_policy = templatefile("${path.module}/iam/trust-policies/lambda.tpl", { none = "none" }) |
35 | | -} |
36 | | - |
37 | | -resource "aws_iam_role_policy_attachment" "aft_account_provisioning_framework_get_account_info" { |
38 | | - count = length(local.lambda_managed_policies) |
39 | | - role = aws_iam_role.aft_lambda_aft_account_provisioning_framework_get_account_info.name |
40 | | - policy_arn = local.lambda_managed_policies[count.index] |
41 | | -} |
42 | | - |
43 | | -resource "aws_iam_role_policy" "aft_invoke_aft_account_provisioning_framework_get_account_info" { |
44 | | - name = "aft-lambda-invoke-aft-account-provisioning-framework-get-account-info-policy" |
45 | | - role = aws_iam_role.aft_lambda_aft_account_provisioning_framework_get_account_info.id |
46 | | - policy = templatefile("${path.module}/iam/role-policies/lambda-aft-account-provisioning-framework.tpl", { |
47 | | - data_aws_partition_current_partition = data.aws_partition.current.partition |
48 | | - data_aws_region_aft-management_name = data.aws_region.aft_management.name |
49 | | - data_aws_caller_identity_aft-management_account_id = data.aws_caller_identity.aft_management.account_id |
50 | | - aft_sns_topic_arn = var.aft_sns_topic_arn |
51 | | - aft_failure_sns_topic_arn = var.aft_failure_sns_topic_arn |
52 | | - aws_kms_key_aft_arn = var.aft_kms_key_arn |
53 | | - }) |
54 | | -} |
55 | | - |
56 | 6 | # Create Role Lambda Permissions |
57 | 7 | resource "aws_iam_role" "aft_lambda_aft_account_provisioning_framework_create_role" { |
58 | 8 | name = "aft-account-provisioning-framework-lambda-create-role-role" |
|
0 commit comments