Documentation ¶
Overview ¶
Copyright © 2024. Citrix Systems, Inc.
Copyright © 2024. Citrix Systems, Inc.
Index ¶
- Constants
- Variables
- func AppendNameValueStringPair(stringPairs *[]citrixorchestration.NameValueStringPairModel, name string, ...)
- func AppendTerraformMetadataInfo(stringPairs *[]citrixorchestration.NameValueStringPairModel)
- func AwsEdcWorkspaceImageIngestionProcessEnumToString(ingestionProcess quickcreateservice.AwsEdcWorkspaceImageIngestionProcess) string
- func AwsEdcWorkspaceImageStateEnumToString(imageState quickcreateservice.AwsEdcWorkspaceImageState) string
- func AwsEdcWorkspaceImageTenancyEnumToString(imageTenancy quickcreateservice.AwsEdcWorkspaceImageTenancy) string
- func BuildAzureMasterImagePath(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (string, error)
- func BuildResourcePathForGetRequest(resourcePathInput string, resourceName string) string
- func CategorizeScopes(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) ([]string, []string, []string, error)
- func CheckIfFieldIsSensitive(ctx context.Context, diags *diag.Diagnostics, attribute schema.Attribute) (map[string]bool, bool)
- func CheckProductVersion(client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, ...) bool
- func CheckStoreFrontVersion(client *citrixstorefrontclient.STFVersion, ctx context.Context, ...) bool
- func ComputeTypeEnumToString(os quickcreateservice.AwsEdcWorkspaceCompute) string
- func ConstructTagsRequestModel(ctx context.Context, diagnostics *diag.Diagnostics, tagSet types.Set) citrixorchestration.TagsRequestModel
- func ConvertBaseStringArrayToPrimitiveStringArray(v []types.String) []string
- func ConvertPrimitiveInterfaceArrayToStringList(ctx context.Context, diagnostics *diag.Diagnostics, v []interface{}) (types.List, string)
- func ConvertToString(model any) (string, error)
- func DataSourceAttributeMapFromObject(m DataSourceModelWithAttributes) (map[string]attr.Type, error)
- func DataSourceTypedArrayToObjectList[objTyp DataSourceModelWithAttributes](ctx context.Context, diagnostics *diag.Diagnostics, v []objTyp) types.List
- func DataSourceTypedArrayToObjectSet[objTyp DataSourceModelWithAttributes](ctx context.Context, diagnostics *diag.Diagnostics, v []objTyp) types.Set
- func DataSourceTypedObjectToObjectValue(ctx context.Context, diagnostics *diag.Diagnostics, ...) types.Object
- func FetchScopeIdsByNames(ctx context.Context, diagnostics diag.Diagnostics, ...) ([]string, error)
- func FetchScopeNamesByIds(ctx context.Context, diagnostics diag.Diagnostics, ...) ([]string, error)
- func GetAllResourcePathList(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) []string
- func GetAllScopedObjects(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) ([]citrixorchestration.ScopedObjectResponseModel, error)
- func GetAllowedFunctionalLevelValues() []string
- func GetApplicationGroupIdWithPath(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (string, error)
- func GetAsyncJobResult[ResponseType any](ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (ResponseType, error)
- func GetAttributeValues(ctx context.Context, diags *diag.Diagnostics, attribute attr.Value, ...) interface{}
- func GetCCAdminAccessPolicyNameKey(r ccadmins.AdministratorAccessPolicyModel) string
- func GetConfigValuesForMap(ctx context.Context, diags *diag.Diagnostics, configMap types.Map) map[string]interface{}
- func GetConfigValuesForObject(ctx context.Context, diags *diag.Diagnostics, obj types.Object, ...) map[string]interface{}
- func GetConfigValuesForSchema(ctx context.Context, diags *diag.Diagnostics, m ResourceModelWithAttributes) (string, map[string]interface{})
- func GetDeliveryGroup(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (*citrixorchestration.DeliveryGroupDetailResponseModel, error)
- func GetDeliveryGroupIdWithPath(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (string, error)
- func GetDeliveryGroupMachines(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) ([]citrixorchestration.MachineResponseModel, error)
- func GetDeliveryGroups(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) ([]citrixorchestration.DeliveryGroupResponseModel, error)
- func GetEffectiveMetadata(stateMetadata []NameValueStringPairModel, ...) []citrixorchestration.NameValueStringPairModel
- func GetFilteredResourcePathList(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) ([]string, error)
- func GetHypervisor(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (*citrixorchestration.HypervisorDetailResponseModel, error)
- func GetHypervisorResourcePool(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (*citrixorchestration.HypervisorResourcePoolDetailResponseModel, error)
- func GetIdsForFilteredScopeObjects(scopeIdsInState []string, ...) []string
- func GetIdsForOrchestrationObjects[objType any](slice []objType) []string
- func GetIdsForScopeObjects[objType any](slice []objType) []string
- func GetMachineAdAccountKey(r citrixorchestration.ProvisioningSchemeMachineAccountResponseModel) string
- func GetMachineCatalog(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (*citrixorchestration.MachineCatalogDetailResponseModel, error)
- func GetMachineCatalogIdWithPath(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (string, error)
- func GetMachineCatalogMachines(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) ([]citrixorchestration.MachineResponseModel, error)
- func GetMetadataListSchema(resource string) schema.ListNestedAttribute
- func GetMetadataRequestModel(ctx context.Context, diagnostics *diag.Diagnostics, ...) []citrixorchestration.NameValueStringPairModel
- func GetOrchestrationAccessPolicyKey(remote citrixorchestration.AdvancedAccessPolicyResponseModel) string
- func GetOrchestrationDesktopKey(r citrixorchestration.DesktopResponseModel) string
- func GetOrchestrationHypervisorStorageKey(remote citrixorchestration.HypervisorStorageResourceResponseModel) string
- func GetOrchestrationNameValueStringPairKey(remote citrixorchestration.NameValueStringPairModel) string
- func GetOrchestrationNetworkMappingKey(remote citrixorchestration.NetworkMapResponseModel) string
- func GetOrchestrationRebootScheduleKey(r citrixorchestration.RebootScheduleResponseModel) string
- func GetOrchestrationRemotePcOuKey(remote citrixorchestration.RemotePCEnrollmentScopeResponseModel) string
- func GetOrchestrationSmartAccessTagKey(remote citrixorchestration.SmartAccessTagResponseModel) string
- func GetProductMajorAndMinorVersion(client *citrixdaasclient.CitrixDaasClient) (int, int, error)
- func GetQcsAwsWorkspacesWithUsernameKey(remote citrixquickcreate.AwsEdcDeploymentMachine) string
- func GetSTFFarmSetKey(remote citrixstorefront.STFFarmSetResponseModel) string
- func GetSTFGroupMemberKey(remote citrixstorefront.STFGroupMemberResponseModel) string
- func GetSTFRoamingGatewayKey(remote citrixstorefront.STFRoamingGatewayResponseModel) string
- func GetSTFSTAUrlKey(remote citrixstorefront.STFSTAUrlModel) string
- func GetSensitiveFieldsForAttribute(ctx context.Context, diags *diag.Diagnostics, ...) map[string]bool
- func GetSingleHypervisorResource(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (*citrixorchestration.HypervisorResourceResponseModel, *http.Response, error)
- func GetSingleResourceFromHypervisor(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (*citrixorchestration.HypervisorResourceResponseModel, *http.Response, error)
- func GetSingleResourcePathFromHypervisor(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (string, *http.Response, error)
- func GetUpdatedMetadataRequestModel(ctx context.Context, diagnostics *diag.Diagnostics, ...) []citrixorchestration.NameValueStringPairModel
- func GetUserIdsUsingIdentity(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, users []string) ([]string, *http.Response, error)
- func GetUsersUsingIdentity(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, users []string) ([]citrixorchestration.IdentityUserResponseModel, *http.Response, error)
- func GetValidatorFromEnum[V ~string, T []V](enum T) validator.String
- func HandleMachineProfileForAzureMcsPvsCatalog(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (string, error)
- func IsScopeInherited(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (bool, error)
- func IsValidUUID(u string) bool
- func IsValidUUIDorNull(u basetypes.StringValue) bool
- func ObjectListToTypedArray[objTyp any](ctx context.Context, diagnostics *diag.Diagnostics, v types.List) []objTyp
- func ObjectSetToTypedArray[objTyp any](ctx context.Context, diagnostics *diag.Diagnostics, v types.Set) []objTyp
- func ObjectValueToTypedObject[objTyp any](ctx context.Context, diagnostics *diag.Diagnostics, v types.Object) objTyp
- func OperatingSystemTypeEnumToString(os quickcreateservice.OperatingSystemType) string
- func OrchestrationOSTypeEnumToString(os citrixorchestration.OsType) string
- func PanicHandler(diagnostics *diag.Diagnostics)
- func ParseDiskEncryptionSetIdToNameAndResourceGroup(desId string) (string, string)
- func ParseMasterImageToUpdateAzureImageSpecs(ctx context.Context, diagnostics *diag.Diagnostics, resourceType string, ...) (types.String, types.String, types.String, types.Object, types.String, ...)
- func ParseMasterImageToUpdateGalleryImageModel(ctx context.Context, diagnostics *diag.Diagnostics, galleryImage types.Object, ...) (types.Object, types.String, types.String)
- func ParseNameValueStringPairToClientModel(stringPairs []NameValueStringPairModel) []citrixorchestration.NameValueStringPairModel
- func ParseNetworkMappingToClientModel(networkMappings []NetworkMappingModel, ...) ([]citrixorchestration.NetworkMapRequestModel, error)
- func PollQcsTask(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (*citrixquickcreate.GetTaskAsync200Response, *http.Response, error)
- func ProcessAsyncJobResponse(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (err error)
- func ProcessTagsResponseCollection(diagnostics *diag.Diagnostics, ...) []string
- func QcsSessionSupportEnumToString(imageState quickcreateservice.SessionSupport) string
- func ReadClientError(err error) string
- func ReadGacError(err error) string
- func ReadQcsClientError(err error) string
- func ReadResource[ResponseType any](request any, ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (ResponseType, *http.Response, error)
- func RefreshList(state []string, remote []string) []string
- func RefreshListValueProperties[tfType RefreshableListItemWithAttributes[clientType], clientType any](ctx context.Context, diagnostics *diag.Diagnostics, state types.List, ...) types.List
- func RefreshListValues(ctx context.Context, diagnostics *diag.Diagnostics, state types.List, ...) types.List
- func RefreshTagSet(ctx context.Context, diagnostics *diag.Diagnostics, tags []string) types.Set
- func RefreshTenantSet(ctx context.Context, diagnostics *diag.Diagnostics, ...) types.Set
- func RefreshUsersList(ctx context.Context, diags *diag.Diagnostics, usersSet types.Set, ...) types.Set
- func ResourceAttributeMapFromObject(m ResourceModelWithAttributes) (map[string]attr.Type, error)
- func RunningModeEnumToString(os quickcreateservice.AwsEdcWorkspaceRunningMode) string
- func SessionSupportEnumToString(sessionSupport citrixorchestration.SessionSupport) string
- func StringArrayToStringList(ctx context.Context, diagnostics *diag.Diagnostics, v []string) types.List
- func StringArrayToStringSet(ctx context.Context, diagnostics *diag.Diagnostics, v []string) types.Set
- func StringListToStringArray(ctx context.Context, diagnostics *diag.Diagnostics, v types.List) []string
- func StringSetToStringArray(ctx context.Context, diagnostics *diag.Diagnostics, v types.Set) []string
- func StringToTypeBool(from string) types.Bool
- func TaskStateEnumToString(os quickcreateservice.TaskState) string
- func TypeBoolToString(from types.Bool) string
- func TypedArrayToObjectList[objTyp ResourceModelWithAttributes](ctx context.Context, diagnostics *diag.Diagnostics, v []objTyp) types.List
- func TypedArrayToObjectSet[objTyp ResourceModelWithAttributes](ctx context.Context, diagnostics *diag.Diagnostics, v []objTyp) types.Set
- func TypedObjectToObjectValue(ctx context.Context, diagnostics *diag.Diagnostics, ...) types.Object
- func ValidateHypervisorResource(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, ...) (bool, string)
- func ValidateMetadataConfig(ctx context.Context, diagnostics *diag.Diagnostics, ...) bool
- func VerifyIdentityUserListCompleteness(inputUserNames []string, ...) error
- func WaitForQcsDeploymentTaskWithDiags(ctx context.Context, diagnostics *diag.Diagnostics, ...) error
- type AzureDiskEncryptionSetModel
- func (AzureDiskEncryptionSetModel) GetAttributes() map[string]schema.Attribute
- func (AzureDiskEncryptionSetModel) GetDataSourceAttributes() map[string]dataSourceSchema.Attribute
- func (AzureDiskEncryptionSetModel) GetDataSourceSchema() dataSourceSchema.SingleNestedAttribute
- func (AzureDiskEncryptionSetModel) GetSchema() schema.SingleNestedAttribute
- type AzureMachineProfileModel
- func (AzureMachineProfileModel) GetAttributes() map[string]schema.Attribute
- func (AzureMachineProfileModel) GetDataSourceAttributes() map[string]dataSourceSchema.Attribute
- func (AzureMachineProfileModel) GetDataSourceSchema() dataSourceSchema.SingleNestedAttribute
- func (AzureMachineProfileModel) GetSchema() schema.SingleNestedAttribute
- type DataSourceModelWithAttributes
- type GalleryImageModel
- type HttpErrorBody
- type NameValueStringPairModel
- func (r NameValueStringPairModel) GetAttributes() map[string]schema.Attribute
- func (r NameValueStringPairModel) GetKey() string
- func (r NameValueStringPairModel) GetSchema() schema.NestedAttributeObject
- func (r NameValueStringPairModel) RefreshListItem(ctx context.Context, diag *diag.Diagnostics, ...) ResourceModelWithAttributes
- func (r NameValueStringPairModel) ValidateConfig(ctx context.Context, diagnostics *diag.Diagnostics, index int) bool
- type NetworkMappingModel
- func (NetworkMappingModel) GetAttributes() map[string]schema.Attribute
- func (n NetworkMappingModel) GetKey() string
- func (NetworkMappingModel) GetSchema() schema.NestedAttributeObject
- func (networkMapping NetworkMappingModel) RefreshListItem(_ context.Context, _ *diag.Diagnostics, ...) ResourceModelWithAttributes
- type RefreshableListItemWithAttributes
- type ResourceModelWithAttributes
Constants ¶
const AZURERM_FACTORY_NAME string = "AzureRmFactory"
const ActiveDirectorySidRegex string = `^S-1-[0-59]-\d{2}-\d{8,10}-\d{8,10}-\d{8,10}-[1-9]\d{2,}$`
Active Directory Sid
const AdminFolderPathSpecialCharactersRegex string = `^[^\/;:#.*?=<>|[\](){}"'\` + "`~]+$"
const AdminFolderPathWithBackslashRegex string = `^[^\\].*[^\\]$`
Admin Folder Path
const AdminUserMonitorAccessPolicySuffix = " - Access to 'Monitor' tab only"
CC Admin User
const AllScopeId string = "00000000-0000-0000-0000-000000000000"
ID of the All Scope
const AppCategoryPathRegex string = `^([a-zA-Z0-9 ]+\\)*[a-zA-Z0-9 ]+\\?$|^$`
Application Category Path
const AssignmentPriority = 0
GAC
const AwsAccessKeyIdRegex string = `^[\w]+$`
Aws Access Key Id Regex
const AwsAmiAndWsiRegex string = `^ami-[0-9a-f]{8,17}$|^wsi-[0-9a-z]{9,63}$`
const AwsAmiRegex string = `^ami-[0-9a-f]{8,17}$`
AWS Machine Image ID REGEX
const AwsDirectoryId = `^d-[a-zA-Z0-9]+$`
Aws Directory ID Regex
const AwsEc2InstanceTypeRegex string = `^[a-z0-9]{1,15}\.[a-z0-9]{1,15}$`
AWS EC2 Instance Type
const AwsNetworkNameRegex string = `^(\d{1,3}\.){3}\d{1,3}` + "`" + `/\d{1,3}\s\(vpc-.+\)\.network$`
AWS Network Name
const AwsRegionRegex string = `^[a-zA-Z0-9\-]+$`
Aws Region Regex
const AwsRoleArnRegex string = `^arn:aws(-us-gov)?:iam::[0-9]{12}:role\/[a-zA-Z0-9+=,.@\-_]{1,64}$`
AWS Role ARN Regex
const AwsSecurityGroupId = `^sg-[a-zA-Z0-9]+$`
Aws Security Group ID Regex
const AwsSubnetIdFormat = `^subnet-[a-zA-Z0-9]+$`
Aws Directory ID Regex
const AwsWsiRegex string = `^wsi-[0-9a-z]{9,63}$`
AWS Workspace Image ID REGEX
const AzureEphemeralOSDisk = "Azure_Ephemeral_OS_Disk"
const CitrixGatewayConnections = "Citrix Gateway connections"
const ComputerAccountRegex string = `^[a-zA-Z0-9\-_]{0,61}[a-zA-Z0-9]\\\w[\w\.\- ]+\$$`
SAM
const CtxManagedScopeId string = "f71a1148-7030-467a-a6d3-4a6bcf6a6532"
ID of the Citrix Managed Users Scope
const DateRegex string = `^\d{4}-\d{2}-\d{2}$`
Date YYYY-MM-DD
const DefaultQcsAwsWorkspacesOffPeakBufferSizePercent int64 = 0
const DefaultQcsAwsWorkspacesOffPeakDisconnectTimeoutMinutes int64 = 15
const DefaultQcsAwsWorkspacesOffPeakLogOffTimeoutMinutes int64 = 5
const DefaultQcsAwsWorkspacesSessionIdleTimeoutMinutes int64 = 15
Default QuickCreateService AWS Workspaces Scale Settings
const DefaultSitePolicySetId string = "00000000-0000-0000-0000-000000000000"
ID of the Default Site Policy Set
const DomainFqdnRegex string = `^(([a-zA-Z0-9-_]){1,63}\.)+[a-zA-Z]{2,63}$`
Domain FQDN
const EmailRegex string = `^[\w-\.]+@([\w-]+\.)+[\w-]+$`
Email REGEX
const GacAppName = "Workspace"
const GacCategoryNameRegex string = `^(root|[A-Z][a-z ]*)$`
GAC Category Name
const GacTestChannelName = "Test Rollout Channel 1"
const GacTestChannelShortName = "testrolloutchannel1"
const GuidRegex string = `^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$`
GUID
const HostResourceType = "Host"
const IPv4Regex string = `^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$`
IPv4
const IPv4RegexWithProtocol string = `^(http|https)://((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$`
IPv4 with https
const ImageVersionResourceType string = "ImageVersion"
const LowerCaseRegex string = `^[^A-Z]*$`
Lowercase Regex
const MetadataCitrixPrefix = "citrix_"
const MetadataHypervisorSecretExpirationDateName = "Citrix_Orchestration_Hypervisor_Secret_Expiration_Date"
const MetadataImageManagementPrepPrefix = "imagemanagementprep_"
const MetadataTaskDataPrefix = "taskdata_"
const MetadataTaskStatePrefix = "taskstate_"
const MetadataTerrafomValue = "Terraform"
const MetadataTerraformName = "ManagedBy"
const MissingProviderClientIdAndSecretErrorMsg = "client_id and client_secret fields must be set in the provider configuration to manage this resource via terraform."
const NOT_EXIST string = "NOT_EXIST"
NOT_EXIST error code
const NUTANIX_PLUGIN_ID string = "AcropolisFactory"
const NetworkResourceType string = "Network"
const NoPathRegex = `^[^\\/]*$`
Check if it does not contain path separator
const NonCitrixGatewayConnections = "Non-Citrix Gateway Connections"
const OktaDomainRegex string = `\.okta\.com$|\.okta-eu\.com$|\.oktapreview\.com$`
Okta Domain REGEX
const OuPathFormat string = `^OU=.+,DC=.+$`
OU Path
const Premium_LRS = "Premium_LRS"
const ProviderInitializationErrorMsg = "Provider initialization error"
const RegionResourceType string = "Region"
const ReplicaMaximum = "SharedImageGalleryReplicaMaximum"
const ReplicaRatio = "SharedImageGalleryReplicaRatio"
const SamAndUpnRegex string = `^[a-zA-Z][a-zA-Z0-9\-_]{0,61}[a-zA-Z0-9]\\\w[\w\.\- ]+$|^[^@]+@\b(([a-zA-Z0-9-_]){1,63}\.)+[a-zA-Z]{2,63}$`
const SamRegex string = `^[a-zA-Z][a-zA-Z0-9\-_]{0,61}[a-zA-Z0-9]\\\w[\w\.\- ]+$`
SAM
const SamlIdpCertRegex string = `\.[Pp][Ee][Mm]$|\.[Cc][Rr][Tt]$|\.[Cc][Ee][Rr]$`
SAML 2.0 Identity Provider Certificate REGEX
const SecurityGroupResourceType = "SecurityGroup"
const SensitiveFieldMaskedValue = "*****"
const ServiceOfferingResourceType string = "ServiceOffering"
Resource Types
const SnapshotResourceType string = "Snapshot"
const SslThumbprintRegex string = `^([0-9a-fA-F]{40}|[0-9a-fA-F]{64})$`
SSL Thumbprint
const StandardLRS = "Standard_LRS"
Azure Storage Types
const StandardSSDLRS = "StandardSSD_LRS"
const StorageResourceType string = "Storage"
const StoreFrontServerIdRegex string = `^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[0-9]+[}]?$`
GUID
const StringWithoutTrailingLeadingWhitespaceRegex string = `^\S(.*\S)?$`
String REGEX without trailing and leading whitespace
const TemplateResourceType string = "Template"
const TimeRegex string = `^([0-1][0-9]|2[0-3]):[0-5][0-9]$`
Time HH:MM
const TimeSpanRegex string = `^(\d+)\.((\d)|(1\d)|(2[0-3])):((\d)|[1-5][0-9]):((\d)|[1-5][0-9])$`
TimeSpan dd.HH:MM:SS
const UpnRegex string = `^[^@]+@\b(([a-zA-Z0-9-_]){1,63}\.)+[a-zA-Z]{2,63}$`
UPN
const UrlValidator string = `^https?://.*\/$`
Url Ending Forward Slash Regex
const UsernameForDecoupledWorkspaces string = "[UNDEFINED]"
Username for decoupled workspaces
const VhdResourceType string = "Vhd"
const VirtualMachineResourceType string = "Vm"
const VirtualPrivateCloudResourceType string = "VirtualPrivateCloud"
const WindowsClientLicenseType string = "Windows_Client"
Azure License Types
const WindowsServerLicenseType string = "Windows_Server"
Variables ¶
var PlatformSettingsAssignedTo = []string{"AllUsersNoAuthentication"}
var RestrictedPermissionsInCloud = map[string]bool{ "Admin_FullControl": true, "C365_EA_Acct": true, "C365_EA_Broker": true, "C365_EA_Hyp": true, "C365_EA_Prov": true, "Configuration_Read": true, "Configuration_Unrestricted_Write": true, "Controller_EditProperties": true, "Controllers_Remove": true, "Database_Read": true, "Director_Admin": true, "EA_Acct": true, "EA_Broker": true, "EA_Hyp": true, "EA_Prov": true, "EdgeService_Admin": true, "Licensing_ChangeLicenseServer": true, "Licensing_EditLicensingProperties": true, "Licensing_Read ": true, "Logging_Delete": true, "Orchestration_RestApi": true, "Paladin_Admin": true, "PerformUpgrade": true, "PVS_Admin": true, "Trust_ServiceKeys": true, }
Restricted permissions in the cloud
Functions ¶
func AppendNameValueStringPair ¶
func AppendNameValueStringPair(stringPairs *[]citrixorchestration.NameValueStringPairModel, name string, appendValue string)
<summary> Helper function to append new name value pairs to an array of NameValueStringPairModel in place </summary> <param name="stringPairs">Original string pair array to append to</param> <param name="name">Name of the new string pair to be added</param> <param name="appendValue">Value of the new string pair to be added</param>
func AppendTerraformMetadataInfo ¶ added in v1.0.3
func AppendTerraformMetadataInfo(stringPairs *[]citrixorchestration.NameValueStringPairModel)
func AwsEdcWorkspaceImageIngestionProcessEnumToString ¶ added in v1.0.0
func AwsEdcWorkspaceImageIngestionProcessEnumToString(ingestionProcess quickcreateservice.AwsEdcWorkspaceImageIngestionProcess) string
func AwsEdcWorkspaceImageStateEnumToString ¶ added in v1.0.0
func AwsEdcWorkspaceImageStateEnumToString(imageState quickcreateservice.AwsEdcWorkspaceImageState) string
func AwsEdcWorkspaceImageTenancyEnumToString ¶ added in v1.0.0
func AwsEdcWorkspaceImageTenancyEnumToString(imageTenancy quickcreateservice.AwsEdcWorkspaceImageTenancy) string
func BuildAzureMasterImagePath ¶ added in v1.0.8
func BuildAzureMasterImagePath(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, galleryImage types.Object, sharedSubscription string, resourceGroup string, storageAccount string, storageContainer string, masterImage string, hypervisor string, hypervisorResourcePool string, errorTitle string) (string, error)
func BuildResourcePathForGetRequest ¶ added in v1.0.7
func CategorizeScopes ¶ added in v1.0.4
func CategorizeScopes(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, scopeResponses []citrixorchestration.ScopeResponseModel, parentObjectType citrixorchestration.ScopedObjectType, parentObjectIds []string, scopeIdsInPlan []string) ([]string, []string, []string, error)
func CheckIfFieldIsSensitive ¶ added in v0.6.2
func CheckProductVersion ¶ added in v0.6.0
func CheckProductVersion(client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, requiredCloudOrchestrationApiVersion int32, requiredOnPremOrchestrationApiVersion int32, requiredProductMajorVersion int, requiredProductMinorVersion int, errorSummary, feature string) bool
<summary> Helper function to check the version requirement for DDC. </summary>
func CheckStoreFrontVersion ¶ added in v0.6.2
func CheckStoreFrontVersion(client *citrixstorefrontclient.STFVersion, ctx context.Context, diagnostic *diag.Diagnostics, requiredMajorVersion int, requiredMinorVersion int) bool
<summary> Helper function to check the version requirement for StoreFront. </summary>
func ComputeTypeEnumToString ¶ added in v1.0.0
func ComputeTypeEnumToString(os quickcreateservice.AwsEdcWorkspaceCompute) string
func ConstructTagsRequestModel ¶ added in v1.0.4
func ConstructTagsRequestModel(ctx context.Context, diagnostics *diag.Diagnostics, tagSet types.Set) citrixorchestration.TagsRequestModel
func ConvertBaseStringArrayToPrimitiveStringArray ¶
<summary> Helper function to convert array of terraform strings to array of golang primitive strings Deprecated: Remove after we fully move to types.List </summary> <param name="v">Array of terraform stringsArray of golang primitive strings</param> <returns>Array of golang primitive strings</returns>
func ConvertPrimitiveInterfaceArrayToStringList ¶ added in v0.6.2
func ConvertPrimitiveInterfaceArrayToStringList(ctx context.Context, diagnostics *diag.Diagnostics, v []interface{}) (types.List, string)
<summary> Helper function to convert array of golang primitive interface to native terraform list of strings </summary> <param name="v">Array of golang primitive interface</param> <returns>Terraform list of strings</returns>
func ConvertToString ¶ added in v0.3.4
<summary> Helper function to serialize any struct value into a string </summary> <param name="model">Input struct value</param> <returns>Serialized string value of the struct</returns>
func DataSourceAttributeMapFromObject ¶ added in v1.0.7
func DataSourceAttributeMapFromObject(m DataSourceModelWithAttributes) (map[string]attr.Type, error)
<summary> Helper function to convert a data source model to a map of attribute types. Used when converting back to a types.Object </summary> <param name="m">Model to convert, must implement the DataSourceModelWithSchema interface</param> <returns>Map of attribute types</returns>
func DataSourceTypedArrayToObjectList ¶ added in v1.0.7
func DataSourceTypedArrayToObjectList[objTyp DataSourceModelWithAttributes](ctx context.Context, diagnostics *diag.Diagnostics, v []objTyp) types.List
<summary> Helper function to convert a golang slice to a native terraform list of objects. Use ObjectListToTypedArray to go the other way. </summary> <param name="diagnostics">Any issues will be appended to these diagnostics</param> <param name="v">Slice of objects</param> <returns>types.List</returns>
func DataSourceTypedArrayToObjectSet ¶ added in v1.0.7
func DataSourceTypedArrayToObjectSet[objTyp DataSourceModelWithAttributes](ctx context.Context, diagnostics *diag.Diagnostics, v []objTyp) types.Set
<summary> Helper function to convert a golang slice to a native terraform list of objects. Use ObjectSetToTypedArray to go the other way. </summary> <param name="diagnostics">Any issues will be appended to these diagnostics</param> <param name="v">Slice of objects</param> <returns>types.Set</returns>
func DataSourceTypedObjectToObjectValue ¶ added in v1.0.7
func DataSourceTypedObjectToObjectValue(ctx context.Context, diagnostics *diag.Diagnostics, v DataSourceModelWithAttributes) types.Object
<summary> Helper function to convert a golang object to a native terraform object. Use ObjectValueToTypedObject to go the other way. </summary> <param name="ctx">"context</param> <param name="diagnostics">Any issues will be appended to these diagnostics</param> <param name="v">Object of the specified type</param> <param name="s">Schema map of the object</param> <returns>Object in the native terraform types.Object wrapper</returns>
func FetchScopeIdsByNames ¶ added in v0.6.1
func FetchScopeIdsByNames(ctx context.Context, diagnostics diag.Diagnostics, client *citrixdaasclient.CitrixDaasClient, scopeNames []string) ([]string, error)
<summary> Helper function to fetch scope ids from scope names </summary>
func FetchScopeNamesByIds ¶ added in v0.6.1
func FetchScopeNamesByIds(ctx context.Context, diagnostics diag.Diagnostics, client *citrixdaasclient.CitrixDaasClient, scopeIds []string) ([]string, error)
<summary> Helper function to fetch scope names from scope ids </summary>
func GetAllResourcePathList ¶
func GetAllResourcePathList(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, hypervisorId, folderPath, resourceType string) []string
func GetAllScopedObjects ¶ added in v1.0.4
func GetAllScopedObjects(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, scopeNameOrId string, continuationToken string) ([]citrixorchestration.ScopedObjectResponseModel, error)
func GetAllowedFunctionalLevelValues ¶ added in v0.6.0
func GetAllowedFunctionalLevelValues() []string
<summary> Helper function to get the allowed functional level values for setting the minimum functional level for machine catalog and deliver group. </summary>
func GetApplicationGroupIdWithPath ¶ added in v1.0.4
func GetApplicationGroupIdWithPath(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, appGroupPath string) (string, error)
func GetAsyncJobResult ¶ added in v1.0.3
func GetAsyncJobResult[ResponseType any](ctx context.Context, client *citrixdaasclient.CitrixDaasClient, jobResp *http.Response, errContext string, diagnostics *diag.Diagnostics, maxTimeout int, returnJobError bool) (ResponseType, error)
<summary> Helper function to process async job response. Takes async job response and polls for result. </summary> <param name="ctx">Context from caller</param> <param name="client">Citrix DaaS client from provider context</param> <param name="jobResp">Job response from async API call</param> <param name="errContext">Context of the job to be use as Terraform diagnostic error message title</param> <param name="diagnostics">Terraform diagnostics from context</param> <param name="maxTimeout">Maximum timeout threashold for job status polling</param> <returns>Error if job polling failed or job itself ended in failed state</returns>
func GetAttributeValues ¶ added in v0.6.2
func GetCCAdminAccessPolicyNameKey ¶ added in v1.0.3
func GetCCAdminAccessPolicyNameKey(r ccadmins.AdministratorAccessPolicyModel) string
func GetConfigValuesForMap ¶ added in v0.6.2
func GetConfigValuesForObject ¶ added in v0.6.2
func GetConfigValuesForSchema ¶ added in v0.6.2
func GetConfigValuesForSchema(ctx context.Context, diags *diag.Diagnostics, m ResourceModelWithAttributes) (string, map[string]interface{})
func GetDeliveryGroup ¶ added in v1.0.8
func GetDeliveryGroup(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, deliveryGroupId string) (*citrixorchestration.DeliveryGroupDetailResponseModel, error)
func GetDeliveryGroupIdWithPath ¶ added in v1.0.4
func GetDeliveryGroupIdWithPath(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, deliveryGroupPath string) (string, error)
func GetDeliveryGroupMachines ¶ added in v1.0.8
func GetDeliveryGroupMachines(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, deliveryGroupId string) ([]citrixorchestration.MachineResponseModel, error)
func GetDeliveryGroups ¶ added in v1.0.8
func GetDeliveryGroups(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, fields string) ([]citrixorchestration.DeliveryGroupResponseModel, error)
func GetEffectiveMetadata ¶ added in v1.0.3
func GetEffectiveMetadata(stateMetadata []NameValueStringPairModel, remoteMetadata []citrixorchestration.NameValueStringPairModel) []citrixorchestration.NameValueStringPairModel
/ <summary> / Helper function to include only metadata that are a part of the state / </summary>
func GetFilteredResourcePathList ¶
func GetFilteredResourcePathList(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, hypervisorId, folderPath, resourceType string, filter []string, connectionType citrixorchestration.HypervisorConnectionType, pluginId string) ([]string, error)
func GetHypervisor ¶ added in v0.3.6
func GetHypervisor(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, hypervisorId string) (*citrixorchestration.HypervisorDetailResponseModel, error)
Gets the hypervisor and logs any errors
func GetHypervisorResourcePool ¶ added in v0.3.6
func GetHypervisorResourcePool(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, hypervisorId, hypervisorResourcePoolId string) (*citrixorchestration.HypervisorResourcePoolDetailResponseModel, error)
func GetIdsForFilteredScopeObjects ¶ added in v1.0.3
func GetIdsForFilteredScopeObjects(scopeIdsInState []string, scopeResponses []citrixorchestration.ScopeResponseModel) []string
<summary> Filter and Extract Ids from a list of scope responses </summary> <param name="scopeIdsInState">List of scope Ids in state or config</param> <param name="scopeResponses">List of scope objects from remote</param> <returns>List of Ids extracted from response</returns>
func GetIdsForOrchestrationObjects ¶ added in v0.6.1
<summary> Extract Ids from a list of objects </summary> <param name="slice">Input list of objects</param> <returns>List of Ids extracted from input list</returns>
func GetIdsForScopeObjects ¶ added in v0.6.1
<summary> Extract Ids from a list of scope objects </summary> <param name="slice">Input list of objects</param> <returns>List of Ids extracted from input list</returns>
func GetMachineAdAccountKey ¶ added in v1.0.8
func GetMachineAdAccountKey(r citrixorchestration.ProvisioningSchemeMachineAccountResponseModel) string
func GetMachineCatalog ¶ added in v0.3.6
func GetMachineCatalog(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, machineCatalogId string, addErrorToDiagnostics bool) (*citrixorchestration.MachineCatalogDetailResponseModel, error)
func GetMachineCatalogIdWithPath ¶ added in v1.0.4
func GetMachineCatalogIdWithPath(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, machineCatalogPath string) (string, error)
func GetMachineCatalogMachines ¶ added in v0.3.6
func GetMachineCatalogMachines(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, machineCatalogId string) ([]citrixorchestration.MachineResponseModel, error)
func GetMetadataListSchema ¶ added in v1.0.3
func GetMetadataListSchema(resource string) schema.ListNestedAttribute
func GetMetadataRequestModel ¶ added in v1.0.3
func GetMetadataRequestModel(ctx context.Context, diagnostics *diag.Diagnostics, planMetadata []NameValueStringPairModel) []citrixorchestration.NameValueStringPairModel
func GetOrchestrationAccessPolicyKey ¶ added in v1.0.1
func GetOrchestrationAccessPolicyKey(remote citrixorchestration.AdvancedAccessPolicyResponseModel) string
func GetOrchestrationDesktopKey ¶ added in v0.6.1
func GetOrchestrationDesktopKey(r citrixorchestration.DesktopResponseModel) string
func GetOrchestrationHypervisorStorageKey ¶ added in v0.6.1
func GetOrchestrationHypervisorStorageKey(remote citrixorchestration.HypervisorStorageResourceResponseModel) string
func GetOrchestrationNameValueStringPairKey ¶ added in v1.0.3
func GetOrchestrationNameValueStringPairKey(remote citrixorchestration.NameValueStringPairModel) string
func GetOrchestrationNetworkMappingKey ¶ added in v0.6.1
func GetOrchestrationNetworkMappingKey(remote citrixorchestration.NetworkMapResponseModel) string
func GetOrchestrationRebootScheduleKey ¶ added in v0.6.1
func GetOrchestrationRebootScheduleKey(r citrixorchestration.RebootScheduleResponseModel) string
These functions are used by RefreshListProperties
func GetOrchestrationRemotePcOuKey ¶ added in v0.6.1
func GetOrchestrationRemotePcOuKey(remote citrixorchestration.RemotePCEnrollmentScopeResponseModel) string
func GetOrchestrationSmartAccessTagKey ¶ added in v1.0.1
func GetOrchestrationSmartAccessTagKey(remote citrixorchestration.SmartAccessTagResponseModel) string
func GetProductMajorAndMinorVersion ¶ added in v0.6.3
func GetProductMajorAndMinorVersion(client *citrixdaasclient.CitrixDaasClient) (int, int, error)
func GetQcsAwsWorkspacesWithUsernameKey ¶ added in v1.0.0
func GetQcsAwsWorkspacesWithUsernameKey(remote citrixquickcreate.AwsEdcDeploymentMachine) string
func GetSTFFarmSetKey ¶ added in v0.6.1
func GetSTFFarmSetKey(remote citrixstorefront.STFFarmSetResponseModel) string
func GetSTFGroupMemberKey ¶ added in v0.6.1
func GetSTFGroupMemberKey(remote citrixstorefront.STFGroupMemberResponseModel) string
func GetSTFRoamingGatewayKey ¶ added in v1.0.3
func GetSTFRoamingGatewayKey(remote citrixstorefront.STFRoamingGatewayResponseModel) string
func GetSTFSTAUrlKey ¶ added in v1.0.3
func GetSTFSTAUrlKey(remote citrixstorefront.STFSTAUrlModel) string
func GetSensitiveFieldsForAttribute ¶ added in v0.6.2
func GetSingleHypervisorResource ¶ added in v0.3.6
func GetSingleHypervisorResource(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, hypervisorId, folderPath, resourceName, resourceType, resourceGroupName string, hypervisor *citrixorchestration.HypervisorDetailResponseModel) (*citrixorchestration.HypervisorResourceResponseModel, *http.Response, error)
func GetSingleResourceFromHypervisor ¶ added in v0.5.3
func GetSingleResourceFromHypervisor(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, hypervisorName, hypervisorPoolName, folderPath, resourceName, resourceType, resourceGroupName string) (*citrixorchestration.HypervisorResourceResponseModel, *http.Response, error)
func GetSingleResourcePathFromHypervisor ¶
func GetSingleResourcePathFromHypervisor(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, hypervisorName, hypervisorPoolName, folderPath, resourceName, resourceType, resourceGroupName string) (string, *http.Response, error)
func GetUpdatedMetadataRequestModel ¶ added in v1.0.5
func GetUpdatedMetadataRequestModel(ctx context.Context, diagnostics *diag.Diagnostics, stateMetadata []NameValueStringPairModel, planMetadata []NameValueStringPairModel) []citrixorchestration.NameValueStringPairModel
<summary> Helper function to delete metadata that is not a part of the plan. The value of the metadata is set to empty string to delete the KVP from the remote. (STUD-31858) </summary>
func GetUserIdsUsingIdentity ¶ added in v0.6.1
func GetUserIdsUsingIdentity(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, users []string) ([]string, *http.Response, error)
func GetUsersUsingIdentity ¶ added in v0.6.1
func GetUsersUsingIdentity(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, users []string) ([]citrixorchestration.IdentityUserResponseModel, *http.Response, error)
func GetValidatorFromEnum ¶
<summary> Helper function for generating string validator for an enum value in Terraform schema. Only works when all eligible values for the enum type are supported by provider. When the eligible values are only partially supported, use custom string validator in schema. </summary> <param name="enum">Enum from citrix-daas-rest-go package</param> <returns>String validator for terraform schema</returns>
func HandleMachineProfileForAzureMcsPvsCatalog ¶ added in v1.0.8
func HandleMachineProfileForAzureMcsPvsCatalog(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diag *diag.Diagnostics, hypervisorName string, resourcePoolName string, machineProfile AzureMachineProfileModel, errorTitle string) (string, error)
func IsScopeInherited ¶ added in v1.0.4
func IsScopeInherited(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, scopeNameOrId string, parentObjectType citrixorchestration.ScopedObjectType, parentObjectIds []string) (bool, error)
func IsValidUUID ¶
<summary> Helper function to validate if a string is a valid UUID </summary> <param name="u">String to validate</param> <returns>True if string is a valid UUID. False if otherwise.</returns>
func IsValidUUIDorNull ¶
func IsValidUUIDorNull(u basetypes.StringValue) bool
<summary> Helper function to validate if a string is a valid UUID or null </summary> <param name="u">String to validate</param> <returns>True if string is a valid UUID, or is null. False if otherwise.</returns>
func ObjectListToTypedArray ¶ added in v0.6.1
func ObjectListToTypedArray[objTyp any](ctx context.Context, diagnostics *diag.Diagnostics, v types.List) []objTyp
<summary> Helper function to convert a native terraform list of objects to a golang slice of the specified type Use TypedArrayToObjectList to go the other way. </summary> <param name="ctx">context</param> <param name="diagnostics">Any issues will be appended to these diagnostics</param> <param name="v">List of object in the native terraform types.List wrapper</param> <returns>Array of the specified type</returns>
func ObjectSetToTypedArray ¶ added in v0.6.2
func ObjectSetToTypedArray[objTyp any](ctx context.Context, diagnostics *diag.Diagnostics, v types.Set) []objTyp
<summary> Helper function to convert a native terraform list of objects to a golang slice of the specified type Use TypedArrayToObjectSet to go the other way. </summary> <param name="ctx">context</param> <param name="diagnostics">Any issues will be appended to these diagnostics</param> <param name="v">Set of object in the native terraform types.Set wrapper</param> <returns>Array of the specified type</returns>
func ObjectValueToTypedObject ¶ added in v0.6.1
func ObjectValueToTypedObject[objTyp any](ctx context.Context, diagnostics *diag.Diagnostics, v types.Object) objTyp
<summary> Helper function to convert a native terraform object to a golang object of the specified type. Use TypedObjectToObjectValue to go the other way. </summary> <param name="ctx">context</param> <param name="diagnostics">Any issues will be appended to these diagnostics</param> <param name="v">Object in the native terraform types.Object wrapper</param> <returns>Object of the specified type</returns>
func OperatingSystemTypeEnumToString ¶ added in v1.0.0
func OperatingSystemTypeEnumToString(os quickcreateservice.OperatingSystemType) string
func OrchestrationOSTypeEnumToString ¶ added in v1.0.8
func OrchestrationOSTypeEnumToString(os citrixorchestration.OsType) string
func PanicHandler ¶ added in v0.3.6
func PanicHandler(diagnostics *diag.Diagnostics)
<summary> Global panic handler to catch all unexpected errors to prevent provider from crashing. Writes crash stack into local txt file for troubleshooting, and displays error message in Terraform Diagnostics. </summary> <param name="diagnostics">Terraform Diagnostics from context</param>
func ParseDiskEncryptionSetIdToNameAndResourceGroup ¶ added in v1.0.9
func ParseMasterImageToUpdateAzureImageSpecs ¶ added in v1.0.8
func ParseMasterImageToUpdateAzureImageSpecs(ctx context.Context, diagnostics *diag.Diagnostics, resourceType string, masterImage citrixorchestration.HypervisorResourceRefResponseModel, masterImageSegments []string, masterImageLastIndex int) (types.String, types.String, types.String, types.Object, types.String, types.String)
func ParseMasterImageToUpdateGalleryImageModel ¶ added in v1.0.8
func ParseNameValueStringPairToClientModel ¶
func ParseNameValueStringPairToClientModel(stringPairs []NameValueStringPairModel) []citrixorchestration.NameValueStringPairModel
<summary> Helper function to parse an array of name value pairs in terraform model to an array of name value pairs in client model </summary> <param name="stringPairs">Original string pair array in terraform model</param> <returns>String pair array in client model</returns>
func ParseNetworkMappingToClientModel ¶ added in v1.0.8
func ParseNetworkMappingToClientModel(networkMappings []NetworkMappingModel, resourcePool *citrixorchestration.HypervisorResourcePoolDetailResponseModel, hypervisorPluginId string) ([]citrixorchestration.NetworkMapRequestModel, error)
func PollQcsTask ¶ added in v1.0.0
func PollQcsTask(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, diagnostics *diag.Diagnostics, taskId string, pollIntervalSeconds int, maxWaitTimeSeconds int) (*citrixquickcreate.GetTaskAsync200Response, *http.Response, error)
<summary> Helper function to poll the task until either the task completed or error out or timed out. </summary>
func ProcessAsyncJobResponse ¶ added in v0.3.6
func ProcessAsyncJobResponse(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, jobResp *http.Response, errContext string, diagnostics *diag.Diagnostics, maxTimeout int, returnJobError bool) (err error)
<summary> Helper function to process async job response. Takes async job response and polls for result. </summary> <param name="ctx">Context from caller</param> <param name="client">Citrix DaaS client from provider context</param> <param name="jobResp">Job response from async API call</param> <param name="errContext">Context of the job to be use as Terraform diagnostic error message title</param> <param name="diagnostics">Terraform diagnostics from context</param> <param name="maxTimeout">Maximum timeout threashold for job status polling</param> <returns>Error if job polling failed or job itself ended in failed state</returns>
func ProcessTagsResponseCollection ¶ added in v1.0.4
func ProcessTagsResponseCollection(diagnostics *diag.Diagnostics, tagsResp *citrixorchestration.TagResponseModelCollection, httpResp *http.Response, err error, resourceType string, resourceId string) []string
func QcsSessionSupportEnumToString ¶ added in v1.0.8
func QcsSessionSupportEnumToString(imageState quickcreateservice.SessionSupport) string
func ReadClientError ¶
<summary> Helper function to read inner error message from a generic error returned from citrix-daas-rest-go </summary> <param name="err">Generic error returned from citrix-daas-rest-go</param> <returns>Inner error message</returns>
func ReadGacError ¶ added in v1.0.4
func ReadQcsClientError ¶ added in v1.0.0
func ReadResource ¶ added in v0.3.3
func ReadResource[ResponseType any](request any, ctx context.Context, client *citrixdaasclient.CitrixDaasClient, resp *resource.ReadResponse, resourceType, resourceIdOrName string) (ResponseType, *http.Response, error)
<summary> Wrapper function for reading specific resource from remote with retries </summary> <param name="request">Request object for the GET call</param> <param name="ctx">Context from caller</param> <param name="client">Citrix DaaS client from provider context</param> <param name="resp">Response from the GET call</param> <param name="resourceType">Resource type that would be shown in error message if failed to read resource</param> <param name="resourceIdOrName">Resource ID or name that would be shown in error message if failed to read resource</param> <returns>Response of the Get call. Raw http response. Error if failed to read the resource.</returns>
func RefreshList ¶ added in v0.4.0
<summary> Helper function for calculating the new state of a list of strings, while keeping the order of the elements in the array intact, and adds missing elements from remote to state. Can be used for refreshing list of strings. </summary> <param name="state">List of values in state</param> <param name="remote">List of values in remote</param>
func RefreshListValueProperties ¶ added in v0.6.1
func RefreshListValueProperties[tfType RefreshableListItemWithAttributes[clientType], clientType any](ctx context.Context, diagnostics *diag.Diagnostics, state types.List, remote []clientType, getClientKey func(clientType) string) types.List
<summary> Helper function for calculating the new state of a list of nested attribute, while keeping the order of the elements in the array intact, and adds missing elements from remote to state. Can be used for refreshing all list nested attributes. </summary> <param name="state">State values in Terraform model</param> <param name="remote">Remote values in client model</param> <param name="getClientKey">Function to get the Id from the client model</param> <returns>Terraform list for new state</returns>
func RefreshListValues ¶ added in v0.6.1
func RefreshListValues(ctx context.Context, diagnostics *diag.Diagnostics, state types.List, remote []string) types.List
<summary> Helper function for calculating the new state of a list of strings, while keeping the order of the elements in the array intact, and adds missing elements from remote to state. Can be used for refreshing all list of strings. </summary> <param name="state">State values in Terraform model</param> <param name="remote">Remote values in client model</param> <returns>Array in Terraform model for new state</returns>
func RefreshTagSet ¶ added in v1.0.4
func RefreshTenantSet ¶ added in v1.0.4
func RefreshTenantSet(ctx context.Context, diagnostics *diag.Diagnostics, tenants []citrixorchestration.RefResponseModel) types.Set
func RefreshUsersList ¶ added in v0.6.1
func RefreshUsersList(ctx context.Context, diags *diag.Diagnostics, usersSet types.Set, usersInRemote []citrixorchestration.IdentityUserResponseModel) types.Set
</summary> Helper function to refresh user list. </summary>
func ResourceAttributeMapFromObject ¶ added in v1.0.7
func ResourceAttributeMapFromObject(m ResourceModelWithAttributes) (map[string]attr.Type, error)
<summary> Helper function to convert a resource model to a map of attribute types. Used when converting back to a types.Object </summary> <param name="m">Model to convert, must implement the ResourceModelWithSchema interface</param> <returns>Map of attribute types</returns>
func RunningModeEnumToString ¶ added in v1.0.0
func RunningModeEnumToString(os quickcreateservice.AwsEdcWorkspaceRunningMode) string
func SessionSupportEnumToString ¶ added in v1.0.0
func SessionSupportEnumToString(sessionSupport citrixorchestration.SessionSupport) string
func StringArrayToStringList ¶ added in v0.6.1
func StringArrayToStringList(ctx context.Context, diagnostics *diag.Diagnostics, v []string) types.List
<summary> Helper function to convert a golang slice of string to a native terraform list of strings. Use StringListToStringArray to go the other way. </summary> <param name="diagnostics">Any issues will be appended to these diagnostics</param> <param name="v">Slice of strings</param> <returns>types.List</returns>
func StringArrayToStringSet ¶ added in v0.6.1
func StringArrayToStringSet(ctx context.Context, diagnostics *diag.Diagnostics, v []string) types.Set
<summary> Helper function to convert a golang slice of string to a native terraform set of strings. Use StringSetToStringArray to go the other way. </summary> <param name="diagnostics">Any issues will be appended to these diagnostics</param> <param name="v">Slice of strings</param> <returns>types.Set</returns>
func StringListToStringArray ¶ added in v0.6.1
func StringListToStringArray(ctx context.Context, diagnostics *diag.Diagnostics, v types.List) []string
<summary> Helper function to convert a terraform list of terraform strings to array of golang primitive strings. Use StringArrayToStringList to go the other way. </summary> <param name="v">List of terraform strings</param> <returns>Array of golang primitive strings</returns>
func StringSetToStringArray ¶ added in v0.6.1
func StringSetToStringArray(ctx context.Context, diagnostics *diag.Diagnostics, v types.Set) []string
<summary> Helper function to convert a terraform set of terraform strings to array of golang primitive strings. Use StringArrayToStringSet to go the other way. </summary> <param name="v">Set of terraform strings</param> <returns>Array of golang primitive strings</returns>
func StringToTypeBool ¶
<summary> Helper function to convert string to terraform boolean value </summary> <param name="from">Boolean value in string</param> <returns>Boolean value in terraform types.Bool</returns>
func TaskStateEnumToString ¶ added in v1.0.0
func TaskStateEnumToString(os quickcreateservice.TaskState) string
func TypeBoolToString ¶
<summary> Helper function to convert terraform bool value to string </summary> <param name="from">Boolean value in terraform bool</param> <returns>Boolean value in string</returns>
func TypedArrayToObjectList ¶ added in v0.6.1
func TypedArrayToObjectList[objTyp ResourceModelWithAttributes](ctx context.Context, diagnostics *diag.Diagnostics, v []objTyp) types.List
<summary> Helper function to convert a golang slice to a native terraform list of objects. Use ObjectListToTypedArray to go the other way. </summary> <param name="diagnostics">Any issues will be appended to these diagnostics</param> <param name="v">Slice of objects</param> <returns>types.List</returns>
func TypedArrayToObjectSet ¶ added in v0.6.2
func TypedArrayToObjectSet[objTyp ResourceModelWithAttributes](ctx context.Context, diagnostics *diag.Diagnostics, v []objTyp) types.Set
<summary> Helper function to convert a golang slice to a native terraform list of objects. Use ObjectSetToTypedArray to go the other way. </summary> <param name="diagnostics">Any issues will be appended to these diagnostics</param> <param name="v">Slice of objects</param> <returns>types.Set</returns>
func TypedObjectToObjectValue ¶ added in v0.6.1
func TypedObjectToObjectValue(ctx context.Context, diagnostics *diag.Diagnostics, v ResourceModelWithAttributes) types.Object
<summary> Helper function to convert a golang object to a native terraform object. Use ObjectValueToTypedObject to go the other way. </summary> <param name="ctx">"context</param> <param name="diagnostics">Any issues will be appended to these diagnostics</param> <param name="v">Object of the specified type</param> <param name="s">Schema map of the object</param> <returns>Object in the native terraform types.Object wrapper</returns>
func ValidateHypervisorResource ¶ added in v0.6.0
func ValidateHypervisorResource(ctx context.Context, client *citrixdaasclient.CitrixDaasClient, hypervisorName string, hypervisorPoolName string, resourcePath string) (bool, string)
func ValidateMetadataConfig ¶ added in v1.0.3
func ValidateMetadataConfig(ctx context.Context, diagnostics *diag.Diagnostics, metadata []NameValueStringPairModel) bool
func VerifyIdentityUserListCompleteness ¶ added in v0.6.1
func VerifyIdentityUserListCompleteness(inputUserNames []string, remoteUsers []citrixorchestration.IdentityUserResponseModel) error
func WaitForQcsDeploymentTaskWithDiags ¶ added in v1.0.0
func WaitForQcsDeploymentTaskWithDiags(ctx context.Context, diagnostics *diag.Diagnostics, client *citrixdaasclient.CitrixDaasClient, maxWaitTimeInSeconds int, taskId string, taskName, deploymentName string, errorContext string) error
Types ¶
type AzureDiskEncryptionSetModel ¶ added in v1.0.8
type AzureDiskEncryptionSetModel struct { DiskEncryptionSetName types.String `tfsdk:"disk_encryption_set_name"` DiskEncryptionSetResourceGroup types.String `tfsdk:"disk_encryption_set_resource_group"` }
func RefreshDiskEncryptionSetModel ¶ added in v1.0.8
func RefreshDiskEncryptionSetModel(diskEncryptionSetModelToRefresh AzureDiskEncryptionSetModel, desId string) AzureDiskEncryptionSetModel
func (AzureDiskEncryptionSetModel) GetAttributes ¶ added in v1.0.8
func (AzureDiskEncryptionSetModel) GetAttributes() map[string]schema.Attribute
func (AzureDiskEncryptionSetModel) GetDataSourceAttributes ¶ added in v1.0.9
func (AzureDiskEncryptionSetModel) GetDataSourceAttributes() map[string]dataSourceSchema.Attribute
func (AzureDiskEncryptionSetModel) GetDataSourceSchema ¶ added in v1.0.9
func (AzureDiskEncryptionSetModel) GetDataSourceSchema() dataSourceSchema.SingleNestedAttribute
func (AzureDiskEncryptionSetModel) GetSchema ¶ added in v1.0.8
func (AzureDiskEncryptionSetModel) GetSchema() schema.SingleNestedAttribute
type AzureMachineProfileModel ¶ added in v1.0.8
type AzureMachineProfileModel struct { MachineProfileVmName types.String `tfsdk:"machine_profile_vm_name"` MachineProfileTemplateSpecName types.String `tfsdk:"machine_profile_template_spec_name"` MachineProfileTemplateSpecVersion types.String `tfsdk:"machine_profile_template_spec_version"` MachineProfileResourceGroup types.String `tfsdk:"machine_profile_resource_group"` }
Azure Machine Profile Model
func ParseAzureMachineProfileResponseToModel ¶ added in v1.0.8
func ParseAzureMachineProfileResponseToModel(machineProfileResponse citrixorchestration.HypervisorResourceRefResponseModel) *AzureMachineProfileModel
func (AzureMachineProfileModel) GetAttributes ¶ added in v1.0.8
func (AzureMachineProfileModel) GetAttributes() map[string]schema.Attribute
func (AzureMachineProfileModel) GetDataSourceAttributes ¶ added in v1.0.9
func (AzureMachineProfileModel) GetDataSourceAttributes() map[string]dataSourceSchema.Attribute
func (AzureMachineProfileModel) GetDataSourceSchema ¶ added in v1.0.9
func (AzureMachineProfileModel) GetDataSourceSchema() dataSourceSchema.SingleNestedAttribute
func (AzureMachineProfileModel) GetSchema ¶ added in v1.0.8
func (AzureMachineProfileModel) GetSchema() schema.SingleNestedAttribute
type DataSourceModelWithAttributes ¶ added in v1.0.7
type DataSourceModelWithAttributes interface {
GetDataSourceAttributes() map[string]datasourceSchema.Attribute // workaround because NestedAttributeObject and SingleNestedAttribute do not share a base type
}
type GalleryImageModel ¶ added in v1.0.8
type GalleryImageModel struct { Gallery types.String `tfsdk:"gallery"` Definition types.String `tfsdk:"definition"` Version types.String `tfsdk:"version"` }
func (GalleryImageModel) GetAttributes ¶ added in v1.0.8
func (GalleryImageModel) GetAttributes() map[string]schema.Attribute
func (GalleryImageModel) GetSchema ¶ added in v1.0.8
func (GalleryImageModel) GetSchema() schema.SingleNestedAttribute
type HttpErrorBody ¶ added in v0.5.0
type NameValueStringPairModel ¶
type NameValueStringPairModel struct { Name types.String `tfsdk:"name"` Value types.String `tfsdk:"value"` }
Terraform model for name value string pair
func ParseNameValueStringPairToPluginModel ¶
func ParseNameValueStringPairToPluginModel(stringPairs []citrixorchestration.NameValueStringPairModel) []NameValueStringPairModel
<summary> Helper function to parse an array of name value pairs in client model to an array of name value pairs in terraform model </summary> <param name="stringPairs">Original string pair array in client model</param> <returns>String pair array in terraform model</returns>
func (NameValueStringPairModel) GetAttributes ¶ added in v0.6.1
func (r NameValueStringPairModel) GetAttributes() map[string]schema.Attribute
func (NameValueStringPairModel) GetKey ¶ added in v1.0.3
func (r NameValueStringPairModel) GetKey() string
func (NameValueStringPairModel) GetSchema ¶ added in v0.6.1
func (r NameValueStringPairModel) GetSchema() schema.NestedAttributeObject
func (NameValueStringPairModel) RefreshListItem ¶ added in v1.0.3
func (r NameValueStringPairModel) RefreshListItem(ctx context.Context, diag *diag.Diagnostics, retmote citrixorchestration.NameValueStringPairModel) ResourceModelWithAttributes
RefreshListItem implements RefreshableListItemWithAttributes.
func (NameValueStringPairModel) ValidateConfig ¶ added in v1.0.3
func (r NameValueStringPairModel) ValidateConfig(ctx context.Context, diagnostics *diag.Diagnostics, index int) bool
type NetworkMappingModel ¶ added in v1.0.8
type NetworkMappingModel struct { NetworkDevice types.String `tfsdk:"network_device"` Network types.String `tfsdk:"network"` }
NetworkMappingModel maps the nested network mapping resource schema data.
func (NetworkMappingModel) GetAttributes ¶ added in v1.0.8
func (NetworkMappingModel) GetAttributes() map[string]schema.Attribute
func (NetworkMappingModel) GetKey ¶ added in v1.0.8
func (n NetworkMappingModel) GetKey() string
func (NetworkMappingModel) GetSchema ¶ added in v1.0.8
func (NetworkMappingModel) GetSchema() schema.NestedAttributeObject
func (NetworkMappingModel) RefreshListItem ¶ added in v1.0.8
func (networkMapping NetworkMappingModel) RefreshListItem(_ context.Context, _ *diag.Diagnostics, nic citrixorchestration.NetworkMapResponseModel) ResourceModelWithAttributes
type RefreshableListItemWithAttributes ¶ added in v0.6.1
type RefreshableListItemWithAttributes[clientType any] interface { // Gets the key to compare the item with the client model GetKey() string // Refreshes the item with the client model and returns the updated item RefreshListItem(context.Context, *diag.Diagnostics, clientType) ResourceModelWithAttributes // Has to implement the ModelWithAttributes interface for conversion back to a Terraform model ResourceModelWithAttributes }
Represents a list item which supports being refreshed from a client model
type ResourceModelWithAttributes ¶ added in v1.0.7
type ResourceModelWithAttributes interface {
GetAttributes() map[string]resourceSchema.Attribute // workaround because NestedAttributeObject and SingleNestedAttribute do not share a base type
}