Skip to content

Commit

Permalink
Merge pull request #16 from DataDome/change-owners-to-integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauredg authored Nov 29, 2023
2 parents 04ca007 + e01779b commit 4b9b5f1
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Default owners for all files
* @DataDome/team-sre @gilleswalbrou
* @datadome/integrations-server-side
59 changes: 59 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# DataDome Terraform Provider

This Terraform Provider aims at creating custom rules using the [Management API](https://docs.datadome.co/reference/get_1-0-protection-custom-rules).

## Build the provider

Run the following command to build the provider

```shell
$ go build -o terraform-provider-datadome
```

## Test a sample configuration manually

1. Build the provider.

2. Install it.

```shell
$ make install
```

3. Navigate to the `examples` directory.

```shell
$ cd examples
```

4. Inside `main.tf`, set your Management API Key that you can find in your dashboard. If you don't have one, you can generate it.


5. Run the following command to initialize the workspace and apply the sample configuration.

```shell
$ terraform init && terraform apply
```

If you have a mac M1, you may need to run these before:

```shell
$ brew uninstall terraform
$ brew install tfenv
$ TFENV_ARCH=amd64 tfenv install 1.3.3
$ tfenv use 1.3.3
```

6. Terraform will ask you if you want to perform these actions: enter yes.

7. Congrats! You created a new custom rule that you can see in your dashboard.

## Make a release

//TODO: update the process after making the first release

1. Create a tag with the version number, starting with `v`.

2. Push it.

3. GHA will release the provider on the Terraform registry
29 changes: 1 addition & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
# DataDome Terraform Provider


## Build provider

Run the following command to build the provider

```shell
$ go build -o terraform-provider-datadome
```

## Test sample configuration

First, build and install the provider.

```shell
$ make install
```

Then, navigate to the `examples` directory.

```shell
$ cd examples
```

Run the following command to initialize the workspace and apply the sample configuration.

```shell
$ terraform init && terraform apply
```
Provider: https://registry.terraform.io/providers/DataDome/datadome/

0 comments on commit 4b9b5f1

Please sign in to comment.