Skip to content

Commit

Permalink
Update CRD definition
Browse files Browse the repository at this point in the history
Signed-off-by: Luke Mallon (Nalum) <luke.mallon@weave.works>
  • Loading branch information
Nalum committed Aug 2, 2022
1 parent 9fadb2e commit 13b442c
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/v1alpha1/terraform_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ type BackendConfigSpec struct {
Disable bool `json:"disable"`

// +optional
SecretSuffix string `json:"secretSuffix"`
SecretSuffix string `json:"secretSuffix,omitempty"`

// +optional
InClusterConfig bool `json:"inClusterConfig"`
InClusterConfig *bool `json:"inClusterConfig,omitempty"`

// +optional
ConfigPath string `json:"configPath,omitempty"`
Expand Down
26 changes: 26 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions config/crd/bases/infra.contrib.fluxcd.io_terraforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,23 @@ spec:
type: object
secretSuffix:
type: string
state:
description: BackendConfigStateSpec allows the user to set ForceUnlock
properties:
forceUnlock:
description: "ForceUnlock a Terraform state if it has become
locked for any reason. \n Leave this empty to do nothing,
set this to the value of the `Lock Info: ID: [value]`, e.g.
`f2ab685b-f84d-ac0b-a125-378a22877e8d`, to force unlock
the state and finally set this to `auto` to have the state
lock automatically unlocked. \n WARNING: Only use `auto`
in the cases where you are absolutely certain that no other
system is using this state, you could otherwise end up in
a bad place See https://www.terraform.io/language/state/locking#force-unlock
for more information on the terraform state lock and force
unlock."
type: string
type: object
type: object
cliConfigSecretRef:
description: SecretReference represents a Secret Reference. It has
Expand Down
53 changes: 53 additions & 0 deletions docs/References/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,59 @@ map[string]string
<em>(Optional)</em>
</td>
</tr>
<tr>
<td>
<code>state</code><br>
<em>
<a href="#infra.contrib.fluxcd.io/v1alpha1.BackendConfigStateSpec">
BackendConfigStateSpec
</a>
</em>
</td>
<td>
<em>(Optional)</em>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<h3 id="infra.contrib.fluxcd.io/v1alpha1.BackendConfigStateSpec">BackendConfigStateSpec
</h3>
<p>
(<em>Appears on:</em>
<a href="#infra.contrib.fluxcd.io/v1alpha1.BackendConfigSpec">BackendConfigSpec</a>)
</p>
<p>BackendConfigStateSpec allows the user to set ForceUnlock</p>
<div class="md-typeset__scrollwrap">
<div class="md-typeset__table">
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>forceUnlock</code><br>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>ForceUnlock a Terraform state if it has become locked for any reason.</p>
<p>Leave this empty to do nothing, set this to the value of the <code>Lock Info: ID: [value]</code>,
e.g. <code>f2ab685b-f84d-ac0b-a125-378a22877e8d</code>, to force unlock the state and
finally set this to <code>auto</code> to have the state lock automatically unlocked.</p>
<p>WARNING: Only use <code>auto</code> in the cases where you are absolutely certain that
no other system is using this state, you could otherwise end up in a bad place
See <a href="https://www.terraform.io/language/state/locking#force-unlock">https://www.terraform.io/language/state/locking#force-unlock</a> for more
information on the terraform state lock and force unlock.</p>
</td>
</tr>
</tbody>
</table>
</div>
Expand Down

0 comments on commit 13b442c

Please sign in to comment.