This is the Aquasec provider for Terraform.
Useful links:
The provider lets you declaratively define the configuration for your Aqua Enterprise platform.
- Terraform v0.12.x or higher
- Go v1.16.x (to build the provider plugin)
- Aqua Enterprise Plaatform
Clone the repository locally and switch to the version you want to try
git clone https://github.com/aquasecurity/terraform-provider-aquasec.git
cd terraform-provider-aquasec
git checkout v0.6
Build the provider
go build
The last command will compile the Terraform Provider and generate a terraform-provider-aquasec
binary in your local directory.
After building the provider, the generated binary will need to be installed into the folder containing the Terraform resources.
We'll use here the example Terraform resources provided in this repo.
mkdir -p examples/resources/.terraform/plugins/terraform-provider-aquasec/aquasec/aquasec/0.6/darwin_amd64/
mv terraform-provider-aquasec examples/resources/.terraform/plugins/terraform-provider-aquasec/aquasec/aquasec/0.6/darwin_amd64/terraform-provider-aquasec
Make sure to replace the version 0.6
and the architecture darwin_amd64
in the path as relevant for your system.
In order to test the provider installed locally, the provider block will have to include the path to the current binary, as in the following example
terraform {
required_providers {
aquasec = {
version = "0.6"
source = "terraform-provider-aquasec/aquasec/aquasec"
}
}
}
Once applied the change above, move to the resources folder and initialise Terraform
cd examples/resources
terraform init
Finally, make sure to replace the Aqua credentials and URL in the provider
block and start trying out the different resources as provided in the example file.
provider "aquasec" {
username = "admin"
aqua_url = "https://aquaurl.com"
password = "@password"
}
The Aqua Provider for Terraform is the work of many contributors. We appreciate your help!
To contribute, please read the contribution guidelines. You may also report an issue. Once you've filed an issue.