File tree Expand file tree Collapse file tree 2 files changed +42
-2
lines changed
terraform/modules/department Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change @@ -1159,8 +1159,7 @@ data "aws_iam_policy_document" "redshift_department_read_access" {
11591159 }
11601160}
11611161
1162- // MWAA Access
1163-
1162+ // MWAA Access - Used in Staging
11641163data "aws_iam_policy_document" "mwaa_department_web_server_access" {
11651164 statement {
11661165 effect = " Allow"
@@ -1176,6 +1175,46 @@ data "aws_iam_policy_document" "mwaa_department_web_server_access" {
11761175 }
11771176}
11781177
1178+ // MWAA Access - Production (allow sso users to access Airflow UI as Viewer by default)
1179+ data "aws_iam_policy_document" "mwaa_department_web_server_access_production" {
1180+ statement {
1181+ sid = " MWAAListEnvironments"
1182+ effect = " Allow"
1183+
1184+ actions = [
1185+ " airflow:ListEnvironments" ,
1186+ ]
1187+
1188+ resources = [" *" ]
1189+ }
1190+
1191+ statement {
1192+ sid = " MWAAGetEnvironment"
1193+ effect = " Allow"
1194+
1195+ actions = [
1196+ " airflow:GetEnvironment" ,
1197+ ]
1198+
1199+ resources = [
1200+ " arn:aws:airflow:${ data . aws_region . current . name } :${ data . aws_caller_identity . current . account_id } :environment/${ var . identifier_prefix } -mwaa-environment"
1201+ ]
1202+ }
1203+
1204+ statement {
1205+ sid = " MWAACreateWebLoginToken"
1206+ effect = " Allow"
1207+
1208+ actions = [
1209+ " airflow:CreateWebLoginToken" ,
1210+ ]
1211+
1212+ resources = [
1213+ " arn:aws:airflow:${ data . aws_region . current . name } :${ data . aws_caller_identity . current . account_id } :role/${ var . identifier_prefix } -mwaa-environment/Viewer"
1214+ ]
1215+ }
1216+ }
1217+
11791218// Glue job runner pass role to glue for notebook use
11801219data "aws_iam_policy_document" "glue_runner_pass_role_to_glue_for_notebook_use" {
11811220 statement {
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ data "aws_iam_policy_document" "sso_production_user_policy" {
2424 data . aws_iam_policy_document . read_only_glue_access . json ,
2525 data . aws_iam_policy_document . secrets_manager_read_only . json ,
2626 data . aws_iam_policy_document . athena_can_write_to_s3 . json ,
27+ data . aws_iam_policy_document . mwaa_department_web_server_access_production . json ,
2728 ]
2829}
2930
You can’t perform that action at this time.
0 commit comments