https://github.com/coveooss/terraform-provider-quantum
A custom provider for terraform
https://github.com/coveooss/terraform-provider-quantum
Last synced: about 2 months ago
JSON representation
A custom provider for terraform
- Host: GitHub
- URL: https://github.com/coveooss/terraform-provider-quantum
- Owner: coveooss
- License: mit
- Created: 2017-06-06T19:15:54.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-04-02T12:42:16.000Z (about 2 months ago)
- Last Synced: 2025-04-02T13:37:52.646Z (about 2 months ago)
- Language: Go
- Size: 184 KB
- Stars: 2
- Watchers: 16
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terraform-provider-quantum
A custom provider for terraform.

[](https://travis-ci.org/coveo/terraform-provider-quantum)
[](https://goreportcard.com/report/github.com/coveo/terraform-provider-quantum)## Installation
1. Download the latest [release](github.com/coveo/terraform-provider-quantum/releases) for your platform
1. rename the file to `terraform-provider-quantum`
1. Copy the file to the same directory as terraform `dirname $(which terraform)` is installed## Usage
### quantum_list_files
#### Example Usage (quantum_list_files)
Returns a list of files from a directory
```hcl
data "quantum_list_files" "data_files" {
folders = ["./data"]
patterns = ["*.txt", "*.doc*"]
recursive = true
}
```The output will look like this:
```sh
data.quantum_list_files.data_files.files = ["./data/file1.txt", "./data/file2.docx"]
```#### Argument Reference (quantum_list_files)
- `folders` - (Optional) - The source list for folders
- `patterns` - (Optional) - The patterns to match files, uses [golang's filepath.Match](http://godoc.org/path/filepath#Match)
- `recursive` - (Optional) - Default `false`, walk directory recursively
- `include_folder` - (Optional) - Default `true`, include the parent folder in the results#### Attributes Reference (quantum_list_files)
- `files` - The list of matched files
### quantum_query_json
#### Example Usage (quantum_query_json)
Queries a json string using GJSON (https://github.com/tidwall/gjson)
```hcl
data "quantum_query_json" "instance_pricing" {
json = "${data.aws_pricing_product.instance.result}"
query = "terms.OnDemand.*.priceDimensions.*.pricePerUnit.USD"
}
```The output will look like this:
```sh
data.quantum_query_json.result = 0.60435
```#### Argument Reference (quantum_query_json)
- `json` - The JSON to query
- `query` - The query string (with this syntax: https://github.com/tidwall/gjson#path-syntax)#### Attributes Reference (quantum_query_json)
- `result` - The query result. Depending on the json and query, this could be json, float, string, etc.
### quantum_password
This resource will generate a password with lowercase, uppercase, numbers and special characters matching the specified `length`. It will also rotate the password every `'n'` days based on the `rotation` attribute.
#### Example Usage (quantum_password)
Generates a random password to be used by other resources
```hcl
resource "quantum_password" "rds_backup_db_password" {
length = 10
rotation = 90
}
```#### Argument Reference (quantum_password)
- `length` - (Optional) - Password length [default `20`]
- `rotation` - (Optional) - Number of days before a new password gets generated. [default `0` = no rotation]
- `special_chars` - (Optional) - Override the special characters set [default `!"#$%&'()*+,-./`]> A `rotation` set to negative number means the password expires on each run
#### Attributes Reference (quantum_password)
- `password` - Attribute to use in your other resources to set the password
- `last_update` - Last generation date of the password> Note that on *quantum_password* attribute change, you need to run `apply` twice to get the new password propagated to dependant resources. ([Comment on this behavior](https://github.com/hashicorp/terraform/issues/1123#issuecomment-77442647))
## Develop
```sh
go get github.com/coveo/terraform-provider-quantum
cd $GOPATH/src/github.com/coveo/terraform-provider-quantum
go get ./...
$EDITOR .
```