# Copyright © 2022 Amazon Web Services, Inc. or its affiliates. All Rights Reserved. This AWS Content is provided subject to the terms of the AWS Customer Agreement available at http://aws.amazon.com/agreement or other written agreement between Customer and either Amazon Web Services, Inc. or Amazon Web Services EMEA SARL or both." #### (1) switch module #### module "mwaa_switch" { source = "../../../" git_personal_access_token = jsondecode(data.aws_secretsmanager_secret_version.github_token_secret_version.secret_string)["TOKEN"] source_type = "GITHUB" switch_additional_policy_arn = aws_iam_policy.mwaa_switch_policy.arn source_location = var.source_location kill_resources_schedule = var.kill_resources_schedule revive_resources_schedule = var.revive_resources_schedule init_command = var.init_command kill_command = var.kill_command revive_command = var.revive_command terraform_version = var.terraform_version tf_backend_bucket = var.tf_backend_bucket tf_backend_key = var.tf_backend_key } #### (0) Switch Policy for MWAA #### resource "aws_iam_policy" "mwaa_switch_policy" { name_prefix = "MWAASwitchPolicy" description = "A policy for MWAA operations." policy = <