From dadd5e2b5b4eefe7ab913d6c24701ff5ef4aa65a Mon Sep 17 00:00:00 2001 From: Doris Ruppert Date: Fri, 14 Jul 2023 11:05:06 +0200 Subject: [PATCH] OPMAAS-4486 corrected spelling errors, added examples for groups with permissions --- .../CN_PreProd.policy_bindings.json | 32 +++++++++++++++++++ CN/user_groups/CN_Prod.policy_bindings.json | 32 +++++++++++++++++++ ...PP_CoCo_CallServices_CN_View.user_group.tf | 9 ------ ...lServices_CN_Change_locals.user_group.json | 12 +++++++ ..._Change_locals.user_group_permissions.json | 29 +++++++++++++++++ ...nectedCallServices_CN_View.user_group.json | 13 ++++++++ ...onnectedCallServices_CN_View.user_group.tf | 10 ++++++ ...rvices_CN_View.user_group_permissions.json | 27 ++++++++++++++++ .../DT_ENV_CoCo_CN_View.user_group.json | 17 ++++++++++ ...ctedCallServices_EMEA-NA_View.iam_group.tf | 4 +-- .../DT_ENV_CoCo_EMEA-NA_View.iam_group.tf | 0 {EMEA_NA => EMEA-NA}/user_groups/__main.tf | 2 +- 12 files changed, 175 insertions(+), 12 deletions(-) create mode 100644 CN/user_groups/CN_PreProd.policy_bindings.json create mode 100644 CN/user_groups/CN_Prod.policy_bindings.json delete mode 100644 CN/user_groups/DT_APP_CoCo_CallServices_CN_View.user_group.tf create mode 100644 CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_Change_locals.user_group.json create mode 100644 CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_Change_locals.user_group_permissions.json create mode 100644 CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_View.user_group.json create mode 100644 CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_View.user_group.tf create mode 100644 CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_View.user_group_permissions.json create mode 100644 CN/user_groups/DT_ENV_CoCo_CN_View.user_group.json rename EMEA_NA/user_groups/DT_APP_CoCo_CallServices_EMEA-NA_View.iam_group.tf => EMEA-NA/user_groups/DT_APP_CoCo_ConnectedCallServices_EMEA-NA_View.iam_group.tf (82%) rename {EMEA_NA => EMEA-NA}/user_groups/DT_ENV_CoCo_EMEA-NA_View.iam_group.tf (100%) rename {EMEA_NA => EMEA-NA}/user_groups/__main.tf (93%) diff --git a/CN/user_groups/CN_PreProd.policy_bindings.json b/CN/user_groups/CN_PreProd.policy_bindings.json new file mode 100644 index 0000000..342fcc4 --- /dev/null +++ b/CN/user_groups/CN_PreProd.policy_bindings.json @@ -0,0 +1,32 @@ +{ + "levelType": "environment", + "levelId": "ab88c03b-b7fc-45f0-9115-9e9ecc0ced35", + "policyBindings": [ + { + "policyUuid": "32ab8b21-6e97-4d85-95eb-635bb771a4fd", + "groups": [ + "dtappcococonnectedcallservicescnview", + "dtappcococonnectedcallservicescnchangelocals" + ] + }, + { + "policyUuid": "af9add43-1ef1-4653-984e-fdde3b9964ba", + "groups": [ + "dtappcococonnectedcallservicescnview", + "dtappcococonnectedcallservicescnchangelocals" + ] + }, + { + "policyUuid": "cd28ffde-77fb-44d7-85fc-94a876660d59", + "groups": [ + "dtappcococonnectedcallservicescnchangelocals" + ] + }, + { + "policyUuid": "665e7a5c-4ed1-44de-9f8d-d0ce10fe0de0", + "groups": [ + "dtappcococonnectedcallservicescnchangelocals" + ] + } + ] +} \ No newline at end of file diff --git a/CN/user_groups/CN_Prod.policy_bindings.json b/CN/user_groups/CN_Prod.policy_bindings.json new file mode 100644 index 0000000..99270d6 --- /dev/null +++ b/CN/user_groups/CN_Prod.policy_bindings.json @@ -0,0 +1,32 @@ +{ + "levelType": "environment", + "levelId": "b921f1b9-c00e-4031-b9d1-f5a0d530757b", + "policyBindings": [ + { + "policyUuid": "32ab8b21-6e97-4d85-95eb-635bb771a4fd", + "groups": [ + "dtappcococonnectedcallservicescnview", + "dtappcococonnectedcallservicescnchangelocals" + ] + }, + { + "policyUuid": "af9add43-1ef1-4653-984e-fdde3b9964ba", + "groups": [ + "dtappcococonnectedcallservicescnview", + "dtappcococonnectedcallservicescnchangelocals" + ] + }, + { + "policyUuid": "cd28ffde-77fb-44d7-85fc-94a876660d59", + "groups": [ + "dtappcococonnectedcallservicescnchangelocals" + ] + }, + { + "policyUuid": "665e7a5c-4ed1-44de-9f8d-d0ce10fe0de0", + "groups": [ + "dtappcococonnectedcallservicescnchangelocals" + ] + } + ] +} \ No newline at end of file diff --git a/CN/user_groups/DT_APP_CoCo_CallServices_CN_View.user_group.tf b/CN/user_groups/DT_APP_CoCo_CallServices_CN_View.user_group.tf deleted file mode 100644 index 250f026..0000000 --- a/CN/user_groups/DT_APP_CoCo_CallServices_CN_View.user_group.tf +++ /dev/null @@ -1,9 +0,0 @@ -resource "dynatrace_user_group" "DT_APP_CoCo_CallServices_CN_View" { - name = "DT_APP_CoCo_CallServices_CN_View" - ldap_groups = [ "Connected Call Services - China View" ] - - permissions { - grant { - } - } -} \ No newline at end of file diff --git a/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_Change_locals.user_group.json b/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_Change_locals.user_group.json new file mode 100644 index 0000000..622aaf8 --- /dev/null +++ b/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_Change_locals.user_group.json @@ -0,0 +1,12 @@ +{ + "isClusterAdminGroup": false, + "isManageAccount": false, + "isAccessAccount": false, + "id": "dtappcococonnectedcallservicescnchangelocals", + "name": "DT_APP_CoCo_ConnectedCallServices_CN_Change_locals", + "ldapGroupNames": [ + "Connected Call Services - CN Change locals" + ], + "ssoGroupNames": [], + "accessRight": {} +} \ No newline at end of file diff --git a/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_Change_locals.user_group_permissions.json b/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_Change_locals.user_group_permissions.json new file mode 100644 index 0000000..6d576b6 --- /dev/null +++ b/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_Change_locals.user_group_permissions.json @@ -0,0 +1,29 @@ +{ + "groupId": "dtappcococonnectedcallservicescnchangelocals", + "mzPermissionsPerEnvironment": [ + { + "environmentUuid": "b921f1b9-c00e-4031-b9d1-f5a0d530757b", + "mzPermissions": [ + { + "mzId": "-5295932427366417022", + "permissions": [ + "VIEWER", + "MANAGE_SETTINGS" + ] + } + ] + }, + { + "environmentUuid": "ab88c03b-b7fc-45f0-9115-9e9ecc0ced35", + "mzPermissions": [ + { + "mzId": "3609016845412481885", + "permissions": [ + "VIEWER", + "MANAGE_SETTINGS" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_View.user_group.json b/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_View.user_group.json new file mode 100644 index 0000000..3621664 --- /dev/null +++ b/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_View.user_group.json @@ -0,0 +1,13 @@ +{ + "isClusterAdminGroup": false, + "isAccessAccount": false, + "isManageAccount": false, + "id": "dtappcococonnectedcallservicescnview", + "name": "DT_APP_CoCo_ConnectedCallServices_CN_View", + "ldapGroupNames": [ + "Connected Call Services - China View" + ], + "ssoGroupNames": [], + "accessRight": { + } +} \ No newline at end of file diff --git a/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_View.user_group.tf b/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_View.user_group.tf new file mode 100644 index 0000000..6d40a70 --- /dev/null +++ b/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_View.user_group.tf @@ -0,0 +1,10 @@ +resource "dynatrace_user_group" "DT_APP_CoCo_ConnectedCallServices_CN_View" { + name = "DT_APP_CoCo_ConnectedCallServices_CN_View" + ldap_groups = [ "Connected Call Services - China View" ] + + permissions { + grant { + permission = "VIEWER" + } + } +} \ No newline at end of file diff --git a/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_View.user_group_permissions.json b/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_View.user_group_permissions.json new file mode 100644 index 0000000..f01e7a0 --- /dev/null +++ b/CN/user_groups/DT_APP_CoCo_ConnectedCallServices_CN_View.user_group_permissions.json @@ -0,0 +1,27 @@ +{ + "groupId": "dtappcococonnectedcallservicescnview", + "mzPermissionsPerEnvironment": [ + { + "environmentUuid": "b921f1b9-c00e-4031-b9d1-f5a0d530757b", + "mzPermissions": [ + { + "mzId": "-5295932427366417022", + "permissions": [ + "VIEWER" + ] + } + ] + }, + { + "environmentUuid": "ab88c03b-b7fc-45f0-9115-9e9ecc0ced35", + "mzPermissions": [ + { + "mzId": "3609016845412481885", + "permissions": [ + "VIEWER" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/CN/user_groups/DT_ENV_CoCo_CN_View.user_group.json b/CN/user_groups/DT_ENV_CoCo_CN_View.user_group.json new file mode 100644 index 0000000..c334f51 --- /dev/null +++ b/CN/user_groups/DT_ENV_CoCo_CN_View.user_group.json @@ -0,0 +1,17 @@ +{ + "isClusterAdminGroup": false, + "isAccessAccount": false, + "isManageAccount": false, + "id": "dtenvcococnview", + "name": "DT_ENV_CoCo_CN_View", + "ldapGroupNames": [ + "Cross-Product View - China" + ], + "ssoGroupNames": [], + "accessRight": { + "VIEWER": [ + "ab88c03b-b7fc-45f0-9115-9e9ecc0ced35", + "b921f1b9-c00e-4031-b9d1-f5a0d530757b" + ] + } +} diff --git a/EMEA_NA/user_groups/DT_APP_CoCo_CallServices_EMEA-NA_View.iam_group.tf b/EMEA-NA/user_groups/DT_APP_CoCo_ConnectedCallServices_EMEA-NA_View.iam_group.tf similarity index 82% rename from EMEA_NA/user_groups/DT_APP_CoCo_CallServices_EMEA-NA_View.iam_group.tf rename to EMEA-NA/user_groups/DT_APP_CoCo_ConnectedCallServices_EMEA-NA_View.iam_group.tf index 2eaa8c3..62d07ff 100644 --- a/EMEA_NA/user_groups/DT_APP_CoCo_CallServices_EMEA-NA_View.iam_group.tf +++ b/EMEA-NA/user_groups/DT_APP_CoCo_ConnectedCallServices_EMEA-NA_View.iam_group.tf @@ -1,5 +1,5 @@ -resource "dynatrace_iam_group" "DT_APP_CoCo_CallServices_EMEA-NA_View" { - name = "DT_APP_CoCo_CallServices_EMEANA_View" +resource "dynatrace_iam_group" "DT_APP_CoCo_ConnectedCallServices_EMEA-NA_View" { + name = "DT_APP_CoCo_ConnectedCallServices_EMEA-NA_View" description = "Connected Call Services - EMEA NA View (preprod und prod)" federated_attribute_values = [ "Connected Call Services - EMEA NA View" ] diff --git a/EMEA_NA/user_groups/DT_ENV_CoCo_EMEA-NA_View.iam_group.tf b/EMEA-NA/user_groups/DT_ENV_CoCo_EMEA-NA_View.iam_group.tf similarity index 100% rename from EMEA_NA/user_groups/DT_ENV_CoCo_EMEA-NA_View.iam_group.tf rename to EMEA-NA/user_groups/DT_ENV_CoCo_EMEA-NA_View.iam_group.tf diff --git a/EMEA_NA/user_groups/__main.tf b/EMEA-NA/user_groups/__main.tf similarity index 93% rename from EMEA_NA/user_groups/__main.tf rename to EMEA-NA/user_groups/__main.tf index 5803a62..cd27ef2 100644 --- a/EMEA_NA/user_groups/__main.tf +++ b/EMEA-NA/user_groups/__main.tf @@ -8,7 +8,7 @@ terraform { backend "s3" { bucket = "coco-dynatrace-tfstate-prod" - key = "EMEA_NA/user_groups/terraform.tfstate" + key = "EMEA-NA/user_groups/terraform.tfstate" region = "eu-central-1" dynamodb_table = "coco-dynatrace-tfstate" encrypt = true