Skip to content

Commit 007e32f

Browse files
authored
Add organization_settings module and example (cloudposse#56)
1 parent 95eb214 commit 007e32f

20 files changed

+826
-144
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ The module consists of the following submodules:
3636
- [synthetics](modules/synthetics) - to provision Datadog [synthetics](https://docs.datadoghq.com/synthetics/)
3737
- [permissions](modules/permissions) - to look up all available Datadog [permissions](https://docs.datadoghq.com/account_management/rbac/permissions/)
3838
- [roles](modules/roles) - to provision Datadog [roles](https://docs.datadoghq.com/account_management/rbac)
39+
- [slo](modules/slo) - to provision Datadog [Service Level Objectives](https://docs.datadoghq.com/monitors/service_level_objectives/)
3940
- [child_organization](modules/child_organization) - to provision Datadog [child organizations](https://docs.datadoghq.com/account_management/multi_organization/)
41+
- [organization_settings](modules/organization_settings) - to manage Datadog organization's settings
4042

4143
__Notes on Datadog child organizations:__
4244

@@ -92,8 +94,12 @@ The [examples/synthetics](examples/synthetics) shows how to provision synthetics
9294

9395
The [examples/rbac](examples/rbac) shows how to use custom RBAC to provision Datadog roles with permissions and assign roles to monitors.
9496

97+
The [examples/slo](examples/slo) shows how to provision Service Level Objectives on Datadog for SLO monitoring.
98+
9599
The [examples/child_organization](examples/child_organization) shows how to provision Datadog child organizations.
96100

101+
The [examples/organization_settings](examples/organization_settings) shows how to provision Datadog organization settings.
102+
97103

98104
## Security & Compliance [<img src="https://cloudposse.com/wp-content/uploads/2020/11/bridgecrew.svg" width="250" align="right" />](https://bridgecrew.io/)
99105

README.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ tags:
1818
- rbac
1919
- role
2020
- permission
21+
- slo
22+
- child-organization
2123

2224
# Categories of this project
2325
categories:
@@ -59,7 +61,9 @@ description: |-
5961
- [synthetics](modules/synthetics) - to provision Datadog [synthetics](https://docs.datadoghq.com/synthetics/)
6062
- [permissions](modules/permissions) - to look up all available Datadog [permissions](https://docs.datadoghq.com/account_management/rbac/permissions/)
6163
- [roles](modules/roles) - to provision Datadog [roles](https://docs.datadoghq.com/account_management/rbac)
64+
- [slo](modules/slo) - to provision Datadog [Service Level Objectives](https://docs.datadoghq.com/monitors/service_level_objectives/)
6265
- [child_organization](modules/child_organization) - to provision Datadog [child organizations](https://docs.datadoghq.com/account_management/multi_organization/)
66+
- [organization_settings](modules/organization_settings) - to manage Datadog organization's settings
6367
6468
__Notes on Datadog child organizations:__
6569
@@ -85,8 +89,12 @@ introduction: |-
8589
8690
The [examples/rbac](examples/rbac) shows how to use custom RBAC to provision Datadog roles with permissions and assign roles to monitors.
8791
92+
The [examples/slo](examples/slo) shows how to provision Service Level Objectives on Datadog for SLO monitoring.
93+
8894
The [examples/child_organization](examples/child_organization) shows how to provision Datadog child organizations.
8995
96+
The [examples/organization_settings](examples/organization_settings) shows how to provision Datadog organization settings.
97+
9098
references:
9199
- name: "Terraform Datadog monitor resources"
92100
description: "Provides a Datadog monitor resource. Used to create and manage Datadog monitors"

examples/child_organization/fixtures.us-east-2.tfvars

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,3 @@ stage = "test"
99
name = "datadog-child-org"
1010

1111
organization_name = "test"
12-
13-
# Free and Trial organizations cannot enable SAML
14-
saml_enabled = false
15-
16-
saml_autocreate_users_domains = []
17-
18-
saml_autocreate_users_enabled = false
19-
20-
saml_idp_initiated_login_enabled = false
21-
22-
saml_strict_mode_enabled = false
23-
24-
private_widget_share = false
25-
26-
saml_autocreate_access_role = "ro"

examples/child_organization/main.tf

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
module "datadog_child_organization" {
22
source = "../../modules/child_organization"
33

4-
organization_name = var.organization_name
5-
saml_enabled = var.saml_enabled
6-
saml_autocreate_users_domains = var.saml_autocreate_users_domains
7-
saml_autocreate_users_enabled = var.saml_autocreate_users_enabled
8-
saml_idp_initiated_login_enabled = var.saml_idp_initiated_login_enabled
9-
saml_strict_mode_enabled = var.saml_strict_mode_enabled
10-
private_widget_share = var.private_widget_share
11-
saml_autocreate_access_role = var.saml_autocreate_access_role
4+
organization_name = var.organization_name
125

136
context = module.this.context
147
}

examples/child_organization/variables.tf

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,3 @@ variable "organization_name" {
99
type = string
1010
description = "Datadog organization name"
1111
}
12-
13-
variable "saml_enabled" {
14-
type = bool
15-
default = true
16-
description = "Whether or not SAML is enabled for the child organization. Note that Free and Trial organizations cannot enable SAML"
17-
}
18-
19-
variable "saml_autocreate_users_domains" {
20-
type = list(string)
21-
default = []
22-
description = "List of domains where the SAML automated user creation is enabled"
23-
}
24-
25-
variable "saml_autocreate_users_enabled" {
26-
type = bool
27-
default = false
28-
description = "Whether or not the automated user creation based on SAML domain is enabled"
29-
}
30-
31-
variable "saml_idp_initiated_login_enabled" {
32-
type = bool
33-
default = true
34-
description = "Whether or not IdP initiated login is enabled for the Datadog organization"
35-
}
36-
37-
variable "saml_strict_mode_enabled" {
38-
type = bool
39-
default = false
40-
description = "Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML"
41-
}
42-
43-
variable "private_widget_share" {
44-
type = bool
45-
default = false
46-
description = "Whether or not the organization users can share widgets outside of Datadog"
47-
}
48-
49-
variable "saml_autocreate_access_role" {
50-
type = string
51-
default = "ro"
52-
description = "The access role of an autocreated user. Options are `st` (standard user), `adm` (admin user), or `ro` (read-only user). Allowed enum values: `st`, `adm` , `ro`, `ERROR`"
53-
}

0 commit comments

Comments
 (0)