Skip to content

Commit

Permalink
fix passing region
Browse files Browse the repository at this point in the history
  • Loading branch information
kwiatekus committed Sep 9, 2024
1 parent 51a194a commit 131141e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions examples/kyma-on-btp-new-sa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Ensure the tofu CLI is installed by calling:
brew install opentofu
```

Save a new version of the template file `examples/kyma-on-btp-basic/local-template.tfvars` as `examples/kyma-on-btp-basic/local.tfvars`. Provide values for input variables.
Save a new version of the template file `examples/kyma-on-btp-new-sa/local-template.tfvars` as `examples/kyma-on-btp-new-sa/local.tfvars`. Provide values for input variables.

Run the example:

```sh
tofu init
tofu apply -var="BTP_NEW_SUBACCOUNT_NAME=foo" -var-file="local.tfvars" -auto-approve
tofu apply -var-file="local.tfvars" -auto-approve
```

As a result, a new `kubeconfig.yaml` file was created that you can use to access the newly provisioned kyma runtime on SAP BTP.
Expand Down
2 changes: 1 addition & 1 deletion examples/kyma-on-btp-reuse-sa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ In order to make automatic management of btp resources possible you need to ensu

## Ensure Input Variables

Save a new version of the template file `examples/kyma-on-btp-basic/local-template.tfvars` as `examples/kyma-on-btp-basic/local.tfvars`. Provide values for input variables
Save a new version of the template file `examples/kyma-on-btp-new-sa/local-template.tfvars` as `examples/kyma-on-btp-new-sa/local.tfvars`. Provide values for input variables


# Run
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ data "btp_subaccount" "reuse_subaccount" {
resource "btp_subaccount" "subaccount" {
count = var.BTP_NEW_SUBACCOUNT_NAME != null && var.BTP_USE_SUBACCOUNT_ID == null ? 1 : 0
name = var.BTP_NEW_SUBACCOUNT_NAME
region = var.BTP_SA_REGION
region = var.BTP_NEW_SUBACCOUNT_REGION
subdomain = var.BTP_NEW_SUBACCOUNT_NAME
}

6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,3 @@ variable "BTP_PROVIDER_SUBACCOUNT_ID" {
default = null
}

#deprecated
variable "BTP_SA_REGION" {
type = string
description = "Region name"
default = "us31"
}

0 comments on commit 131141e

Please sign in to comment.