Skip to content

Commit

Permalink
add hashicorp/terraform-cloud-operator
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Hoß <[email protected]>
  • Loading branch information
sebhoss committed Nov 8, 2023
1 parent ac0c4b5 commit 81674aa
Show file tree
Hide file tree
Showing 12 changed files with 10,411 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@ Files: crd-catalog/gravitational/teleport/*
Copyright: The gravitational/teleport Authors
License: Apache-2.0

Files: crd-catalog/hashicorp/terraform-cloud-operator/*
Copyright: The hashicorp/terraform-cloud-operator Authors
License: MPL-2.0

Files: crd-catalog/hazelcast/hazelcast-platform-operator/*
Copyright: The hazelcast/hazelcast-platform-operator Authors
License: Apache-2.0
Expand Down
373 changes: 373 additions & 0 deletions LICENSES/MPL-2.0.txt

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions code-generator/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,15 @@ pub const CRD_V1_SOURCES: &'static [UpstreamSource] = &[
"https://github.com/gravitational/teleport/blob/master/integrations/operator/config/crd/bases/resources.teleport.dev_users.yaml",
],
},
UpstreamSource {
project_name: "hashicorp/terraform-cloud-operator",
license: MPL_V2,
urls: &[
"https://github.com/hashicorp/terraform-cloud-operator/blob/main/config/crd/bases/app.terraform.io_agentpools.yaml",
"https://github.com/hashicorp/terraform-cloud-operator/blob/main/config/crd/bases/app.terraform.io_modules.yaml",
"https://github.com/hashicorp/terraform-cloud-operator/blob/main/config/crd/bases/app.terraform.io_workspaces.yaml",
],
},
UpstreamSource {
project_name: "hazelcast/hazelcast-platform-operator",
license: APACHE_V2,
Expand Down Expand Up @@ -1887,3 +1896,4 @@ const EPL_V2: &'static str = "EPL-2.0";
const AGPL_V3_ONLY: &'static str = "AGPL-3.0-only";
const GPL_V2_OR_LATER: &'static str = "GPL-2.0-or-later";
const UPL_V1: &'static str = "UPL-1.0";
const MPL_V2: &'static str = "MPL-2.0";

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.3
name: modules.app.terraform.io
spec:
group: app.terraform.io
names:
kind: Module
listKind: ModuleList
plural: modules
singular: module
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .status.configurationVersion.status
name: CV Status
type: string
- jsonPath: .status.run.status
name: Run Status
type: string
name: v1alpha2
schema:
openAPIV3Schema:
description: 'Module is the Schema for the modules API Module implements the API-driven Run Workflow More information: - https://developer.hashicorp.com/terraform/cloud-docs/run/api'
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More 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. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: ModuleSpec defines the desired state of Module.
properties:
destroyOnDeletion:
default: false
description: 'Specify whether or not to execute a Destroy run when the object is deleted from the Kubernetes. Default: `false`.'
type: boolean
module:
description: Module source and version to execute.
properties:
source:
description: 'Non local Terraform module source. More information: - https://developer.hashicorp.com/terraform/language/modules/sources'
minLength: 1
type: string
version:
description: Terraform module version.
minLength: 1
type: string
required:
- source
type: object
name:
default: this
description: 'Name of the module that will be uploaded and executed. Default: `this`.'
minLength: 1
type: string
organization:
description: 'Organization name where the Workspace will be created. More information: - https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/organizations'
minLength: 1
type: string
outputs:
description: Module outputs to store in ConfigMap(non-sensitive) or Secret(sensitive).
items:
description: Module outputs to store in ConfigMap(non-sensitive) or Secret(sensitive).
properties:
name:
description: Output name must match with the module output.
minLength: 1
type: string
sensitive:
default: false
description: 'Specify whether or not the output is sensitive. Default: `false`.'
type: boolean
required:
- name
type: object
minItems: 1
type: array
restartedAt:
description: 'Allows executing a new Run without changing any Workspace or Module attributes. Example: kubectl patch <KIND> <NAME> --type=merge --patch ''{"spec": {"restartedAt": "''\`date -u -Iseconds\`''"}}'''
minLength: 1
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:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
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
required:
- secretKeyRef
type: object
variables:
description: Variables to pass to the module, they must exist in the Workspace.
items:
description: Variables to pass to the module.
properties:
name:
description: Variable name must exist in the Workspace.
minLength: 1
type: string
required:
- name
type: object
minItems: 1
type: array
workspace:
description: Workspace to execute the module.
properties:
id:
description: 'Module Workspace ID. Must match pattern: ^ws-[a-zA-Z0-9]+$'
pattern: ^ws-[a-zA-Z0-9]+$
type: string
name:
description: Module Workspace Name.
minLength: 1
type: string
type: object
required:
- module
- organization
- token
- workspace
type: object
status:
description: ModuleStatus defines the observed state of Module.
properties:
configurationVersion:
description: 'A configuration version is a resource used to reference the uploaded configuration files. More information: - https://developer.hashicorp.com/terraform/cloud-docs/api-docs/configuration-versions - https://developer.hashicorp.com/terraform/cloud-docs/run/api'
properties:
id:
description: Configuration Version ID.
type: string
status:
description: Configuration Version Status.
type: string
required:
- id
- status
type: object
destroyRunID:
description: Workspace Destroy Run status.
type: string
observedGeneration:
description: Real world state generation.
format: int64
type: integer
output:
description: Module Outputs status.
properties:
runID:
description: Run ID of the latest run that updated the outputs.
type: string
required:
- runID
type: object
run:
description: 'Workspace Runs status. More information: - https://developer.hashicorp.com/terraform/cloud-docs/run/states'
properties:
configurationVersion:
type: string
id:
description: Current(both active and finished) Terraform Cloud 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) Terraform Cloud run status.
type: string
type: object
workspaceID:
description: Workspace ID where the module is running.
type: string
required:
- observedGeneration
- workspaceID
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
Loading

0 comments on commit 81674aa

Please sign in to comment.