Skip to content

Commit

Permalink
release v0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuolun-citrix committed Mar 8, 2024
1 parent 0a2b3f4 commit c1c455c
Show file tree
Hide file tree
Showing 59 changed files with 2,612 additions and 95 deletions.
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -40,7 +40,7 @@ The CUGC (Citrix User Group Community) maintains a combination Slack/Discord for
* `daas` folder - Contains all the Citrix DaaS resources libraries that we support through Terraform.
* `test` folder - Contains the Go tests for both `provider` and all `resources` that we have.
* `util` folder - Contains general utility functions that can be reused.
2. `examples` folder - Contains the examples for users to use various Citrix resources e.g [zone](examples/resources/citrix_daas_zone) folder contains the resources.tf that illustrates how citrix_daas_zone resource can be used to create a DaaS Zone on target Citrix DaaS site. There are also examples for [Citrix provider](examples/provider) configuration for both Citrix Cloud customer and Citrix on-premises customers. Users can use the examples as a starting point to configure their own Citrix Terraform script.
2. `examples` folder - Contains the examples for users to use various Citrix resources e.g [zone](examples/resources/citrix_zone) folder contains the resources.tf that illustrates how citrix_zone resource can be used to create a DaaS Zone on target Citrix DaaS site. There are also examples for [Citrix provider](examples/provider) configuration for both Citrix Cloud customer and Citrix on-premises customers. Users can use the examples as a starting point to configure their own Citrix Terraform script.
3. `docs` folder - [resources](docs/resources) - contains the documentation for all resource configurations supported through Terraform. Refer this to understand the properties, accepted values, and how various properties work together for each type of resource.

### Provider Configuration
Expand Down Expand Up @@ -153,9 +153,9 @@ A delivery group is a collection of machines selected from one or more machine c
| Connection Type | Hypervisor | Resource Pool | Machine Catalog |
|-----------------|------------------|------------------|---------------------|
| AzureRM |:heavy_check_mark:|:heavy_check_mark:| MCS / Power Managed |
| AWS EC2 |:heavy_check_mark:|:heavy_check_mark:| in progress |
| AWS EC2 |:heavy_check_mark:|:heavy_check_mark:| MCS / Power Managed |
| GCP |:heavy_check_mark:|:heavy_check_mark:| MCS / Power Managed |
| Vsphere |:heavy_check_mark:| in progress | Power Managed |
| Vsphere |:heavy_check_mark:|:heavy_check_mark:| Power Managed |
| XenServer |:heavy_check_mark:|:heavy_check_mark:| Power Managed |
| Nutanix |:heavy_check_mark:| in progress | Power Managed |

Expand All @@ -164,6 +164,7 @@ A delivery group is a collection of machines selected from one or more machine c
- MCS provisioning
- Azure
- GCP
- AWS EC2
- Manual Power Managed
- Azure
- GCP
Expand Down
16 changes: 8 additions & 8 deletions docs/resources/admin_role.md
Expand Up @@ -3,12 +3,12 @@
page_title: "citrix_admin_role Resource - citrix"
subcategory: ""
description: |-
Manages an Administrator role.
Manages an administrator role.
---

# citrix_admin_role (Resource)

Manages an Administrator role.
Manages an administrator role.

## Example Usage

Expand Down Expand Up @@ -37,18 +37,18 @@ 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).
- `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).

### Optional

- `can_launch_manage` (Boolean) Flag to determine if the user will have access to the Manage tab on the console. This field is only applicable for Cloud customers. For On-Premise customers, the only acceptable value is `true`. Defaults to `true`.
- `can_launch_monitor` (Boolean) Flag to determine if the user will have access to the Monitor tab on the console. This field is only applicable for Cloud customers. For On-Premise customers, the only acceptable value is `true`. Defaults to `true`.
- `description` (String) Description of the Admin Role.
- `can_launch_manage` (Boolean) Flag to determine if the user will have access to the Manage tab on the console. This field is only applicable for cloud admins. For on-premise admins, the only acceptable value is `true`. Defaults to `true`.
- `can_launch_monitor` (Boolean) Flag to determine if the user will have access to the Monitor tab on the console. This field is only applicable for cloud admins. For on-premise admins, the only acceptable value is `true`. Defaults to `true`.
- `description` (String) Description of the admin role.

### Read-Only

- `id` (String) ID of the Admin Role.
- `id` (String) ID of the admin role.
- `is_built_in` (Boolean) Flag to determine if the role was built-in or user defined

## Import
Expand Down
12 changes: 6 additions & 6 deletions docs/resources/admin_scope.md
Expand Up @@ -3,12 +3,12 @@
page_title: "citrix_admin_scope Resource - citrix"
subcategory: ""
description: |-
Manages an Administrator scope.
Manages an administrator scope.
---

# citrix_admin_scope (Resource)

Manages an Administrator scope.
Manages an administrator scope.

## Example Usage

Expand All @@ -34,16 +34,16 @@ resource "citrix_admin_scope" "example-admin-scope" {

### Required

- `name` (String) Name of the Admin Scope.
- `name` (String) Name of the 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))
- `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.
- `id` (String) ID of the admin scope.

<a id="nestedatt--scoped_objects"></a>
### Nested Schema for `scoped_objects`
Expand Down
61 changes: 61 additions & 0 deletions docs/resources/admin_user.md
@@ -0,0 +1,61 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "citrix_admin_user Resource - citrix"
subcategory: ""
description: |-
Manages an administrator user for on-premise environment.
---

# citrix_admin_user (Resource)

Manages an administrator user for on-premise environment.

## Example Usage

```terraform
resource "citrix_admin_user" "example-admin-user" {
name = "example-admin-user"
domain_name = "example-domain"
rights = [
{
role = "Delivery Group Administrator",
scope = "All"
}
]
is_enabled = true
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `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))

### Optional

- `is_enabled` (Boolean) Flag to determine if the administrator is to be enabled or not.

### Read-Only

- `id` (String) ID of the admin user.

<a id="nestedatt--rights"></a>
### Nested Schema for `rights`

Required:

- `role` (String) Name of the role to be associated with the admin user.
- `scope` (String) Name of the scope to be associated with the admin user.

## Import

Import is supported using the following syntax:

```shell
# Admin User can be imported by specifying the SID
terraform import citrix_admin_user.example-admin-user S-1-5-21-0000000000-0000000000-0000000000-0000
```
36 changes: 36 additions & 0 deletions docs/resources/machine_catalog.md
Expand Up @@ -62,6 +62,42 @@ resource "citrix_machine_catalog" "example-azure-mtsession" {
}
}
resource "citrix_machine_catalog" "example-aws-mtsession" {
name = "example-aws-mtsession"
description = "Example multi-session catalog on AWS hypervisor"
zone = "<zone Id>"
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
hypervisor_resource_pool = citrix_hypervisor_resource_pool.example-aws-hypervisor-resource-pool.id
identity_type = "ActiveDirectory"
machine_domain_identity = {
domain = "<DomainFQDN>"
domain_ou = "<DomainOU>"
service_account = "<Admin Username>"
service_account_password = "<Admin Password>"
}
aws_machine_config = {
image_ami = "<AMI ID for VDA>"
master_image = "<Image template AMI name>"
service_offering = "T2 Small Instance"
}
network_mapping = {
network_device = "0"
network = "10.0.128.0/20"
}
number_of_total_machines = 1
}
machine_account_creation_rules ={
naming_scheme = "aws-multi-##"
naming_scheme_type = "Numeric"
}
}
resource "citrix_machine_catalog" "example-gcp-mtsession" {
name = "example-gcp-mtsession"
description = "Example multi-session catalog on GCP hypervisor"
Expand Down
File renamed without changes.
60 changes: 60 additions & 0 deletions examples/basic_aws_mcs_vda/delivery_group.tf
@@ -0,0 +1,60 @@
resource "citrix_delivery_group" "example-delivery-group" {
name = "example-delivery-group"
associated_machine_catalogs = [
{
machine_catalog = citrix_machine_catalog.example-aws-catalog.id
machine_count = 1
}
]
desktops = [
{
published_name = "Example Desktop"
description = "Desription for example desktop"
restricted_access_users = {
allow_list = [
"user1@example.com"
]
block_list = [
"user2@example.com",
]
}
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 = [
"user1@example.com"
]
block_list = [
"user2@example.com",
]
}
}
8 changes: 8 additions & 0 deletions examples/basic_aws_mcs_vda/hypervisors.tf
@@ -0,0 +1,8 @@
# AWS Hypervisor
resource "citrix_aws_hypervisor" "example-aws-hypervisor" {
name = "example-aws-hyperv"
zone = citrix_zone.example-zone.id
api_key = "{AWS API access key}"
secret_key = "{AWS API secret key}"
region = "{AWS region}"
}
35 changes: 35 additions & 0 deletions examples/basic_aws_mcs_vda/machine_catalogs.tf
@@ -0,0 +1,35 @@
resource "citrix_machine_catalog" "example-aws-catalog" {
name = "example-aws-catalog"
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
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 = "<DomainFQDN>"
domain_ou = "<DomainOU>"
service_account = "<Admin Username>"
service_account_password = "<Admin Password>"
}
aws_machine_config = {
image_ami = "<AWS AMI ID>"
master_image = "<AWS AMI Name>"
service_offering = "<AWS EC2 Service Offering>"
}
number_of_total_machines = 1
network_mapping = {
network_device = "0"
network = "<AWS Subnet Mask>"
}
machine_account_creation_rules = {
naming_scheme = "ctx-aws-###"
naming_scheme_type = "Numeric"
}
}
}
9 changes: 9 additions & 0 deletions examples/basic_aws_mcs_vda/resource_pools.tf
@@ -0,0 +1,9 @@
resource "citrix_aws_hypervisor_resource_pool" "example-aws-rp" {
name = "example-aws-rp"
hypervisor = citrix_aws_hypervisor.example-aws-hypervisor.id
subnets = [
"<AWS Subnet Mask>",
]
vpc = "<AWS VPC Name>"
availability_zone = "<AWS Availability Zone>"
}
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
citrix = {
source = "citrix/citrix"
version = ">=0.3.1"
version = ">=0.5.1"
}
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
citrix = {
source = "citrix/citrix"
version = ">=0.3.1"
version = ">=0.5.1"
}
}

Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions examples/basic_gcp_mcs_vda/citrix.tf
@@ -0,0 +1,17 @@
// On-Premises customer provider settings
// Please comment out / remove this provider settings block if you are a Citrix Cloud customer
provider "citrix" {
hostname = "<DDC public IP / hostname>"
client_id = "<DomainFqdn>\\<Admin Username>"
client_secret = "<Admin Passwd>"
disable_ssl_verification = true # omit this field if DDC has valid SSL certificate configured
}

// 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
}
File renamed without changes.
12 changes: 12 additions & 0 deletions examples/basic_gcp_mcs_vda/terraform.tf
@@ -0,0 +1,12 @@
terraform {
required_version = ">= 1.4.0"

required_providers {
citrix = {
source = "citrix/citrix"
version = ">=0.5.1"
}
}

backend "local" {}
}
4 changes: 4 additions & 0 deletions examples/basic_gcp_mcs_vda/zones.tf
@@ -0,0 +1,4 @@
resource "citrix_zone" "example-zone" {
name = "example zone"
description = "description for example zone"
}

0 comments on commit c1c455c

Please sign in to comment.