Skip to content

Latest commit

 

History

History

examples

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

Deployment guides

Complete steps from start to finish for a variety of senarios from Citrix Tech Zone:

How to use the examples in this repository

Clone this repository and then navigate to the given example directory, specify the variables, and run terraform there:

> 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
> code terraform.tfvars # open the file and specify variables
> terraform init
> terraform plan
> terraform apply

Specifying variables

Each example contains a 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 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:

terraform apply -var="customer_id=<customerId>" -var="client_id=<clientId>" -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 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 configured.

Non-domain joined MCS

A single example of how to create a non-domain joined VDA, based on the basic_azure_mcs_vda example.

The difference is in machine_catalogs.tf, provisioning_scheme.identity_type = "Workgroup" and the addition of a Citrix Group Policy in policy_sets.tf.

Quick Deploy

Examples of creating resources using DaaS Quick Deploy. This includes the account, directory or resource connection, image, and finally the deployment which is assigned to a list of usernames provided in the variables.

Basic Policy Set

Examples of resources related to a policy set. This includes the policy set, policies, policy filters, policy settings, and policy priorities.

  • Policy Set is a collection of policies with their priorities defined. Policy set can also have scopes defined and have associated delivery groups specified.
  • Policies are linked to a policy set, they can be enabled or disabled.
  • Policy settings and policy filters are detailed configurations of a policy. Each setting or filter can only be associated with a single policy.
  • The priorities of policies with in a policy set are defined my the policy priority resource.