diff --git a/DEVELOPER.md b/DEVELOPER.md
index a18dd69..732eead 100644
--- a/DEVELOPER.md
+++ b/DEVELOPER.md
@@ -3,7 +3,6 @@
This documentation will guide you through the process of setting up your dev environment for running Plugin for Terraform Provider for Citrix® server locally on your dev machine.
## Table of Contents
-
- [Plugin for Terraform Provider for Citrix® Developer Guide](#plugin-for-terraform-provider-for-citrix-developer-guide)
- [Table of Contents](#table-of-contents)
- [Install Dependencies](#install-dependencies)
@@ -13,9 +12,13 @@ This documentation will guide you through the process of setting up your dev env
- [Start Debugger](#start-debugger)
- [Attach Local Provider to PowerShell](#attach-local-provider-to-powershell)
- [Debugging with citrix-daas-rest-go client code in Visual Studio Code](#debugging-with-citrix-daas-rest-go-client-code-in-visual-studio-code)
+ - [Handling Terraform lists/sets and nested objects](#handling-terraform-listssets-and-nested-objects)
+ - [Converting to Go native types](#converting-to-go-native-types)
+ - [Preserving order in lists](#preserving-order-in-lists)
- [Running the tests](#running-the-tests)
- [Commonly faced errors](#commonly-faced-errors)
- [Plugin for Terraform Provider for StoreFront Developer Guide](#plugin-for-terraform-provider-for-storefront-developer-guide)
+
## Install Dependencies
* Install Go on your local system: https://go.dev/doc/install
* `choco install golang`
@@ -85,6 +88,35 @@ Run [Debugging Provider code in Visual Studio Code](#debugging-provider-code-in-
Set a breakpoint in `terraform-provider-citrix/internal/provider/provider.go::Configure`
+## Handling Terraform lists/sets and nested objects
+### Converting to Go native types
+When the Terraform configuration, state, or plan is being converted into a Go model we must use `types.List` and `types.Object` for lists and nested objects rather than go native slices and structs. This is in order to support Null/Unknown values. Unknown is especially important because any variables in the .tf configuration files can be unknown in `ValidateConfig` and `ModifyPlan`. However, handling these Terraform List and Object types is cumbersome as they are dynamically typed at runtime. See [this doc](https://developer.hashicorp.com/terraform/plugin/framework/handling-data/accessing-values) for more information.
+
+In order to reduce errors this project has introduced a system to convert between Terraform List/Object and Go native slices/structs. When data needs to be operated on it should be first converted to the Go native representation, then converted back to the Terraform representation. The following helper methods can handle this for you.
+
+| From | To | Function | Notes |
+|------|----|----------|-------|
+| `types.Object` | `T` | `ObjectValueToTypedObject` | `T` must implement `ModelWithAttributes` |
+| `T` | `types.Object` | `TypedObjectToObjectValue` | `T` must implement `ModelWithAttributes` |
+| `types.List` | `T[]` | `ObjectListToTypedArray[T]` | `T` must implement `ModelWithAttributes`. For a list of nested objects |
+| `T[]` | `types.List` | `TypedArrayToObjectList[T]` | `T` must implement `ModelWithAttributes`. For a list of nested objects |
+| `types.List` | `string[]` | `StringListToStringArray` | For a list of strings |
+| `string[]` | `types.List` | `StringArrayToStringList` | For a list of strings |
+| `types.Set` | `string[]` | `StringSetToStringArray` | For a set of strings |
+| `string[]` | `types.Set` | `StringArrayToStringSet` | For a set of strings |
+
+In order to use the first 4 of these methods, the struct `T` needs to implement the [ModelWithAttributes](internal/util/types.go) interface which is ultimately populated from the attribute's Schema. This gives the Terraform type system the necessary information to populate a `types.Object` or `types.List` with a nested object.
+
+### Preserving order in lists
+Often time the order of elements in a list does not matter to the service. In this case one of the following helper functions should be used. These functions will get state list in sync with the remote list while preserving the order in the state when possible.
+
+| Function | Input | Notes |
+|----------|-------|-------|
+| `RefreshList` | `[]string` | |
+| `RefreshUsersList` | `types.Set` | Will ensure users are not duplicated by UPN or SAMname |
+| `RefreshListValues` | `types.List` of `string` | |
+| `RefreshListValueProperties` | `types.List` of `types.Object` | Each element will have its `RefreshListItem` method called. The element's type must implement the `RefreshableListItemWithAttributes` interface |
+
## Running the tests
Before running the tests, you need to provide values for environment variables required by the test files.
diff --git a/README.md b/README.md
index 0d65fc1..c3c3211 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,9 @@
Citrix has developed a custom Terraform provider for automating Citrix product deployments and configurations. Using [Terraform](https://www.terraform.io) with Citrix provider, you can manage your Citrix products via Infrastructure as Code, giving you higher efficiency and consistency on infrastructure management, as well as better reusability on infrastructure configuration. The provider is developed and maintained by Citrix. Please note that this provider is still in tech preview.
-## Table of Content
+## Table of Contents
- [Plugin for Terraform Provider for Citrix®](#plugin-for-terraform-provider-for-citrix)
- - [Table of Content](#table-of-content)
+ - [Table of Contents](#table-of-contents)
- [Contacting the Maintainers](#contacting-the-maintainers)
- [Plugin for Terraform Provider for Citrix® Documentation](#plugin-for-terraform-provider-for-citrix-documentation)
- [Navigating the repository](#navigating-the-repository)
@@ -24,7 +24,7 @@ Citrix has developed a custom Terraform provider for automating Citrix product d
- [Configure Global App Configuration (GAC) Settings](#configure-global-app-configuration-gac-settings)
- [Create Citrix Cloud Resource Locations](#create-citrix-cloud-resource-locations)
- [Managing StoreFront resources](#managing-storefront-resources)
- - [Deployment Guides](#deployment-guides)
+ - [Examples and Deployment Guides](#examples-and-deployment-guides)
- [Frequently Asked Questions](#frequently-asked-questions)
- [What resource is supported for different connection types?](#what-resource-is-supported-for-different-connection-types)
- [What provisioning types are supported for machine catalog?](#what-provisioning-types-are-supported-for-machine-catalog)
@@ -66,24 +66,19 @@ Example for Cloud site:
```hcl
provider "citrix" {
- region = "US" # Optionally set with `CITRIX_REGION` environment variable.
- environment = "Production" # Optionally set with `CITRIX_ENVIRONMENT` environment variable.
customer_id = "${var.customer_id}" # Optionally set with `CITRIX_CUSTOMER_ID` environment variable.
client_id = "${var.api_key_clientId}" # Optionally set with `CITRIX_CLIENT_ID` environment variable.
client_secret = "${var.api_key_clientSecret}" # Optionally set with `CITRIX_CLIENT_SECRET` environment variable.
}
```
-You can also set `hostname` for cloud site to force override the Citrix DaaS service URL for a cloud customer.
-
You can use environment variables as stated in the comments above. When running Go tests, always use environment variables so that no credentials or other sensitive information are checked-in to the code.
Below is a table to show the difference between on-premises and Cloud provider configuration:
| | Cloud | On-Premises |
|--------------|-----------------------------------|---------------------------------------|
-| region | `US` / `EU` / `AP-S` / `JP` | N/A |
-| environment | `Production` / `Staging` | N/A |
+| environment | `Production`, `Japan`, `Gov` | N/A |
| customerId | Cloud Customer Id | N/A |
| hostname | (Optional) Cloud DDC hostname | On-Premises DDC Hostname / IP address |
| clientId | Citrix Cloud API Key clientId | Domain Admin Username |
@@ -162,9 +157,10 @@ Resource locations contain the resources (e.g. cloud connectors) required to del
### Managing StoreFront resources
Please refer to the [StoreFront.md](StoreFront.md) to configure StoreFront resources via terraform.
-## Deployment Guides
-Detailed instructions on setting up deployments on different cloud providers.
+## Examples and Deployment Guides
+Basic example templates for getting started: [/examples](/examples)
+Detailed instructions on setting up deployments on different cloud providers from Citrix Tech Zone:
- [AWS EC2](https://community.citrix.com/tech-zone/build/deployment-guides/terraform-daas-aws/)
- [Azure](https://community.citrix.com/tech-zone/build/deployment-guides/citrix-daas-terraform-azure/)
- [GCP](https://community.citrix.com/tech-zone/build/deployment-guides/terraform-daas-gcp/)
@@ -211,4 +207,4 @@ This project is Licensed under the Apache License, Version 2.0 (the "License");
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-Copyright © 2023. Citrix Systems, Inc.
\ No newline at end of file
+Copyright © 2024. Citrix Systems, Inc.
\ No newline at end of file
diff --git a/StoreFront.md b/StoreFront.md
index 88ea32d..b1d1c79 100644
--- a/StoreFront.md
+++ b/StoreFront.md
@@ -3,7 +3,6 @@
This Terraform module allows you to manage resources in Citrix StoreFront.
## Table of Contents
-
- [Terraform Module for Citrix StoreFront](#terraform-module-for-citrix-storefront)
- [Table of Contents](#table-of-contents)
- [Prerequisites](#prerequisites)
@@ -26,9 +25,9 @@ This Terraform module allows you to manage resources in Citrix StoreFront.
If running the StoreFront provider on a machine other than the machine where StoreFront is installed, please provide the Active Directory Admin credentials in either environment variables or provider configuration
- `SF_COMPUTER_NAME`:
- The name of the remote computer where the StoreFront server is running.
- - `SF_AD_ADMAIN_USERNAME`:
+ - `SF_AD_ADMIN_USERNAME`:
- The Active Directory Admin username to connect to the remote PowerShell of the StoreFront Server machine.
- - `SF_AD_ADMAIN_PASSWORD`:
+ - `SF_AD_ADMIN_PASSWORD`:
- The Active Directory Admin password to connect to the remote PowerShell of the StoreFront server machine.
diff --git a/docs/data-sources/application_folder_details.md b/docs/data-sources/application_folder_details.md
index 57d7964..d675c69 100644
--- a/docs/data-sources/application_folder_details.md
+++ b/docs/data-sources/application_folder_details.md
@@ -30,7 +30,7 @@ Data source for retrieving details of applications belonging to a specific folde
Read-Only:
- `application_folder_path` (String) The path of the folder which the application belongs to
-- `delivery_groups` (List of String) The delivery groups which the application is associated with.
+- `delivery_groups` (Set of String) The delivery groups which the application is associated with.
- `description` (String) The description of the application.
- `installed_app_properties` (Attributes) The installed application properties of the application. (see [below for nested schema](#nestedatt--applications_list--installed_app_properties))
- `name` (String) The name of the application.
diff --git a/docs/index.md b/docs/index.md
index c76e92c..50caef8 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -33,8 +33,8 @@ provider "citrix" {
### Optional
-- `client_id` (String) Client Id for Citrix DaaS service authentication.
For Citrix On-Premises customers: Use this to specify Domain Admin Username.
For Citrix Cloud customers: Use this to specify Cloud API Key Client Id.
Can be set via Environment Variable **CITRIX_CLIENT_ID**.
-- `client_secret` (String, Sensitive) Client Secret for Citrix DaaS service authentication.
For Citrix on-premises customers: Use this to specify Domain Admin Password.
For Citrix Cloud customers: Use this to specify Cloud API Key Client Secret.
Can be set via Environment Variable **CITRIX_CLIENT_SECRET**.
+- `client_id` (String) Client Id for Citrix DaaS service authentication.
For Citrix On-Premises customers: Use this to specify a DDC administrator username.
For Citrix Cloud customers: Use this to specify Cloud API Key Client Id.
Can be set via Environment Variable **CITRIX_CLIENT_ID**.
+- `client_secret` (String, Sensitive) Client Secret for Citrix DaaS service authentication.
For Citrix on-premises customers: Use this to specify a DDC administrator password.
For Citrix Cloud customers: Use this to specify Cloud API Key Client Secret.
Can be set via Environment Variable **CITRIX_CLIENT_SECRET**.
- `customer_id` (String) Citrix Cloud customer ID. Only applicable for Citrix Cloud customers.
Can be set via Environment Variable **CITRIX_CUSTOMER_ID**.
- `disable_ssl_verification` (Boolean) Disable SSL verification against the target DDC.
Only applicable to on-premises customers. Citrix Cloud customers should omit this option. Set to true to skip SSL verification only when the target DDC does not have a valid SSL certificate issued by a trusted CA.
When set to true, please make sure that your provider config is set for a known DDC hostname.
[It is recommended to configure a valid certificate for the target DDC](https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/install-configure/install-core/secure-web-studio-deployment)
Can be set via Environment Variable **CITRIX_DISABLE_SSL_VERIFICATION**.
- `environment` (String) Citrix Cloud environment of the customer. Only applicable for Citrix Cloud customers. Available options: `Production`, `Staging`, `Japan`, `JapanStaging`, `Gov`, `GovStaging`.
Can be set via Environment Variable **CITRIX_ENVIRONMENT**.
@@ -46,6 +46,6 @@ provider "citrix" {
Required:
-- `ad_admin_password` (String) Active Directory Admin Password to connect to storefront server
Only applicable for Citrix on-premises customers. Use this to specify AD admin password
Can be set via Environment Variable **SF_AD_ADMAIN_PASSWORD**.
-- `ad_admin_username` (String) Active Directory Admin Username to connect to storefront server
Only applicable for Citrix on-premises customers. Use this to specify AD admin username
Can be set via Environment Variable **SF_AD_ADMAIN_USERNAME**.
+- `ad_admin_password` (String) Active Directory Admin Password to connect to storefront server
Only applicable for Citrix on-premises customers. Use this to specify AD admin password
Can be set via Environment Variable **SF_AD_ADMIN_PASSWORD**.
+- `ad_admin_username` (String) Active Directory Admin Username to connect to storefront server
Only applicable for Citrix on-premises customers. Use this to specify AD admin username
Can be set via Environment Variable **SF_AD_ADMIN_USERNAME**.
- `computer_name` (String) StoreFront server computer Name
Only applicable for Citrix on-premises customers. Use this to specify StoreFront server computer name
Can be set via Environment Variable **SF_COMPUTER_NAME**.
diff --git a/docs/resources/admin_role.md b/docs/resources/admin_role.md
index b37c971..d66194c 100644
--- a/docs/resources/admin_role.md
+++ b/docs/resources/admin_role.md
@@ -38,7 +38,7 @@ resource "citrix_admin_role" "cloud_example_role" {
### Required
- `name` (String) Name of the admin role.
-- `permissions` (List of String) List of permissions to be associated with the admin role. To get a list of supported permissions, please refer to [Admin Predefined Permissions for Cloud](https://developer-docs.citrix.com/en-us/citrix-daas-service-apis/citrix-daas-rest-apis/apis/#/Admin-APIs/Admin-GetPredefinedPermissions) and [Admin Predefined Permissions for On-Premise](https://developer-docs.citrix.com/en-us/citrix-virtual-apps-desktops/citrix-cvad-rest-apis/apis/#/Admin-APIs/Admin-GetPredefinedPermissions).
+- `permissions` (Set of String) Permissions to be associated with the admin role. To get a list of supported permissions, please refer to [Admin Predefined Permissions for Cloud](https://developer-docs.citrix.com/en-us/citrix-daas-service-apis/citrix-daas-rest-apis/apis/#/Admin-APIs/Admin-GetPredefinedPermissions) and [Admin Predefined Permissions for On-Premise](https://developer-docs.citrix.com/en-us/citrix-virtual-apps-desktops/citrix-cvad-rest-apis/apis/#/Admin-APIs/Admin-GetPredefinedPermissions).
### Optional
diff --git a/docs/resources/admin_scope.md b/docs/resources/admin_scope.md
index f330e50..71bd3f6 100644
--- a/docs/resources/admin_scope.md
+++ b/docs/resources/admin_scope.md
@@ -16,16 +16,6 @@ Manages an administrator scope.
resource "citrix_admin_scope" "example-admin-scope" {
name = "example-admin-scope"
description = "Example admin scope for delivery group and machine catalog"
- scoped_objects = [
- {
- object_type = "DeliveryGroup",
- object = ""
- },
- {
- object_type = "MachineCatalog",
- object = ""
- }
- ]
}
```
@@ -39,20 +29,11 @@ resource "citrix_admin_scope" "example-admin-scope" {
### Optional
- `description` (String) Description of the admin scope.
-- `scoped_objects` (Attributes List) List of scoped objects to be associated with the admin scope. (see [below for nested schema](#nestedatt--scoped_objects))
### Read-Only
- `id` (String) ID of the admin scope.
-
-### Nested Schema for `scoped_objects`
-
-Required:
-
-- `object` (String) Name of an existing object under the object type to be added to the scope.
-- `object_type` (String) Type of the scoped object. Allowed values are: `HypervisorConnection`, `MachineCatalog`, `DeliveryGroup`, `ApplicationGroup`, `Tag`, `PolicySet` and `Unknown`.
-
## Import
Import is supported using the following syntax:
diff --git a/docs/resources/admin_user.md b/docs/resources/admin_user.md
index 985de67..e09b75e 100644
--- a/docs/resources/admin_user.md
+++ b/docs/resources/admin_user.md
@@ -33,7 +33,7 @@ resource "citrix_admin_user" "example-admin-user" {
- `domain_name` (String) Name of the domain that the user is a part of. For example, if the domain is `example.com`, then provide the value `example` for this field.
- `name` (String) Name of an existing user in the active directory.
-- `rights` (Attributes List) List of rights to be associated with the admin user. (see [below for nested schema](#nestedatt--rights))
+- `rights` (Attributes List) Rights to be associated with the admin user. (see [below for nested schema](#nestedatt--rights))
### Optional
diff --git a/docs/resources/application.md b/docs/resources/application.md
index c8b844c..ba400bf 100644
--- a/docs/resources/application.md
+++ b/docs/resources/application.md
@@ -24,6 +24,8 @@ resource "citrix_application" "example-application" {
working_directory = ""
}
delivery_groups = [citrix_delivery_group.example-delivery-group.id]
+ icon = citrix_application_icon.example-application-icon.id
+ limit_visibility_to_users = ["example\\user1"]
}
```
@@ -32,7 +34,7 @@ resource "citrix_application" "example-application" {
### Required
-- `delivery_groups` (List of String) The delivery group id's to which the application should be added.
+- `delivery_groups` (Set of String) The delivery group IDs to which the application should be added.
- `installed_app_properties` (Attributes) The install application properties. (see [below for nested schema](#nestedatt--installed_app_properties))
- `name` (String) Name of the application.
- `published_name` (String) A display name for the application that is shown to users.
@@ -41,6 +43,8 @@ resource "citrix_application" "example-application" {
- `application_folder_path` (String) The application folder path in which the application should be created.
- `description` (String) Description of the application.
+- `icon` (String) The Id of the icon to be associated with the application.
+- `limit_visibility_to_users` (Set of String) By default, the application is visible to all users within a delivery group. However, you can restrict its visibility to only certain users by specifying them in the 'limit_visibility_to_users' list. Must be in `DOMAIN\UserOrGroupName` or `user@domain.com` format
### Read-Only
diff --git a/docs/resources/application_group.md b/docs/resources/application_group.md
new file mode 100644
index 0000000..7ff8276
--- /dev/null
+++ b/docs/resources/application_group.md
@@ -0,0 +1,50 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "citrix_application_group Resource - citrix"
+subcategory: ""
+description: |-
+ Resource for creating and managing application group.
+---
+
+# citrix_application_group (Resource)
+
+Resource for creating and managing application group.
+
+## Example Usage
+
+```terraform
+resource "citrix_application_group" "example-application-group" {
+ name = "example-name"
+ description = "example-description"
+ included_users = ["user@text.com"]
+ delivery_groups = [citrix_delivery_group.example-delivery-group.id, citrix_delivery_group.example-delivery-group-2.id]
+}
+```
+
+
+## Schema
+
+### Required
+
+- `delivery_groups` (Set of String) Delivery groups to associate with the application group.
+- `name` (String) Name of the application group to create.
+
+### Optional
+
+- `description` (String) Description of the application group.
+- `included_users` (Set of String) Users who can use this application group. Must be in `Domain\UserOrGroupName` or `user@domain.com` format
+- `restrict_to_tag` (String) The tag to restrict the application group to.
+- `scopes` (Set of String) The IDs of the scopes for the application group to be a part of.
+
+### Read-Only
+
+- `id` (String) GUID identifier of the application group.
+
+## Import
+
+Import is supported using the following syntax:
+
+```shell
+# Application group can be imported by specifying the GUID
+terraform import citrix_application_group.example-application-group b620d505-0d0d-43b1-8c94-5cb21c5ab40d
+```
diff --git a/docs/resources/application_icon.md b/docs/resources/application_icon.md
new file mode 100644
index 0000000..052ded0
--- /dev/null
+++ b/docs/resources/application_icon.md
@@ -0,0 +1,43 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "citrix_application_icon Resource - citrix"
+subcategory: ""
+description: |-
+ Resource for managing application icons.
+---
+
+# citrix_application_icon (Resource)
+
+Resource for managing application icons.
+
+## Example Usage
+
+```terraform
+resource "citrix_application_icon" "example-application-icon" {
+ raw_data = "example-raw-data"
+}
+
+# You can use the following PowerShell commands to convert an .ico file to base64:
+# $pic = Get-Content 'fileName.ico' -Encoding Byte
+# $picBase64 = [System.Convert]::ToBase64String($pic)
+```
+
+
+## Schema
+
+### Required
+
+- `raw_data` (String) Prepare an icon in ICO format and convert its binary raw data to base64 encoding. Use the base64 encoded string as the value of this attribute.
+
+### Read-Only
+
+- `id` (String) GUID identifier of the application icon.
+
+## Import
+
+Import is supported using the following syntax:
+
+```shell
+# Application icon can be imported by specifying the GUID
+terraform import citrix_application_icon.example-application-icon 4cec0568-1c91-407f-a32e-cc487822defc
+```
diff --git a/docs/resources/aws_hypervisor.md b/docs/resources/aws_hypervisor.md
index 7a22fbd..1041732 100644
--- a/docs/resources/aws_hypervisor.md
+++ b/docs/resources/aws_hypervisor.md
@@ -34,6 +34,10 @@ resource "citrix_aws_hypervisor" "example-aws-hypervisor" {
- `secret_key` (String, Sensitive) The secret key used to authenticate with the AWS APIs.
- `zone` (String) Id of the zone the hypervisor is associated with.
+### Optional
+
+- `scopes` (Set of String) The IDs of the scopes for the hypervisor to be a part of.
+
### Read-Only
- `id` (String) GUID identifier of the hypervisor.
diff --git a/docs/resources/aws_hypervisor_resource_pool.md b/docs/resources/aws_hypervisor_resource_pool.md
index df0d300..5079dd4 100644
--- a/docs/resources/aws_hypervisor_resource_pool.md
+++ b/docs/resources/aws_hypervisor_resource_pool.md
@@ -32,7 +32,7 @@ resource "citrix_aws_hypervisor_resource_pool" "example-aws-hypervisor-resource-
- `availability_zone` (String) The name of the availability zone resource to use for provisioning operations in this resource pool.
- `hypervisor` (String) Id of the hypervisor for which the resource pool needs to be created.
- `name` (String) Name of the resource pool. Name should be unique across all hypervisors.
-- `subnets` (List of String) List of subnets to allocate VDAs within the virtual private cloud.
+- `subnets` (List of String) Subnets to allocate VDAs within the virtual private cloud.
- `vpc` (String) Name of the virtual private cloud.
### Read-Only
diff --git a/docs/resources/azure_hypervisor.md b/docs/resources/azure_hypervisor.md
index 3da0102..de34180 100644
--- a/docs/resources/azure_hypervisor.md
+++ b/docs/resources/azure_hypervisor.md
@@ -40,6 +40,7 @@ resource "citrix_azure_hypervisor" "example-azure-hypervisor" {
- `application_secret_expiration_date` (String) The expiration date of the application secret of the service principal used to access the Azure APIs. Format is YYYY-MM-DD.
- `enable_azure_ad_device_management` (Boolean) Enable Azure AD device management. Default is false.
+- `scopes` (Set of String) The IDs of the scopes for the hypervisor to be a part of.
### Read-Only
diff --git a/docs/resources/azure_hypervisor_resource_pool.md b/docs/resources/azure_hypervisor_resource_pool.md
index 9e52fe2..2af3719 100644
--- a/docs/resources/azure_hypervisor_resource_pool.md
+++ b/docs/resources/azure_hypervisor_resource_pool.md
@@ -34,7 +34,7 @@ resource "citrix_azure_hypervisor_resource_pool" "example-azure-hypervisor-resou
- `hypervisor` (String) Id of the hypervisor for which the resource pool needs to be created.
- `name` (String) Name of the resource pool. Name should be unique across all hypervisors.
- `region` (String) Cloud Region where the virtual network sits in.
-- `subnets` (List of String) List of subnets to allocate VDAs within the virtual network.
+- `subnets` (List of String) Subnets to allocate VDAs within the virtual network.
- `virtual_network` (String) Name of the cloud virtual network.
- `virtual_network_resource_group` (String) The name of the resource group where the vnet resides.
diff --git a/docs/resources/delivery_group.md b/docs/resources/delivery_group.md
index 6d51cee..4ae0236 100644
--- a/docs/resources/delivery_group.md
+++ b/docs/resources/delivery_group.md
@@ -24,7 +24,7 @@ resource "citrix_delivery_group" "example-delivery-group" {
desktops = [
{
published_name = "Example Desktop"
- description = "Desription for example desktop"
+ description = "Description for example desktop"
restricted_access_users = {
allow_list = [
"user1@example.com"
@@ -113,7 +113,6 @@ resource "citrix_delivery_group" "example-delivery-group" {
}
}
]
-
policy_set_id = citrix_policy_set.example-policy-set.id
minimum_functional_level = "L7_20"
}
@@ -133,10 +132,13 @@ resource "citrix_delivery_group" "example-delivery-group" {
- `autoscale_settings` (Attributes) The power management settings governing the machine(s) in the delivery group. (see [below for nested schema](#nestedatt--autoscale_settings))
- `description` (String) Description of the delivery group.
- `desktops` (Attributes List) A list of Desktop resources to publish on the delivery group. Only 1 desktop can be added to a Remote PC Delivery Group. (see [below for nested schema](#nestedatt--desktops))
+- `make_resources_available_in_lhc` (Boolean) In the event of a service disruption or loss of connectivity, select if you want Local Host Cache to keep resources in the delivery group available to launch new sessions. Existing sessions are not impacted. This setting only impacts Single Session OS Random (pooled) desktops which are power managed. LHC is always enabled for Single Session OS static and Multi Session OS desktops.When set to `true`, machines will remain available and allow new connections and changes to the machine caused by a user might be present in subsequent sessions. When set to `false`, machines in the delivery group will be unavailable for new connections during a Local Host Cache event.
- `minimum_functional_level` (String) Specifies the minimum functional level for the VDA machines in the delivery group. Defaults to `L7_20`.
- `policy_set_id` (String) GUID identifier of the policy set.
- `reboot_schedules` (Attributes List) The reboot schedule for the delivery group. (see [below for nested schema](#nestedatt--reboot_schedules))
- `restricted_access_users` (Attributes) Restrict access to this Delivery Group by specifying users and groups in the allow and block list. If no value is specified, all authenticated users will have access to this Delivery Group. To give access to unauthenticated users, use the `allow_anonymous_access` property. (see [below for nested schema](#nestedatt--restricted_access_users))
+- `scopes` (Set of String) The IDs of the scopes for the delivery group to be a part of.
+- `storefront_servers` (Set of String) A list of GUID identifiers of StoreFront Servers to associate with the delivery group.
### Read-Only
@@ -186,14 +188,14 @@ Optional:
Required:
-- `days_of_week` (List of String) The pattern of days of the week that the power time scheme covers.
+- `days_of_week` (Set of String) The pattern of days of the week that the power time scheme covers.
- `display_name` (String) The name of the power time scheme as displayed in the console.
-- `peak_time_ranges` (List of String) List of peak time ranges during the day. e.g. 09:00-17:00
+- `peak_time_ranges` (Set of String) Peak time ranges during the day. e.g. 09:00-17:00
- `pool_using_percentage` (Boolean) Indicates whether the integer values in the pool size array are to be treated as absolute values (if this value is `false`) or as percentages of the number of machines in the delivery group (if this value is `true`).
Optional:
-- `pool_size_schedules` (Attributes List) List of pool size schedules during the day. Each is specified as a time range and an indicator of the number of machines that should be powered on during that time range. Do not specify schedules when no machines should be powered on. (see [below for nested schema](#nestedatt--autoscale_settings--power_time_schemes--pool_size_schedules))
+- `pool_size_schedules` (Attributes List) Pool size schedules during the day. Each is specified as a time range and an indicator of the number of machines that should be powered on during that time range. Do not specify schedules when no machines should be powered on. (see [below for nested schema](#nestedatt--autoscale_settings--power_time_schemes--pool_size_schedules))
### Nested Schema for `autoscale_settings.power_time_schemes.pool_size_schedules`
@@ -225,8 +227,8 @@ Optional:
Optional:
-- `allow_list` (List of String) Users who can use this Desktop. Must be in `DOMAIN\UserOrGroupName` or `user@domain.com` format
-- `block_list` (List of String) Users who cannot use this Desktop. A block list is meaningful only when used to block users in the allow list. Must be in `Domain\UserOrGroupName` or `user@domain.com` format
+- `allow_list` (Set of String) Users who can use this Desktop. Must be in `DOMAIN\UserOrGroupName` or `user@domain.com` format
+- `block_list` (Set of String) Users who cannot use this Desktop. A block list is meaningful only when used to block users in the allow list. Must be in `DOMAIN\UserOrGroupName` or `user@domain.com` format
@@ -248,7 +250,7 @@ Required:
Optional:
- `day_in_month` (String) The day in the month on which the reboot schedule runs monthly. Can only be set to `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, or `Saturday`.
-- `days_in_week` (List of String) The days of the week on which the reboot schedule runs weekly. Can only be set to `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, or `Saturday`.
+- `days_in_week` (Set of String) The days of the week on which the reboot schedule runs weekly. Can only be set to `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, or `Saturday`.
- `description` (String) The description of the reboot schedule.
- `reboot_notification_to_users` (Attributes) The reboot notification for the reboot schedule. Not available for natural reboot. (see [below for nested schema](#nestedatt--reboot_schedules--reboot_notification_to_users))
- `restrict_to_tag` (String) The tag to which the reboot schedule is restricted.
@@ -274,8 +276,8 @@ Optional:
Optional:
-- `allow_list` (List of String) Users who can use this Delivery Group. Must be in `DOMAIN\UserOrGroupName` or `user@domain.com` format
-- `block_list` (List of String) Users who cannot use this Delivery Group. A block list is meaningful only when used to block users in the allow list. Must be in `Domain\UserOrGroupName` or `user@domain.com` format
+- `allow_list` (Set of String) Users who can use this Delivery Group. Must be in `DOMAIN\UserOrGroupName` or `user@domain.com` format
+- `block_list` (Set of String) Users who cannot use this Delivery Group. A block list is meaningful only when used to block users in the allow list. Must be in `DOMAIN\UserOrGroupName` or `user@domain.com` format
## Import
diff --git a/docs/resources/gcp_hypervisor.md b/docs/resources/gcp_hypervisor.md
index 808ff20..50ca2c1 100644
--- a/docs/resources/gcp_hypervisor.md
+++ b/docs/resources/gcp_hypervisor.md
@@ -32,6 +32,10 @@ resource "citrix_gcp_hypervisor" "example-gcp-hypervisor" {
- `service_account_id` (String) The service account ID used to access the Google Cloud APIs.
- `zone` (String) Id of the zone the hypervisor is associated with.
+### Optional
+
+- `scopes` (Set of String) The IDs of the scopes for the hypervisor to be a part of.
+
### Read-Only
- `id` (String) GUID identifier of the hypervisor.
diff --git a/docs/resources/gcp_hypervisor_resource_pool.md b/docs/resources/gcp_hypervisor_resource_pool.md
index c8e451d..ce63412 100644
--- a/docs/resources/gcp_hypervisor_resource_pool.md
+++ b/docs/resources/gcp_hypervisor_resource_pool.md
@@ -34,7 +34,7 @@ resource "citrix_gcp_hypervisor_resource_pool" "example-gcp-hypervisor-resource-
- `name` (String) Name of the resource pool. Name should be unique across all hypervisors.
- `project_name` (String) GCP Project name.
- `region` (String) Cloud Region where the virtual network sits in.
-- `subnets` (List of String) List of subnets to allocate VDAs within the virtual network.
+- `subnets` (List of String) Subnets to allocate VDAs within the virtual network.
- `vpc` (String) Name of the cloud virtual network.
### Optional
diff --git a/docs/resources/machine_catalog.md b/docs/resources/machine_catalog.md
index c5e9114..2740996 100644
--- a/docs/resources/machine_catalog.md
+++ b/docs/resources/machine_catalog.md
@@ -19,10 +19,7 @@ resource "citrix_machine_catalog" "example-azure-mtsession" {
zone = ""
allocation_type = "Random"
session_support = "MultiSession"
- is_power_managed = true
- is_remote_pc = false
provisioning_type = "MCS"
- minimum_functional_level = "L7_20"
provisioning_scheme = {
hypervisor = citrix_azure_hypervisor.example-azure-hypervisor.id
hypervisor_resource_pool = citrix_azure_hypervisor_resource_pool.example-azure-hypervisor-resource-pool.id
@@ -37,11 +34,19 @@ resource "citrix_machine_catalog" "example-azure-mtsession" {
storage_type = "Standard_LRS"
use_managed_disks = true
service_offering = "Standard_D2_v2"
- azure_machine_config = {
- resource_group = ""
- storage_account = ""
- container = ""
- master_image = ""
+ azure_master_image = {
+ # shared_subscription = var.azure_image_subscription # Uncomment if the image is from a subscription outside of the hypervisor's subscription
+
+ # For Azure master image from managed disk or snapshot
+ resource_group = var.azure_resource_group
+ master_image = var.azure_master_image
+
+ # For Azure image gallery
+ # gallery_image = {
+ # gallery = var.azure_gallery_name
+ # definition = var.azure_gallery_image_definition
+ # version = var.azure_gallery_image_version
+ # }
}
writeback_cache = {
wbc_disk_storage_type = "pd-standard"
@@ -53,12 +58,6 @@ resource "citrix_machine_catalog" "example-azure-mtsession" {
storage_cost_saving = true
}
}
- network_mapping = [
- {
- network_device = "0"
- network = ""
- }
- ]
availability_zones = "1,2,..."
number_of_total_machines = 1
machine_account_creation_rules ={
@@ -74,8 +73,6 @@ resource "citrix_machine_catalog" "example-aws-mtsession" {
zone = ""
allocation_type = "Random"
session_support = "MultiSession"
- is_power_managed = true
- is_remote_pc = false
provisioning_type = "MCS"
provisioning_scheme = {
hypervisor = citrix_aws_hypervisor.example-aws-hypervisor.id
@@ -96,12 +93,6 @@ resource "citrix_machine_catalog" "example-aws-mtsession" {
]
tenancy_type = "Shared"
}
- network_mapping = [
- {
- network_device = "0"
- network = "10.0.128.0/20"
- }
- ]
number_of_total_machines = 1
machine_account_creation_rules ={
naming_scheme = "aws-multi-##"
@@ -116,8 +107,6 @@ resource "citrix_machine_catalog" "example-gcp-mtsession" {
zone = ""
allocation_type = "Random"
session_support = "MultiSession"
- is_power_managed = true
- is_remote_pc = false
provisioning_type = "MCS"
provisioning_scheme = {
hypervisor = citrix_gcp_hypervisor.example-gcp-hypervisor.id
@@ -130,7 +119,6 @@ resource "citrix_machine_catalog" "example-gcp-mtsession" {
service_account_password = ""
}
gcp_machine_config = {
-
machine_profile = ""
master_image = ""
machine_snapshot = ""
@@ -155,29 +143,29 @@ resource "citrix_machine_catalog" "example-gcp-mtsession" {
resource "citrix_machine_catalog" "example-vsphere-mtsession" {
name = "example-vsphere-mtsession"
description = "Example multi-session catalog on Vsphere hypervisor"
- provisioning_type = "MCS"
+ zone = ""
allocation_type = "Random"
session_support = "MultiSession"
- zone = ""
+ provisioning_type = "MCS"
provisioning_scheme = {
- identity_type = "ActiveDirectory"
- number_of_total_machines = 1
- machine_account_creation_rules = {
- naming_scheme = "catalog-##"
- naming_scheme_type = "Numeric"
- }
hypervisor = citrix_vsphere_hypervisor.vsphere-hypervisor-1.id
hypervisor_resource_pool = citrix_vsphere_hypervisor_resource_pool.vsphere-hypervisor-rp-1.id
+ identity_type = "ActiveDirectory"
+ machine_domain_identity = {
+ domain = ""
+ service_account = ""
+ service_account_password = ""
+ }
vsphere_machine_config = {
master_image_vm = ""
image_snapshot = "///..."
cpu_count = 2
memory_mb = 4096
}
- machine_domain_identity = {
- domain = ""
- service_account = ""
- service_account_password = ""
+ number_of_total_machines = 1
+ machine_account_creation_rules = {
+ naming_scheme = "catalog-##"
+ naming_scheme_type = "Numeric"
}
}
}
@@ -185,29 +173,29 @@ resource "citrix_machine_catalog" "example-vsphere-mtsession" {
resource "citrix_machine_catalog" "example-xenserver-mtsession" {
name = "example-xenserver-mtsession"
description = "Example multi-session catalog on XenServer hypervisor"
- provisioning_type = "MCS"
+ zone = ""
allocation_type = "Random"
session_support = "MultiSession"
- zone = ""
+ provisioning_type = "MCS"
provisioning_scheme = {
- identity_type = "ActiveDirectory"
- number_of_total_machines = 1
- machine_account_creation_rules = {
- naming_scheme = "catalog-##"
- naming_scheme_type = "Numeric"
- }
hypervisor = citrix_xenserver_hypervisor.xenserver-hypervisor-1.id
hypervisor_resource_pool = citrix_xenserver_hypervisor_resource_pool.xenserver-hypervisor-rp-1.id
+ identity_type = "ActiveDirectory"
+ machine_domain_identity = {
+ domain = ""
+ service_account = ""
+ service_account_password = ""
+ }
xenserver_machine_config = {
master_image_vm = ""
image_snapshot = "///..."
cpu_count = 2
memory_mb = 4096
}
- machine_domain_identity = {
- domain = ""
- service_account = ""
- service_account_password = ""
+ number_of_total_machines = 1
+ machine_account_creation_rules = {
+ naming_scheme = "catalog-##"
+ naming_scheme_type = "Numeric"
}
}
}
@@ -215,19 +203,19 @@ resource "citrix_machine_catalog" "example-xenserver-mtsession" {
resource "citrix_machine_catalog" "example-nutanix-mtsession" {
name = "example-nutanix-mtsession"
description = "Example multi-session catalog on Nutanix hypervisor"
- provisioning_type = "MCS"
+ zone = citrix_zone.example-zone.id
allocation_type = "Random"
session_support = "MultiSession"
- zone = citrix_zone.example-zone.id
+ provisioning_type = "MCS"
provisioning_scheme = {
- identity_type = "ActiveDirectory"
- number_of_total_machines = 1
- machine_account_creation_rules = {
- naming_scheme = "catalog-##"
- naming_scheme_type = "Numeric"
- }
hypervisor = citrix_nutanix_hypervisor.example-nutanix-hypervisor.id
hypervisor_resource_pool = citrix_nutanix_hypervisor_resource_pool.example-nutanix-rp.id
+ identity_type = "ActiveDirectory"
+ machine_domain_identity = {
+ domain = ""
+ service_account = ""
+ service_account_password = ""
+ }
nutanix_machine_config = {
container = ""
master_image = ""
@@ -235,10 +223,10 @@ resource "citrix_machine_catalog" "example-nutanix-mtsession" {
memory_mb = 4096
cores_per_cpu_count = 2
}
- machine_domain_identity = {
- domain = ""
- service_account = ""
- service_account_password = ""
+ number_of_total_machines = 1
+ machine_account_creation_rules = {
+ naming_scheme = "catalog-##"
+ naming_scheme_type = "Numeric"
}
}
}
@@ -259,7 +247,8 @@ resource "citrix_machine_catalog" "example-manual-power-managed-mtsession" {
{
region = "East US"
resource_group_name = "machine-resource-group-name"
- machine_name = "Domain\\MachineName"
+ machine_account = "DOMAIN\\MachineName"
+ machine_name = "MachineName"
}
]
}
@@ -279,10 +268,10 @@ resource "citrix_machine_catalog" "example-manual-non-power-managed-mtsession" {
{
machines = [
{
- machine_name = "Domain\\MachineName1"
+ machine_account = "DOMAIN\\MachineName1"
},
{
- machine_name = "Domain\\MachineName2"
+ machine_account = "DOMAIN\\MachineName2"
}
]
}
@@ -302,10 +291,10 @@ resource "citrix_machine_catalog" "example-remote-pc" {
{
machines = [
{
- machine_name = "Domain\\MachineName1"
+ machine_account = "DOMAIN\\MachineName1"
},
{
- machine_name = "Domain\\MachineName2"
+ machine_account = "DOMAIN\\MachineName2"
}
]
}
@@ -335,10 +324,18 @@ resource "citrix_machine_catalog" "example-non-domain-joined-azure-mcs" {
use_managed_disks = true
service_offering = "Standard_D2_v2"
azure_master_image = {
- resource_group = ""
- storage_account = ""
- container = ""
- master_image = ""
+ # shared_subscription = var.azure_image_subscription # Uncomment if the image is from a subscription outside of the hypervisor's subscription
+
+ # For Azure master image from managed disk or snapshot
+ resource_group = var.azure_resource_group
+ master_image = var.azure_master_image
+
+ # For Azure image gallery
+ # gallery_image = {
+ # gallery = var.azure_gallery_name
+ # definition = var.azure_gallery_image_definition
+ # version = var.azure_gallery_image_version
+ # }
}
writeback_cache = {
wbc_disk_storage_type = "pd-standard"
@@ -376,10 +373,11 @@ resource "citrix_machine_catalog" "example-non-domain-joined-azure-mcs" {
- `description` (String) Description of the machine catalog.
- `is_power_managed` (Boolean) Specify if the machines in the machine catalog will be power managed.
- `is_remote_pc` (Boolean) Specify if this catalog is for Remote PC access.
-- `machine_accounts` (Attributes List) List of machine accounts to add to the catalog. Only to be used when using `provisioning_type = MANUAL` (see [below for nested schema](#nestedatt--machine_accounts))
+- `machine_accounts` (Attributes List) Machine accounts to add to the catalog. Only to be used when using `provisioning_type = MANUAL` (see [below for nested schema](#nestedatt--machine_accounts))
- `minimum_functional_level` (String) Specifies the minimum functional level for the VDA machines in the catalog. Defaults to `L7_20`.
- `provisioning_scheme` (Attributes) Machine catalog provisioning scheme. Required when `provisioning_type = MCS` (see [below for nested schema](#nestedatt--provisioning_scheme))
- `remote_pc_ous` (Attributes List) Organizational Units to be included in the Remote PC machine catalog. Only to be used when `is_remote_pc = true`. For adding machines, use `machine_accounts`. (see [below for nested schema](#nestedatt--remote_pc_ous))
+- `scopes` (Set of String) The IDs of the scopes for the machine catalog to be a part of.
- `vda_upgrade_type` (String) Type of Vda Upgrade. Choose between LTSR and CR. When omitted, Vda Upgrade is disabled.
### Read-Only
@@ -391,7 +389,7 @@ resource "citrix_machine_catalog" "example-non-domain-joined-azure-mcs" {
Required:
-- `machines` (Attributes List) List of machines (see [below for nested schema](#nestedatt--machine_accounts--machines))
+- `machines` (Attributes List) Machines to add to the catalog (see [below for nested schema](#nestedatt--machine_accounts--machines))
Optional:
@@ -430,7 +428,7 @@ Required:
Optional:
-- `availability_zones` (String) The Availability Zones for provisioning virtual machines. Use a comma as a delimiter for multiple availability_zones.
+- `availability_zones` (List of String) The Availability Zones for provisioning virtual machines.
- `aws_machine_config` (Attributes) Machine Configuration For AWS EC2 MCS catalog. (see [below for nested schema](#nestedatt--provisioning_scheme--aws_machine_config))
- `azure_machine_config` (Attributes) Machine Configuration For Azure MCS catalog. (see [below for nested schema](#nestedatt--provisioning_scheme--azure_machine_config))
- `custom_properties` (Attributes List) **This is an advanced feature. Use with caution.** Custom properties to be set for the machine catalog. For properties that are already supported as a terraform configuration field, please use terraform field instead. (see [below for nested schema](#nestedatt--provisioning_scheme--custom_properties))
@@ -457,10 +455,29 @@ Required:
- `image_ami` (String) AMI of the AWS image to be used as the template image for the machine catalog.
- `master_image` (String) The name of the virtual machine image that will be used.
-- `security_groups` (List of String) List of security groups to associate with the machine. When omitted, the default security group of the VPC will be used by default.
+- `security_groups` (List of String) Security groups to associate with the machine. When omitted, the default security group of the VPC will be used by default.
- `service_offering` (String) The AWS VM Sku to use when creating machines.
- `tenancy_type` (String) Tenancy type of the machine. Choose between `Shared`, `Instance` and `Host`.
+Optional:
+
+- `image_update_reboot_options` (Attributes) The options for how rebooting is performed for image update. When omitted, image update on the VDAs will be performed on next shutdown. (see [below for nested schema](#nestedatt--provisioning_scheme--aws_machine_config--image_update_reboot_options))
+- `master_image_note` (String) The note for the master image.
+
+
+### Nested Schema for `provisioning_scheme.aws_machine_config.image_update_reboot_options`
+
+Required:
+
+- `reboot_duration` (Number) Approximate maximum duration over which the reboot cycle runs, in minutes. Set to `-1` to skip reboot, and perform image update on the VDAs on next shutdown. Set to `0` to reboot all machines immediately.
+
+Optional:
+
+- `warning_duration` (Number) Time in minutes prior to a machine reboot at which a warning message is displayed in all user sessions on that machine. When omitted, no warning about reboot will be displayed in user session.
+- `warning_message` (String) Warning message displayed in user sessions on a machine scheduled for a reboot. The optional pattern '%m%' is replaced by the number of minutes until the reboot.
+- `warning_repeat_interval` (Number) Number of minutes to wait before showing the reboot warning message again.
+
+
### Nested Schema for `provisioning_scheme.azure_machine_config`
@@ -475,8 +492,10 @@ Optional:
- `disk_encryption_set` (Attributes) The configuration for Disk Encryption Set (DES). The DES must be in the same subscription and region as your resources. If your master image is encrypted with a DES, use the same DES when creating this machine catalog. When using a DES, if you later disable the key with which the corresponding DES is associated in Azure, you can no longer power on the machines in this catalog or add machines to it. (see [below for nested schema](#nestedatt--provisioning_scheme--azure_machine_config--disk_encryption_set))
- `enroll_in_intune` (Boolean) Specify whether to enroll machines in Microsoft Intune. Use this property only when `identity_type` is set to `AzureAD`.
+- `image_update_reboot_options` (Attributes) The options for how rebooting is performed for image update. When omitted, image update on the VDAs will be performed on next shutdown. (see [below for nested schema](#nestedatt--provisioning_scheme--azure_machine_config--image_update_reboot_options))
- `license_type` (String) Windows license type used to provision virtual machines in Azure at the base compute rate. License types include: `Windows_Client` and `Windows_Server`.
- `machine_profile` (Attributes) The name of the virtual machine or template spec that will be used to identify the default value for the tags, virtual machine size, boot diagnostics, host cache property of OS disk, accelerated networking and availability zone.
Required when identity_type is set to `AzureAD` (see [below for nested schema](#nestedatt--provisioning_scheme--azure_machine_config--machine_profile))
+- `master_image_note` (String) The note for the master image.
- `use_azure_compute_gallery` (Attributes) Use this to place prepared image in Azure Compute Gallery. Required when `storage_type = Azure_Ephemeral_OS_Disk`. (see [below for nested schema](#nestedatt--provisioning_scheme--azure_machine_config--use_azure_compute_gallery))
- `use_managed_disks` (Boolean) Indicate whether to use Azure managed disks for the provisioned virtual machine.
- `vda_resource_group` (String) Designated resource group where the VDA VMs will be located on Azure.
@@ -517,6 +536,20 @@ Required:
- `disk_encryption_set_resource_group` (String) The name of the resource group in which the disk encryption set resides.
+
+### Nested Schema for `provisioning_scheme.azure_machine_config.image_update_reboot_options`
+
+Required:
+
+- `reboot_duration` (Number) Approximate maximum duration over which the reboot cycle runs, in minutes. Set to `-1` to skip reboot, and perform image update on the VDAs on next shutdown. Set to `0` to reboot all machines immediately.
+
+Optional:
+
+- `warning_duration` (Number) Time in minutes prior to a machine reboot at which a warning message is displayed in all user sessions on that machine. When omitted, no warning about reboot will be displayed in user session.
+- `warning_message` (String) Warning message displayed in user sessions on a machine scheduled for a reboot. The optional pattern '%m%' is replaced by the number of minutes until the reboot.
+- `warning_repeat_interval` (Number) Number of minutes to wait before showing the reboot warning message again.
+
+
### Nested Schema for `provisioning_scheme.azure_machine_config.machine_profile`
@@ -574,10 +607,26 @@ Required:
Optional:
+- `image_update_reboot_options` (Attributes) The options for how rebooting is performed for image update. When omitted, image update on the VDAs will be performed on next shutdown. (see [below for nested schema](#nestedatt--provisioning_scheme--gcp_machine_config--image_update_reboot_options))
- `machine_profile` (String) The name of the virtual machine template that will be used to identify the default value for the tags, virtual machine size, boot diagnostics, host cache property of OS disk, accelerated networking and availability zone. If not specified, the VM specified in master_image will be used as template.
- `machine_snapshot` (String) The name of the virtual machine snapshot of a GCP VM that will be used as master image.
+- `master_image_note` (String) The note for the master image.
- `writeback_cache` (Attributes) Write-back Cache config. Leave this empty to disable Write-back Cache. (see [below for nested schema](#nestedatt--provisioning_scheme--gcp_machine_config--writeback_cache))
+
+### Nested Schema for `provisioning_scheme.gcp_machine_config.image_update_reboot_options`
+
+Required:
+
+- `reboot_duration` (Number) Approximate maximum duration over which the reboot cycle runs, in minutes. Set to `-1` to skip reboot, and perform image update on the VDAs on next shutdown. Set to `0` to reboot all machines immediately.
+
+Optional:
+
+- `warning_duration` (Number) Time in minutes prior to a machine reboot at which a warning message is displayed in all user sessions on that machine. When omitted, no warning about reboot will be displayed in user session.
+- `warning_message` (String) Warning message displayed in user sessions on a machine scheduled for a reboot. The optional pattern '%m%' is replaced by the number of minutes until the reboot.
+- `warning_repeat_interval` (Number) Number of minutes to wait before showing the reboot warning message again.
+
+
### Nested Schema for `provisioning_scheme.gcp_machine_config.writeback_cache`
@@ -625,6 +674,25 @@ Required:
- `master_image` (String) The name of the master image that will be the template for all virtual machines in this catalog.
- `memory_mb` (Number) The maximum amount of memory that virtual machines created from the provisioning scheme should use.
+Optional:
+
+- `image_update_reboot_options` (Attributes) The options for how rebooting is performed for image update. When omitted, image update on the VDAs will be performed on next shutdown. (see [below for nested schema](#nestedatt--provisioning_scheme--nutanix_machine_config--image_update_reboot_options))
+- `master_image_note` (String) The note for the master image.
+
+
+### Nested Schema for `provisioning_scheme.nutanix_machine_config.image_update_reboot_options`
+
+Required:
+
+- `reboot_duration` (Number) Approximate maximum duration over which the reboot cycle runs, in minutes. Set to `-1` to skip reboot, and perform image update on the VDAs on next shutdown. Set to `0` to reboot all machines immediately.
+
+Optional:
+
+- `warning_duration` (Number) Time in minutes prior to a machine reboot at which a warning message is displayed in all user sessions on that machine. When omitted, no warning about reboot will be displayed in user session.
+- `warning_message` (String) Warning message displayed in user sessions on a machine scheduled for a reboot. The optional pattern '%m%' is replaced by the number of minutes until the reboot.
+- `warning_repeat_interval` (Number) Number of minutes to wait before showing the reboot warning message again.
+
+
### Nested Schema for `provisioning_scheme.vsphere_machine_config`
@@ -638,8 +706,24 @@ Required:
Optional:
- `image_snapshot` (String) The Snapshot of the virtual machine specified in `master_image_vm`. Specify the relative path of the snapshot. Eg: snaphost-1/snapshot-2/snapshot-3. This property is case sensitive.
+- `image_update_reboot_options` (Attributes) The options for how rebooting is performed for image update. When omitted, image update on the VDAs will be performed on next shutdown. (see [below for nested schema](#nestedatt--provisioning_scheme--vsphere_machine_config--image_update_reboot_options))
+- `master_image_note` (String) The note for the master image.
- `writeback_cache` (Attributes) Write-back Cache config. Leave this empty to disable Write-back Cache. (see [below for nested schema](#nestedatt--provisioning_scheme--vsphere_machine_config--writeback_cache))
+
+### Nested Schema for `provisioning_scheme.vsphere_machine_config.image_update_reboot_options`
+
+Required:
+
+- `reboot_duration` (Number) Approximate maximum duration over which the reboot cycle runs, in minutes. Set to `-1` to skip reboot, and perform image update on the VDAs on next shutdown. Set to `0` to reboot all machines immediately.
+
+Optional:
+
+- `warning_duration` (Number) Time in minutes prior to a machine reboot at which a warning message is displayed in all user sessions on that machine. When omitted, no warning about reboot will be displayed in user session.
+- `warning_message` (String) Warning message displayed in user sessions on a machine scheduled for a reboot. The optional pattern '%m%' is replaced by the number of minutes until the reboot.
+- `warning_repeat_interval` (Number) Number of minutes to wait before showing the reboot warning message again.
+
+
### Nested Schema for `provisioning_scheme.vsphere_machine_config.writeback_cache`
@@ -666,8 +750,24 @@ Required:
Optional:
- `image_snapshot` (String) The Snapshot of the virtual machine specified in `master_image_vm`. Specify the relative path of the snapshot. Eg: snaphost-1/snapshot-2/snapshot-3. This property is case sensitive.
+- `image_update_reboot_options` (Attributes) The options for how rebooting is performed for image update. When omitted, image update on the VDAs will be performed on next shutdown. (see [below for nested schema](#nestedatt--provisioning_scheme--xenserver_machine_config--image_update_reboot_options))
+- `master_image_note` (String) The note for the master image.
- `writeback_cache` (Attributes) Write-back Cache config. Leave this empty to disable Write-back Cache. (see [below for nested schema](#nestedatt--provisioning_scheme--xenserver_machine_config--writeback_cache))
+
+### Nested Schema for `provisioning_scheme.xenserver_machine_config.image_update_reboot_options`
+
+Required:
+
+- `reboot_duration` (Number) Approximate maximum duration over which the reboot cycle runs, in minutes. Set to `-1` to skip reboot, and perform image update on the VDAs on next shutdown. Set to `0` to reboot all machines immediately.
+
+Optional:
+
+- `warning_duration` (Number) Time in minutes prior to a machine reboot at which a warning message is displayed in all user sessions on that machine. When omitted, no warning about reboot will be displayed in user session.
+- `warning_message` (String) Warning message displayed in user sessions on a machine scheduled for a reboot. The optional pattern '%m%' is replaced by the number of minutes until the reboot.
+- `warning_repeat_interval` (Number) Number of minutes to wait before showing the reboot warning message again.
+
+
### Nested Schema for `provisioning_scheme.xenserver_machine_config.writeback_cache`
diff --git a/docs/resources/nutanix_hypervisor.md b/docs/resources/nutanix_hypervisor.md
index ac8a61e..f7d54aa 100644
--- a/docs/resources/nutanix_hypervisor.md
+++ b/docs/resources/nutanix_hypervisor.md
@@ -42,6 +42,7 @@ resource "citrix_nutanix_hypervisor" "example-nutanix-hypervisor" {
- `max_absolute_active_actions` (Number) Maximum number of actions that can execute in parallel on the hypervisor. Default is 100.
- `max_absolute_new_actions_per_minute` (Number) Maximum number of actions that can be started on the hypervisor per-minute. Default is 10.
- `max_power_actions_percentage_of_machines` (Number) Maximum percentage of machines on the hypervisor which can have their power state changed simultaneously. Default is 20.
+- `scopes` (Set of String) The IDs of the scopes for the hypervisor to be a part of.
### Read-Only
diff --git a/docs/resources/nutanix_hypervisor_resource_pool.md b/docs/resources/nutanix_hypervisor_resource_pool.md
index 86ab7c9..596929b 100644
--- a/docs/resources/nutanix_hypervisor_resource_pool.md
+++ b/docs/resources/nutanix_hypervisor_resource_pool.md
@@ -30,7 +30,7 @@ resource "citrix_nutanix_hypervisor_resource_pool" "example-nutanix-hypervisor-r
- `hypervisor` (String) Id of the hypervisor for which the resource pool needs to be created.
- `name` (String) Name of the resource pool. Name should be unique across all hypervisors.
-- `networks` (List of String) List of networks for allocating resources.
+- `networks` (List of String) Networks for allocating resources.
### Read-Only
diff --git a/docs/resources/policy_set.md b/docs/resources/policy_set.md
index 5e28676..51d9ab0 100644
--- a/docs/resources/policy_set.md
+++ b/docs/resources/policy_set.md
@@ -17,7 +17,7 @@ resource "citrix_policy_set" "example-policy-set" {
name = "example-policy-set"
description = "This is an example policy set description"
type = "DeliveryGroupPolicies"
- scopes = [ "All", citrix_admin_scope.example-admin-scope.name ]
+ scopes = [ citrix_admin_scope.example-admin-scope.id ]
policies = [
{
name = "test-policy-with-priority-0"
@@ -30,13 +30,64 @@ resource "citrix_policy_set" "example-policy-set" {
use_default = false
},
]
- policy_filters = [
+ access_control_filters = [
{
- type = "DesktopGroup"
- data = {
- server = "0.0.0.0"
- uuid = citrix_delivery_group.example-delivery-group.id
- }
+ connection = "WithAccessGateway"
+ condition = "*"
+ gateway = "*"
+ enabled = true
+ allowed = true
+ },
+ ]
+ branch_repeater_filter = {
+ enabled = true
+ allowed = true
+ },
+ client_ip_filters = [
+ {
+ ip_address = "10.0.0.1"
+ enabled = true
+ allowed = true
+ }
+ ]
+ client_name_filters = [
+ {
+ client_name = "Example Client Name"
+ enabled = true
+ allowed = true
+ }
+ ]
+ delivery_group_filters = [
+ {
+ delivery_group_id = citrix_delivery_group.example-delivery-group.id
+ enabled = true
+ allowed = true
+ },
+ ]
+ delivery_group_type_filters = [
+ {
+ delivery_group_type = "Private"
+ enabled = true
+ allowed = true
+ },
+ ]
+ ou_filters = [
+ {
+ ou = "{Path of the oranizational unit to be filtered}"
+ enabled = true
+ allowed = true
+ },
+ ]
+ user_filters = [
+ {
+ sid = "{SID of the user or user group to be filtered}"
+ enabled = true
+ allowed = true
+ },
+ ]
+ tag_filters = [
+ {
+ tag = "{ID of the tag to be filtered}"
enabled = true
allowed = true
},
@@ -47,7 +98,6 @@ resource "citrix_policy_set" "example-policy-set" {
description = "Test policy in the example policy set with priority 1"
enabled = false
policy_settings = []
- policy_filters = []
}
]
}
@@ -60,17 +110,17 @@ resource "citrix_policy_set" "example-policy-set" {
- `name` (String) Name of the policy set.
- `policies` (Attributes List) Ordered list of policies. The order of policies in the list determines the priority of the policies. (see [below for nested schema](#nestedatt--policies))
-- `type` (String) Type of the policy set. Type can be one of `SitePolicies`, `DeliveryGroupPolicies`, `SiteTemplates`, or `CustomTemplates`.
### Optional
- `description` (String) Description of the policy set.
-- `scopes` (List of String) The names of the scopes for the policy set to apply on.
+- `scopes` (Set of String) The IDs of the scopes for the policy set to be a part of.
+- `type` (String) Type of the policy set. Type can be one of `SitePolicies`, `DeliveryGroupPolicies`, `SiteTemplates`, or `CustomTemplates`.
### Read-Only
+- `assigned` (Boolean) Indicate whether the policy set is being assigned to delivery groups.
- `id` (String) GUID identifier of the policy set.
-- `is_assigned` (Boolean) Indicate whether the policy set is being assigned to delivery groups.
### Nested Schema for `policies`
@@ -79,52 +129,124 @@ Required:
- `enabled` (Boolean) Indicate whether the policy is being enabled.
- `name` (String) Name of the policy.
-- `policy_filters` (Attributes List) Set of policy filters. (see [below for nested schema](#nestedatt--policies--policy_filters))
- `policy_settings` (Attributes List) Set of policy settings. (see [below for nested schema](#nestedatt--policies--policy_settings))
Optional:
+- `access_control_filters` (Attributes List) Access control policy filters. (see [below for nested schema](#nestedatt--policies--access_control_filters))
+- `branch_repeater_filter` (Attributes) Set of policy filters. (see [below for nested schema](#nestedatt--policies--branch_repeater_filter))
+- `client_ip_filters` (Attributes List) Client ip policy filters. (see [below for nested schema](#nestedatt--policies--client_ip_filters))
+- `client_name_filters` (Attributes List) Client name policy filters. (see [below for nested schema](#nestedatt--policies--client_name_filters))
+- `delivery_group_filters` (Attributes List) Delivery group policy filters. (see [below for nested schema](#nestedatt--policies--delivery_group_filters))
+- `delivery_group_type_filters` (Attributes List) Delivery group type policy filters. (see [below for nested schema](#nestedatt--policies--delivery_group_type_filters))
- `description` (String) Description of the policy.
+- `ou_filters` (Attributes List) Organizational unit policy filters. (see [below for nested schema](#nestedatt--policies--ou_filters))
+- `tag_filters` (Attributes List) Tag policy filters. (see [below for nested schema](#nestedatt--policies--tag_filters))
+- `user_filters` (Attributes List) User policy filters. (see [below for nested schema](#nestedatt--policies--user_filters))
-
-### Nested Schema for `policies.policy_filters`
+
+### Nested Schema for `policies.policy_settings`
Required:
-- `allowed` (Boolean) Indicate the filtered policy is allowed or denied if the filter condition is met.
-- `enabled` (Boolean) Indicate whether the policy is being enabled.
-- `type` (String) Type of the policy filter. Type can be one of `AccessControl`, `BranchRepeater`, `ClientIP`, `ClientName`, `DesktopGroup`, `DesktopKind`, `OU`, `User`, and `DesktopTag`
+- `name` (String) Name of the policy setting name.
+- `use_default` (Boolean) Indicate whether using default value for the policy setting.
Optional:
-- `data` (Attributes) Data of the policy filter. (see [below for nested schema](#nestedatt--policies--policy_filters--data))
+- `enabled` (Boolean) Whether of the policy setting has enabled or allowed value.
+- `value` (String) Value of the policy setting.
-
-### Nested Schema for `policies.policy_filters.data`
-Optional:
+
+### Nested Schema for `policies.access_control_filters`
-- `condition` (String) Gateway condition for the policy filter data.
-- `connection` (String) Gateway connection for the policy filter data.
-- `gateway` (String) Gateway for the policy filter data.
-- `server` (String) Server address for the policy filter data.
-- `uuid` (String) Resource UUID for the policy filter data.
-- `value` (String) Va;ie for the policy filter data.
+Required:
+- `allowed` (Boolean) Indicate the filtered policy is allowed or denied if the filter condition is met.
+- `condition` (String) Gateway condition for the policy filter.
+- `connection` (String) Gateway connection for the policy filter.
+- `enabled` (Boolean) Indicate whether the filter is being enabled.
+- `gateway` (String) Gateway for the policy filter.
-
-### Nested Schema for `policies.policy_settings`
+
+### Nested Schema for `policies.branch_repeater_filter`
Required:
-- `name` (String) Name of the policy setting name.
-- `use_default` (Boolean) Indicate whether using default value for the policy setting.
+- `allowed` (Boolean) Indicate the filtered policy is allowed or denied if the filter condition is met.
+- `enabled` (Boolean) Indicate whether the filter is being enabled.
-Optional:
-- `enabled` (Boolean) Whether of the policy setting has enabled or allowed value.
-- `value` (String) Value of the policy setting.
+
+### Nested Schema for `policies.client_ip_filters`
+
+Required:
+
+- `allowed` (Boolean) Indicate the filtered policy is allowed or denied if the filter condition is met.
+- `enabled` (Boolean) Indicate whether the filter is being enabled.
+- `ip_address` (String) IP Address of the client to be filtered.
+
+
+
+### Nested Schema for `policies.client_name_filters`
+
+Required:
+
+- `allowed` (Boolean) Indicate the filtered policy is allowed or denied if the filter condition is met.
+- `client_name` (String) Name of the client to be filtered.
+- `enabled` (Boolean) Indicate whether the filter is being enabled.
+
+
+
+### Nested Schema for `policies.delivery_group_filters`
+
+Required:
+
+- `allowed` (Boolean) Indicate the filtered policy is allowed or denied if the filter condition is met.
+- `delivery_group_id` (String) Id of the delivery group to be filtered.
+- `enabled` (Boolean) Indicate whether the filter is being enabled.
+
+
+
+### Nested Schema for `policies.delivery_group_type_filters`
+
+Required:
+
+- `allowed` (Boolean) Indicate the filtered policy is allowed or denied if the filter condition is met.
+- `delivery_group_type` (String) Type of the delivery groups to be filtered.
+- `enabled` (Boolean) Indicate whether the filter is being enabled.
+
+
+
+### Nested Schema for `policies.ou_filters`
+
+Required:
+
+- `allowed` (Boolean) Indicate the filtered policy is allowed or denied if the filter condition is met.
+- `enabled` (Boolean) Indicate whether the filter is being enabled.
+- `ou` (String) Organizational Unit to be filtered.
+
+
+
+### Nested Schema for `policies.tag_filters`
+
+Required:
+
+- `allowed` (Boolean) Indicate the filtered policy is allowed or denied if the filter condition is met.
+- `enabled` (Boolean) Indicate whether the filter is being enabled.
+- `tag` (String) Tag to be filtered.
+
+
+
+### Nested Schema for `policies.user_filters`
+
+Required:
+
+- `allowed` (Boolean) Indicate the filtered policy is allowed or denied if the filter condition is met.
+- `enabled` (Boolean) Indicate whether the filter is being enabled.
+- `sid` (String) SID of the user or user group to be filtered.
## Import
diff --git a/docs/resources/stf_authentication_service.md b/docs/resources/stf_authentication_service.md
index ebb03bb..25002db 100644
--- a/docs/resources/stf_authentication_service.md
+++ b/docs/resources/stf_authentication_service.md
@@ -3,12 +3,12 @@
page_title: "citrix_stf_authentication_service Resource - citrix"
subcategory: ""
description: |-
- Storefront Authentication Service.
+ StoreFront Authentication Service.
---
# citrix_stf_authentication_service (Resource)
-Storefront Authentication Service.
+StoreFront Authentication Service.
## Example Usage
diff --git a/docs/resources/stf_deployment.md b/docs/resources/stf_deployment.md
index 48e5211..f10755d 100644
--- a/docs/resources/stf_deployment.md
+++ b/docs/resources/stf_deployment.md
@@ -3,12 +3,12 @@
page_title: "citrix_stf_deployment Resource - citrix"
subcategory: ""
description: |-
- Storefront Deployment.
+ StoreFront Deployment.
---
# citrix_stf_deployment (Resource)
-Storefront Deployment.
+StoreFront Deployment.
## Example Usage
@@ -28,7 +28,7 @@ resource "citrix_stf_deployment" "example-stf-deployment" {
### Optional
-- `site_id` (String) The IIS site id of the Storefront deployment. Defaults to 1.
+- `site_id` (String) The IIS site id of the StoreFront deployment. Defaults to 1.
## Import
diff --git a/docs/resources/stf_store_service.md b/docs/resources/stf_store_service.md
index b3817a9..c78ea45 100644
--- a/docs/resources/stf_store_service.md
+++ b/docs/resources/stf_store_service.md
@@ -3,12 +3,12 @@
page_title: "citrix_stf_store_service Resource - citrix"
subcategory: ""
description: |-
- Storefront StoreService.
+ StoreFront StoreService.
---
# citrix_stf_store_service (Resource)
-Storefront StoreService.
+StoreFront StoreService.
## Example Usage
@@ -48,7 +48,7 @@ resource "citrix_stf_store_service" "example-stf-store-service" {
- `farm_config` (Attributes) Farm configuration for the Store. (see [below for nested schema](#nestedatt--farm_config))
- `friendly_name` (String) The friendly name of the Store
- `load_balance` (Boolean) Whether the Store is load balanced.
-- `site_id` (String) The IIS site id of the Storefront storeservice. Defaults to 1.
+- `site_id` (String) The IIS site id of the StoreFront storeservice. Defaults to 1.
### Nested Schema for `farm_config`
diff --git a/docs/resources/stf_user_farm_mapping.md b/docs/resources/stf_user_farm_mapping.md
new file mode 100644
index 0000000..5aeb509
--- /dev/null
+++ b/docs/resources/stf_user_farm_mapping.md
@@ -0,0 +1,93 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "citrix_stf_user_farm_mapping Resource - citrix"
+subcategory: ""
+description: |-
+ StoreFront User Farm Mapping Resource
+---
+
+# citrix_stf_user_farm_mapping (Resource)
+
+StoreFront User Farm Mapping Resource
+
+## Example Usage
+
+```terraform
+resource "citrix_stf_user_farm_mapping" "example-stf-user-farm-mapping" {
+ name = "Example STFUserFarmMapping"
+ store_virtual_path = citrix_stf_storeservice.example-stf-store-service.virtual_path
+ group_members = [
+ {
+ group_name = "TestGroup1"
+ account_sid = "{First Account Sid}"
+ },
+ {
+ group_name = "TestGroup2"
+ account_sid = "{Second Account Sid}"
+ }
+ ]
+ equivalent_farm_sets = [
+ {
+ name = "EU1",
+ aggregation_group_name = "EU1Users"
+ primary_farms = ["Primary"]
+ backup_farms = ["Backup"]
+ load_balance_mode = "LoadBalanced"
+ farms_are_identical = true
+ },
+ {
+ name = "EU2",
+ aggregation_group_name = "EU2Users"
+ primary_farms = ["Secondary"]
+ load_balance_mode = "Failover"
+ farms_are_identical = false
+ }
+ ]
+}
+```
+
+
+## Schema
+
+### Required
+
+- `equivalent_farm_sets` (Attributes List) Configurations of the EquivalentFarmSets that will be assigned to the UserFarmMapping. (see [below for nested schema](#nestedatt--equivalent_farm_sets))
+- `name` (String) The unique name used to identify the UserFarmMapping.
+- `store_virtual_path` (String) The IIS VirtualPath at which the Store is configured to be accessed by Receivers.
+
+### Optional
+
+- `group_members` (Attributes List) The Windows groups to which the UserFarmMapping will apply. Not specifying this field will assign all users to the UserFarmMapping. (see [below for nested schema](#nestedatt--group_members))
+
+
+### Nested Schema for `equivalent_farm_sets`
+
+Required:
+
+- `aggregation_group_name` (String) The AggregationGroupName used to de-duplicate applications and desktops that are available on multiple EquivalentFarmSets. Where multiple EquivalentFarmSets are defined the AggregationGroup will prevent the user seeing the application multiple times if it exists in both places.
+- `load_balance_mode` (String) The load balance mode, either `Failover` or `LoadBalanced`.
+- `name` (String) The unique Name used to identify the EquivalentFarmSet.
+- `primary_farms` (List of String) The PrimaryFarms. The farm names should match those defined in the Store service.
+
+Optional:
+
+- `backup_farms` (List of String) The BackupFarms. The farm names should match those defined in the Store Service.
+- `farms_are_identical` (Boolean) Whether the PrimaryFarms in the EquivalentFarmSet all publish identical resources. Set to true if all resources are identical on all primary farms. Set to false if the deployment has some unique resources per farm. Default to `false`.
+
+
+
+### Nested Schema for `group_members`
+
+Required:
+
+- `account_sid` (String) Sid of the account.
+- `group_name` (String) A display only group name.
+
+## Import
+
+Import is supported using the following syntax:
+
+```shell
+# StoreFront UserFarmMapping can be imported with the Store Virtual Path and UserFarmMapping Name
+terraform import citrix_stf_store_service.example-stf-store-service "/Citrix/Store","Example UserFarmMapping"
+```
diff --git a/docs/resources/stf_webreceiver_service.md b/docs/resources/stf_webreceiver_service.md
index c299357..233ca6a 100644
--- a/docs/resources/stf_webreceiver_service.md
+++ b/docs/resources/stf_webreceiver_service.md
@@ -3,12 +3,12 @@
page_title: "citrix_stf_webreceiver_service Resource - citrix"
subcategory: ""
description: |-
- Storefront WebReceiver.
+ StoreFront WebReceiver.
---
# citrix_stf_webreceiver_service (Resource)
-Storefront WebReceiver.
+StoreFront WebReceiver.
## Example Usage
@@ -40,10 +40,10 @@ resource "citrix_stf_webreceiver_service" "example-stf-webreceiver-service"{
### Optional
-- `authentication_methods` (List of String) The authentication methods supported by the WebReceiver.
+- `authentication_methods` (Set of String) The authentication methods supported by the WebReceiver.
- `friendly_name` (String) The friendly name of the WebReceiver
- `plugin_assistant` (Attributes) Pluin Assistant configuration for the WebReceiver. (see [below for nested schema](#nestedatt--plugin_assistant))
-- `site_id` (String) The IIS site id of the Storefront webreceiver. Defaults to 1.
+- `site_id` (String) The IIS site id of the StoreFront webreceiver. Defaults to 1.
- `store_service` (String) The StoreFront Store Service linked to the WebReceiver.
diff --git a/docs/resources/vsphere_hypervisor.md b/docs/resources/vsphere_hypervisor.md
index 5ce9181..e4c191d 100644
--- a/docs/resources/vsphere_hypervisor.md
+++ b/docs/resources/vsphere_hypervisor.md
@@ -42,6 +42,7 @@ resource "citrix_vsphere_hypervisor" "example-vsphere-hypervisor" {
- `max_absolute_active_actions` (Number) Maximum number of actions that can execute in parallel on the hypervisor. Default is 40.
- `max_absolute_new_actions_per_minute` (Number) Maximum number of actions that can be started on the hypervisor per-minute. Default is 10.
- `max_power_actions_percentage_of_machines` (Number) Maximum percentage of machines on the hypervisor which can have their power state changed simultaneously. Default is 20.
+- `scopes` (Set of String) The IDs of the scopes for the hypervisor to be a part of.
- `ssl_thumbprints` (List of String) SSL certificate thumbprints to consider acceptable for this connection. If not specified, and the hypervisor uses SSL for its connection, the SSL certificate's root certification authority and any intermediate certificates must be trusted.
### Read-Only
diff --git a/docs/resources/vsphere_hypervisor_resource_pool.md b/docs/resources/vsphere_hypervisor_resource_pool.md
index 0c0bfe9..8f02343 100644
--- a/docs/resources/vsphere_hypervisor_resource_pool.md
+++ b/docs/resources/vsphere_hypervisor_resource_pool.md
@@ -49,9 +49,9 @@ resource "citrix_vsphere_hypervisor_resource_pool" "example-vsphere-hypervisor-r
- `cluster` (Attributes) Details of the cluster where resources reside and new resources will be created. (see [below for nested schema](#nestedatt--cluster))
- `hypervisor` (String) Id of the hypervisor for which the resource pool needs to be created.
- `name` (String) Name of the resource pool. Name should be unique across all hypervisors.
-- `networks` (List of String) List of networks for allocating resources.
-- `storage` (Attributes List) List of hypervisor storage to use for OS data. (see [below for nested schema](#nestedatt--storage))
-- `temporary_storage` (Attributes List) List of hypervisor storage to use for temporary data. (see [below for nested schema](#nestedatt--temporary_storage))
+- `networks` (List of String) Networks for allocating resources.
+- `storage` (Attributes List) Storage resources to use for OS data. (see [below for nested schema](#nestedatt--storage))
+- `temporary_storage` (Attributes List) Storage resources to use for temporary data. (see [below for nested schema](#nestedatt--temporary_storage))
### Optional
diff --git a/docs/resources/xenserver_hypervisor.md b/docs/resources/xenserver_hypervisor.md
index 55aa2d0..e4a4e60 100644
--- a/docs/resources/xenserver_hypervisor.md
+++ b/docs/resources/xenserver_hypervisor.md
@@ -46,6 +46,7 @@ resource "citrix_xenserver_hypervisor" "example-xenserver-hypervisor" {
- `max_absolute_active_actions` (Number) Maximum number of actions that can execute in parallel on the hypervisor. Default is 40.
- `max_absolute_new_actions_per_minute` (Number) Maximum number of actions that can be started on the hypervisor per-minute. Default is 10.
- `max_power_actions_percentage_of_machines` (Number) Maximum percentage of machines on the hypervisor which can have their power state changed simultaneously. Default is 20.
+- `scopes` (Set of String) The IDs of the scopes for the hypervisor to be a part of.
- `ssl_thumbprints` (List of String) SSL certificate thumbprints to consider acceptable for this connection. If not specified, and the hypervisor uses SSL for its connection, the SSL certificate's root certification authority and any intermediate certificates must be trusted.
### Read-Only
diff --git a/docs/resources/xenserver_hypervisor_resource_pool.md b/docs/resources/xenserver_hypervisor_resource_pool.md
index 6049aa1..16e2e78 100644
--- a/docs/resources/xenserver_hypervisor_resource_pool.md
+++ b/docs/resources/xenserver_hypervisor_resource_pool.md
@@ -43,7 +43,7 @@ resource "citrix_xenserver_hypervisor_resource_pool" "example-xenserver-hypervis
- `hypervisor` (String) Id of the hypervisor for which the resource pool needs to be created.
- `name` (String) Name of the resource pool. Name should be unique across all hypervisors.
-- `networks` (List of String) List of networks for allocating resources.
+- `networks` (List of String) Networks for allocating resources.
- `storage` (Attributes List) List of hypervisor storage to use for OS data. (see [below for nested schema](#nestedatt--storage))
- `temporary_storage` (Attributes List) List of hypervisor storage to use for temporary data. (see [below for nested schema](#nestedatt--temporary_storage))
diff --git a/examples/README.md b/examples/README.md
new file mode 100644
index 0000000..fd09f1d
--- /dev/null
+++ b/examples/README.md
@@ -0,0 +1,67 @@
+# Plugin for Terraform Provider for Citrix® Examples
+
+This folder contains examples of how to configure Citrix environments in various ways using this provider.
+
+## Table of Contents
+- [Plugin for Terraform Provider for Citrix® Examples](#plugin-for-terraform-provider-for-citrix-examples)
+ - [Table of Contents](#table-of-contents)
+ - [How to use the examples](#how-to-use-the-examples)
+ - [Specifying variables](#specifying-variables)
+ - [Provider settings](#provider-settings)
+ - [Examples](#examples)
+ - [Basic MCS](#basic-mcs)
+ - [Non-domain joined MCS](#non-domain-joined-mcs)
+ - [Detailed instructions for cloud providers:](#detailed-instructions-for-cloud-providers)
+
+## How to use the examples
+Clone this repository and then navigate to the given example directory, [specify the variables](#specifying-variables), and run terraform there:
+```shell
+> git clone https://github.com/citrix/terraform-provider-citrix.git
+> cd terraform-provider-citrix/examples/basic_azure_mcs_vda
+> cp terraform.template.tfvars terraform.tfvars
+> vscode terraform.tfvars # open the file and specify variables
+> terraform init
+> terraform plan
+> terraform apply
+```
+
+### Specifying variables
+Each example contains a [variables.tf](basic_azure_mcs_vda/variables.tf) file which needs to be specified. There are also some default values and configuration options in the other `.tf` files in the directory. Review these options and adjust depending on your use case.
+
+The variables can be specified by copying the [terraform.template.tfvars](basic_azure_mcs_vda/terraform.template.tfvars) file to `terraform.tfvars` and then filling it out with your values.
+
+Another option is to pass them into the terraform command one by one:
+```shell
+terraform apply -var="customer_id=" -var="client_id=" -var=...
+```
+
+This method has the benefit of being able to fetch secrets from secure locations and pass them via the commandline in the form of shell or environment variables.
+
+### Provider settings
+Each example contains a `citrix.tf` file with the Citrix provider configuration. In this file select between on-premises and Cloud and fill in the required credentials, then delete the other one so there is only one Citrix provider configuration.
+
+
+## Examples
+
+### Basic MCS
+Each of the following examples creates a single multi-session domain joined VDA in the given hypervisor using machine creation services. The VDA is power managed and uses autoscale to stay powered on between 9am and 5pm. [machine_catalogs.tf](basic_azure_mcs_vda/machine_catalogs.tf) can be modified depending how the master image is stored. *Note for Cloud customers*, the zone specified by `var.zone_name` needs to already exist and have [Cloud Connectors](https://docs.citrix.com/en-us/citrix-cloud/citrix-cloud-resource-locations/citrix-cloud-connector.html) configured.
+* [AWS EC2](basic_aws_mcs_vda/)
+* [Microsoft Azure](basic_azure_mcs_vda/)
+ * If using an Azure image gallery, uncomment the `gallery_image` in [machine_catalogs.tf](basic_azure_mcs_vda/machine_catalogs.tf) and remove the VHD parameters.
+* [Google Cloud Compute](basic_gcp_mcs_vda/)
+* [Nutanix](basic_nutanix_mcs_vda/)
+* [VMware vSphere](basic_vsphere_mcs_vda/)
+* [XenServer](basic_xenserver_mcs_vda/)
+
+### Non-domain joined MCS
+A single example of how to create a non-domain joined VDA, based on the [basic_azure_mcs_vda](basic_aws_mcs_vda/) example.
+* [Microsoft Azure](non_domain_joined_azure_mcs_vda/)
+ * If using an Azure image gallery, uncomment the `gallery_image` in [machine_catalogs.tf](basic_azure_mcs_vda/machine_catalogs.tf) and remove the VHD parameters.
+
+The difference is in [machine_catalogs.tf](non_domain_joined_azure_mcs_vda/machine_catalogs.tf), `provisioning_scheme.identity_type = "Workgroup"` and the addition of a Citrix Group Policy in [policy_sets.tf](non_domain_joined_azure_mcs_vda/policy_sets.tf).
+
+### Detailed instructions for cloud providers:
+Detailed instructions on setting up deployments on different cloud providers from Citrix Tech Zone:
+- [AWS EC2](https://community.citrix.com/tech-zone/build/deployment-guides/terraform-daas-aws/)
+- [Azure](https://community.citrix.com/tech-zone/build/deployment-guides/citrix-daas-terraform-azure/)
+- [GCP](https://community.citrix.com/tech-zone/build/deployment-guides/terraform-daas-gcp/)
diff --git a/examples/basic_aws_mcs_vda/citrix.tf b/examples/basic_aws_mcs_vda/citrix.tf
index 5ac9b01..f32f7f4 100644
--- a/examples/basic_aws_mcs_vda/citrix.tf
+++ b/examples/basic_aws_mcs_vda/citrix.tf
@@ -1,17 +1,17 @@
-// On-Premises customer provider settings
-// Please comment out / remove this provider settings block if you are a Citrix Cloud customer
+# On-Premises customer provider settings
+# Please comment out / remove this provider settings block if you are a Citrix Cloud customer
provider "citrix" {
- hostname = ""
- client_id = "\\"
- client_secret = ""
- disable_ssl_verification = true # omit this field if DDC has valid SSL certificate configured
+ hostname = var.provider_hostname
+ client_id = "${var.provider_domain_fqdn}\\${var.provider_client_id}"
+ client_secret = "${var.provider_client_secret}"
+ disable_ssl_verification = var.provider_disable_ssl_verification
}
-// Citrix Cloud customer provider settings
-// Please comment out / remove this provider settings block if you are an On-Premises customer
+# Citrix Cloud customer provider settings
+# Please comment out / remove this provider settings block if you are an On-Premises customer
provider "citrix" {
- customer_id = "" # set your customer id
- client_id = ""
- client_secret = "" # API key client id and secret are needed to interact with Citrix Cloud APIs. These can be created/found under Identity and Access Management > API Access
- environment = "Production" # use "Japan" for Citrix Cloud customers in Japan region
+ customer_id = var.provider_customer_id
+ client_id = var.provider_client_id
+ client_secret = var.provider_client_secret
+ environment = var.provider_environment
}
diff --git a/examples/basic_aws_mcs_vda/delivery_group.tf b/examples/basic_aws_mcs_vda/delivery_groups.tf
similarity index 73%
rename from examples/basic_aws_mcs_vda/delivery_group.tf
rename to examples/basic_aws_mcs_vda/delivery_groups.tf
index 272dd56..bdc8d19 100644
--- a/examples/basic_aws_mcs_vda/delivery_group.tf
+++ b/examples/basic_aws_mcs_vda/delivery_groups.tf
@@ -1,6 +1,5 @@
resource "citrix_delivery_group" "example-delivery-group" {
- name = "example-delivery-group"
- minimum_functional_level = "L7_20"
+ name = var.delivery_group_name
associated_machine_catalogs = [
{
machine_catalog = citrix_machine_catalog.example-aws-catalog.id
@@ -10,19 +9,13 @@ resource "citrix_delivery_group" "example-delivery-group" {
desktops = [
{
published_name = "Example Desktop"
- description = "Desription for example desktop"
+ description = "Description for example desktop"
restricted_access_users = {
- allow_list = [
- "example\\user1"
- ]
- block_list = [
- "example\\user2",
- ]
+ allow_list = var.allow_list
}
enabled = true
enable_session_roaming = false
}
-
]
autoscale_settings = {
autoscale_enabled = true
@@ -51,11 +44,6 @@ resource "citrix_delivery_group" "example-delivery-group" {
]
}
restricted_access_users = {
- allow_list = [
- "example\\user1"
- ]
- block_list = [
- "example\\user2",
- ]
+ allow_list = var.allow_list
}
}
diff --git a/examples/basic_aws_mcs_vda/hypervisors.tf b/examples/basic_aws_mcs_vda/hypervisors.tf
index a0826d5..a3cf08d 100644
--- a/examples/basic_aws_mcs_vda/hypervisors.tf
+++ b/examples/basic_aws_mcs_vda/hypervisors.tf
@@ -1,8 +1,8 @@
# AWS Hypervisor
resource "citrix_aws_hypervisor" "example-aws-hypervisor" {
- name = "example-aws-hyperv"
+ name = var.hypervisor_name
zone = citrix_zone.example-zone.id
- api_key = "{AWS API access key}"
- secret_key = "{AWS API secret key}"
- region = "us-east-1"
+ api_key = var.aws_api_key
+ secret_key = var.aws_secret_key
+ region = var.aws_region
}
diff --git a/examples/basic_aws_mcs_vda/machine_catalogs.tf b/examples/basic_aws_mcs_vda/machine_catalogs.tf
index 2b8420c..ea5bb1a 100644
--- a/examples/basic_aws_mcs_vda/machine_catalogs.tf
+++ b/examples/basic_aws_mcs_vda/machine_catalogs.tf
@@ -1,27 +1,24 @@
resource "citrix_machine_catalog" "example-aws-catalog" {
- name = "example-aws-catalog"
+ name = var.machine_catalog_name
description = "Example multi-session catalog on AWS hypervisor"
allocation_type = "Random"
session_support = "MultiSession"
- is_power_managed = true
- is_remote_pc = false
provisioning_type = "MCS"
zone = citrix_zone.example-zone.id
- minimum_functional_level = "L7_20"
provisioning_scheme = {
hypervisor = citrix_aws_hypervisor.example-aws-hypervisor.id
hypervisor_resource_pool = citrix_aws_hypervisor_resource_pool.example-aws-rp.id
identity_type = "ActiveDirectory"
machine_domain_identity = {
- domain = ""
- domain_ou = ""
- service_account = ""
- service_account_password = ""
+ domain = var.domain_fqdn
+ domain_ou = var.domain_ou
+ service_account = var.domain_service_account
+ service_account_password = var.domain_service_account_password
}
aws_machine_config = {
- image_ami = ""
- master_image = ""
- service_offering = "t2.small"
+ image_ami = var.aws_ami_id
+ master_image = var.aws_ami_name
+ service_offering = var.aws_service_offering
security_groups = [
"default"
]
@@ -29,7 +26,7 @@ resource "citrix_machine_catalog" "example-aws-catalog" {
}
number_of_total_machines = 1
machine_account_creation_rules = {
- naming_scheme = "ctx-aws-###"
+ naming_scheme = var.machine_catalog_naming_scheme
naming_scheme_type = "Numeric"
}
}
diff --git a/examples/basic_aws_mcs_vda/resource_pools.tf b/examples/basic_aws_mcs_vda/resource_pools.tf
index ddb810b..874e92f 100644
--- a/examples/basic_aws_mcs_vda/resource_pools.tf
+++ b/examples/basic_aws_mcs_vda/resource_pools.tf
@@ -1,9 +1,7 @@
resource "citrix_aws_hypervisor_resource_pool" "example-aws-rp" {
- name = "example-aws-rp"
+ name = var.resource_pool_name
hypervisor = citrix_aws_hypervisor.example-aws-hypervisor.id
- subnets = [
- "",
- ]
- vpc = ""
- availability_zone = "us-east-1a"
+ subnets = var.aws_subnets
+ vpc = var.aws_vpc
+ availability_zone = var.aws_availability_zone
}
diff --git a/examples/basic_aws_mcs_vda/terraform.template.tfvars b/examples/basic_aws_mcs_vda/terraform.template.tfvars
new file mode 100644
index 0000000..a9f8833
--- /dev/null
+++ b/examples/basic_aws_mcs_vda/terraform.template.tfvars
@@ -0,0 +1,37 @@
+# citrix.tf variables, uncomment the ones you need for on-premises or cloud
+# provider_hostname = "" # on-premises only
+# provider_domain_fqdn = "" # on-premises only
+provider_client_id = "" # or Citrx Cloud secure client ID for cloud
+provider_client_secret = "" # or Citrix Cloud secure client secret for cloud
+# provider_customer_id = "" # cloud only
+
+# delivery_groups.tf variables
+delivery_group_name = "example-delivery-group"
+allow_list = ["DOMAIN\\user1", "DOMAIN\\user2"]
+block_list = ["DOMAIN\\user3", "DOMAIN\\user4"]
+
+# hypervisors.tf variables
+hypervisor_name = "example-aws-hyperv"
+aws_api_key = ""
+aws_secret_key = ""
+aws_region = "us-east-1"
+
+# machine_catalogs.tf variables
+machine_catalog_name = "example-aws-catalog"
+domain_fqdn = ""
+domain_ou = ""
+domain_service_account = ""
+domain_service_account_password = ""
+aws_ami_id = ""
+aws_ami_name = ""
+aws_service_offering = "t2.small"
+machine_catalog_naming_scheme = "ctx-aws-##"
+
+# resource_pools.tf variables
+resource_pool_name = "example-aws-resource-pool"
+aws_subnets = [""]
+aws_vpc = ""
+aws_availability_zone = "us-east-1a"
+
+# zones.tf variables
+zone_name = "example-aws-zone"
\ No newline at end of file
diff --git a/examples/basic_aws_mcs_vda/terraform.tf b/examples/basic_aws_mcs_vda/terraform.tf
index f2f10f4..6484546 100644
--- a/examples/basic_aws_mcs_vda/terraform.tf
+++ b/examples/basic_aws_mcs_vda/terraform.tf
@@ -4,7 +4,7 @@ terraform {
required_providers {
citrix = {
source = "citrix/citrix"
- version = ">=0.5.1"
+ version = ">=0.6.1"
}
}
diff --git a/examples/basic_aws_mcs_vda/variables.tf b/examples/basic_aws_mcs_vda/variables.tf
new file mode 100644
index 0000000..0ab2df3
--- /dev/null
+++ b/examples/basic_aws_mcs_vda/variables.tf
@@ -0,0 +1,170 @@
+# citrix.tf variables
+## On-Premises customer provider settings
+variable provider_hostname {
+ description = "The hostname of the Citrix Virtual Apps and Desktops Delivery Controller."
+ type = string
+ default = "" # Leave this variable empty for Citrix Cloud customer.
+}
+
+variable provider_domain_fqdn {
+ description = "The domain FQDN of the on-premises Active Directory."
+ type = string
+ default = null # Leave this variable empty for Citrix Cloud customer.
+}
+
+variable provider_disable_ssl_verification {
+ description = "Disable SSL verification for the Citrix Virtual Apps and Desktops Delivery Controller."
+ type = bool
+ default = false # Set this field to true if DDC does not have a valid SSL certificate configured. Omit this variable for Citrix Cloud customer.
+}
+
+## Citrix Cloud customer provider settings
+variable provider_customer_id {
+ description = "The customer id of the Citrix Cloud customer."
+ type = string
+ default = "" # Set your customer id for Citrix Cloud customer. Omit this variable for On-Premises customer.
+}
+
+variable provider_environment {
+ description = "The environment of the Citrix Cloud customer."
+ type = string
+ default = "Production" # Use "Japan" for Citrix Cloud customers in Japan region. Omit this variable for On-Premises customer.
+}
+
+# Common provider settings
+# For On-Premises customers: Domain Admin username and password are needed to interact with the Citrix Virtual Apps and Desktops Delivery Controller.
+# For Citrix Cloud customers: API key client id and secret are needed to interact with Citrix DaaS APIs. These can be created/found under Identity and Access Management > API Access
+variable provider_client_id {
+ description = "The Domain Admin username of the on-premises Active Directory / The API key client id for Citrix Cloud customer."
+ type = string
+ default = ""
+}
+
+variable provider_client_secret {
+ description = "The Domain Admin password of the on-premises Active Directory / The API key client secret for Citrix Cloud customer."
+ type = string
+ default = ""
+}
+
+
+# delivery_groups.tf variables
+variable "delivery_group_name" {
+ description = "Name of the Delivery Group to create"
+ type = string
+ default = "example-delivery-group"
+}
+
+variable "allow_list" {
+ description = "List of users to allow for the Delivery Group in DOMAIN\\username format"
+ type = list(string)
+ default = []
+}
+
+
+# hypervisors.tf variables
+variable "hypervisor_name" {
+ description = "Name of the Hypervisor to create"
+ type = string
+ default = "example-aws-hyperv"
+}
+
+variable "aws_api_key" {
+ description = "AWS API Key"
+ type = string
+ sensitive = true
+}
+
+variable "aws_secret_key" {
+ description = "AWS Secret Key"
+ type = string
+ sensitive = true
+}
+
+variable "aws_region" {
+ description = "AWS Region"
+ type = string
+ default = "us-east-1"
+}
+
+
+# machine_catalogs.tf variables
+variable "machine_catalog_name" {
+ description = "Name of the Machine Catalog to create"
+ type = string
+ default = "example-aws-catalog"
+}
+
+variable "domain_fqdn" {
+ description = "Domain FQDN"
+ type = string
+}
+
+variable "domain_ou" {
+ description = "Domain organizational unit"
+ type = string
+ default = null
+}
+
+variable "domain_service_account" {
+ description = "Domain service account with permissions to create machine accounts"
+ type = string
+}
+
+variable "domain_service_account_password" {
+ description = "Domain service account password"
+ type = string
+ sensitive = true
+}
+
+variable "aws_ami_id" {
+ description = "AWS AMI ID"
+ type = string
+}
+
+variable "aws_ami_name" {
+ description = "AWS AMI Name"
+ type = string
+}
+
+variable "aws_service_offering" {
+ description = "AWS Service Offering"
+ type = string
+ default = "t2.small"
+}
+
+variable "machine_catalog_naming_scheme" {
+ description = "Machine Catalog naming scheme"
+ type = string
+ default = "ctx-aws-##"
+}
+
+
+# resource_pools.tf variables
+variable "resource_pool_name" {
+ description = "Name of the Resource Pool to create"
+ type = string
+ default = "example-aws-rp"
+}
+
+variable "aws_subnets" {
+ description = "List of AWS subnets"
+ type = list(string)
+}
+
+variable "aws_vpc" {
+ description = "AWS VPC name"
+ type = string
+}
+
+variable "aws_availability_zone" {
+ description = "AWS Availability Zone"
+ type = string
+ default = "us-east-1a"
+}
+
+
+# zones.tf variables
+variable "zone_name" {
+ description = "Name of the Zone to create. For Citrix Cloud customers the zone should already exist."
+ type = string
+}
diff --git a/examples/basic_aws_mcs_vda/zones.tf b/examples/basic_aws_mcs_vda/zones.tf
index b3f0728..f73a488 100644
--- a/examples/basic_aws_mcs_vda/zones.tf
+++ b/examples/basic_aws_mcs_vda/zones.tf
@@ -1,4 +1,3 @@
resource "citrix_zone" "example-zone" {
- name = "example zone"
- description = "description for example zone"
+ name = var.zone_name
}
diff --git a/examples/basic_azure_mcs_vda/citrix.tf b/examples/basic_azure_mcs_vda/citrix.tf
index 5ac9b01..f32f7f4 100644
--- a/examples/basic_azure_mcs_vda/citrix.tf
+++ b/examples/basic_azure_mcs_vda/citrix.tf
@@ -1,17 +1,17 @@
-// On-Premises customer provider settings
-// Please comment out / remove this provider settings block if you are a Citrix Cloud customer
+# On-Premises customer provider settings
+# Please comment out / remove this provider settings block if you are a Citrix Cloud customer
provider "citrix" {
- hostname = ""
- client_id = "\\"
- client_secret = ""
- disable_ssl_verification = true # omit this field if DDC has valid SSL certificate configured
+ hostname = var.provider_hostname
+ client_id = "${var.provider_domain_fqdn}\\${var.provider_client_id}"
+ client_secret = "${var.provider_client_secret}"
+ disable_ssl_verification = var.provider_disable_ssl_verification
}
-// Citrix Cloud customer provider settings
-// Please comment out / remove this provider settings block if you are an On-Premises customer
+# Citrix Cloud customer provider settings
+# Please comment out / remove this provider settings block if you are an On-Premises customer
provider "citrix" {
- customer_id = "" # set your customer id
- client_id = ""
- client_secret = "" # API key client id and secret are needed to interact with Citrix Cloud APIs. These can be created/found under Identity and Access Management > API Access
- environment = "Production" # use "Japan" for Citrix Cloud customers in Japan region
+ customer_id = var.provider_customer_id
+ client_id = var.provider_client_id
+ client_secret = var.provider_client_secret
+ environment = var.provider_environment
}
diff --git a/examples/basic_azure_mcs_vda/delivery_group.tf b/examples/basic_azure_mcs_vda/delivery_group.tf
deleted file mode 100644
index 0efc666..0000000
--- a/examples/basic_azure_mcs_vda/delivery_group.tf
+++ /dev/null
@@ -1,61 +0,0 @@
-resource "citrix_delivery_group" "example-delivery-group" {
- name = "example-delivery-group"
- minimum_functional_level = "L7_20"
- associated_machine_catalogs = [
- {
- machine_catalog = citrix_machine_catalog.example-catalog.id
- machine_count = 1
- }
- ]
- desktops = [
- {
- published_name = "Example Desktop"
- description = "Desription for example desktop"
- restricted_access_users = {
- allow_list = [
- "example\\user1"
- ]
- block_list = [
- "example\\user2",
- ]
- }
- enabled = true
- enable_session_roaming = false
- }
-
- ]
- autoscale_settings = {
- autoscale_enabled = true
- power_time_schemes = [
- {
- days_of_week = [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday"
- ]
- name = "weekdays test"
- display_name = "weekdays schedule"
- peak_time_ranges = [
- "09:00-17:00"
- ]
- pool_size_schedules = [
- {
- time_range = "00:00-00:00",
- pool_size = 1
- }
- ]
- pool_using_percentage = false
- },
- ]
- }
- restricted_access_users = {
- allow_list = [
- "example\\user1"
- ]
- block_list = [
- "example\\user2",
- ]
- }
-}
\ No newline at end of file
diff --git a/examples/basic_azure_mcs_vda/delivery_groups.tf b/examples/basic_azure_mcs_vda/delivery_groups.tf
new file mode 100644
index 0000000..4918a56
--- /dev/null
+++ b/examples/basic_azure_mcs_vda/delivery_groups.tf
@@ -0,0 +1,49 @@
+resource "citrix_delivery_group" "example-delivery-group" {
+ name = var.delivery_group_name
+ associated_machine_catalogs = [
+ {
+ machine_catalog = citrix_machine_catalog.example-catalog.id
+ machine_count = 1
+ }
+ ]
+ desktops = [
+ {
+ published_name = "Example Desktop"
+ description = "Description for example desktop"
+ restricted_access_users = {
+ allow_list = var.allow_list
+ }
+ enabled = true
+ enable_session_roaming = false
+ }
+ ]
+ autoscale_settings = {
+ autoscale_enabled = true
+ power_time_schemes = [
+ {
+ days_of_week = [
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday"
+ ]
+ name = "weekdays test"
+ display_name = "weekdays schedule"
+ peak_time_ranges = [
+ "09:00-17:00"
+ ]
+ pool_size_schedules = [
+ {
+ time_range = "00:00-00:00",
+ pool_size = 1
+ }
+ ]
+ pool_using_percentage = false
+ },
+ ]
+ }
+ restricted_access_users = {
+ allow_list = var.allow_list
+ }
+}
\ No newline at end of file
diff --git a/examples/basic_azure_mcs_vda/hypervisors.tf b/examples/basic_azure_mcs_vda/hypervisors.tf
index 175b8db..556d0a8 100644
--- a/examples/basic_azure_mcs_vda/hypervisors.tf
+++ b/examples/basic_azure_mcs_vda/hypervisors.tf
@@ -1,8 +1,8 @@
resource "citrix_azure_hypervisor" "example-azure-hypervisor" {
- name = "example-azure-hyperv"
+ name = var.hypervisor_name
zone = citrix_zone.example-zone.id
- application_id = ""
- application_secret = ""
- subscription_id = ""
- active_directory_id = ""
+ application_id = var.azure_application_id
+ application_secret = var.azure_application_secret
+ subscription_id = var.azure_subscription_id
+ active_directory_id = var.azure_tenant_id
}
\ No newline at end of file
diff --git a/examples/basic_azure_mcs_vda/machine_catalogs.tf b/examples/basic_azure_mcs_vda/machine_catalogs.tf
index 46a6539..d6d2b7a 100644
--- a/examples/basic_azure_mcs_vda/machine_catalogs.tf
+++ b/examples/basic_azure_mcs_vda/machine_catalogs.tf
@@ -1,36 +1,42 @@
resource "citrix_machine_catalog" "example-catalog" {
- name = "example-catalog"
+ name = var.machine_catalog_name
description = "description for example catalog"
allocation_type = "Random"
session_support = "MultiSession"
- is_power_managed = true
- is_remote_pc = false
provisioning_type = "MCS"
zone = citrix_zone.example-zone.id
- minimum_functional_level = "L7_20"
provisioning_scheme = {
hypervisor = citrix_azure_hypervisor.example-azure-hypervisor.id
hypervisor_resource_pool = citrix_azure_hypervisor_resource_pool.example-azure-rp.id
identity_type = "ActiveDirectory"
- machine_domain_identity = {
- domain = ""
- service_account = ""
- service_account_password = ""
- }
+ machine_domain_identity = {
+ domain = var.domain_fqdn
+ domain_ou = var.domain_ou
+ service_account = var.domain_service_account
+ service_account_password = var.domain_service_account_password
+ }
azure_machine_config = {
- service_offering = "Standard_D2_v2"
- azure_master_image = {
- resource_group = ""
- storage_account = ""
- container = ""
- master_image = ""
+ service_offering = var.azure_service_offering
+ azure_master_image = {
+ # shared_subscription = var.azure_image_subscription # Uncomment if the image is from a subscription outside of the hypervisor's subscription
+
+ # For Azure master image from managed disk or snapshot
+ resource_group = var.azure_resource_group
+ master_image = var.azure_master_image
+
+ # For Azure image gallery
+ # gallery_image = {
+ # gallery = var.azure_gallery_name
+ # definition = var.azure_gallery_image_definition
+ # version = var.azure_gallery_image_version
+ # }
}
- storage_type = "Standard_LRS"
- use_managed_disks = true
+ storage_type = var.azure_storage_type
+ use_managed_disks = true
}
number_of_total_machines = 1
machine_account_creation_rules = {
- naming_scheme = "ctx-pvdr-##"
+ naming_scheme = var.machine_catalog_naming_scheme
naming_scheme_type = "Numeric"
}
}
diff --git a/examples/basic_azure_mcs_vda/resource_pools.tf b/examples/basic_azure_mcs_vda/resource_pools.tf
index ff58937..96fad0d 100644
--- a/examples/basic_azure_mcs_vda/resource_pools.tf
+++ b/examples/basic_azure_mcs_vda/resource_pools.tf
@@ -1,10 +1,8 @@
resource "citrix_azure_hypervisor_resource_pool" "example-azure-rp" {
- name = "example-azure-rp"
+ name = var.resource_pool_name
hypervisor = citrix_azure_hypervisor.example-azure-hypervisor.id
- region = "East US"
- virtual_network_resource_group = ""
- virtual_network = ""
- subnets = [
- ""
- ]
+ region = var.azure_region
+ virtual_network_resource_group = var.azure_vnet_resource_group
+ virtual_network = var.azure_vnet
+ subnets = var.azure_subnets
}
\ No newline at end of file
diff --git a/examples/basic_azure_mcs_vda/terraform.template.tfvars b/examples/basic_azure_mcs_vda/terraform.template.tfvars
new file mode 100644
index 0000000..24d694e
--- /dev/null
+++ b/examples/basic_azure_mcs_vda/terraform.template.tfvars
@@ -0,0 +1,44 @@
+# citrix.tf variables, uncomment the ones you need for on-premises or cloud
+# provider_hostname = "" # on-premises only
+# provider_domain_fqdn = "" # on-premises only
+provider_client_id = "" # or Citrx Cloud secure client ID for cloud
+provider_client_secret = "" # or Citrix Cloud secure client secret for cloud
+# provider_customer_id = "" # cloud only
+
+# delivery_groups.tf variables
+delivery_group_name = "example-delivery-group"
+allow_list = ["DOMAIN\\user1", "DOMAIN\\user2"]
+block_list = ["DOMAIN\\user3", "DOMAIN\\user4"]
+
+# hypervisors.tf variables
+hypervisor_name = "example-azure-hyperv"
+azure_application_id = ""
+azure_application_secret = ""
+azure_subscription_id = ""
+azure_tenant_id = ""
+
+# machine_catalogs.tf variables
+machine_catalog_name = "example-azure-catalog"
+domain_fqdn = ""
+domain_ou = ""
+domain_service_account = ""
+domain_service_account_password = ""
+azure_service_offering = "Standard_D2_v2"
+azure_storage_type = "Standard_LRS"
+#azure_image_subscription = ""
+azure_resource_group = ""
+azure_master_image = ""
+#azure_gallery_name = ""
+#azure_gallery_image_definition = ""
+#azure_gallery_image_version = ""
+machine_catalog_naming_scheme = "ctx-azure-##"
+
+# resource_pools.tf variables
+resource_pool_name = "example-azure-resource-pool"
+azure_region = "East US"
+azure_vnet_resource_group = ""
+azure_vnet = ""
+azure_subnets = [""]
+
+# zones.tf variables
+zone_name = "example-azure-zone"
\ No newline at end of file
diff --git a/examples/basic_azure_mcs_vda/terraform.tf b/examples/basic_azure_mcs_vda/terraform.tf
index f2f10f4..6484546 100644
--- a/examples/basic_azure_mcs_vda/terraform.tf
+++ b/examples/basic_azure_mcs_vda/terraform.tf
@@ -4,7 +4,7 @@ terraform {
required_providers {
citrix = {
source = "citrix/citrix"
- version = ">=0.5.1"
+ version = ">=0.6.1"
}
}
diff --git a/examples/basic_azure_mcs_vda/variables.tf b/examples/basic_azure_mcs_vda/variables.tf
new file mode 100644
index 0000000..f7edf14
--- /dev/null
+++ b/examples/basic_azure_mcs_vda/variables.tf
@@ -0,0 +1,206 @@
+# citrix.tf variables
+## On-Premises customer provider settings
+variable provider_hostname {
+ description = "The hostname of the Citrix Virtual Apps and Desktops Delivery Controller."
+ type = string
+ default = "" # Leave this variable empty for Citrix Cloud customer.
+}
+
+variable provider_domain_fqdn {
+ description = "The domain FQDN of the on-premises Active Directory."
+ type = string
+ default = null # Leave this variable empty for Citrix Cloud customer.
+}
+
+variable provider_disable_ssl_verification {
+ description = "Disable SSL verification for the Citrix Virtual Apps and Desktops Delivery Controller."
+ type = bool
+ default = false # Set this field to true if DDC does not have a valid SSL certificate configured. Omit this variable for Citrix Cloud customer.
+}
+
+## Citrix Cloud customer provider settings
+variable provider_customer_id {
+ description = "The customer id of the Citrix Cloud customer."
+ type = string
+ default = "" # Set your customer id for Citrix Cloud customer. Omit this variable for On-Premises customer.
+}
+
+variable provider_environment {
+ description = "The environment of the Citrix Cloud customer."
+ type = string
+ default = "Production" # Use "Japan" for Citrix Cloud customers in Japan region. Omit this variable for On-Premises customer.
+}
+
+# Common provider settings
+# For On-Premises customers: Domain Admin username and password are needed to interact with the Citrix Virtual Apps and Desktops Delivery Controller.
+# For Citrix Cloud customers: API key client id and secret are needed to interact with Citrix DaaS APIs. These can be created/found under Identity and Access Management > API Access
+variable provider_client_id {
+ description = "The Domain Admin username of the on-premises Active Directory / The API key client id for Citrix Cloud customer."
+ type = string
+ default = ""
+}
+
+variable provider_client_secret {
+ description = "The Domain Admin password of the on-premises Active Directory / The API key client secret for Citrix Cloud customer."
+ type = string
+ default = ""
+}
+
+
+# delivery_groups.tf variables
+variable "delivery_group_name" {
+ description = "Name of the Delivery Group to create"
+ type = string
+ default = "example-delivery-group"
+}
+
+variable "allow_list" {
+ description = "List of users to allow for the Delivery Group in DOMAIN\\username format"
+ type = list(string)
+}
+
+
+# hypervisors.tf variables
+variable "hypervisor_name" {
+ description = "Name of the Hypervisor to create"
+ type = string
+ default = "example-azure-hyperv"
+}
+
+variable "azure_application_id" {
+ description = "Azure SPN client ID"
+ type = string
+}
+
+variable "azure_application_secret" {
+ description = "Azure SPN client secret"
+ type = string
+ sensitive = true
+}
+
+variable "azure_subscription_id" {
+ description = "Azure subscription ID"
+ type = string
+}
+
+variable "azure_tenant_id" {
+ description = "Azure tenant ID"
+ type = string
+}
+
+
+# machine_catalogs.tf variables
+variable "machine_catalog_name" {
+ description = "Name of the Machine Catalog to create"
+ type = string
+ default = "example-azure-catalog"
+}
+
+variable "domain_fqdn" {
+ description = "Domain FQDN"
+ type = string
+}
+
+variable "domain_ou" {
+ description = "Domain organizational unit"
+ type = string
+ default = null
+}
+
+variable "domain_service_account" {
+ description = "Domain service account with permissions to create machine accounts"
+ type = string
+}
+
+variable "domain_service_account_password" {
+ description = "Domain service account password"
+ type = string
+ sensitive = true
+}
+
+variable "azure_service_offering" {
+ description = "Azure VM service offering SKU"
+ type = string
+ default = "Standard_D2_v2"
+}
+
+# variable "azure_image_subscription" {
+# description = "Azure subscription ID for the image, not needed if image is in the same subscription as the hypervisor"
+# type = string
+# }
+
+# For Azure master image from managed disk or snapshot
+variable "azure_resource_group" {
+ description = "Azure resource group containing the master image"
+ type = string
+}
+
+variable "azure_master_image" {
+ description = "Name of the master image managed disk or snapshot"
+ type = string
+}
+
+# For Azure image gallery
+# variable "azure_gallery_name" {
+# description = "Azure gallery image name"
+# type = string
+# }
+
+# variable "azure_gallery_image_definition" {
+# description = "Azure gallery image definition"
+# type = string
+# }
+
+# variable "azure_gallery_image_version" {
+# description = "Azure gallery image version"
+# type = string
+# default = "1.0.0"
+# }
+
+variable "azure_storage_type" {
+ description = "Azure storage type"
+ type = string
+ default = "Standard_LRS"
+}
+
+variable "machine_catalog_naming_scheme" {
+ description = "Machine Catalog naming scheme"
+ type = string
+ default = "ctx-azure-##"
+}
+
+
+# resource_pools.tf variables
+variable "resource_pool_name" {
+ description = "Name of the Resource Pool to create"
+ type = string
+ default = "example-azure-rp"
+}
+
+variable "azure_region" {
+ description = "Azure region for the Resource Pool"
+ type = string
+ default = "East US"
+}
+
+variable "azure_vnet_resource_group" {
+ description = "Name of the Azure virtual network resource group"
+ type = string
+}
+
+variable "azure_vnet" {
+ description = "Name of the Azure virtual network"
+ type = string
+}
+
+variable "azure_subnets" {
+ description = "List of Azure subnets"
+ type = list(string)
+}
+
+
+# zones.tf variables
+variable "zone_name" {
+ description = "Name of the Zone to create. For Citrix Cloud customers the zone should already exist."
+ type = string
+}
diff --git a/examples/basic_azure_mcs_vda/zones.tf b/examples/basic_azure_mcs_vda/zones.tf
index b3f0728..eeafc84 100644
--- a/examples/basic_azure_mcs_vda/zones.tf
+++ b/examples/basic_azure_mcs_vda/zones.tf
@@ -1,4 +1,4 @@
resource "citrix_zone" "example-zone" {
- name = "example zone"
+ name = var.zone_name
description = "description for example zone"
}
diff --git a/examples/basic_gcp_mcs_vda/citrix.tf b/examples/basic_gcp_mcs_vda/citrix.tf
index 5ac9b01..f32f7f4 100644
--- a/examples/basic_gcp_mcs_vda/citrix.tf
+++ b/examples/basic_gcp_mcs_vda/citrix.tf
@@ -1,17 +1,17 @@
-// On-Premises customer provider settings
-// Please comment out / remove this provider settings block if you are a Citrix Cloud customer
+# On-Premises customer provider settings
+# Please comment out / remove this provider settings block if you are a Citrix Cloud customer
provider "citrix" {
- hostname = ""
- client_id = "\\"
- client_secret = ""
- disable_ssl_verification = true # omit this field if DDC has valid SSL certificate configured
+ hostname = var.provider_hostname
+ client_id = "${var.provider_domain_fqdn}\\${var.provider_client_id}"
+ client_secret = "${var.provider_client_secret}"
+ disable_ssl_verification = var.provider_disable_ssl_verification
}
-// Citrix Cloud customer provider settings
-// Please comment out / remove this provider settings block if you are an On-Premises customer
+# Citrix Cloud customer provider settings
+# Please comment out / remove this provider settings block if you are an On-Premises customer
provider "citrix" {
- customer_id = "" # set your customer id
- client_id = ""
- client_secret = "" # API key client id and secret are needed to interact with Citrix Cloud APIs. These can be created/found under Identity and Access Management > API Access
- environment = "Production" # use "Japan" for Citrix Cloud customers in Japan region
+ customer_id = var.provider_customer_id
+ client_id = var.provider_client_id
+ client_secret = var.provider_client_secret
+ environment = var.provider_environment
}
diff --git a/examples/basic_vsphere_mcs_vda/delivery_group.tf b/examples/basic_gcp_mcs_vda/delivery_groups.tf
similarity index 75%
rename from examples/basic_vsphere_mcs_vda/delivery_group.tf
rename to examples/basic_gcp_mcs_vda/delivery_groups.tf
index 836f752..fb92a67 100644
--- a/examples/basic_vsphere_mcs_vda/delivery_group.tf
+++ b/examples/basic_gcp_mcs_vda/delivery_groups.tf
@@ -1,5 +1,5 @@
resource "citrix_delivery_group" "example-delivery-group" {
- name = "example-delivery-group"
+ name = var.delivery_group_name
associated_machine_catalogs = [
{
machine_catalog = citrix_machine_catalog.example-catalog.id
@@ -9,19 +9,13 @@ resource "citrix_delivery_group" "example-delivery-group" {
desktops = [
{
published_name = "Example Desktop"
- description = "Desription for example desktop"
+ description = "Description for example desktop"
restricted_access_users = {
- allow_list = [
- "example\\user1"
- ]
- block_list = [
- "example\\user2",
- ]
+ allow_list = var.allow_list
}
enabled = true
enable_session_roaming = false
}
-
]
autoscale_settings = {
autoscale_enabled = true
@@ -50,11 +44,6 @@ resource "citrix_delivery_group" "example-delivery-group" {
]
}
restricted_access_users = {
- allow_list = [
- "example\\user1"
- ]
- block_list = [
- "example\\user2",
- ]
+ allow_list = var.allow_list
}
}
\ No newline at end of file
diff --git a/examples/basic_gcp_mcs_vda/hypervisors.tf b/examples/basic_gcp_mcs_vda/hypervisors.tf
index c90741f..7f86373 100644
--- a/examples/basic_gcp_mcs_vda/hypervisors.tf
+++ b/examples/basic_gcp_mcs_vda/hypervisors.tf
@@ -1,7 +1,7 @@
resource "citrix_gcp_hypervisor" "example-gcp-hypervisor" {
- name = "example-gcp-hyperv"
+ name = var.hypervisor_name
zone = citrix_zone.example-zone.id
- service_account_id = "{GCP service account Id}"
- service_account_credentials = "{GCP service account private key}"
+ service_account_id = var.gcp_service_account_id
+ service_account_credentials = var.gcp_service_account_credentials
}
diff --git a/examples/basic_gcp_mcs_vda/machine_catalogs.tf b/examples/basic_gcp_mcs_vda/machine_catalogs.tf
index 3638513..e0ec2a9 100644
--- a/examples/basic_gcp_mcs_vda/machine_catalogs.tf
+++ b/examples/basic_gcp_mcs_vda/machine_catalogs.tf
@@ -1,36 +1,32 @@
resource "citrix_machine_catalog" "example-catalog" {
- name = "example-gcp-catalog"
+ name = var.machine_catalog_name
description = "description for example catalog"
allocation_type = "Random"
session_support = "MultiSession"
- is_power_managed = true
- is_remote_pc = false
provisioning_type = "MCS"
zone = citrix_zone.example-zone.id
- minimum_functional_level = "L7_20"
provisioning_scheme = {
hypervisor = citrix_gcp_hypervisor.example-gcp-hypervisor.id
hypervisor_resource_pool = citrix_gcp_hypervisor_resource_pool.example-gcp-rp.id
identity_type = "ActiveDirectory"
- machine_domain_identity = {
- domain = ""
- service_account = ""
- service_account_password = ""
+ machine_domain_identity = {
+ domain = var.domain_fqdn
+ domain_ou = var.domain_ou
+ service_account = var.domain_service_account
+ service_account_password = var.domain_service_account_password
}
gcp_machine_config = {
- storage_type = "pd-standard"
- machine_profile = ""
- master_image = ""
- machine_snapshot = ""
+ storage_type = var.gcp_storage_type
+ master_image = var.gcp_master_image
}
- availability_zones = "::,::,..."
+ availability_zones = var.gcp_availability_zones
number_of_total_machines = 1
machine_account_creation_rules = {
- naming_scheme = "ctx-pvdr-##"
+ naming_scheme = var.machine_catalog_naming_scheme
naming_scheme_type = "Numeric"
}
writeback_cache = {
- wbc_disk_storage_type = "pd-standard"
+ wbc_disk_storage_type = var.gcp_storage_type
persist_wbc = true
persist_os_disk = true
writeback_cache_disk_size_gb = 127
diff --git a/examples/basic_gcp_mcs_vda/resource_pools.tf b/examples/basic_gcp_mcs_vda/resource_pools.tf
index e8f3df6..1d1dda0 100644
--- a/examples/basic_gcp_mcs_vda/resource_pools.tf
+++ b/examples/basic_gcp_mcs_vda/resource_pools.tf
@@ -1,12 +1,10 @@
resource "citrix_gcp_hypervisor_resource_pool" "example-gcp-rp" {
- name = "example-gcp-rp"
+ name = var.resource_pool_name
hypervisor = citrix_gcp_hypervisor.example-gcp-hypervisor.id
- project_name = ""
- region = ""
- subnets = [
- ""
- ]
- vpc = "{VPC name}"
+ project_name = var.gcp_project_name
+ region = var.gcp_vpc_region
+ subnets = var.gcp_subnets
+ vpc = var.gcp_vpc
}
diff --git a/examples/basic_gcp_mcs_vda/terraform.template.tfvars b/examples/basic_gcp_mcs_vda/terraform.template.tfvars
new file mode 100644
index 0000000..d0f497f
--- /dev/null
+++ b/examples/basic_gcp_mcs_vda/terraform.template.tfvars
@@ -0,0 +1,37 @@
+# citrix.tf variables, uncomment the ones you need for on-premises or cloud
+# provider_hostname = "" # on-premises only
+# provider_domain_fqdn = "" # on-premises only
+provider_client_id = "" # or Citrx Cloud secure client ID for cloud
+provider_client_secret = "" # or Citrix Cloud secure client secret for cloud
+# provider_customer_id = "" # cloud only
+
+# delivery_groups.tf variables
+delivery_group_name = "example-delivery-group"
+allow_list = ["DOMAIN\\user1", "DOMAIN\\user2"]
+block_list = ["DOMAIN\\user3", "DOMAIN\\user4"]
+
+# hypervisors.tf variables
+hypervisor_name = "example-gcp-hyperv"
+gcp_service_account_id = ""
+gcp_service_account_credentials = ""
+
+# machine_catalogs.tf variables
+machine_catalog_name = "example-gcp-catalog"
+domain_fqdn = ""
+domain_ou = ""
+domain_service_account = ""
+domain_service_account_password = ""
+gcp_storage_type = "pd-standard"
+gcp_master_image = ""
+gcp_availability_zones = "::,::,..."
+machine_catalog_naming_scheme = "ctx-gcp-##"
+
+# resource_pools.tf variables
+resource_pool_name = "example-gcp-resource-pool"
+gcp_project_name = ""
+gcp_vpc_region = ""
+gcp_vpc = [""]
+gcp_subnets = ""
+
+# zones.tf variables
+zone_name = "example-gcp-zone"
\ No newline at end of file
diff --git a/examples/basic_gcp_mcs_vda/terraform.tf b/examples/basic_gcp_mcs_vda/terraform.tf
index f2f10f4..6484546 100644
--- a/examples/basic_gcp_mcs_vda/terraform.tf
+++ b/examples/basic_gcp_mcs_vda/terraform.tf
@@ -4,7 +4,7 @@ terraform {
required_providers {
citrix = {
source = "citrix/citrix"
- version = ">=0.5.1"
+ version = ">=0.6.1"
}
}
diff --git a/examples/basic_gcp_mcs_vda/variables.tf b/examples/basic_gcp_mcs_vda/variables.tf
new file mode 100644
index 0000000..e397242
--- /dev/null
+++ b/examples/basic_gcp_mcs_vda/variables.tf
@@ -0,0 +1,167 @@
+# citrix.tf variables
+## On-Premises customer provider settings
+variable provider_hostname {
+ description = "The hostname of the Citrix Virtual Apps and Desktops Delivery Controller."
+ type = string
+ default = "" # Leave this variable empty for Citrix Cloud customer.
+}
+
+variable provider_domain_fqdn {
+ description = "The domain FQDN of the on-premises Active Directory."
+ type = string
+ default = null # Leave this variable empty for Citrix Cloud customer.
+}
+
+variable provider_disable_ssl_verification {
+ description = "Disable SSL verification for the Citrix Virtual Apps and Desktops Delivery Controller."
+ type = bool
+ default = false # Set this field to true if DDC does not have a valid SSL certificate configured. Omit this variable for Citrix Cloud customer.
+}
+
+## Citrix Cloud customer provider settings
+variable provider_customer_id {
+ description = "The customer id of the Citrix Cloud customer."
+ type = string
+ default = "" # Set your customer id for Citrix Cloud customer. Omit this variable for On-Premises customer.
+}
+
+variable provider_environment {
+ description = "The environment of the Citrix Cloud customer."
+ type = string
+ default = "Production" # Use "Japan" for Citrix Cloud customers in Japan region. Omit this variable for On-Premises customer.
+}
+
+# Common provider settings
+# For On-Premises customers: Domain Admin username and password are needed to interact with the Citrix Virtual Apps and Desktops Delivery Controller.
+# For Citrix Cloud customers: API key client id and secret are needed to interact with Citrix DaaS APIs. These can be created/found under Identity and Access Management > API Access
+variable provider_client_id {
+ description = "The Domain Admin username of the on-premises Active Directory / The API key client id for Citrix Cloud customer."
+ type = string
+ default = ""
+}
+
+variable provider_client_secret {
+ description = "The Domain Admin password of the on-premises Active Directory / The API key client secret for Citrix Cloud customer."
+ type = string
+ default = ""
+}
+
+
+# delivery_groups.tf variables
+variable "delivery_group_name" {
+ description = "Name of the Delivery Group to create"
+ type = string
+ default = "example-delivery-group"
+}
+
+variable "allow_list" {
+ description = "List of users to allow for the Delivery Group in DOMAIN\\username format"
+ type = list(string)
+}
+
+
+# hypervisors.tf variables
+variable "hypervisor_name" {
+ description = "Name of the Hypervisor to create"
+ type = string
+ default = "example-gcp-hyperv"
+}
+
+variable "gcp_service_account_id" {
+ description = "GCP service account ID"
+ type = string
+}
+
+variable "gcp_service_account_credentials" {
+ description = "GCP service account private key, base64 encoded"
+ type = string
+ sensitive = true
+}
+
+
+# machine_catalogs.tf variables
+variable "machine_catalog_name" {
+ description = "Name of the Machine Catalog to create"
+ type = string
+ default = "example-gcp-catalog"
+}
+
+variable "domain_fqdn" {
+ description = "Domain FQDN"
+ type = string
+}
+
+variable "domain_ou" {
+ description = "Domain organizational unit"
+ type = string
+ default = null
+}
+
+variable "domain_service_account" {
+ description = "Domain service account with permissions to create machine accounts"
+ type = string
+}
+
+variable "domain_service_account_password" {
+ description = "Domain service account password"
+ type = string
+ sensitive = true
+}
+
+variable "gcp_storage_type" {
+ description = "Storage type of the provisioned VM disks on GCP"
+ type = string
+ default = "pd-standard"
+}
+
+variable "gcp_master_image" {
+ description = "Name of the master image VM in GCP"
+ type = string
+}
+
+variable "gcp_availability_zones" {
+ description = "Comma seperate list of GCP availability zones in the format of \"::,::,...\""
+ type = string
+}
+
+variable "machine_catalog_naming_scheme" {
+ description = "Machine Catalog naming scheme"
+ type = string
+ default = "ctx-gcp-##"
+}
+
+
+# resource_pools.tf variables
+variable "resource_pool_name" {
+ description = "Name of the Resource Pool to create"
+ type = string
+ default = "example-gcp-rp"
+}
+
+variable "gcp_project_name" {
+ description = "Project to create the Resource Pool in"
+ type = string
+}
+
+variable "gcp_vpc_region" {
+ description = "Region to create the Resource Pool in"
+ type = string
+ default = "us-east1"
+}
+
+variable "gcp_vpc" {
+ description = "Name of the GCP VPC"
+ type = string
+}
+
+variable "gcp_subnets" {
+ description = "List of GCP subnets in the VPC"
+ type = list(string)
+}
+
+
+# zones.tf variables
+variable "zone_name" {
+ description = "Name of the Zone to create. For Citrix Cloud customers the zone should already exist."
+ type = string
+}
diff --git a/examples/basic_gcp_mcs_vda/zones.tf b/examples/basic_gcp_mcs_vda/zones.tf
index b3f0728..eeafc84 100644
--- a/examples/basic_gcp_mcs_vda/zones.tf
+++ b/examples/basic_gcp_mcs_vda/zones.tf
@@ -1,4 +1,4 @@
resource "citrix_zone" "example-zone" {
- name = "example zone"
+ name = var.zone_name
description = "description for example zone"
}
diff --git a/examples/basic_nutanix_mcs_vda/citrix.tf b/examples/basic_nutanix_mcs_vda/citrix.tf
index 5ac9b01..f32f7f4 100644
--- a/examples/basic_nutanix_mcs_vda/citrix.tf
+++ b/examples/basic_nutanix_mcs_vda/citrix.tf
@@ -1,17 +1,17 @@
-// On-Premises customer provider settings
-// Please comment out / remove this provider settings block if you are a Citrix Cloud customer
+# On-Premises customer provider settings
+# Please comment out / remove this provider settings block if you are a Citrix Cloud customer
provider "citrix" {
- hostname = ""
- client_id = "\\"
- client_secret = ""
- disable_ssl_verification = true # omit this field if DDC has valid SSL certificate configured
+ hostname = var.provider_hostname
+ client_id = "${var.provider_domain_fqdn}\\${var.provider_client_id}"
+ client_secret = "${var.provider_client_secret}"
+ disable_ssl_verification = var.provider_disable_ssl_verification
}
-// Citrix Cloud customer provider settings
-// Please comment out / remove this provider settings block if you are an On-Premises customer
+# Citrix Cloud customer provider settings
+# Please comment out / remove this provider settings block if you are an On-Premises customer
provider "citrix" {
- customer_id = "" # set your customer id
- client_id = ""
- client_secret = "" # API key client id and secret are needed to interact with Citrix Cloud APIs. These can be created/found under Identity and Access Management > API Access
- environment = "Production" # use "Japan" for Citrix Cloud customers in Japan region
+ customer_id = var.provider_customer_id
+ client_id = var.provider_client_id
+ client_secret = var.provider_client_secret
+ environment = var.provider_environment
}
diff --git a/examples/basic_xenserver_mcs_vda/delivery_group.tf b/examples/basic_nutanix_mcs_vda/delivery_groups.tf
similarity index 75%
rename from examples/basic_xenserver_mcs_vda/delivery_group.tf
rename to examples/basic_nutanix_mcs_vda/delivery_groups.tf
index 836f752..fb92a67 100644
--- a/examples/basic_xenserver_mcs_vda/delivery_group.tf
+++ b/examples/basic_nutanix_mcs_vda/delivery_groups.tf
@@ -1,5 +1,5 @@
resource "citrix_delivery_group" "example-delivery-group" {
- name = "example-delivery-group"
+ name = var.delivery_group_name
associated_machine_catalogs = [
{
machine_catalog = citrix_machine_catalog.example-catalog.id
@@ -9,19 +9,13 @@ resource "citrix_delivery_group" "example-delivery-group" {
desktops = [
{
published_name = "Example Desktop"
- description = "Desription for example desktop"
+ description = "Description for example desktop"
restricted_access_users = {
- allow_list = [
- "example\\user1"
- ]
- block_list = [
- "example\\user2",
- ]
+ allow_list = var.allow_list
}
enabled = true
enable_session_roaming = false
}
-
]
autoscale_settings = {
autoscale_enabled = true
@@ -50,11 +44,6 @@ resource "citrix_delivery_group" "example-delivery-group" {
]
}
restricted_access_users = {
- allow_list = [
- "example\\user1"
- ]
- block_list = [
- "example\\user2",
- ]
+ allow_list = var.allow_list
}
}
\ No newline at end of file
diff --git a/examples/basic_nutanix_mcs_vda/hypervisors.tf b/examples/basic_nutanix_mcs_vda/hypervisors.tf
index 4aa6b91..e897ed1 100644
--- a/examples/basic_nutanix_mcs_vda/hypervisors.tf
+++ b/examples/basic_nutanix_mcs_vda/hypervisors.tf
@@ -1,10 +1,8 @@
resource "citrix_nutanix_hypervisor" "example-nutanix-hypervisor" {
- name = "example-nutanix-hyperv"
+ name = var.hypervisor_name
zone = citrix_zone.example-zone.id
- username = ""
- password = ""
- password_format = "PlainText"
- addresses = [
- "http://"
- ]
+ username = var.nutanix_username
+ password = var.nutanix_password
+ password_format = var.nutanix_password_format
+ addresses = var.nutanix_addresses
}
\ No newline at end of file
diff --git a/examples/basic_nutanix_mcs_vda/machine_catalogs.tf b/examples/basic_nutanix_mcs_vda/machine_catalogs.tf
index 2445885..7055500 100644
--- a/examples/basic_nutanix_mcs_vda/machine_catalogs.tf
+++ b/examples/basic_nutanix_mcs_vda/machine_catalogs.tf
@@ -1,30 +1,31 @@
resource "citrix_machine_catalog" "example-catalog" {
- name = "example-catalog"
+ name = var.machine_catalog_name
description = "description for example catalog"
- provisioning_type = "MCS"
allocation_type = "Random"
session_support = "MultiSession"
+ provisioning_type = "MCS"
zone = citrix_zone.example-zone.id
provisioning_scheme = {
- identity_type = "ActiveDirectory"
- number_of_total_machines = 1
- machine_account_creation_rules = {
- naming_scheme = "catalog-##"
- naming_scheme_type = "Numeric"
- }
hypervisor = citrix_nutanix_hypervisor.example-nutanix-hypervisor.id
hypervisor_resource_pool = citrix_nutanix_hypervisor_resource_pool.example-nutanix-rp.id
+ identity_type = "ActiveDirectory"
+ machine_domain_identity = {
+ domain = var.domain_fqdn
+ domain_ou = var.domain_ou
+ service_account = var.domain_service_account
+ service_account_password = var.domain_service_account_password
+ }
nutanix_machine_config = {
- container = ""
- master_image = ""
- cpu_count = 2
- memory_mb = 4096
- cores_per_cpu_count = 2
+ container = var.nutanix_container
+ master_image = var.nutanix_master_image
+ cpu_count = var.nutanix_cpu_count
+ cores_per_cpu_count = var.nutanix_core_per_cpu_count
+ memory_mb = var.nutanix_memory_size
}
- machine_domain_identity = {
- domain = ""
- service_account = ""
- service_account_password = ""
+ number_of_total_machines = 1
+ machine_account_creation_rules = {
+ naming_scheme = var.machine_catalog_naming_scheme
+ naming_scheme_type = "Numeric"
}
}
}
\ No newline at end of file
diff --git a/examples/basic_nutanix_mcs_vda/resource_pools.tf b/examples/basic_nutanix_mcs_vda/resource_pools.tf
index 3f9cb0c..25b734f 100644
--- a/examples/basic_nutanix_mcs_vda/resource_pools.tf
+++ b/examples/basic_nutanix_mcs_vda/resource_pools.tf
@@ -1,8 +1,5 @@
resource "citrix_nutanix_hypervisor_resource_pool" "example-nutanix-rp" {
- name = "example-nutanix-rp"
+ name = var.resource_pool_name
hypervisor = citrix_nutanix_hypervisor.example-nutanix-hypervisor.id
- networks = [
- "",
- ""
- ]
+ networks = var.nutanix_networks
}
\ No newline at end of file
diff --git a/examples/basic_nutanix_mcs_vda/terraform.template.tfvars b/examples/basic_nutanix_mcs_vda/terraform.template.tfvars
new file mode 100644
index 0000000..d42b243
--- /dev/null
+++ b/examples/basic_nutanix_mcs_vda/terraform.template.tfvars
@@ -0,0 +1,37 @@
+# citrix.tf variables, uncomment the ones you need for on-premises or cloud
+# provider_hostname = "" # on-premises only
+# provider_domain_fqdn = "" # on-premises only
+provider_client_id = "" # or Citrx Cloud secure client ID for cloud
+provider_client_secret = "" # or Citrix Cloud secure client secret for cloud
+# provider_customer_id = "" # cloud only
+
+# delivery_groups.tf variables
+delivery_group_name = "example-delivery-group"
+allow_list = ["DOMAIN\\user1", "DOMAIN\\user2"]
+block_list = ["DOMAIN\\user3", "DOMAIN\\user4"]
+
+# hypervisors.tf variables
+hypervisor_name = "example-nutanix-hyperv"
+nutanix_username = ""
+nutanix_password = ""
+nutanix_addresses = ["http://"]
+
+# machine_catalogs.tf variables
+machine_catalog_name = "example-nutanix-catalog"
+domain_fqdn = ""
+domain_ou = ""
+domain_service_account = ""
+domain_service_account_password = ""
+nutanix_container = ""
+nutanix_master_image = ""
+nutanix_cpu_count = 2
+nutanix_core_per_cpu_count = 2
+nutanix_memory_size = 4096
+machine_catalog_naming_scheme = "ctx-nutanix-##"
+
+# resource_pools.tf variables
+resource_pool_name = "example-nutanix-resource-pool"
+nutanix_networks = ["", ""]
+
+# zones.tf variables
+zone_name = "example-nutanix-zone"
\ No newline at end of file
diff --git a/examples/basic_nutanix_mcs_vda/terraform.tf b/examples/basic_nutanix_mcs_vda/terraform.tf
index 234252a..6484546 100644
--- a/examples/basic_nutanix_mcs_vda/terraform.tf
+++ b/examples/basic_nutanix_mcs_vda/terraform.tf
@@ -4,7 +4,7 @@ terraform {
required_providers {
citrix = {
source = "citrix/citrix"
- version = ">=0.5.4"
+ version = ">=0.6.1"
}
}
diff --git a/examples/basic_nutanix_mcs_vda/variables.tf b/examples/basic_nutanix_mcs_vda/variables.tf
new file mode 100644
index 0000000..e5e8753
--- /dev/null
+++ b/examples/basic_nutanix_mcs_vda/variables.tf
@@ -0,0 +1,174 @@
+# citrix.tf variables
+## On-Premises customer provider settings
+variable provider_hostname {
+ description = "The hostname of the Citrix Virtual Apps and Desktops Delivery Controller."
+ type = string
+ default = "" # Leave this variable empty for Citrix Cloud customer.
+}
+
+variable provider_domain_fqdn {
+ description = "The domain FQDN of the on-premises Active Directory."
+ type = string
+ default = null # Leave this variable empty for Citrix Cloud customer.
+}
+
+variable provider_disable_ssl_verification {
+ description = "Disable SSL verification for the Citrix Virtual Apps and Desktops Delivery Controller."
+ type = bool
+ default = false # Set this field to true if DDC does not have a valid SSL certificate configured. Omit this variable for Citrix Cloud customer.
+}
+
+## Citrix Cloud customer provider settings
+variable provider_customer_id {
+ description = "The customer id of the Citrix Cloud customer."
+ type = string
+ default = "" # Set your customer id for Citrix Cloud customer. Omit this variable for On-Premises customer.
+}
+
+variable provider_environment {
+ description = "The environment of the Citrix Cloud customer."
+ type = string
+ default = "Production" # Use "Japan" for Citrix Cloud customers in Japan region. Omit this variable for On-Premises customer.
+}
+
+# Common provider settings
+# For On-Premises customers: Domain Admin username and password are needed to interact with the Citrix Virtual Apps and Desktops Delivery Controller.
+# For Citrix Cloud customers: API key client id and secret are needed to interact with Citrix DaaS APIs. These can be created/found under Identity and Access Management > API Access
+variable provider_client_id {
+ description = "The Domain Admin username of the on-premises Active Directory / The API key client id for Citrix Cloud customer."
+ type = string
+ default = ""
+}
+
+variable provider_client_secret {
+ description = "The Domain Admin password of the on-premises Active Directory / The API key client secret for Citrix Cloud customer."
+ type = string
+ default = ""
+}
+
+
+# delivery_groups.tf variables
+variable "delivery_group_name" {
+ description = "Name of the Delivery Group to create"
+ type = string
+ default = "example-delivery-group"
+}
+
+variable "allow_list" {
+ description = "List of users to allow for the Delivery Group in DOMAIN\\username format"
+ type = list(string)
+}
+
+
+# hypervisors.tf variables
+variable "hypervisor_name" {
+ description = "Name of the Hypervisor to create"
+ type = string
+ default = "example-nutanix-hyperv"
+}
+
+variable "nutanix_username" {
+ description = "Username to the Nutanix hypervisor"
+ type = string
+}
+
+variable "nutanix_password" {
+ description = "Password to the Nutanix hypervisor"
+ type = string
+ sensitive = true
+}
+
+variable "nutanix_password_format" {
+ description = "Nutanix password format"
+ type = string
+ default = "PlainText"
+}
+
+variable "nutanix_addresses" {
+ description = "List of addresses to the Nutanix hypervisor in the format of \"http://\""
+ type = list(string)
+}
+
+
+# machine_catalogs.tf variables
+variable "machine_catalog_name" {
+ description = "Name of the Machine Catalog to create"
+ type = string
+ default = "example-nutanix-catalog"
+}
+
+variable "domain_fqdn" {
+ description = "Domain FQDN"
+ type = string
+}
+
+variable "domain_ou" {
+ description = "Domain organizational unit"
+ type = string
+ default = null
+}
+
+variable "domain_service_account" {
+ description = "Domain service account with permissions to create machine accounts"
+ type = string
+}
+
+variable "domain_service_account_password" {
+ description = "Domain service account password"
+ type = string
+ sensitive = true
+}
+
+variable "nutanix_container" {
+ description = "Name of the container to place the identity disks in Nutanix"
+ type = string
+}
+
+variable "nutanix_master_image" {
+ description = "Name of the master image VM in Nutanix"
+ type = string
+}
+
+variable "nutanix_cpu_count" {
+ description = "Number of CPUs per VM created"
+ type = number
+ default = 2
+}
+
+variable "nutanix_core_per_cpu_count" {
+ description = "Number of cores per CPUs per VM created"
+ type = number
+ default = 2
+}
+
+variable "nutanix_memory_size" {
+ description = "Amount of memory in MB per VM created"
+ type = number
+ default = 4096
+}
+
+variable "machine_catalog_naming_scheme" {
+ description = "Machine Catalog naming scheme"
+ type = string
+ default = "ctx-nutanix-##"
+}
+
+
+# resource_pools.tf variables
+variable "resource_pool_name" {
+ description = "Name of the Resource Pool to create"
+ type = string
+ default = "example-nutanix-rp"
+}
+
+variable "nutanix_networks" {
+ description = "List of network names for the Resource Pool to use"
+ type = list(string)
+}
+
+
+# zones.tf variables
+variable "zone_name" {
+ description = "Name of the Zone to create. For Citrix Cloud customers the zone should already exist."
+ type = string
+}
diff --git a/examples/basic_nutanix_mcs_vda/zones.tf b/examples/basic_nutanix_mcs_vda/zones.tf
index b3f0728..eeafc84 100644
--- a/examples/basic_nutanix_mcs_vda/zones.tf
+++ b/examples/basic_nutanix_mcs_vda/zones.tf
@@ -1,4 +1,4 @@
resource "citrix_zone" "example-zone" {
- name = "example zone"
+ name = var.zone_name
description = "description for example zone"
}
diff --git a/examples/basic_vsphere_mcs_vda/citrix.tf b/examples/basic_vsphere_mcs_vda/citrix.tf
index 5ac9b01..f32f7f4 100644
--- a/examples/basic_vsphere_mcs_vda/citrix.tf
+++ b/examples/basic_vsphere_mcs_vda/citrix.tf
@@ -1,17 +1,17 @@
-// On-Premises customer provider settings
-// Please comment out / remove this provider settings block if you are a Citrix Cloud customer
+# On-Premises customer provider settings
+# Please comment out / remove this provider settings block if you are a Citrix Cloud customer
provider "citrix" {
- hostname = ""
- client_id = "\\"
- client_secret = ""
- disable_ssl_verification = true # omit this field if DDC has valid SSL certificate configured
+ hostname = var.provider_hostname
+ client_id = "${var.provider_domain_fqdn}\\${var.provider_client_id}"
+ client_secret = "${var.provider_client_secret}"
+ disable_ssl_verification = var.provider_disable_ssl_verification
}
-// Citrix Cloud customer provider settings
-// Please comment out / remove this provider settings block if you are an On-Premises customer
+# Citrix Cloud customer provider settings
+# Please comment out / remove this provider settings block if you are an On-Premises customer
provider "citrix" {
- customer_id = "" # set your customer id
- client_id = ""
- client_secret = "" # API key client id and secret are needed to interact with Citrix Cloud APIs. These can be created/found under Identity and Access Management > API Access
- environment = "Production" # use "Japan" for Citrix Cloud customers in Japan region
+ customer_id = var.provider_customer_id
+ client_id = var.provider_client_id
+ client_secret = var.provider_client_secret
+ environment = var.provider_environment
}
diff --git a/examples/basic_nutanix_mcs_vda/delivery_group.tf b/examples/basic_vsphere_mcs_vda/delivery_groups.tf
similarity index 75%
rename from examples/basic_nutanix_mcs_vda/delivery_group.tf
rename to examples/basic_vsphere_mcs_vda/delivery_groups.tf
index 836f752..fb92a67 100644
--- a/examples/basic_nutanix_mcs_vda/delivery_group.tf
+++ b/examples/basic_vsphere_mcs_vda/delivery_groups.tf
@@ -1,5 +1,5 @@
resource "citrix_delivery_group" "example-delivery-group" {
- name = "example-delivery-group"
+ name = var.delivery_group_name
associated_machine_catalogs = [
{
machine_catalog = citrix_machine_catalog.example-catalog.id
@@ -9,19 +9,13 @@ resource "citrix_delivery_group" "example-delivery-group" {
desktops = [
{
published_name = "Example Desktop"
- description = "Desription for example desktop"
+ description = "Description for example desktop"
restricted_access_users = {
- allow_list = [
- "example\\user1"
- ]
- block_list = [
- "example\\user2",
- ]
+ allow_list = var.allow_list
}
enabled = true
enable_session_roaming = false
}
-
]
autoscale_settings = {
autoscale_enabled = true
@@ -50,11 +44,6 @@ resource "citrix_delivery_group" "example-delivery-group" {
]
}
restricted_access_users = {
- allow_list = [
- "example\\user1"
- ]
- block_list = [
- "example\\user2",
- ]
+ allow_list = var.allow_list
}
}
\ No newline at end of file
diff --git a/examples/basic_vsphere_mcs_vda/hypervisors.tf b/examples/basic_vsphere_mcs_vda/hypervisors.tf
index 92a9972..93a699f 100644
--- a/examples/basic_vsphere_mcs_vda/hypervisors.tf
+++ b/examples/basic_vsphere_mcs_vda/hypervisors.tf
@@ -1,11 +1,9 @@
resource "citrix_vsphere_hypervisor" "example-vsphere-hypervisor" {
- name = "example-vsphere-hyperv"
+ name = var.hypervisor_name
zone = citrix_zone.example-zone.id
- username = ""
- password = ""
- password_format = "PlainText"
- addresses = [
- "http://"
- ]
+ username = var.vsphere_username
+ password = var.vsphere_password
+ password_format = var.vsphere_password_format
+ addresses = var.vsphere_addresses
max_absolute_active_actions = 20
}
\ No newline at end of file
diff --git a/examples/basic_vsphere_mcs_vda/machine_catalogs.tf b/examples/basic_vsphere_mcs_vda/machine_catalogs.tf
index 5a8ce24..a440dfb 100644
--- a/examples/basic_vsphere_mcs_vda/machine_catalogs.tf
+++ b/examples/basic_vsphere_mcs_vda/machine_catalogs.tf
@@ -1,28 +1,29 @@
resource "citrix_machine_catalog" "example-catalog" {
- name = "example-catalog"
+ name = var.machine_catalog_name
description = "description for example catalog"
- provisioning_type = "MCS"
allocation_type = "Random"
session_support = "MultiSession"
- zone = ""
+ provisioning_type = "MCS"
+ zone = citrix_zone.example-zone.id
provisioning_scheme = {
- identity_type = "ActiveDirectory"
- number_of_total_machines = 1
- machine_account_creation_rules = {
- naming_scheme = "catalog-##"
- naming_scheme_type = "Numeric"
- }
hypervisor = citrix_vsphere_hypervisor.example-vsphere-hypervisor.id
hypervisor_resource_pool = citrix_vsphere_hypervisor_resource_pool.example-vsphere-rp.id
+ identity_type = "ActiveDirectory"
+ machine_domain_identity = {
+ domain = var.domain_fqdn
+ domain_ou = var.domain_ou
+ service_account = var.domain_service_account
+ service_account_password = var.domain_service_account_password
+ }
vsphere_machine_config = {
- master_image_vm = ""
- cpu_count = 2
- memory_mb = 4096
+ master_image_vm = var.vsphere_master_image_vm
+ cpu_count = var.vsphere_cpu_count
+ memory_mb = var.vsphere_memory_size
}
- machine_domain_identity = {
- domain = ""
- service_account = ""
- service_account_password = ""
+ number_of_total_machines = 1
+ machine_account_creation_rules = {
+ naming_scheme = var.machine_catalog_naming_scheme
+ naming_scheme_type = "Numeric"
}
}
}
\ No newline at end of file
diff --git a/examples/basic_vsphere_mcs_vda/resource_pools.tf b/examples/basic_vsphere_mcs_vda/resource_pools.tf
index f208401..e392b4e 100644
--- a/examples/basic_vsphere_mcs_vda/resource_pools.tf
+++ b/examples/basic_vsphere_mcs_vda/resource_pools.tf
@@ -1,23 +1,20 @@
resource "citrix_vsphere_hypervisor_resource_pool" "example-vsphere-rp" {
- name = "example-vsphere-rp"
+ name = var.resource_pool_name
hypervisor = citrix_vsphere_hypervisor.example-vsphere-hypervisor.id
cluster = {
- datacenter = ""
- cluster_name = ""
- host = ""
+ datacenter = var.vsphere_cluster_datacenter
+ cluster_name = var.vsphere_cluster_name
+ host = var.vsphere_cluster_host
}
- networks = [
- "",
- ""
- ]
+ networks = var.vsphere_networks
storage = [
{
- storage_name = ""
+ storage_name = var.vsphere_storage_name
}
]
temporary_storage = [
{
- storage_name = ""
+ storage_name = var.vsphere_temporary_storage_name
}
]
use_local_storage_caching = false
diff --git a/examples/basic_vsphere_mcs_vda/terraform.template.tfvars b/examples/basic_vsphere_mcs_vda/terraform.template.tfvars
new file mode 100644
index 0000000..dd5bb45
--- /dev/null
+++ b/examples/basic_vsphere_mcs_vda/terraform.template.tfvars
@@ -0,0 +1,41 @@
+# citrix.tf variables, uncomment the ones you need for on-premises or cloud
+# provider_hostname = "" # on-premises only
+# provider_domain_fqdn = "" # on-premises only
+provider_client_id = "" # or Citrx Cloud secure client ID for cloud
+provider_client_secret = "" # or Citrix Cloud secure client secret for cloud
+# provider_customer_id = "" # cloud only
+
+# delivery_groups.tf variables
+delivery_group_name = "example-delivery-group"
+allow_list = ["DOMAIN\\user1", "DOMAIN\\user2"]
+block_list = ["DOMAIN\\user3", "DOMAIN\\user4"]
+
+# hypervisors.tf variables
+hypervisor_name = "example-vsphere-hyperv"
+vsphere_username = ""
+vsphere_password = ""
+vsphere_addresses = ["http://"]
+
+# machine_catalogs.tf variables
+machine_catalog_name = "example-vsphere-catalog"
+domain_fqdn = ""
+domain_ou = ""
+domain_service_account = ""
+domain_service_account_password = ""
+vsphere_master_image_vm = ""
+vsphere_cpu_count = 2
+nutanix_core_per_cpu_count = 2
+vsphere_memory_size = 4096
+machine_catalog_naming_scheme = "ctx-vsphere-##"
+
+# resource_pools.tf variables
+resource_pool_name = "example-vsphere-resource-pool"
+vsphere_networks = ["", ""]
+vsphere_cluster_datacenter = ""
+vsphere_cluster_name = ""
+vsphere_cluster_host = ""
+vsphere_storage_name = ""
+vsphere_temporary_storage_name = ""
+
+# zones.tf variables
+zone_name = "example-vsphere-zone"
\ No newline at end of file
diff --git a/examples/basic_vsphere_mcs_vda/terraform.tf b/examples/basic_vsphere_mcs_vda/terraform.tf
index 3d89e96..6484546 100644
--- a/examples/basic_vsphere_mcs_vda/terraform.tf
+++ b/examples/basic_vsphere_mcs_vda/terraform.tf
@@ -4,7 +4,7 @@ terraform {
required_providers {
citrix = {
source = "citrix/citrix"
- version = ">=0.5.3"
+ version = ">=0.6.1"
}
}
diff --git a/examples/basic_vsphere_mcs_vda/variables.tf b/examples/basic_vsphere_mcs_vda/variables.tf
new file mode 100644
index 0000000..10cddaa
--- /dev/null
+++ b/examples/basic_vsphere_mcs_vda/variables.tf
@@ -0,0 +1,187 @@
+# citrix.tf variables
+## On-Premises customer provider settings
+variable provider_hostname {
+ description = "The hostname of the Citrix Virtual Apps and Desktops Delivery Controller."
+ type = string
+ default = "" # Leave this variable empty for Citrix Cloud customer.
+}
+
+variable provider_domain_fqdn {
+ description = "The domain FQDN of the on-premises Active Directory."
+ type = string
+ default = null # Leave this variable empty for Citrix Cloud customer.
+}
+
+variable provider_disable_ssl_verification {
+ description = "Disable SSL verification for the Citrix Virtual Apps and Desktops Delivery Controller."
+ type = bool
+ default = false # Set this field to true if DDC does not have a valid SSL certificate configured. Omit this variable for Citrix Cloud customer.
+}
+
+## Citrix Cloud customer provider settings
+variable provider_customer_id {
+ description = "The customer id of the Citrix Cloud customer."
+ type = string
+ default = "" # Set your customer id for Citrix Cloud customer. Omit this variable for On-Premises customer.
+}
+
+variable provider_environment {
+ description = "The environment of the Citrix Cloud customer."
+ type = string
+ default = "Production" # Use "Japan" for Citrix Cloud customers in Japan region. Omit this variable for On-Premises customer.
+}
+
+# Common provider settings
+# For On-Premises customers: Domain Admin username and password are needed to interact with the Citrix Virtual Apps and Desktops Delivery Controller.
+# For Citrix Cloud customers: API key client id and secret are needed to interact with Citrix DaaS APIs. These can be created/found under Identity and Access Management > API Access
+variable provider_client_id {
+ description = "The Domain Admin username of the on-premises Active Directory / The API key client id for Citrix Cloud customer."
+ type = string
+ default = ""
+}
+
+variable provider_client_secret {
+ description = "The Domain Admin password of the on-premises Active Directory / The API key client secret for Citrix Cloud customer."
+ type = string
+ default = ""
+}
+
+
+# delivery_groups.tf variables
+variable "delivery_group_name" {
+ description = "Name of the Delivery Group to create"
+ type = string
+ default = "example-delivery-group"
+}
+
+variable "allow_list" {
+ description = "List of users to allow for the Delivery Group in DOMAIN\\username format"
+ type = list(string)
+}
+
+
+# hypervisors.tf variables
+variable "hypervisor_name" {
+ description = "Name of the Hypervisor to create"
+ type = string
+ default = "example-vsphere-hyperv"
+}
+
+variable "vsphere_username" {
+ description = "Username to the vSphere hypervisor"
+ type = string
+}
+
+variable "vsphere_password" {
+ description = "Password to the vSphere hypervisor"
+ type = string
+ sensitive = true
+}
+
+variable "vsphere_password_format" {
+ description = "vSphere password format"
+ type = string
+ default = "PlainText"
+}
+
+variable "vsphere_addresses" {
+ description = "List of addresses to the vSphere hypervisor in the format of \"http://\""
+ type = list(string)
+}
+
+
+# machine_catalogs.tf variables
+variable "machine_catalog_name" {
+ description = "Name of the Machine Catalog to create"
+ type = string
+ default = "example-vsphere-catalog"
+}
+
+variable "domain_fqdn" {
+ description = "Domain FQDN"
+ type = string
+}
+
+variable "domain_ou" {
+ description = "Domain organizational unit"
+ type = string
+ default = null
+}
+
+variable "domain_service_account" {
+ description = "Domain service account with permissions to create machine accounts"
+ type = string
+}
+
+variable "domain_service_account_password" {
+ description = "Domain service account password"
+ type = string
+ sensitive = true
+}
+
+variable "vsphere_master_image_vm" {
+ description = "Name of the VM to be used as a master image"
+ type = string
+}
+
+variable "vsphere_cpu_count" {
+ description = "Number of CPUs per VM created"
+ type = number
+ default = 2
+}
+
+variable "vsphere_memory_size" {
+ description = "Amount of memory in MB per VM created"
+ type = number
+ default = 4096
+}
+
+variable "machine_catalog_naming_scheme" {
+ description = "Machine Catalog naming scheme"
+ type = string
+ default = "ctx-vsphere-##"
+}
+
+
+# resource_pools.tf variables
+variable "resource_pool_name" {
+ description = "Name of the Resource Pool to create"
+ type = string
+ default = "example-vsphere-rp"
+}
+
+variable "vsphere_networks" {
+ description = "List of network names for the Resource Pool to use"
+ type = list(string)
+}
+
+variable "vsphere_cluster_datacenter" {
+ description = "Name of the vSphere Datacenter"
+ type = string
+}
+
+variable "vsphere_cluster_name" {
+ description = "Name of the cluster"
+ type = string
+}
+
+variable "vsphere_cluster_host" {
+ description = "FQDN or IP address of the host"
+ type = string
+}
+
+variable "vsphere_storage_name" {
+ description = "Name of the storage"
+ type = string
+}
+
+variable "vsphere_temporary_storage_name" {
+ description = "Name of the temporary storage"
+ type = string
+}
+
+# zones.tf variables
+variable "zone_name" {
+ description = "Name of the Zone to create. For Citrix Cloud customers the zone should already exist."
+ type = string
+}
diff --git a/examples/basic_vsphere_mcs_vda/zones.tf b/examples/basic_vsphere_mcs_vda/zones.tf
index b3f0728..eeafc84 100644
--- a/examples/basic_vsphere_mcs_vda/zones.tf
+++ b/examples/basic_vsphere_mcs_vda/zones.tf
@@ -1,4 +1,4 @@
resource "citrix_zone" "example-zone" {
- name = "example zone"
+ name = var.zone_name
description = "description for example zone"
}
diff --git a/examples/basic_xenserver_mcs_vda/citrix.tf b/examples/basic_xenserver_mcs_vda/citrix.tf
index 5ac9b01..f32f7f4 100644
--- a/examples/basic_xenserver_mcs_vda/citrix.tf
+++ b/examples/basic_xenserver_mcs_vda/citrix.tf
@@ -1,17 +1,17 @@
-// On-Premises customer provider settings
-// Please comment out / remove this provider settings block if you are a Citrix Cloud customer
+# On-Premises customer provider settings
+# Please comment out / remove this provider settings block if you are a Citrix Cloud customer
provider "citrix" {
- hostname = ""
- client_id = "\\"
- client_secret = ""
- disable_ssl_verification = true # omit this field if DDC has valid SSL certificate configured
+ hostname = var.provider_hostname
+ client_id = "${var.provider_domain_fqdn}\\${var.provider_client_id}"
+ client_secret = "${var.provider_client_secret}"
+ disable_ssl_verification = var.provider_disable_ssl_verification
}
-// Citrix Cloud customer provider settings
-// Please comment out / remove this provider settings block if you are an On-Premises customer
+# Citrix Cloud customer provider settings
+# Please comment out / remove this provider settings block if you are an On-Premises customer
provider "citrix" {
- customer_id = "" # set your customer id
- client_id = ""
- client_secret = "" # API key client id and secret are needed to interact with Citrix Cloud APIs. These can be created/found under Identity and Access Management > API Access
- environment = "Production" # use "Japan" for Citrix Cloud customers in Japan region
+ customer_id = var.provider_customer_id
+ client_id = var.provider_client_id
+ client_secret = var.provider_client_secret
+ environment = var.provider_environment
}
diff --git a/examples/basic_gcp_mcs_vda/delivery_group.tf b/examples/basic_xenserver_mcs_vda/delivery_groups.tf
similarity index 73%
rename from examples/basic_gcp_mcs_vda/delivery_group.tf
rename to examples/basic_xenserver_mcs_vda/delivery_groups.tf
index 0efc666..fb92a67 100644
--- a/examples/basic_gcp_mcs_vda/delivery_group.tf
+++ b/examples/basic_xenserver_mcs_vda/delivery_groups.tf
@@ -1,6 +1,5 @@
resource "citrix_delivery_group" "example-delivery-group" {
- name = "example-delivery-group"
- minimum_functional_level = "L7_20"
+ name = var.delivery_group_name
associated_machine_catalogs = [
{
machine_catalog = citrix_machine_catalog.example-catalog.id
@@ -10,19 +9,13 @@ resource "citrix_delivery_group" "example-delivery-group" {
desktops = [
{
published_name = "Example Desktop"
- description = "Desription for example desktop"
+ description = "Description for example desktop"
restricted_access_users = {
- allow_list = [
- "example\\user1"
- ]
- block_list = [
- "example\\user2",
- ]
+ allow_list = var.allow_list
}
enabled = true
enable_session_roaming = false
}
-
]
autoscale_settings = {
autoscale_enabled = true
@@ -51,11 +44,6 @@ resource "citrix_delivery_group" "example-delivery-group" {
]
}
restricted_access_users = {
- allow_list = [
- "example\\user1"
- ]
- block_list = [
- "example\\user2",
- ]
+ allow_list = var.allow_list
}
}
\ No newline at end of file
diff --git a/examples/basic_xenserver_mcs_vda/hypervisors.tf b/examples/basic_xenserver_mcs_vda/hypervisors.tf
index c0a6826..6e01596 100644
--- a/examples/basic_xenserver_mcs_vda/hypervisors.tf
+++ b/examples/basic_xenserver_mcs_vda/hypervisors.tf
@@ -1,13 +1,8 @@
resource "citrix_xenserver_hypervisor" "example-xenserver-hypervisor" {
- name = "example-xenserver-hyperv"
+ name = var.hypervisor_name
zone = citrix_zone.example-zone.id
- username = ""
- password = ""
- password_format = "PlainText"
- addresses = [
- "http://"
- ]
- ssl_thumbprints = [
- ""
- ]
+ username = var.xenserver_username
+ password = var.xenserver_password
+ password_format = var.xenserver_password_format
+ addresses = var.xenserver_addresses
}
\ No newline at end of file
diff --git a/examples/basic_xenserver_mcs_vda/machine_catalogs.tf b/examples/basic_xenserver_mcs_vda/machine_catalogs.tf
index 6082b2c..d8af1f2 100644
--- a/examples/basic_xenserver_mcs_vda/machine_catalogs.tf
+++ b/examples/basic_xenserver_mcs_vda/machine_catalogs.tf
@@ -1,28 +1,29 @@
resource "citrix_machine_catalog" "example-catalog" {
- name = "example-catalog"
+ name = var.machine_catalog_name
description = "description for example catalog"
provisioning_type = "MCS"
allocation_type = "Random"
session_support = "MultiSession"
zone = ""
provisioning_scheme = {
- identity_type = "ActiveDirectory"
- number_of_total_machines = 1
- machine_account_creation_rules = {
- naming_scheme = "catalog-##"
- naming_scheme_type = "Numeric"
- }
hypervisor = citrix_xenserver_hypervisor.example-xenserver-hypervisor.id
hypervisor_resource_pool = citrix_xenserver_hypervisor_resource_pool.example-xenserver-rp.id
+ identity_type = "ActiveDirectory"
+ machine_domain_identity = {
+ domain = var.domain_fqdn
+ domain_ou = var.domain_ou
+ service_account = var.domain_service_account
+ service_account_password = var.domain_service_account_password
+ }
xenserver_machine_config = {
- master_image_vm = ""
- cpu_count = 2
- memory_mb = 4096
+ master_image_vm = var.xenserver_master_image_vm
+ cpu_count = var.xenserver_cpu_count
+ memory_mb = var.xenserver_memory_size
}
- machine_domain_identity = {
- domain = ""
- service_account = ""
- service_account_password = ""
+ number_of_total_machines = 1
+ machine_account_creation_rules = {
+ naming_scheme = var.machine_catalog_naming_scheme
+ naming_scheme_type = "Numeric"
}
}
}
\ No newline at end of file
diff --git a/examples/basic_xenserver_mcs_vda/resource_pools.tf b/examples/basic_xenserver_mcs_vda/resource_pools.tf
index b3ef3f2..41ce297 100644
--- a/examples/basic_xenserver_mcs_vda/resource_pools.tf
+++ b/examples/basic_xenserver_mcs_vda/resource_pools.tf
@@ -1,18 +1,15 @@
resource "citrix_xenserver_hypervisor_resource_pool" "example-xenserver-rp" {
- name = "example-xenserver-rp"
- hypervisor = citrix_xenserver_hypervisor.example-xenserver-hypervisor.id
- networks = [
- "",
- ""
- ]
+ name = var.resource_pool_name
+ hypervisor = citrix_xenserver_hypervisor.example-xenserver-hypervisor.id
+ networks = var.xenserver_networks
storage = [
{
- storage_name = ""
+ storage_name = var.xenserver_storage_name
}
]
temporary_storage = [
{
- storage_name = "