Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the app v1alpha1 API group +kubebuilder:object:generate=true +groupName=app.terraform.io
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "app.terraform.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// Any remote module source (version control, registry)
Source string `json:"source"`
// Module version for registry modules
// +optional
Version string `json:"version"`
}
Module references a Terraform module
func (*Module) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Module.
func (*Module) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Notification ¶ added in v1.1.0
type Notification struct {
// Notification type. Can be one of email, generic, or slack
Type tfc.NotificationDestinationType `json:"type"`
// Control if the notification is enabled or not
Enabled bool `json:"enabled"`
// Name of the hook
Name string `json:"name"`
// URL of the hook
// +optional
URL string `json:"url"`
// Token used to generate an HMAC on the verificatio0n request
// +optional
Token string `json:"token"`
// When the web hook gets triggered. Acceptable values are run:created, run:planning, run:needs_attention, run:applying, run:completed, run:errored.
// +optional
Triggers []string `json:"triggers,omitempty"`
// List of recipients' email addresses. Only applicable for TFE endpoints.
// +optional
Recipients []string `json:"recipients,omitempty"`
// List of users to receive the notificaiton email.
// +optional
Users []string `json:"users,omitempty"`
}
Notification notification holds all the necessary information required to configure any workspace notification
func (*Notification) DeepCopy ¶ added in v1.1.0
func (in *Notification) DeepCopy() *Notification
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Notification.
func (*Notification) DeepCopyInto ¶ added in v1.1.0
func (in *Notification) DeepCopyInto(out *Notification)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OutputSpec ¶
type OutputSpec struct {
// Output name
// +optional
Key string `json:"key"`
// Attribute name in module
// +optional
ModuleOutputName string `json:"moduleOutputName"`
}
OutputSpec specifies which values need to be output
func (*OutputSpec) DeepCopy ¶
func (in *OutputSpec) DeepCopy() *OutputSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OutputSpec.
func (*OutputSpec) DeepCopyInto ¶
func (in *OutputSpec) DeepCopyInto(out *OutputSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OutputStatus ¶
type OutputStatus struct {
// Attribute name in module
// +optional
Key string `json:"key"`
// Value
// +optional
Value string `json:"value"`
}
OutputStatus outputs the values of Terraform output
func (*OutputStatus) DeepCopy ¶
func (in *OutputStatus) DeepCopy() *OutputStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OutputStatus.
func (*OutputStatus) DeepCopyInto ¶
func (in *OutputStatus) DeepCopyInto(out *OutputStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RunTrigger ¶ added in v1.1.0
type RunTrigger struct {
// Name of source workspace that triggers the current workspace
SourceableName string `json:"sourceableName"`
}
Run Trigger from a source workspace
func (*RunTrigger) DeepCopy ¶ added in v1.1.0
func (in *RunTrigger) DeepCopy() *RunTrigger
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunTrigger.
func (*RunTrigger) DeepCopyInto ¶ added in v1.1.0
func (in *RunTrigger) DeepCopyInto(out *RunTrigger)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VCS ¶
type VCS struct {
// Token ID of the VCS Connection (OAuth Connection Token) to use
// https://www.terraform.io/docs/cloud/vcs
TokenID string `json:"token_id"`
// A reference to your VCS repository in the format org/repo
RepoIdentifier string `json:"repo_identifier"`
// The repository branch to use
// +optional
Branch string `json:"branch"`
// Whether submodules should be fetched when cloning the VCS repository (Defaults to false)
IngressSubmodules bool `json:"ingress_submodules,omitempty"`
}
VCS holds all the information needed to connect the workspace to a VCS repository
func (*VCS) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VCS.
func (*VCS) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Variable ¶
type Variable struct {
// Variable name
Key string `json:"key"`
// Variable value
// +optional
Value string `json:"value"`
// Source for the variable's value. Cannot be used if value is not empty.
// +optional
ValueFrom *corev1.EnvVarSource `json:"valueFrom,omitempty"`
// String input should be an HCL-formatted variable
// +optional
HCL bool `json:"hcl"`
// Variable is a secret and should be retrieved from file
Sensitive bool `json:"sensitive"`
// EnvironmentVariable denotes if this variable should be created as environment variable
EnvironmentVariable bool `json:"environmentVariable"`
}
Variable denotes an input to the module
func (*Variable) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable.
func (*Variable) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Workspace ¶
type Workspace struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec WorkspaceSpec `json:"spec,omitempty"`
Status WorkspaceStatus `json:"status,omitempty"`
}
Workspace is the Schema for the workspaces API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=workspaces,scope=Namespaced
func (*Workspace) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workspace.
func (*Workspace) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Workspace) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkspaceList ¶
type WorkspaceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Workspace `json:"items"`
}
WorkspaceList contains a list of Workspace
func (*WorkspaceList) DeepCopy ¶
func (in *WorkspaceList) DeepCopy() *WorkspaceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceList.
func (*WorkspaceList) DeepCopyInto ¶
func (in *WorkspaceList) DeepCopyInto(out *WorkspaceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkspaceList) DeepCopyObject ¶
func (in *WorkspaceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkspaceSpec ¶
type WorkspaceSpec struct {
// Terraform Cloud organization
Organization string `json:"organization"`
// Module source and version to use
// +optional
// +nullable
Module *Module `json:"module"`
// Details of the VCS repository we want to connect to the workspace
// +optional
// +nullable
VCS *VCS `json:"vcs"`
// Variables as inputs to module
// +optional
Variables []*Variable `json:"variables,omitempty"`
// Run Triggers from source workspaces to trigger this workspace
// +optional
RunTriggers []*RunTrigger `json:"runTriggers,omitempty"`
// File path within operator pod to load workspace secrets
SecretsMountPath string `json:"secretsMountPath"`
// SSH Key ID. This key must already exist in the TF Cloud organization. This can either be the user assigned name of the SSH Key, or the system assigned ID.
// +optional
SSHKeyID string `json:"sshKeyID,omitempty"`
// Outputs denote outputs wanted
// +optional
Outputs []*OutputSpec `json:"outputs,omitempty"`
// Terraform version used for this workspace. The default is `latest`.
// +optional
TerraformVersion string `json:"terraformVersion"`
// Specifies the agent pool ID we wish to use.
// +optional
AgentPoolID string `json:"agentPoolID,omitempty"`
// Notification configuration
// +optional
Notifications []*Notification `json:"notifications,omitempty"`
// Omit namespace prefix in workspace name
// +optional
OmitNamespacePrefix bool `json:"omitNamespacePrefix,omitempty"`
// Specifies the agent pool name we wish to use.
// +optional
AgentPoolName string `json:"agentPoolName,omitempty"`
}
WorkspaceSpec defines the desired state of Workspace +k8s:openapi-gen=true
func (*WorkspaceSpec) DeepCopy ¶
func (in *WorkspaceSpec) DeepCopy() *WorkspaceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceSpec.
func (*WorkspaceSpec) DeepCopyInto ¶
func (in *WorkspaceSpec) DeepCopyInto(out *WorkspaceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkspaceStatus ¶
type WorkspaceStatus struct {
// Run Status gets the run status
RunStatus string `json:"runStatus"`
// Workspace ID
WorkspaceID string `json:"workspaceID"`
// Run ID
RunID string `json:"runID"`
// Configuration Version ID
ConfigVersionID string `json:"configVersionID"`
// Outputs from state file
// +optional
Outputs []*OutputStatus `json:"outputs,omitempty"`
}
WorkspaceStatus defines the observed state of Workspace +k8s:openapi-gen=true
func (*WorkspaceStatus) DeepCopy ¶
func (in *WorkspaceStatus) DeepCopy() *WorkspaceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceStatus.
func (*WorkspaceStatus) DeepCopyInto ¶
func (in *WorkspaceStatus) DeepCopyInto(out *WorkspaceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.