File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 66 "net/http"
77 "net/url"
88 "os"
9+ "slices"
910 "testing"
1011
1112 "github.com/SAP/terraform-exporter-btp/pkg/tfcleanup/testutils"
@@ -128,6 +129,11 @@ func GetDefaultRoleCollectionsByDirectory(directoryId string, client *ClientFaca
128129}
129130
130131func GetDefaultRolesBySubaccount (subaccountId string , client * ClientFacade ) (defaults []string , err error ) {
132+ // Role names that are provisioned by default but cannot be identified via standard configuration
133+ var defaultRoleNameSubaccount = []string {
134+ "Application_Frontend_Developer" ,
135+ }
136+
131137 var roles []string
132138
133139 cliRes , _ , err := client .Security .Role .ListBySubaccount (context .Background (), subaccountId )
@@ -138,7 +144,7 @@ func GetDefaultRolesBySubaccount(subaccountId string, client *ClientFacade) (def
138144
139145 for _ , role := range cliRes {
140146 // The roles that are marked as IsReadOnly and contain an empty attribute list are predefined and need not be exported
141- if role .IsReadOnly && len (role .AttributeList ) == 0 {
147+ if role .IsReadOnly && len (role .AttributeList ) == 0 || role . IsReadOnly && slices . Contains ( defaultRoleNameSubaccount , role . Name ) {
142148 roles = append (roles , role .Name )
143149 }
144150 }
You can’t perform that action at this time.
0 commit comments