provider

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Canonical environment names (kept consistent with the AzureAD provider).
	EnvironmentPublic         = "public"
	EnvironmentUSGovernmentL4 = "usgovernmentl4"
	EnvironmentUSGovernmentL5 = "usgovernmentl5"
	EnvironmentChina          = "china"

	// Aliases accepted for the canonical names above.
	EnvironmentGlobal       = "global"
	EnvironmentUSGovernment = "usgovernment"
	EnvironmentDoD          = "dod"

	GraphHostPublic         = "https://graph.microsoft.com"
	GraphHostUSGovernmentL4 = "https://graph.microsoft.us"
	GraphHostUSGovernmentL5 = "https://dod-graph.microsoft.us"
	GraphHostChina          = "https://microsoftgraph.chinacloudapi.cn"
)

Variables

Environments is the single source of truth mapping every accepted environment name (canonical values and their AzureAD-compatible aliases) to a fully resolved cloud.Configuration that embeds the Microsoft Graph service endpoint and audience.

SupportedEnvironments contains every value accepted for the `environment` argument, including the aliases that mirror the AzureAD provider. The order is stable so it can back both the schema validator and the documentation.

Functions

func New

func New() func() provider.Provider

func ResolveCloudEnvironment added in v0.5.0

func ResolveCloudEnvironment(environment string) (cloud.Configuration, error)

ResolveCloudEnvironment returns the cloud.Configuration for the given environment name. An empty value defaults to the public cloud.

Types

type MSGraphProvider

type MSGraphProvider struct{}

func (*MSGraphProvider) Configure

func (*MSGraphProvider) DataSources

func (p *MSGraphProvider) DataSources(ctx context.Context) []func() datasource.DataSource

func (*MSGraphProvider) Metadata

func (*MSGraphProvider) Resources

func (p *MSGraphProvider) Resources(ctx context.Context) []func() resource.Resource

func (*MSGraphProvider) Schema

type MSGraphProviderModel

type MSGraphProviderModel struct {
	Environment                  types.String `tfsdk:"environment"`
	ClientID                     types.String `tfsdk:"client_id"`
	ClientIDFilePath             types.String `tfsdk:"client_id_file_path"`
	TenantID                     types.String `tfsdk:"tenant_id"`
	ClientCertificatePath        types.String `tfsdk:"client_certificate_path"`
	ClientCertificate            types.String `tfsdk:"client_certificate"`
	ClientCertificatePassword    types.String `tfsdk:"client_certificate_password"`
	ClientSecret                 types.String `tfsdk:"client_secret"`
	ClientSecretFilePath         types.String `tfsdk:"client_secret_file_path"`
	OIDCRequestToken             types.String `tfsdk:"oidc_request_token"`
	OIDCRequestURL               types.String `tfsdk:"oidc_request_url"`
	OIDCToken                    types.String `tfsdk:"oidc_token"`
	OIDCTokenFilePath            types.String `tfsdk:"oidc_token_file_path"`
	OIDCAzureServiceConnectionID types.String `tfsdk:"oidc_azure_service_connection_id"`
	UseOIDC                      types.Bool   `tfsdk:"use_oidc"`
	UseCLI                       types.Bool   `tfsdk:"use_cli"`
	UsePowerShell                types.Bool   `tfsdk:"use_powershell"`
	UseMSI                       types.Bool   `tfsdk:"use_msi"`
	UseAKSWorkloadIdentity       types.Bool   `tfsdk:"use_aks_workload_identity"`
	PartnerID                    types.String `tfsdk:"partner_id"`
	CustomCorrelationRequestID   types.String `tfsdk:"custom_correlation_request_id"`
	DisableCorrelationRequestID  types.Bool   `tfsdk:"disable_correlation_request_id"`
	DisableTerraformPartnerID    types.Bool   `tfsdk:"disable_terraform_partner_id"`
}

func (MSGraphProviderModel) GetClientId

func (model MSGraphProviderModel) GetClientId() (*string, error)

func (MSGraphProviderModel) GetClientSecret

func (model MSGraphProviderModel) GetClientSecret() (*string, error)

func (MSGraphProviderModel) GetOIDCTokenFilePath

func (model MSGraphProviderModel) GetOIDCTokenFilePath() string

type MsiCredential

type MsiCredential struct {
	// contains filtered or unexported fields
}

func NewManagedIdentityCredential

func NewManagedIdentityCredential(options *azidentity.ManagedIdentityCredentialOptions) (*MsiCredential, error)

func (*MsiCredential) GetToken

type OidcCredential

type OidcCredential struct {
	// contains filtered or unexported fields
}

func NewOidcCredential

func NewOidcCredential(options *OidcCredentialOptions) (*OidcCredential, error)

func (*OidcCredential) GetToken

type OidcCredentialOptions

type OidcCredentialOptions struct {
	azcore.ClientOptions
	TenantID                   string
	ClientID                   string
	RequestToken               string
	RequestUrl                 string
	Token                      string
	TokenFilePath              string
	AdditionallyAllowedTenants []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL