Skip to content

Commit

Permalink
Generate libsonnet source from libgenerator PR tf-libsonnet/libgenera…
Browse files Browse the repository at this point in the history
…tor#197

Signed-off-by: tflibsonnet-ci <[email protected]>
  • Loading branch information
renovate[bot] authored and tflibsonnet-ci committed Aug 1, 2023
1 parent 097ff81 commit 41d335f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
22 changes: 18 additions & 4 deletions 1.x/_gen/resources/secret.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet');
local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet');
{
'#':: d.pkg(name='secret', url='', help='`secret` represents the `doppler_secret` Terraform resource.\n\n\n\nThis package contains functions and utilities for setting up the resource using Jsonnet code.\n'),
'#new':: d.fn(help="\n`doppler.secret.new` injects a new `doppler_secret` Terraform `resource`\nblock into the root module document.\n\nAdditionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the\nresource. For example, if you added a new instance to the root using:\n\n # arguments omitted for brevity\n doppler.secret.new('some_id')\n\nYou can get the reference to the `id` field of the created `doppler.secret` using the reference:\n\n $._ref.doppler_secret.some_id.get('id')\n\nThis is the same as directly entering `\"${ doppler_secret.some_id.id }\"` as the value.\n\nNOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`,\nor `$` to refer to the root object. Instead, make an explicit outer object using `local`.\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block.\n - `config` (`string`): The name of the Doppler config\n - `name` (`string`): The name of the Doppler secret\n - `project` (`string`): The name of the Doppler project\n - `value` (`string`): The raw secret value\n\n**Returns**:\n- A mixin object that injects the new resource into the root Terraform configuration.\n", args=[]),
'#new':: d.fn(help="\n`doppler.secret.new` injects a new `doppler_secret` Terraform `resource`\nblock into the root module document.\n\nAdditionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the\nresource. For example, if you added a new instance to the root using:\n\n # arguments omitted for brevity\n doppler.secret.new('some_id')\n\nYou can get the reference to the `id` field of the created `doppler.secret` using the reference:\n\n $._ref.doppler_secret.some_id.get('id')\n\nThis is the same as directly entering `\"${ doppler_secret.some_id.id }\"` as the value.\n\nNOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`,\nor `$` to refer to the root object. Instead, make an explicit outer object using `local`.\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block.\n - `config` (`string`): The name of the Doppler config\n - `name` (`string`): The name of the Doppler secret\n - `project` (`string`): The name of the Doppler project\n - `value` (`string`): The raw secret value\n - `visibility` (`string`): The visibility of the secret When `null`, the `visibility` field will be omitted from the resulting object.\n\n**Returns**:\n- A mixin object that injects the new resource into the root Terraform configuration.\n", args=[]),
new(
resourceLabel,
config,
name,
project,
value,
visibility=null,
_meta={}
):: tf.withResource(
type='doppler_secret',
Expand All @@ -17,21 +18,24 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet');
config=config,
name=name,
project=project,
value=value
value=value,
visibility=visibility
),
_meta=_meta
),
'#newAttrs':: d.fn(help='\n`doppler.secret.newAttrs` constructs a new object with attributes and blocks configured for the `secret`\nTerraform resource.\n\nUnlike [doppler.secret.new](#fn-new), this function will not inject the `resource`\nblock into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the\n[tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) function to build a complete block.\n\nThis is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to\ninjecting into a complete block.\n\n**Args**:\n - `config` (`string`): The name of the Doppler config\n - `name` (`string`): The name of the Doppler secret\n - `project` (`string`): The name of the Doppler project\n - `value` (`string`): The raw secret value\n\n**Returns**:\n - An attribute object that can be used with [tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) to construct a new `secret` resource into the root Terraform configuration.\n', args=[]),
'#newAttrs':: d.fn(help='\n`doppler.secret.newAttrs` constructs a new object with attributes and blocks configured for the `secret`\nTerraform resource.\n\nUnlike [doppler.secret.new](#fn-new), this function will not inject the `resource`\nblock into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the\n[tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) function to build a complete block.\n\nThis is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to\ninjecting into a complete block.\n\n**Args**:\n - `config` (`string`): The name of the Doppler config\n - `name` (`string`): The name of the Doppler secret\n - `project` (`string`): The name of the Doppler project\n - `value` (`string`): The raw secret value\n - `visibility` (`string`): The visibility of the secret When `null`, the `visibility` field will be omitted from the resulting object.\n\n**Returns**:\n - An attribute object that can be used with [tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) to construct a new `secret` resource into the root Terraform configuration.\n', args=[]),
newAttrs(
config,
name,
project,
value
value,
visibility=null
):: std.prune(a={
config: config,
name: name,
project: project,
value: value,
visibility: visibility,
}),
'#withConfig':: d.fn(help='`doppler.string.withConfig` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the config field.\n\n\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block to update.\n - `value` (`string`): The value to set for the `config` field.\n', args=[]),
withConfig(resourceLabel, value): {
Expand Down Expand Up @@ -73,4 +77,14 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet');
},
},
},
'#withVisibility':: d.fn(help='`doppler.string.withVisibility` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the visibility field.\n\n\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block to update.\n - `value` (`string`): The value to set for the `visibility` field.\n', args=[]),
withVisibility(resourceLabel, value): {
resource+: {
doppler_secret+: {
[resourceLabel]+: {
visibility: value,
},
},
},
},
}
19 changes: 19 additions & 0 deletions docs/1.x/secret.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This package contains functions and utilities for setting up the resource using
* [`fn withName()`](#fn-withname)
* [`fn withProject()`](#fn-withproject)
* [`fn withValue()`](#fn-withvalue)
* [`fn withVisibility()`](#fn-withvisibility)

## Fields

Expand Down Expand Up @@ -53,6 +54,7 @@ or `$` to refer to the root object. Instead, make an explicit outer object using
- `name` (`string`): The name of the Doppler secret
- `project` (`string`): The name of the Doppler project
- `value` (`string`): The raw secret value
- `visibility` (`string`): The visibility of the secret When `null`, the `visibility` field will be omitted from the resulting object.

**Returns**:
- A mixin object that injects the new resource into the root Terraform configuration.
Expand Down Expand Up @@ -80,6 +82,7 @@ injecting into a complete block.
- `name` (`string`): The name of the Doppler secret
- `project` (`string`): The name of the Doppler project
- `value` (`string`): The raw secret value
- `visibility` (`string`): The visibility of the secret When `null`, the `visibility` field will be omitted from the resulting object.

**Returns**:
- An attribute object that can be used with [tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) to construct a new `secret` resource into the root Terraform configuration.
Expand Down Expand Up @@ -147,3 +150,19 @@ Terraform resource block to set or update the value field.
**Args**:
- `resourceLabel` (`string`): The name label of the block to update.
- `value` (`string`): The value to set for the `value` field.


### fn withVisibility

```ts
withVisibility()
```

`doppler.string.withVisibility` constructs a mixin object that can be merged into the `string`
Terraform resource block to set or update the visibility field.



**Args**:
- `resourceLabel` (`string`): The name label of the block to update.
- `value` (`string`): The value to set for the `visibility` field.

0 comments on commit 41d335f

Please sign in to comment.