-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
abbc372
commit 5b05bd9
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Basic usage | ||
|
||
This example shows a basic usage of the Nebuly's platform GCP Terraform module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# ------ Variables ------ # | ||
variable "region" { | ||
type = string | ||
default = "us-central1" | ||
} | ||
variable "project" { | ||
type = string | ||
} | ||
|
||
|
||
# ----------- Terraform setup ----------- # | ||
terraform { | ||
required_version = ">1.8" | ||
required_providers { | ||
google = { | ||
source = "hashicorp/google" | ||
version = "~>6.3" | ||
} | ||
} | ||
} | ||
provider "google" { | ||
region = var.region | ||
project = var.project | ||
} | ||
|
||
|
||
# ------ Main ------ # | ||
module "nebuly" { | ||
source = "nebuly-ai/nebuly-platform/gcp" | ||
version = "~0.1.0" | ||
|
||
region = var.region | ||
resource_prefix = "dev-" | ||
|
||
gke_cluster_admin_users = [ | ||
"[email protected]", | ||
] | ||
|
||
openai_api_key = "my-key" | ||
openai_endpoint = "https://api.openai.com" | ||
openai_gpt4_deployment_name = "gpt-4" | ||
nebuly_credentials = { | ||
client_id = "<your-nebuly-client-id>" | ||
client_secret = "<your-nebuly-client-secret>" | ||
} | ||
} | ||
|
||
|
||
# ------ Outputs ------ # | ||
output "helm_values_bootstrap" { | ||
value = module.nebuly.helm_values_bootstrap | ||
sensitive = true | ||
description = <<EOT | ||
The `bootrap.values.yaml` file for installing the Nebuly Boostrap GCP chart with Helm. | ||
EOT | ||
} | ||
output "helm_values" { | ||
value = module.nebuly.helm_values | ||
sensitive = true | ||
description = <<EOT | ||
The `values.yaml` file for installing Nebuly with Helm. | ||
The default standard configuration is used, which uses Nginx as ingress controller and exposes the application to the Internet. This configuration can be customized according to specific needs. | ||
EOT | ||
} | ||
output "secret_provider_class" { | ||
value = module.nebuly.secret_provider_class | ||
sensitive = true | ||
description = "The `secret-provider-class.yaml` file to make Kubernetes reference the secrets stored in the Secrets Managethe Secrets Manager." | ||
} | ||
output "gke_cluster_get_credentials" { | ||
description = "Command for getting the credentials for accessing the Kubernetes Cluster." | ||
value = module.nebuly.gke_cluster_get_credentials | ||
} |