terraform-provider-edge-con.../examples/authentication/env-vars.tf

33 lines
835 B
HCL

# Example: Environment Variable Authentication
#
# This example demonstrates how to authenticate with the Edge Connect
# provider using environment variables instead of explicit configuration.
terraform {
required_providers {
edge-connect = {
source = "local/edge-connect"
}
}
}
# Provider configured entirely via environment variables
# No explicit configuration needed - provider will read from:
# - EDGE_CONNECT_ENDPOINT
# - EDGE_CONNECT_TOKEN (for token auth)
# OR
# - EDGE_CONNECT_USERNAME and EDGE_CONNECT_PASSWORD (for username/password auth)
provider "edge-connect" {
# All values will be read from environment variables
}
# Example resource
resource "edge-connect_app" "env_example" {
name = "env-var-app"
version = "1.0.0"
}
output "app_id" {
value = edge-connect_app.env_example.id
}