generated from masterpointio/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from masterpointio/feature/init_version
feature: init version
- Loading branch information
Showing
17 changed files
with
244 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ cli: | |
plugins: | ||
sources: | ||
- id: trunk | ||
ref: v1.4.3 | ||
ref: v1.4.4 | ||
uri: https://github.com/trunk-io/plugins | ||
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes) | ||
runtimes: | ||
|
@@ -20,14 +20,15 @@ lint: | |
# Incompatible with some Terraform features: https://github.com/tenable/terrascan/issues/1331 | ||
- terrascan | ||
enabled: | ||
- [email protected] | ||
- [email protected] | ||
- [email protected].26 | ||
- [email protected].31 | ||
- git-diff-check | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected].2 | ||
- [email protected].4 | ||
- [email protected] | ||
actions: | ||
enabled: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,94 @@ | ||
# terraform-module-template | ||
# terraform-datadog-users | ||
|
||
[![Release](https://img.shields.io/github/release/masterpointio/terraform-module-template.svg)](https://github.com/masterpointio/terraform-module-template/releases/latest) | ||
[![Release](https://img.shields.io/github/release/masterpointio/terraform-datadog-users.svg)](https://github.com/masterpointio/terraform-datadog-users/releases/latest) | ||
|
||
This repository serves as a template for creating Terraform modules, providing a standardized structure and essential files for efficient module development. It's designed to ensure consistency and best practices across Terraform projects. | ||
This Terraform module is designed to create and manage Datadog user accounts. | ||
|
||
The users are associated with one of the three [out-of-the-box roles](https://docs.datadoghq.com/account_management/rbac/permissions/): | ||
|
||
- Datadog Admin | ||
- Datadog Standard | ||
- Datadog Read Only | ||
|
||
## Usage | ||
|
||
TODO | ||
```hcl | ||
module "datadog_users" { | ||
source = "masterpointio/datadog/users" | ||
version = "X.X.X" | ||
users = [ | ||
{ | ||
roles = ["standard"], | ||
email = "[email protected]", | ||
name = "Jane Smith", | ||
role = "Editor", | ||
username = "janesmith" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
Check out [examples/complete](examples/complete) for the full example. | ||
|
||
To ensure the secure handling of DataDog sensitive data for datadog/datadog provider, the module's example is designed to work with the [SOPS (Secrets OPerationS)](https://github.com/mozilla/sops) provider. SOPS is a tool for encrypting and decrypting files containing sensitive data, often used in conjunction with Terraform to manage secrets. The example also utilizes [terraform-secrets-helper](https://github.com/masterpointio/terraform-secrets-helper/tree/main) module - a helper that provides a standard way of managing secrets from different sources, incuding SOPS files. | ||
|
||
❗ We recommend to use AWS KMS, GCP KMS, Azure Key Vault for SOPS files encryption. Don't use the secrets from the example in your real configuration! | ||
|
||
Here are some basic SOPS operations that help you to work with the example: | ||
|
||
- Pass `age` key to SOPS provider configuration: | ||
|
||
```sh | ||
cd ./example/complete | ||
export SOPS_AGE_KEY_FILE=key.txt | ||
``` | ||
|
||
- Encryption/decryption via SOPS editior | ||
|
||
```sh | ||
sops example.yaml | ||
``` | ||
|
||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
|
||
## Requirements | ||
|
||
No requirements. | ||
| Name | Version | | ||
| ------------------------------------------------------------------------ | ------- | | ||
| <a name="requirement_terraform"></a> [terraform](#requirement_terraform) | >= 1.3 | | ||
| <a name="requirement_datadog"></a> [datadog](#requirement_datadog) | >= 3.14 | | ||
|
||
## Providers | ||
|
||
No provider. | ||
| Name | Version | | ||
| ------------------------------------------------------------ | ------- | | ||
| <a name="provider_datadog"></a> [datadog](#provider_datadog) | >= 3.14 | | ||
|
||
## Modules | ||
|
||
No modules. | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
| --------------------------------------------------------------------------------------------------------------- | ----------- | | ||
| [datadog_user.users](https://registry.terraform.io/providers/datadog/datadog/latest/docs/resources/user) | resource | | ||
| [datadog_role.admin](https://registry.terraform.io/providers/datadog/datadog/latest/docs/data-sources/role) | data source | | ||
| [datadog_role.read_only](https://registry.terraform.io/providers/datadog/datadog/latest/docs/data-sources/role) | data source | | ||
| [datadog_role.standard](https://registry.terraform.io/providers/datadog/datadog/latest/docs/data-sources/role) | data source | | ||
|
||
## Inputs | ||
|
||
No input. | ||
| Name | Description | Type | Default | Required | | ||
| ------------------------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | :------: | | ||
| <a name="input_users"></a> [users](#input_users) | n/a | <pre>list(object({<br> disabled = optional(bool, false)<br> email = string<br> name = string<br> roles = set(string)<br> send_user_invitation = optional(bool, true)<br> username = string<br> }))</pre> | n/a | yes | | ||
|
||
## Outputs | ||
|
||
No output. | ||
| Name | Description | | ||
| -------------------------------------------------------------------------- | ------------------------------------------------------ | | ||
| <a name="output_datadog_users"></a> [datadog_users](#output_datadog_users) | A map of all Datadog user resources keyed by username. | | ||
|
||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
|
||
|
Oops, something went wrong.