File tree Expand file tree Collapse file tree 4 files changed +43
-0
lines changed
released/modules/roles/subaccount_role_app_id Expand file tree Collapse file tree 4 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ # Module: modules - roles - App ID of a Role on subaccount level
2+
3+ ## Content of setup
4+
5+ The module returns the application ID needed to create custom role collections.
Original file line number Diff line number Diff line change 1+ terraform {
2+ required_providers {
3+ btp = {
4+ source = " SAP/btp"
5+ version = " ~> 1.9.0"
6+ }
7+ }
8+ }
9+
10+ data "btp_subaccount_roles" "all_roles" {
11+ subaccount_id = var. subaccount_id
12+ }
13+
14+
15+ locals {
16+ selected_role = [
17+ for role in data . btp_subaccount_roles . all_roles . values : role
18+ if role . name == var . role_name && role . role_template_name == var . role_template_name
19+ ]
20+ }
Original file line number Diff line number Diff line change 1+ output "role_app_id" {
2+ value = local. selected_role [0 ]. app_id
3+ description = " The id of the application that provides the role template and the role."
4+ }
Original file line number Diff line number Diff line change 1+ variable "subaccount_id" {
2+ type = string
3+ description = " The ID of the SAP BTP subaccount"
4+ }
5+
6+ variable "role_name" {
7+ type = string
8+ description = " The name of the role"
9+ }
10+
11+ variable "role_template_name" {
12+ type = string
13+ description = " The name of the role template."
14+ }
You can’t perform that action at this time.
0 commit comments