|
| 1 | +apiVersion: apiextensions.k8s.io/v1 |
| 2 | +kind: CustomResourceDefinition |
| 3 | +metadata: |
| 4 | + annotations: |
| 5 | + controller-gen.kubebuilder.io/version: v0.16.5 |
| 6 | + labels: |
| 7 | + app.terraform.io/crd-schema-version: v25.11.0 |
| 8 | + name: agenttokens.app.terraform.io |
| 9 | +spec: |
| 10 | + group: app.terraform.io |
| 11 | + names: |
| 12 | + kind: AgentToken |
| 13 | + listKind: AgentTokenList |
| 14 | + plural: agenttokens |
| 15 | + singular: agenttoken |
| 16 | + scope: Namespaced |
| 17 | + versions: |
| 18 | + - additionalPrinterColumns: |
| 19 | + - jsonPath: .status.agentPool.name |
| 20 | + name: Pool Name |
| 21 | + type: string |
| 22 | + - jsonPath: .status.agentPool.id |
| 23 | + name: Pool ID |
| 24 | + type: string |
| 25 | + name: v1alpha2 |
| 26 | + schema: |
| 27 | + openAPIV3Schema: |
| 28 | + description: |- |
| 29 | + AgentToken manages HCP Terraform Agent Tokens. |
| 30 | + More information: |
| 31 | + - https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/api-tokens#agent-api-tokens |
| 32 | + properties: |
| 33 | + apiVersion: |
| 34 | + description: |- |
| 35 | + APIVersion defines the versioned schema of this representation of an object. |
| 36 | + Servers should convert recognized schemas to the latest internal value, and |
| 37 | + may reject unrecognized values. |
| 38 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| 39 | + type: string |
| 40 | + kind: |
| 41 | + description: |- |
| 42 | + Kind is a string value representing the REST resource this object represents. |
| 43 | + Servers may infer this from the endpoint the client submits requests to. |
| 44 | + Cannot be updated. |
| 45 | + In CamelCase. |
| 46 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| 47 | + type: string |
| 48 | + metadata: |
| 49 | + type: object |
| 50 | + spec: |
| 51 | + description: AgentTokenSpec defines the desired state of AgentToken. |
| 52 | + properties: |
| 53 | + agentPool: |
| 54 | + description: The Agent Pool name or ID where the tokens will be managed. |
| 55 | + properties: |
| 56 | + id: |
| 57 | + description: |- |
| 58 | + Agent Pool ID. |
| 59 | + Must match pattern: `^apool-[a-zA-Z0-9]+$` |
| 60 | + pattern: ^apool-[a-zA-Z0-9]+$ |
| 61 | + type: string |
| 62 | + name: |
| 63 | + description: Agent Pool name. |
| 64 | + minLength: 1 |
| 65 | + type: string |
| 66 | + type: object |
| 67 | + agentTokens: |
| 68 | + description: List of the HCP Terraform Agent tokens to manage. |
| 69 | + items: |
| 70 | + description: |- |
| 71 | + Agent Token is a secret token that a HCP Terraform Agent is used to connect to the HCP Terraform Agent Pool. |
| 72 | + In `spec` only the field `Name` is allowed, the rest are used in `status`. |
| 73 | + More infromation: |
| 74 | + - https://developer.hashicorp.com/terraform/cloud-docs/agents |
| 75 | + properties: |
| 76 | + createdAt: |
| 77 | + description: Timestamp of when the agent token was created. |
| 78 | + format: int64 |
| 79 | + type: integer |
| 80 | + id: |
| 81 | + description: Agent Token ID. |
| 82 | + pattern: ^at-[a-zA-Z0-9]+$ |
| 83 | + type: string |
| 84 | + lastUsedAt: |
| 85 | + description: Timestamp of when the agent token was last used. |
| 86 | + format: int64 |
| 87 | + type: integer |
| 88 | + name: |
| 89 | + description: Agent Token name. |
| 90 | + minLength: 1 |
| 91 | + type: string |
| 92 | + required: |
| 93 | + - name |
| 94 | + type: object |
| 95 | + minItems: 1 |
| 96 | + type: array |
| 97 | + deletionPolicy: |
| 98 | + default: retain |
| 99 | + description: |- |
| 100 | + The Deletion Policy defines how managed tokens and Kubernetes Secrets should be handled when the custom resource is deleted. |
| 101 | + - `retain`: When the custom resource is deleted, the operator will remove only the resource itself. |
| 102 | + The managed HCP Terraform Agent tokens will remain active on the HCP Terraform side, and the corresponding Kubernetes Secret will not be modified. |
| 103 | + - `destroy`: The operator will attempt to delete the managed HCP Terraform Agent tokens and remove the corresponding Kubernetes Secret. |
| 104 | + Default: `retain`. |
| 105 | + enum: |
| 106 | + - retain |
| 107 | + - destroy |
| 108 | + type: string |
| 109 | + managementPolicy: |
| 110 | + default: merge |
| 111 | + description: |- |
| 112 | + The Management Policy defines how the controller will manage tokens in the specified Agent Pool. |
| 113 | + - `merge` — the controller will manage its tokens alongside any existing tokens in the pool, without modifying or deleting tokens it does not own. |
| 114 | + - `owner` — the controller assumes full ownership of all agent tokens in the pool, managing and potentially modifying or deleting all tokens, including those not created by it. |
| 115 | + Default: `merge`. |
| 116 | + enum: |
| 117 | + - merge |
| 118 | + - owner |
| 119 | + type: string |
| 120 | + organization: |
| 121 | + description: |- |
| 122 | + Organization name where the Workspace will be created. |
| 123 | + More information: |
| 124 | + - https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/organizations |
| 125 | + minLength: 1 |
| 126 | + type: string |
| 127 | + secretName: |
| 128 | + description: |- |
| 129 | + secretName specifies the name of the Kubernetes Secret |
| 130 | + where the HCP Terraform Agent tokens are stored. |
| 131 | + minLength: 1 |
| 132 | + type: string |
| 133 | + token: |
| 134 | + description: API Token to be used for API calls. |
| 135 | + properties: |
| 136 | + secretKeyRef: |
| 137 | + description: Selects a key of a secret in the workspace's namespace |
| 138 | + properties: |
| 139 | + key: |
| 140 | + description: The key of the secret to select from. Must be |
| 141 | + a valid secret key. |
| 142 | + type: string |
| 143 | + name: |
| 144 | + default: "" |
| 145 | + description: |- |
| 146 | + Name of the referent. |
| 147 | + This field is effectively required, but due to backwards compatibility is |
| 148 | + allowed to be empty. Instances of this type with an empty value here are |
| 149 | + almost certainly wrong. |
| 150 | + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
| 151 | + type: string |
| 152 | + optional: |
| 153 | + description: Specify whether the Secret or its key must be |
| 154 | + defined |
| 155 | + type: boolean |
| 156 | + required: |
| 157 | + - key |
| 158 | + type: object |
| 159 | + x-kubernetes-map-type: atomic |
| 160 | + required: |
| 161 | + - secretKeyRef |
| 162 | + type: object |
| 163 | + required: |
| 164 | + - agentPool |
| 165 | + - agentTokens |
| 166 | + - organization |
| 167 | + - secretName |
| 168 | + - token |
| 169 | + type: object |
| 170 | + status: |
| 171 | + description: AgentTokenStatus defines the observed state of AgentToken. |
| 172 | + properties: |
| 173 | + agentPool: |
| 174 | + description: Agent Pool where tokens are managed by the controller. |
| 175 | + properties: |
| 176 | + id: |
| 177 | + description: |- |
| 178 | + Agent Pool ID. |
| 179 | + Must match pattern: `^apool-[a-zA-Z0-9]+$` |
| 180 | + pattern: ^apool-[a-zA-Z0-9]+$ |
| 181 | + type: string |
| 182 | + name: |
| 183 | + description: Agent Pool name. |
| 184 | + minLength: 1 |
| 185 | + type: string |
| 186 | + type: object |
| 187 | + agentTokens: |
| 188 | + description: List of the agent tokens managed by the controller. |
| 189 | + items: |
| 190 | + description: |- |
| 191 | + Agent Token is a secret token that a HCP Terraform Agent is used to connect to the HCP Terraform Agent Pool. |
| 192 | + In `spec` only the field `Name` is allowed, the rest are used in `status`. |
| 193 | + More infromation: |
| 194 | + - https://developer.hashicorp.com/terraform/cloud-docs/agents |
| 195 | + properties: |
| 196 | + createdAt: |
| 197 | + description: Timestamp of when the agent token was created. |
| 198 | + format: int64 |
| 199 | + type: integer |
| 200 | + id: |
| 201 | + description: Agent Token ID. |
| 202 | + pattern: ^at-[a-zA-Z0-9]+$ |
| 203 | + type: string |
| 204 | + lastUsedAt: |
| 205 | + description: Timestamp of when the agent token was last used. |
| 206 | + format: int64 |
| 207 | + type: integer |
| 208 | + name: |
| 209 | + description: Agent Token name. |
| 210 | + minLength: 1 |
| 211 | + type: string |
| 212 | + required: |
| 213 | + - name |
| 214 | + type: object |
| 215 | + type: array |
| 216 | + observedGeneration: |
| 217 | + description: Real world state generation. |
| 218 | + format: int64 |
| 219 | + type: integer |
| 220 | + required: |
| 221 | + - observedGeneration |
| 222 | + type: object |
| 223 | + required: |
| 224 | + - spec |
| 225 | + type: object |
| 226 | + served: true |
| 227 | + storage: true |
| 228 | + subresources: |
| 229 | + status: {} |
| 230 | + |
0 commit comments