@@ -120,10 +120,82 @@ func init() {
120120 exportFileStorageMountTargetHints .requireResourceRefresh = true
121121
122122 exportBudgetAlertRuleHints .getIdFn = getBudgetAlertRuleId
123+
124+ exportIdentityApiKeyHints .getIdFn = getIdentityApiKeyId
125+
126+ exportIdentityAuthTokenHints .getIdFn = getIdentityAuthTokenId
127+
128+ exportIdentityCustomerSecretKeyHints .getIdFn = getIdentityCustomerSecretKeyId
129+
130+ exportIdentityIdpGroupMappingHints .getIdFn = getIdentityIdpGroupMappingId
131+
132+ exportIdentitySmtpCredentialHints .getIdFn = getIdentitySmtpCredentialId
133+
134+ exportIdentitySwiftPasswordHints .getIdFn = getIdentitySwiftPasswordId
123135}
124136
125137// Custom functions to alter behavior of resource discovery and resource HCL representation
126138
139+ func getIdentityApiKeyId (resource * OCIResource ) (string , error ) {
140+ fingerPrint , ok := resource .sourceAttributes ["fingerprint" ].(string )
141+ if ! ok {
142+ return "" , fmt .Errorf ("[ERROR] unable to find fingerprint for Api Key" )
143+ }
144+ userId := resource .parent .id
145+
146+ return getApiKeyCompositeId (fingerPrint , userId ), nil
147+ }
148+
149+ func getIdentityAuthTokenId (resource * OCIResource ) (string , error ) {
150+ authTokenId , ok := resource .sourceAttributes ["id" ].(string )
151+ if ! ok {
152+ return "" , fmt .Errorf ("[ERROR] unable to find id for Auth Token" )
153+ }
154+ userId := resource .parent .id
155+
156+ return getAuthTokenCompositeId (authTokenId , userId ), nil
157+ }
158+
159+ func getIdentityCustomerSecretKeyId (resource * OCIResource ) (string , error ) {
160+ id , ok := resource .sourceAttributes ["id" ].(string )
161+ if ! ok {
162+ return "" , fmt .Errorf ("[ERROR] unable to find id for Customer Secrest Key" )
163+ }
164+ userId := resource .parent .id
165+
166+ return getCustomerSecretKeyCompositeId (id , userId ), nil
167+ }
168+
169+ func getIdentityIdpGroupMappingId (resource * OCIResource ) (string , error ) {
170+ id , ok := resource .sourceAttributes ["id" ].(string )
171+ if ! ok {
172+ return "" , fmt .Errorf ("[ERROR] unable to find id for Customer Secrest Key" )
173+ }
174+ providerId := resource .parent .id
175+
176+ return getIdpGroupMappingCompositeId (providerId , id ), nil
177+ }
178+
179+ func getIdentitySmtpCredentialId (resource * OCIResource ) (string , error ) {
180+ id , ok := resource .sourceAttributes ["id" ].(string )
181+ if ! ok {
182+ return "" , fmt .Errorf ("[ERROR] unable to find id for Smtp Credential" )
183+ }
184+ userId := resource .parent .id
185+
186+ return getSmtpCredentialCompositeId (id , userId ), nil
187+ }
188+
189+ func getIdentitySwiftPasswordId (resource * OCIResource ) (string , error ) {
190+ id , ok := resource .sourceAttributes ["id" ].(string )
191+ if ! ok {
192+ return "" , fmt .Errorf ("[ERROR] unable to find id for Swift Password" )
193+ }
194+ userId := resource .parent .id
195+
196+ return getSwiftPasswordCompositeId (id , userId ), nil
197+ }
198+
127199func processContainerengineNodePool (clients * OracleClients , resources []* OCIResource ) ([]* OCIResource , error ) {
128200 for _ , nodePool := range resources {
129201 // subnet_ids and quantity_per_subnet are deprecated and conflict with node_config_details
0 commit comments