cdktf-gke-auth
Project description
cdktf-gke-auth
Easily authenticate against a Google Kubernetes Engine (GKE) within your CDK for Terraform stack. Without the need to
resort to Google's terraform GKE auth module. You can avoid running cdktf get as pre-synth step.
This project uses projen and jsii to compile the construct to Typescript, Python, Go and .Net (Java upon request).
Example usage (Typescript)
Install the construct with: yarn install cdktf-gke-auth.
import { GoogleProvider } from "@cdktf/provider-google/lib/provider";
import { TerraformOutput, TerraformStack } from "cdktf";
import { Construct } from "constructs";
import { GKEAuth } from 'cdktf-gke-auth';
export class MyKubeStack extends TerraformStack {
constructor(scope: Construct, name: string) {
super(scope, name);
new GoogleProvider(this, "google-provider", {});
const auth = new GKEAuth(this, "gke-auth", {
clusterName: "my-cluster",
location: "europe-west1",
projectId: "my-project",
});
// init the Kubernetes provider like so:
new KubernetesProvider(this, "kubernetes", {
...auth.authCredentials
});
// Or a helm provider like so:
new HelmProvider(this, "helm", {
kubernetes: auth.authCredentials,
});
}
}
The GKEAuth instance expose host, clusterCaCertificate, clusterCaCertificatePEM, and token you can use to authenticate using
any of the kubernetes popular cdktf providers.
For other languages examples, checkout this construct on ConstructHub.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cdktf-gke-auth-1.1.1.tar.gz.
File metadata
- Download URL: cdktf-gke-auth-1.1.1.tar.gz
- Upload date:
- Size: 31.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b955c8843732f00216047afb2da56238a79be19555e550e720c39ac8ef04132
|
|
| MD5 |
e84046dec94effe49ac8b371dcf0d244
|
|
| BLAKE2b-256 |
cee72b8b8623b693c1f4131963ebe217478ec43d9915821ffd46eaf8901dc93e
|
File details
Details for the file cdktf_gke_auth-1.1.1-py3-none-any.whl.
File metadata
- Download URL: cdktf_gke_auth-1.1.1-py3-none-any.whl
- Upload date:
- Size: 29.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba36874a68ba7775a18ef24c53b99f58be3e0c780ff9822822f641d7130c30fb
|
|
| MD5 |
ef15c1f77c57e7334fd2d9994ae6b6d6
|
|
| BLAKE2b-256 |
da368194d6c1d064252e4097f9a44e065020a4ca9fe99200ca966e5405617aa7
|