Skip to content

Commit

Permalink
Merge pull request #17 from kwiatekus/make-modulelist-configurable
Browse files Browse the repository at this point in the history
module list configurable
  • Loading branch information
kwiatekus authored Sep 9, 2024
2 parents bea6abe + b6084a6 commit 017ce48
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 14 deletions.
1 change: 1 addition & 0 deletions examples/kyma-on-btp-new-sa/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ module "kyma" {
BTP_BOT_PASSWORD = var.BTP_BOT_PASSWORD
BTP_PROVIDER_SUBACCOUNT_ID = var.BTP_PROVIDER_SUBACCOUNT_ID
BTP_NEW_SUBACCOUNT_REGION = var.BTP_NEW_SUBACCOUNT_REGION
BTP_KYMA_MODULES = var.BTP_KYMA_MODULES
}
22 changes: 22 additions & 0 deletions examples/kyma-on-btp-new-sa/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,25 @@ variable "BTP_PROVIDER_SUBACCOUNT_ID" {
description = "Subaccount ID"
default = null
}

variable "BTP_KYMA_MODULES" {
type = list(object({
name = string
channel = string
}))
default = [
{
name = "istio"
channel = "fast"
},
{
name = "api-gateway"
channel = "fast"
},
{
name = "btp-operator"
channel = "fast"
}
]
description = "The list of kyma modules to install"
}
15 changes: 1 addition & 14 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,7 @@ resource "btp_subaccount_environment_instance" "kyma" {
plan_name = btp_subaccount_entitlement.kyma.plan_name
parameters = jsonencode({
modules = {
list = [
{
name = "api-gateway"
channel = "fast"
},
{
name = "istio"
channel = "fast"
},
{
name = "btp-operator"
channel = "fast"
}
]
list = var.BTP_KYMA_MODULES
}
oidc = {
groupsClaim = "groups"
Expand Down
22 changes: 22 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,25 @@ variable "BTP_PROVIDER_SUBACCOUNT_ID" {
default = null
}

variable "BTP_KYMA_MODULES" {
type = list(object({
name = string
channel = string
}))
default = [
{
name = "istio"
channel = "fast"
},
{
name = "api-gateway"
channel = "fast"
},
{
name = "btp-operator"
channel = "fast"
}
]
description = "The list of kyma modules to install"
}

0 comments on commit 017ce48

Please sign in to comment.