Skip to content

quortex/terraform-provider-administration

Repository files navigation

terraform-provider-administration

The Terraform provider administration is a plugin for Terraform that allows some administration configuration of quortex solution. This provider is maintained internally by the Quortex team.

Documentation

Full, comprehensive documentation is available on the Terraform website:

https://registry.terraform.io/providers/quortex/administration/latest/docs

Build provider

Run the following command to build the provider

$ go build -o terraform-provider-administraition

Test sample configuration

First, build and install the provider.

$ make install

Then, navigate to the examples/development directory.

$ cd examples/development

Then update the following variables according to your needs in the provider "administration", for instance in your main.tf or define the variables in ./local/terraform.tfvars

provider "administration" {
  auth_server = "https://example.auth.server" //can be omitted to use default
  host        = "http://localhost:8000" //can be omitted to use default
  client_id     = "my_client_id"
  client_secret = "my_client_secret"
}

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

$ terraform init && terraform apply

Run Terraform tests :

Inspired from : https://developer.hashicorp.com/terraform/tutorials/configuration-language/test Go into ./local Change the configs for this right ones according the credentials in ./local/terraform.tfvars. Change the variable my_local_test_org you want to test in ./local/tests/setup/main.tf

To launch local test : Change in main.go : Address: "localhost/quortex/administration",

In Makefile make sure that when you build that the OS_ARCH is correct according to your environment.

$ make install

Then :

$ terraform init && terraform apply

Tests acceptance (yet abandonned)

Test was inspired from this repo : https://github.com/hashicorp/terraform-provider-scaffolding-framework/tree/main