{
  "description": "Workspace manages HCP Terraform Workspaces.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "WorkspaceSpec defines the desired state of Workspace.",
      "properties": {
        "agentPool": {
          "description": "HCP Terraform Agents allow HCP Terraform to communicate with isolated, private, or on-premises infrastructure.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/agents",
          "properties": {
            "id": {
              "description": "Agent Pool ID.\nMust match pattern: `^apool-[a-zA-Z0-9]+$`",
              "pattern": "^apool-[a-zA-Z0-9]+$",
              "type": "string"
            },
            "name": {
              "description": "Agent Pool name.",
              "minLength": 1,
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "allowDestroyPlan": {
          "default": true,
          "description": "Allows a destroy plan to be created and applied.\nDefault: `true`.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#destruction-and-deletion",
          "type": "boolean"
        },
        "applyMethod": {
          "default": "manual",
          "description": "Define either change will be applied automatically(auto) or require an operator to confirm(manual).\nMust be one of the following values: `auto`, `manual`.\nDefault: `manual`.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#auto-apply-and-manual-apply",
          "pattern": "^(auto|manual)$",
          "type": "string"
        },
        "applyRunTrigger": {
          "default": "manual",
          "description": "Specifies the type of apply, whether manual or auto\nMust be of value `auto` or `manual`\nDefault: `manual`\nMore information:\n- https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#auto-apply",
          "pattern": "^(auto|manual)$",
          "type": "string"
        },
        "deletionPolicy": {
          "default": "retain",
          "description": "The Deletion Policy specifies the behavior of the custom resource and its associated workspace when the custom resource is deleted.\n- `retain`: When you delete the custom resource, the operator does not delete the workspace.\n- `soft`: Attempts to delete the associated workspace only if it does not contain any managed resources.\n- `destroy`: Executes a destroy operation to remove all resources managed by the associated workspace. Once the destruction of these resources is successful, the operator deletes the workspace, and then deletes the custom resource.\n- `force`: Forcefully and immediately deletes the workspace and the custom resource.\nDefault: `retain`.",
          "enum": [
            "retain",
            "soft",
            "destroy",
            "force"
          ],
          "type": "string"
        },
        "description": {
          "description": "Workspace description.",
          "minLength": 1,
          "type": "string"
        },
        "environmentVariables": {
          "description": "Terraform Environment variables for all plans and applies in this workspace.\nVariables defined within a workspace always overwrite variables from variable sets that have the same type and the same key.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/variables\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/variables#environment-variables",
          "items": {
            "description": "Variables let you customize configurations, modify Terraform's behavior, and store information like provider credentials.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/variables",
            "properties": {
              "description": {
                "description": "Description of the variable.",
                "minLength": 1,
                "type": "string"
              },
              "hcl": {
                "default": false,
                "description": "Parse this field as HashiCorp Configuration Language (HCL). This allows you to interpolate values at runtime.\nDefault: `false`.",
                "type": "boolean"
              },
              "name": {
                "description": "Name of the variable.",
                "minLength": 1,
                "type": "string"
              },
              "sensitive": {
                "default": false,
                "description": "Sensitive variables are never shown in the UI or API.\nThey may appear in Terraform logs if your configuration is designed to output them.\nDefault: `false`.",
                "type": "boolean"
              },
              "value": {
                "description": "Value of the variable.",
                "minLength": 1,
                "type": "string"
              },
              "valueFrom": {
                "description": "Source for the variable's value. Cannot be used if value is not empty.",
                "properties": {
                  "configMapKeyRef": {
                    "description": "Selects a key of a ConfigMap.",
                    "properties": {
                      "key": {
                        "description": "The key to select.",
                        "type": "string"
                      },
                      "name": {
                        "default": "",
                        "description": "Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                        "type": "string"
                      },
                      "optional": {
                        "description": "Specify whether the ConfigMap or its key must be defined",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "key"
                    ],
                    "type": "object",
                    "x-kubernetes-map-type": "atomic",
                    "additionalProperties": false
                  },
                  "secretKeyRef": {
                    "description": "Selects a key of a Secret.",
                    "properties": {
                      "key": {
                        "description": "The key of the secret to select from.  Must be a valid secret key.",
                        "type": "string"
                      },
                      "name": {
                        "default": "",
                        "description": "Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                        "type": "string"
                      },
                      "optional": {
                        "description": "Specify whether the Secret or its key must be defined",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "key"
                    ],
                    "type": "object",
                    "x-kubernetes-map-type": "atomic",
                    "additionalProperties": false
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            },
            "required": [
              "name"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "minItems": 1,
          "type": "array"
        },
        "executionMode": {
          "default": "remote",
          "description": "Define where the Terraform code will be executed.\nMust be one of the following values: `agent`, `local`, `remote`.\nDefault: `remote`.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode",
          "pattern": "^(agent|local|remote)$",
          "type": "string"
        },
        "name": {
          "description": "Workspace name.",
          "minLength": 1,
          "type": "string"
        },
        "notifications": {
          "description": "Notifications allow you to send messages to other applications based on run and workspace events.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/notifications",
          "items": {
            "description": "Notifications allow you to send messages to other applications based on run and workspace events.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/notifications",
            "properties": {
              "emailAddresses": {
                "description": "The list of email addresses that will receive notification emails.\nIt is only available for Terraform Enterprise users. It is not available in HCP Terraform.",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              },
              "emailUsers": {
                "description": "The list of users belonging to the organization that will receive notification emails.",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              },
              "enabled": {
                "default": true,
                "description": "Whether the notification configuration should be enabled or not.\nDefault: `true`.",
                "type": "boolean"
              },
              "name": {
                "description": "Notification name.",
                "minLength": 1,
                "type": "string"
              },
              "token": {
                "description": "The token of the notification.",
                "minLength": 1,
                "type": "string"
              },
              "triggers": {
                "description": "The list of run events that will trigger notifications.\nTrigger represents the different TFC notifications that can be sent as a run's progress transitions between different states.\nThere are two categories of triggers:\n  - Health Events: `assessment:check_failure`, `assessment:drifted`, `assessment:failed`.\n  - Run Events: `run:applying`, `run:completed`, `run:created`, `run:errored`, `run:needs_attention`, `run:planning`.",
                "items": {
                  "description": "NotificationTrigger represents the different TFC notifications that can be sent as a run's progress transitions between different states.\nThis must be aligned with go-tfe type `NotificationTriggerType`.\nMust be one of the following values: `run:applying`, `assessment:check_failure`, `run:completed`, `run:created`, `assessment:drifted`, `run:errored`, `assessment:failed`, `run:needs_attention`, `run:planning`.",
                  "enum": [
                    "run:applying",
                    "assessment:check_failure",
                    "run:completed",
                    "run:created",
                    "assessment:drifted",
                    "run:errored",
                    "assessment:failed",
                    "run:needs_attention",
                    "run:planning"
                  ],
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              },
              "type": {
                "description": "The type of the notification.\nMust be one of the following values: `email`, `generic`, `microsoft-teams`, `slack`.",
                "enum": [
                  "email",
                  "generic",
                  "microsoft-teams",
                  "slack"
                ],
                "type": "string"
              },
              "url": {
                "description": "The URL of the notification.\nMust match pattern: `^https?://.*`",
                "pattern": "^https?://.*",
                "type": "string"
              }
            },
            "required": [
              "name",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "minItems": 1,
          "type": "array"
        },
        "organization": {
          "description": "Organization name where the Workspace will be created.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/organizations",
          "minLength": 1,
          "type": "string"
        },
        "project": {
          "description": "Projects let you organize your workspaces into groups.\nDefault: default organization project.\nMore information:\n  - https://developer.hashicorp.com/terraform/tutorials/cloud/projects",
          "properties": {
            "id": {
              "description": "Project ID.\nMust match pattern: `^prj-[a-zA-Z0-9]+$`",
              "pattern": "^prj-[a-zA-Z0-9]+$",
              "type": "string"
            },
            "name": {
              "description": "Project name.",
              "minLength": 1,
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "remoteStateSharing": {
          "description": "Remote state access between workspaces.\nBy default, new workspaces in HCP Terraform do not allow other workspaces to access their state.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/state#accessing-state-from-other-workspaces",
          "properties": {
            "allWorkspaces": {
              "default": false,
              "description": "Allow access to the state for all workspaces within the same organization.\nDefault: `false`.",
              "type": "boolean"
            },
            "workspaces": {
              "description": "Allow access to the state for specific workspaces within the same organization.",
              "items": {
                "description": "ConsumerWorkspace allows access to the state for specific workspaces within the same organization.\nOnly one of the fields `ID` or `Name` is allowed.\nAt least one of the fields `ID` or `Name` is mandatory.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/state#remote-state-access-controls",
                "properties": {
                  "id": {
                    "description": "Consumer Workspace ID.\nMust match pattern: `^ws-[a-zA-Z0-9]+$`",
                    "pattern": "^ws-[a-zA-Z0-9]+$",
                    "type": "string"
                  },
                  "name": {
                    "description": "Consumer Workspace name.",
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "minItems": 1,
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "runTasks": {
          "description": "Run tasks allow HCP Terraform to interact with external systems at specific points in the HCP Terraform run lifecycle.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-tasks",
          "items": {
            "description": "Run tasks allow HCP Terraform to interact with external systems at specific points in the HCP Terraform run lifecycle.\nOnly one of the fields `ID` or `Name` is allowed.\nAt least one of the fields `ID` or `Name` is mandatory.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-tasks",
            "properties": {
              "enforcementLevel": {
                "default": "advisory",
                "description": "Run Task Enforcement Level. Can be one of `advisory` or `mandatory`. Default: `advisory`.\nMust be one of the following values: `advisory`, `mandatory`\nDefault: `advisory`.",
                "pattern": "^(advisory|mandatory)$",
                "type": "string"
              },
              "id": {
                "description": "Run Task ID.\nMust match pattern: `^task-[a-zA-Z0-9]+$`",
                "pattern": "^task-[a-zA-Z0-9]+$",
                "type": "string"
              },
              "name": {
                "description": "Run Task Name.",
                "minLength": 1,
                "type": "string"
              },
              "stage": {
                "default": "post_plan",
                "description": "Run Task Stage.\nMust be one of the following values: `pre_apply`, `pre_plan`, `post_plan`.\nDefault: `post_plan`.",
                "pattern": "^(pre_apply|pre_plan|post_plan)$",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "minItems": 1,
          "type": "array"
        },
        "runTriggers": {
          "description": "Run triggers allow you to connect this workspace to one or more source workspaces.\nThese connections allow runs to queue automatically in this workspace on successful apply of runs in any of the source workspaces.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-triggers",
          "items": {
            "description": "RunTrigger allows you to connect this workspace to one or more source workspaces.\nThese connections allow runs to queue automatically in this workspace on successful apply of runs in any of the source workspaces.\nOnly one of the fields `ID` or `Name` is allowed.\nAt least one of the fields `ID` or `Name` is mandatory.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-triggers",
            "properties": {
              "id": {
                "description": "Source Workspace ID.\nMust match pattern: `^ws-[a-zA-Z0-9]+$`",
                "pattern": "^ws-[a-zA-Z0-9]+$",
                "type": "string"
              },
              "name": {
                "description": "Source Workspace Name.",
                "minLength": 1,
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "minItems": 1,
          "type": "array"
        },
        "sshKey": {
          "description": "SSH key used to clone Terraform modules.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/ssh-keys",
          "properties": {
            "id": {
              "description": "SSH key ID.\nMust match pattern: `^sshkey-[a-zA-Z0-9]+$`",
              "pattern": "^sshkey-[a-zA-Z0-9]+$",
              "type": "string"
            },
            "name": {
              "description": "SSH key name.",
              "minLength": 1,
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "tags": {
          "description": "Workspace tags are used to help identify and group together workspaces.\nTags must be one or more characters; can include letters, numbers, colons, hyphens, and underscores; and must begin and end with a letter or number.",
          "items": {
            "description": "Tags allows you to correlate, organize, and even filter workspaces based on the assigned tags.\nTags must be one or more characters; can include letters, numbers, colons, hyphens, and underscores; and must begin and end with a letter or number.\nMust match pattern: `^[A-Za-z0-9][A-Za-z0-9:_-]*$`",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9:_-]*$",
            "type": "string"
          },
          "minItems": 1,
          "type": "array"
        },
        "teamAccess": {
          "description": "HCP Terraform workspaces can only be accessed by users with the correct permissions.\nYou can manage permissions for a workspace on a per-team basis.\nWhen a workspace is created, only the owners team and teams with the \"manage workspaces\" permission can access it,\nwith full admin permissions. These teams' access can't be removed from a workspace.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/access",
          "items": {
            "description": "HCP Terraform workspaces can only be accessed by users with the correct permissions.\nYou can manage permissions for a workspace on a per-team basis.\nWhen a workspace is created, only the owners team and teams with the \"manage workspaces\" permission can access it,\nwith full admin permissions. These teams' access can't be removed from a workspace.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/access",
            "properties": {
              "access": {
                "description": "There are two ways to choose which permissions a given team has on a workspace: fixed permission sets, and custom permissions.\nMust be one of the following values: `admin`, `custom`, `plan`, `read`, `write`.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/permissions#workspace-permissions",
                "pattern": "^(admin|custom|plan|read|write)$",
                "type": "string"
              },
              "custom": {
                "description": "Custom permissions let you assign specific, finer-grained permissions to a team than the broader fixed permission sets provide.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/permissions#custom-workspace-permissions",
                "properties": {
                  "runTasks": {
                    "description": "Manage Workspace Run Tasks.\nDefault: `false`.",
                    "type": "boolean"
                  },
                  "runs": {
                    "default": "read",
                    "description": "Run access.\nMust be one of the following values: `apply`, `plan`, `read`.\nDefault: `read`.",
                    "pattern": "^(apply|plan|read)$",
                    "type": "string"
                  },
                  "sentinel": {
                    "default": "none",
                    "description": "Download Sentinel mocks.\nMust be one of the following values: `none`, `read`.\nDefault: `none`.",
                    "pattern": "^(none|read)$",
                    "type": "string"
                  },
                  "stateVersions": {
                    "default": "none",
                    "description": "State access.\nMust be one of the following values: `none`, `read`, `read-outputs`, `write`.\nDefault: `none`.",
                    "pattern": "^(none|read|read-outputs|write)$",
                    "type": "string"
                  },
                  "variables": {
                    "default": "none",
                    "description": "Variable access.\nMust be one of the following values: `none`, `read`, `write`.\nDefault: `none`.",
                    "pattern": "^(none|read|write)$",
                    "type": "string"
                  },
                  "workspaceLocking": {
                    "default": false,
                    "description": "Lock/unlock workspace.\nDefault: `false`.",
                    "type": "boolean"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "team": {
                "description": "Team to grant access.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/teams",
                "properties": {
                  "id": {
                    "description": "Team ID.\nMust match pattern: `^team-[a-zA-Z0-9]+$`",
                    "pattern": "^team-[a-zA-Z0-9]+$",
                    "type": "string"
                  },
                  "name": {
                    "description": "Team name.",
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            },
            "required": [
              "access",
              "team"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "minItems": 1,
          "type": "array"
        },
        "terraformVariables": {
          "description": "Terraform variables for all plans and applies in this workspace.\nVariables defined within a workspace always overwrite variables from variable sets that have the same type and the same key.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/variables\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/variables#terraform-variables",
          "items": {
            "description": "Variables let you customize configurations, modify Terraform's behavior, and store information like provider credentials.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/variables",
            "properties": {
              "description": {
                "description": "Description of the variable.",
                "minLength": 1,
                "type": "string"
              },
              "hcl": {
                "default": false,
                "description": "Parse this field as HashiCorp Configuration Language (HCL). This allows you to interpolate values at runtime.\nDefault: `false`.",
                "type": "boolean"
              },
              "name": {
                "description": "Name of the variable.",
                "minLength": 1,
                "type": "string"
              },
              "sensitive": {
                "default": false,
                "description": "Sensitive variables are never shown in the UI or API.\nThey may appear in Terraform logs if your configuration is designed to output them.\nDefault: `false`.",
                "type": "boolean"
              },
              "value": {
                "description": "Value of the variable.",
                "minLength": 1,
                "type": "string"
              },
              "valueFrom": {
                "description": "Source for the variable's value. Cannot be used if value is not empty.",
                "properties": {
                  "configMapKeyRef": {
                    "description": "Selects a key of a ConfigMap.",
                    "properties": {
                      "key": {
                        "description": "The key to select.",
                        "type": "string"
                      },
                      "name": {
                        "default": "",
                        "description": "Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                        "type": "string"
                      },
                      "optional": {
                        "description": "Specify whether the ConfigMap or its key must be defined",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "key"
                    ],
                    "type": "object",
                    "x-kubernetes-map-type": "atomic",
                    "additionalProperties": false
                  },
                  "secretKeyRef": {
                    "description": "Selects a key of a Secret.",
                    "properties": {
                      "key": {
                        "description": "The key of the secret to select from.  Must be a valid secret key.",
                        "type": "string"
                      },
                      "name": {
                        "default": "",
                        "description": "Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                        "type": "string"
                      },
                      "optional": {
                        "description": "Specify whether the Secret or its key must be defined",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "key"
                    ],
                    "type": "object",
                    "x-kubernetes-map-type": "atomic",
                    "additionalProperties": false
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            },
            "required": [
              "name"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "minItems": 1,
          "type": "array"
        },
        "terraformVersion": {
          "description": "The version of Terraform to use for this workspace.\nIf not specified, the latest available version will be used.\nMust match pattern: `^\\\\d{1}\\\\.\\\\d{1,2}\\\\.\\\\d{1,2}$`\nMore information:\n  - https://www.terraform.io/cloud-docs/workspaces/settings#terraform-version",
          "pattern": "^\\d{1}\\.\\d{1,2}\\.\\d{1,2}$",
          "type": "string"
        },
        "token": {
          "description": "API Token to be used for API calls.",
          "properties": {
            "secretKeyRef": {
              "description": "Selects a key of a secret in the workspace's namespace",
              "properties": {
                "key": {
                  "description": "The key of the secret to select from.  Must be a valid secret key.",
                  "type": "string"
                },
                "name": {
                  "default": "",
                  "description": "Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                  "type": "string"
                },
                "optional": {
                  "description": "Specify whether the Secret or its key must be defined",
                  "type": "boolean"
                }
              },
              "required": [
                "key"
              ],
              "type": "object",
              "x-kubernetes-map-type": "atomic",
              "additionalProperties": false
            }
          },
          "required": [
            "secretKeyRef"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "variableSets": {
          "description": "HCP Terraform variable sets let you reuse variables in an efficient and centralized way.\nMore information\n  - https://developer.hashicorp.com/terraform/tutorials/cloud/cloud-multiple-variable-sets",
          "items": {
            "properties": {
              "id": {
                "description": "ID of the variable set.\nMust match pattern: `varset-[a-zA-Z0-9]+$`\nMore information:\n  - https://developer.hashicorp.com/terraform/tutorials/cloud/cloud-multiple-variable-sets",
                "pattern": "varset-[a-zA-Z0-9]+$",
                "type": "string"
              },
              "name": {
                "description": "Name of the variable set.\nMore information:\n  - https://developer.hashicorp.com/terraform/tutorials/cloud/cloud-multiple-variable-sets",
                "minLength": 1,
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "minItems": 1,
          "type": "array"
        },
        "versionControl": {
          "description": "Settings for the workspace's VCS repository, enabling the UI/VCS-driven run workflow.\nOmit this argument to utilize the CLI-driven and API-driven workflows, where runs are not driven by webhooks on your VCS provider.\nMore information:\n  - https://www.terraform.io/cloud-docs/run/ui\n  - https://www.terraform.io/cloud-docs/vcs",
          "properties": {
            "branch": {
              "description": "The repository branch that Run will execute from. This defaults to the repository's default branch (e.g. main).",
              "minLength": 1,
              "type": "string"
            },
            "enableFileTriggers": {
              "default": false,
              "description": "File triggers allow you to queue runs in HCP Terraform when files in your VCS repository change.\nDefault: `false`.\nMore informarion:\n - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs#automatic-run-triggering",
              "type": "boolean"
            },
            "oAuthTokenID": {
              "description": "The VCS Connection (OAuth Connection + Token) to use.\nMust match pattern: `^ot-[a-zA-Z0-9]+$`",
              "pattern": "^ot-[a-zA-Z0-9]+$",
              "type": "string"
            },
            "repository": {
              "description": "A reference to your VCS repository in the format `<organization>/<repository>` where `<organization>` and `<repository>` refer to the organization and repository in your VCS provider.",
              "minLength": 1,
              "type": "string"
            },
            "speculativePlans": {
              "default": true,
              "description": "Whether this workspace allows automatic speculative plans on PR.\nDefault: `true`.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/run/ui#speculative-plans-on-pull-requests\n  - https://developer.hashicorp.com/terraform/cloud-docs/run/remote-operations#speculative-plans",
              "type": "boolean"
            },
            "triggerPatterns": {
              "description": "The list of pattern triggers that will queue runs in HCP Terraform when files in your VCS repository change.\n`spec.versionControl.fileTriggersEnabled` must be set to `true`.\nMore informarion:\n - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs#automatic-run-triggering",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "type": "array"
            },
            "triggerPrefixes": {
              "description": "The list of pattern prefixes that will queue runs in HCP Terraform when files in your VCS repository change.\n`spec.versionControl.fileTriggersEnabled` must be set to `true`.\nMore informarion:\n - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs#automatic-run-triggering",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "workingDirectory": {
          "description": "The directory where Terraform will execute, specified as a relative path from the root of the configuration directory.\nMore information:\n  - https://www.terraform.io/cloud-docs/workspaces/settings#terraform-working-directory",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "name",
        "organization",
        "token"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "WorkspaceStatus defines the observed state of Workspace.",
      "properties": {
        "defaultProjectID": {
          "description": "Default organization project ID.",
          "type": "string"
        },
        "destroyRunID": {
          "description": "Workspace Destroy Run ID.",
          "type": "string"
        },
        "observedGeneration": {
          "description": "Real world state generation.",
          "format": "int64",
          "type": "integer"
        },
        "plan": {
          "description": "Run status of plan-only/speculative plan that was triggered manually.",
          "properties": {
            "id": {
              "description": "Latest plan-only/speculative plan HCP Terraform run ID.",
              "type": "string"
            },
            "status": {
              "description": "Latest plan-only/speculative plan HCP Terraform run status.",
              "type": "string"
            },
            "terraformVersion": {
              "description": "The version of Terraform to use for this run.",
              "pattern": "^\\d{1}\\.\\d{1,2}\\.\\d{1,2}$",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "runStatus": {
          "description": "Workspace Runs status.",
          "properties": {
            "configurationVersion": {
              "description": "The configuration version of this run.",
              "type": "string"
            },
            "id": {
              "description": "Current(both active and finished) HCP Terraform run ID.",
              "type": "string"
            },
            "outputRunID": {
              "description": "Run ID of the latest run that could update the outputs.",
              "type": "string"
            },
            "status": {
              "description": "Current(both active and finished) HCP Terraform run status.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "sshKeyID": {
          "description": "SSH Key ID.",
          "type": "string"
        },
        "terraformVersion": {
          "description": "Workspace Terraform version.",
          "pattern": "^\\d{1}\\.\\d{1,2}\\.\\d{1,2}$",
          "type": "string"
        },
        "updateAt": {
          "description": "Workspace last update timestamp.",
          "format": "int64",
          "type": "integer"
        },
        "variableSet": {
          "description": "Variable Sets.",
          "items": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "variables": {
          "description": "Workspace variables.",
          "items": {
            "properties": {
              "category": {
                "description": "Category of the variable.",
                "type": "string"
              },
              "id": {
                "description": "ID of the variable.",
                "type": "string"
              },
              "name": {
                "description": "Name of the variable.",
                "type": "string"
              },
              "valueID": {
                "description": "ValueID is a hash of the variable on the CRD end.",
                "type": "string"
              },
              "versionID": {
                "description": "VersionID is a hash of the variable on the TFC end.",
                "type": "string"
              }
            },
            "required": [
              "category",
              "id",
              "name",
              "valueID",
              "versionID"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "workspaceID": {
          "description": "Workspace ID that is managed by the controller.",
          "type": "string"
        }
      },
      "required": [
        "workspaceID"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
