Skip to content

Commit

Permalink
introduce autoscaler config (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwiatekus authored Nov 29, 2024
1 parent 3c3b3d7 commit 9431143
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
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
}

0 comments on commit 9431143

Please sign in to comment.