Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trendmicro/terraform-provider-conformity
Conformity Terraform provider
https://github.com/trendmicro/terraform-provider-conformity
conformity terraform
Last synced: 3 months ago
JSON representation
Conformity Terraform provider
- Host: GitHub
- URL: https://github.com/trendmicro/terraform-provider-conformity
- Owner: trendmicro
- License: mpl-2.0
- Created: 2021-06-21T07:16:16.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-24T15:45:55.000Z (7 months ago)
- Last Synced: 2024-07-25T02:54:49.457Z (7 months ago)
- Topics: conformity, terraform
- Language: Go
- Homepage: https://registry.terraform.io/providers/trendmicro/conformity/latest/docs
- Size: 10.3 MB
- Stars: 10
- Watchers: 5
- Forks: 11
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Conformity Terraform Provider
## How to set up local machine:
#### 1. Navigate to project directory:
```sh
cd /path/terraform-provider-conformity
```
#### 2. Install dependencies:
```sh
go mod tidy
go mod vendor
```
#### 3. Update Makefile with your own values:
```makefile
# ...
VERSION=0.6 # Set a new version
OS_ARCH=darwin_amd64 # Update to value that matches with your OS
# ...
```
#### 4. Create the Artifact:
```sh
make install
```
#### 5. Go to your terraform project, and update `source` set in your terraform provider block:
```hcl
terraform {
required_providers {
conformity = {
version = "YOUR_VERSION"# Set path to match with values in HOSTNAME/NAMESPACE/NAME defined in the Makefile
source = "trendmicro.com/cloudone/conformity"
}
}
}
```
#### 6. Now, you can test terraform code:
```sh
cd example/path-to-main/
terraform init
terraform apply
```
Notes:
* for your own config, create a file name `terraform.tfvars`
* add the following:
```sh
region = "region"
apikey = "apikey"
```Turn on debug:
```sh
export TF_LOG_CORE=TRACE
export TF_LOG_PROVIDER=TRACE
```## How to protect API keys
#### 1. with file
Create a file name `terraform.tfvars` and add all necessary variables here
Ensure `terraform.tfvars` is included in `.gitignore` so these secrets are not accidentally pushed to a remote git repository.
#### 2. with environment variables
Terraform provides a way of reading variables from the environment: https://www.terraform.io/docs/cli/config/environment-variables.html#tf_var_name
## Updating documentation
Use the [Doc Preview Tool](https://registry.terraform.io/tools/doc-preview) to understand how the markdown will look once released. The [Provider Documentation](https://developer.hashicorp.com/terraform/registry/providers/docs) can also provide further guidance.## How to release
### Steps
#### 1. Go to terraform provider GitHub: https://github.com/trendmicro/terraform-provider-conformity/releases#### 2. Click "Draft a new release" button
#### 3. Click "Choose a Tag" dropdown, provide tag with value “xxx”, then select "+ Create new Tag : xxx on publish" popup item below.
#### 4. Choose the main branch as "Target"
#### 5. Fill the release title “xxx”
#### 6. Add the released changes to the description. *Do avoid Jira Ticket's IDs as those are not publicly visible.*
#### 7. Click "Publish release" button at the bottom.
### Check the release
After releasing, a webhook will be sent to Terraform registry automatically.
Within about 10 minutes https://registry.terraform.io/providers/trendmicro/conformity/latest/docs should be updated with the new release from Github.