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

explain prerequisites #11

Merged
merged 4 commits into from
Sep 9, 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
10 changes: 5 additions & 5 deletions .github/workflows/pull-e2e-test.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: pull-e2e-test
on:
pull_request:
push:
branches: [ "main", "release-*" ]

jobs:
btp-integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: opentofu/setup-opentofu@v1
- name: Create kyma runtime on btp
working-directory: examples/kyma-on-btp-basic
run: |
tofu init
tofu apply -auto-approve
tofu destroy -auto-approve
terraform init
terraform apply -auto-approve
terraform destroy -auto-approve
env:
TF_VAR_BTP_SUBACCOUNT: btp-test-PR-${{ github.event.number }}-${{ github.run_attempt }}
TF_VAR_BTP_SA_REGION: ${{ secrets.sa_region }}
Expand Down
20 changes: 18 additions & 2 deletions examples/kyma-on-btp-basic/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Run
# Prerequisites

## Ensure CLI tools

Ensure you have opentofu (or terraform CLI installed).
The sample scripts relly on `tofu` command, but its 100% compatible with `terraform` CLI.
Expand All @@ -8,7 +10,21 @@ 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.
## Ensure bot user access

In order to make automatic management of btp resources possible you need to ensure the following:
- establish trust between BTP global account and your custom IAS tenant
- add the bot user to the custom IAS tenant
- assign global account administrator role collection to the bot user (this example needs it to create subaccount. It is not required if subaccount is reused)
- if you decide to use provider subaccount in order to create disposable references to existing, shared instances of stateful services (via `BTP_PROVIDER_SUBACCOUNT_ID` environment variable ) the bot user would need to have `Subaccount Viewer` role collection assigned in the provider subaccount.

## 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


# Run


Run the example:

Expand Down
Loading