A ProviderConfig configures a Terraform provider.
Type
CRD
Group
tf.upbound.io
Version
v1beta1
apiVersion: tf.upbound.io/v1beta1
kind: ProviderConfig
A ProviderConfigSpec defines the desired state of a ProviderConfig.
Credentials required to authenticate to this provider.
Env is a reference to an environment variable that contains credentials that must be used to connect to the provider.
Fs is a reference to a filesystem location that contains credentials that must be used to connect to the provider.
A ProviderConfigStatus reflects the observed state of a ProviderConfig.
Conditions of the resource.
default
apiVersion: tf.upbound.io/v1beta1
kind: ProviderConfig
metadata:
name: default
spec:
configuration: |
terraform {
backend "kubernetes" {
secret_suffix = "providerconfig-aws-eu-west-1"
namespace = "upbound-system"
in_cluster_config = true
}
}
provider "aws" {
shared_credentials_file = "${path.module}/aws-creds.ini"
region = "eu-west-1"
}
credentials:
- filename: aws-creds.ini
secretRef:
key: credentials
name: aws-creds
namespace: upbound-system
source: Secret
- filename: .terraformrc
secretRef:
key: .terraformrc
name: terraformrc
namespace: upbound-system
source: Secret
azure-westeurope
apiVersion: tf.upbound.io/v1beta1
kind: ProviderConfig
metadata:
name: azure-westeurope
spec:
configuration: |
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "3.78.0"
}
}
backend "kubernetes" {
secret_suffix = "providerconfig-azure-westeurope"
namespace = "upbound-system"
in_cluster_config = true
}
}
variable "subscriptionId" {
type = string
}
variable "tenantId" {
type = string
}
variable "clientId" {
type = string
}
variable "clientSecret" {
type = string
}
provider "azurerm" {
subscription_id = var.subscriptionId
tenant_id = var.tenantId
client_id = var.clientId
client_secret = var.clientSecret
features {}
}
credentials:
- filename: terraform.tfvars.json
secretRef:
key: credentials
name: azure-creds
namespace: upbound-system
source: Secret
aws-eu-west-1
apiVersion: tf.upbound.io/v1beta1
kind: ProviderConfig
metadata:
name: aws-eu-west-1
spec:
configuration: |
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.6.1"
}
}
backend "kubernetes" {
secret_suffix = "providerconfig-aws-eu-west-1"
namespace = "upbound-system"
in_cluster_config = true
}
}
provider "aws" {
shared_credentials_files = ["${path.module}/aws-creds.ini"]
region = "eu-west-1"
}
credentials:
- filename: aws-creds.ini
secretRef:
key: credentials
name: aws-creds
namespace: upbound-system
source: Secret
default
apiVersion: tf.upbound.io/v1beta1
kind: ProviderConfig
metadata:
name: default
spec:
configuration: |
provider "google" {
credentials = "gcp-credentials.json"
project = "official-provider-testing"
}
// Modules _must_ use remote state. The provider does not persist state.
terraform {
backend "kubernetes" {
secret_suffix = "providerconfig-default"
namespace = "upbound-system"
in_cluster_config = true
}
}
credentials:
- filename: gcp-credentials.json
secretRef:
key: credentials
name: gcp-creds
namespace: upbound-system
source: Secret
aws-irsa
apiVersion: tf.upbound.io/v1beta1
kind: ProviderConfig
metadata:
annotations: {}
name: aws-irsa
spec:
configuration: |
terraform {
backend "kubernetes" {
secret_suffix = "providerconfig-tf-aws"
namespace = "crossplane-system"
in_cluster_config = true
}
}
provider "aws" {}
credentials:
- filename: aws.json
source: None
default
apiVersion: tf.upbound.io/v1beta1
kind: ProviderConfig
metadata:
name: default
spec:
backendFile: |
secret_suffix = "providerconfig-default"
namespace = "upbound-system"
in_cluster_config = true
configuration: >
provider "google" {
credentials = "gcp-credentials.json"
project = "official-provider-testing"
}
// Defining partial backend configuration as documented at
// https://developer.hashicorp.com/terraform/language/settings/backends/configuration#partial-configuration
terraform {
backend "kubernetes" {}
}
credentials:
- filename: gcp-credentials.json
secretRef:
key: credentials
name: gcp-creds
namespace: upbound-system
source: Secret