Documentation
¶
Index ¶
- Variables
- func SetGraphBetaClientForDataSource(ctx context.Context, req datasource.ConfigureRequest, ...) *msgraphbetasdk.GraphServiceClient
- func SetGraphBetaClientForResource(ctx context.Context, req resource.ConfigureRequest, ...) *msgraphbetasdk.GraphServiceClient
- func SetGraphStableClientForDataSource(ctx context.Context, req datasource.ConfigureRequest, ...) *msgraphsdk.GraphServiceClient
- func SetGraphStableClientForResource(ctx context.Context, req resource.ConfigureRequest, ...) *msgraphsdk.GraphServiceClient
Constants ¶
This section is empty.
Variables ¶
var GraphSDKMutex sync.Mutex
GraphSDKMutex is a global lock used to serialize Microsoft Graph SDK (Kiota) API calls.
Reason: Kiota's middleware (e.g., HeadersInspectionHandler) modifies shared header maps during HTTP request processing. In Go, maps are not concurrency-safe — concurrent writes cause immediate fatal runtime panics ("concurrent map writes").
Terraform executes Read operations across multiple resources in parallel, leading to multiple Graph API calls at the same time. Without locking, simultaneous mutation of the shared headers map causes the plugin to crash.
By acquiring this mutex around Graph API calls (Get, Post, Patch, Delete), we ensure only one request is processed at a time through the Kiota pipeline, preventing concurrency issues and plugin crashes.
Functions ¶
func SetGraphBetaClientForDataSource ¶
func SetGraphBetaClientForDataSource(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse, dataSourceName string) *msgraphbetasdk.GraphServiceClient
SetGraphBetaClientForDataSource is a helper function to retrieve and validate the Graph Beta client for data sources.
func SetGraphBetaClientForResource ¶
func SetGraphBetaClientForResource(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse, resourceName string) *msgraphbetasdk.GraphServiceClient
SetGraphBetaClientForResource is a helper function to retrieve and validate the Graph Beta client for resources.
func SetGraphStableClientForDataSource ¶
func SetGraphStableClientForDataSource(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse, dataSourceName string) *msgraphsdk.GraphServiceClient
SetGraphStableClientForDataSource is a helper function to retrieve and validate the Graph Stable client for data sources.
func SetGraphStableClientForResource ¶
func SetGraphStableClientForResource(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse, resourceName string) *msgraphsdk.GraphServiceClient
SetGraphStableClientForResource is a helper function to retrieve and validate the Graph Stable client for resources.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
planmodifiers/bool.go
|
planmodifiers/bool.go |
|
shared_models
|
|
|
graph_beta/device_and_app_management
Base resource REF: https://learn.microsoft.com/en-us/graph/api/resources/intune-apps-mobileappassignment?view=graph-rest-beta
|
Base resource REF: https://learn.microsoft.com/en-us/graph/api/resources/intune-apps-mobileappassignment?view=graph-rest-beta |
|
graph_beta/device_management
REF: https://learn.microsoft.com/en-us/graph/api/resources/intune-rbac-roleassignment?view=graph-rest-beta
|
REF: https://learn.microsoft.com/en-us/graph/api/resources/intune-rbac-roleassignment?view=graph-rest-beta |