Multiple provider configuration
We can have multiple ProviderConfig configured against a provider. It's like having many credentials or cloud accounts to access the cloud platform and choosing the appropriate credentials based on the given context. When provisioning the infrastructure resources with an MR or XR, we specify providerConfigRef:
to determine which ProviderConfig to use in the given context. If providerConfigRef:
is not available in an MR or XR, Crossplane refers to the ProviderConfig named default
. This way of organizing infrastructure resources under different credentials can help us manage infrastructure billing and maintain resources concerning the organizational structure in groups. The following YAML will provision POSTGRES from GCP using the provider config named gcp-credentials-project-1
, which we created in the preceding section:
apiVersion: database.gcp.crossplane.io/v1beta1
kind: CloudSQLInstance
metadata:
name: my-GCP-DB
spec...