mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-14 23:17:15 +00:00
cfa914581a
The docs currently don't use the datasource version of 'google_client_config'. This PR just prefixes 'data.' to 'google_client_config' in the datasource docs.
1.4 KiB
1.4 KiB
layout | page_title | sidebar_current | description |
---|---|---|---|
Google: google_client_config | docs-google-datasource-client-config | Get information about the configuration of the Google Cloud provider. |
google_client_config
Use this data source to access the configuration of the Google Cloud provider.
Example Usage
data "google_client_config" "current" {}
output "project" {
value = "${data.google_client_config.current.project}"
}
Example Usage: Configure Kubernetes provider with OAuth2 access token
data "google_client_config" "default" {}
data "google_container_cluster" "my_cluster" {
name = "my-cluster"
zone = "us-east1-a"
}
provider "kubernetes" {
load_config_file = false
host = "https://${data.google_container_cluster.my_cluster.endpoint}"
token = "${data.google_client_config.default.access_token}"
cluster_ca_certificate = "${base64decode(data.google_container_cluster.my_cluster.master_auth.0.cluster_ca_certificate)}"
}
Argument Reference
There are no arguments available for this data source.
Attributes Reference
In addition to the arguments listed above, the following attributes are exported:
-
project
- The ID of the project to apply any resources to. -
region
- The region to operate under. -
access_token
- The OAuth2 access token used by the client to authenticate against the Google Cloud API.