Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce autoscaler config #57

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Terraform module that creates kyma runtime in SAP BTP platform.
| BTP_BACKEND_URL | false | https://cli.btp.cloud.sap | URL of the BTP backend API (on canary environment this has to be set to `https://cpcli.cf.sap.hana.ondemand.com`). |
| BTP_KYMA_PLAN | false | azure | Use one of a valid kyma plans that you are entitled to use (One of: `azure`, `gcp`, `aws`,`sap-converged-cloud`) |
| BTP_KYMA_REGION | false | westeurope | Use a valid kyma region that matches your selected kyma plan |
| BTP_KYMA_AUTOSCALER_MIN | false | 3 | Minimum number of nodes |
| BTP_KYMA_AUTOSCALER_MAX | false | 10 | Maximum number of nodes |



### Required Providers

Expand Down
2 changes: 2 additions & 0 deletions examples/kyma-on-btp-new-sa/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ module "kyma" {
BTP_NEW_SUBACCOUNT_REGION = var.BTP_NEW_SUBACCOUNT_REGION
BTP_KYMA_MODULES = var.BTP_KYMA_MODULES
BTP_KYMA_CUSTOM_ADMINISTRATORS = var.BTP_KYMA_CUSTOM_ADMINISTRATORS
BTP_KYMA_AUTOSCALER_MIN = 1
BTP_KYMA_AUTOSCALER_MAX = 2
}

output "subaccount_id" {
Expand Down
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ resource "btp_subaccount_environment_instance" "kyma" {
name = "${local.subaccount_name}-kyma"
region = var.BTP_KYMA_REGION
administrators = var.BTP_KYMA_CUSTOM_ADMINISTRATORS
autoScalerMin = var.BTP_KYMA_AUTOSCALER_MIN
autoScalerMax = var.BTP_KYMA_AUTOSCALER_MAX
})
timeouts = {
create = "60m"
Expand Down
10 changes: 10 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,13 @@ variable "BTP_KYMA_MODULES" {
description = "The list of kyma modules to install"
}

variable "BTP_KYMA_AUTOSCALER_MIN" {
type: number
default: 3
}

variable "BTP_KYMA_AUTOSCALER_MAX" {
type: number
default: 10
}