Authenticating with Prodvana
To authenticate your Terraform run with Prodvana you need to provide your Organization's org_slug
and a valid Prodvana API Token:
org_slug
- can be found in your prodvana URL:<org_slug>.<<domain>>
api_token
- can be created using the pvnctl api-tokens command
These can be passed to the provider block in your Terraform configuration:
terraform {
required_providers {
prodvana = {
source = "prodvana/prodvana"
version = "~> 0.1.19"
}
}
required_version = ">= 1.0.0"
}
variable "api_token" {
type = string
}
provider "prodvana" {
org_slug = "my-org"
api_token = var.api_token
}
Then when you run the terraform
command you can pass in the api_token
variable:
$ terraform apply -var="api_token=<api_token>"
Alternatively, these values can be provided as environment variables PVN_ORG_SLUG
and PVN_API_TOKEN
.
$ export PVN_ORG_SLUG='my-org'
$ export PVN_API_TOKEN='<api_token>'
$ terraform apply
Updated 9 months ago
What’s Next