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#184

Signed-off-by: tflibsonnet-ci <120686569+tflibsonnet-ci@users.noreply.github.com>
  • Loading branch information
renovate[bot] authored and tflibsonnet-ci committed Jul 10, 2023
1 parent 6a79eb0 commit 9ea83ba
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
18 changes: 16 additions & 2 deletions 0.x/_gen/resources/boundary_cluster.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet');
upgrade_type: upgrade_type,
}),
},
'#new':: d.fn(help="\n`hcp.boundary_cluster.new` injects a new `hcp_boundary_cluster` 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 hcp.boundary_cluster.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.boundary_cluster` using the reference:\n\n $._ref.hcp_boundary_cluster.some_id.get('id')\n\nThis is the same as directly entering `\"${ hcp_boundary_cluster.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 - `cluster_id` (`string`): The ID of the Boundary cluster\n - `password` (`string`): The password of the initial admin user. This must be at least 8 characters in length. Note that this may show up in logs, and it will be stored in the state file.\n - `project_id` (`string`): \nThe ID of the HCP project where the Boundary cluster is located.\nIf not specified, the project specified in the HCP Provider config block will be used, if configured.\nIf a project is not configured in the HCP Provider config block, the oldest project in the organization will be used. When `null`, the `project_id` field will be omitted from the resulting object.\n - `username` (`string`): The username of the initial admin user. This must be at least 3 characters in length, alphanumeric, hyphen, or period.\n - `maintenance_window_config` (`list[obj]`): The maintenance window configuration for when cluster upgrades can take place. When `null`, the `maintenance_window_config` sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the [hcp.boundary_cluster.maintenance_window_config.new](#fn-maintenance_window_confignew) constructor.\n - `timeouts` (`obj`): Set the `timeouts` field on the resulting resource block. When `null`, the `timeouts` sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the [hcp.boundary_cluster.timeouts.new](#fn-timeoutsnew) constructor.\n\n**Returns**:\n- A mixin object that injects the new resource into the root Terraform configuration.\n", args=[]),
'#new':: d.fn(help="\n`hcp.boundary_cluster.new` injects a new `hcp_boundary_cluster` 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 hcp.boundary_cluster.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.boundary_cluster` using the reference:\n\n $._ref.hcp_boundary_cluster.some_id.get('id')\n\nThis is the same as directly entering `\"${ hcp_boundary_cluster.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 - `cluster_id` (`string`): The ID of the Boundary cluster\n - `password` (`string`): The password of the initial admin user. This must be at least 8 characters in length. Note that this may show up in logs, and it will be stored in the state file.\n - `project_id` (`string`): \nThe ID of the HCP project where the Boundary cluster is located.\nIf not specified, the project specified in the HCP Provider config block will be used, if configured.\nIf a project is not configured in the HCP Provider config block, the oldest project in the organization will be used. When `null`, the `project_id` field will be omitted from the resulting object.\n - `tier` (`string`): The tier that the HCP Boundary cluster will be provisioned as, \u0026#39;Standard\u0026#39; or \u0026#39;Plus\u0026#39;.\n - `username` (`string`): The username of the initial admin user. This must be at least 3 characters in length, alphanumeric, hyphen, or period.\n - `maintenance_window_config` (`list[obj]`): The maintenance window configuration for when cluster upgrades can take place. When `null`, the `maintenance_window_config` sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the [hcp.boundary_cluster.maintenance_window_config.new](#fn-maintenance_window_confignew) constructor.\n - `timeouts` (`obj`): Set the `timeouts` field on the resulting resource block. When `null`, the `timeouts` sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the [hcp.boundary_cluster.timeouts.new](#fn-timeoutsnew) constructor.\n\n**Returns**:\n- A mixin object that injects the new resource into the root Terraform configuration.\n", args=[]),
new(
resourceLabel,
cluster_id,
password,
tier,
username,
maintenance_window_config=null,
project_id=null,
Expand All @@ -34,15 +35,17 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet');
maintenance_window_config=maintenance_window_config,
password=password,
project_id=project_id,
tier=tier,
timeouts=timeouts,
username=username
),
_meta=_meta
),
'#newAttrs':: d.fn(help='\n`hcp.boundary_cluster.newAttrs` constructs a new object with attributes and blocks configured for the `boundary_cluster`\nTerraform resource.\n\nUnlike [hcp.boundary_cluster.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 - `cluster_id` (`string`): The ID of the Boundary cluster\n - `password` (`string`): The password of the initial admin user. This must be at least 8 characters in length. Note that this may show up in logs, and it will be stored in the state file.\n - `project_id` (`string`): \nThe ID of the HCP project where the Boundary cluster is located.\nIf not specified, the project specified in the HCP Provider config block will be used, if configured.\nIf a project is not configured in the HCP Provider config block, the oldest project in the organization will be used. When `null`, the `project_id` field will be omitted from the resulting object.\n - `username` (`string`): The username of the initial admin user. This must be at least 3 characters in length, alphanumeric, hyphen, or period.\n - `maintenance_window_config` (`list[obj]`): The maintenance window configuration for when cluster upgrades can take place. When `null`, the `maintenance_window_config` sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the [hcp.boundary_cluster.maintenance_window_config.new](#fn-maintenance_window_confignew) constructor.\n - `timeouts` (`obj`): Set the `timeouts` field on the resulting object. When `null`, the `timeouts` sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the [hcp.boundary_cluster.timeouts.new](#fn-timeoutsnew) constructor.\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 `boundary_cluster` resource into the root Terraform configuration.\n', args=[]),
'#newAttrs':: d.fn(help='\n`hcp.boundary_cluster.newAttrs` constructs a new object with attributes and blocks configured for the `boundary_cluster`\nTerraform resource.\n\nUnlike [hcp.boundary_cluster.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 - `cluster_id` (`string`): The ID of the Boundary cluster\n - `password` (`string`): The password of the initial admin user. This must be at least 8 characters in length. Note that this may show up in logs, and it will be stored in the state file.\n - `project_id` (`string`): \nThe ID of the HCP project where the Boundary cluster is located.\nIf not specified, the project specified in the HCP Provider config block will be used, if configured.\nIf a project is not configured in the HCP Provider config block, the oldest project in the organization will be used. When `null`, the `project_id` field will be omitted from the resulting object.\n - `tier` (`string`): The tier that the HCP Boundary cluster will be provisioned as, &#39;Standard&#39; or &#39;Plus&#39;.\n - `username` (`string`): The username of the initial admin user. This must be at least 3 characters in length, alphanumeric, hyphen, or period.\n - `maintenance_window_config` (`list[obj]`): The maintenance window configuration for when cluster upgrades can take place. When `null`, the `maintenance_window_config` sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the [hcp.boundary_cluster.maintenance_window_config.new](#fn-maintenance_window_confignew) constructor.\n - `timeouts` (`obj`): Set the `timeouts` field on the resulting object. When `null`, the `timeouts` sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the [hcp.boundary_cluster.timeouts.new](#fn-timeoutsnew) constructor.\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 `boundary_cluster` resource into the root Terraform configuration.\n', args=[]),
newAttrs(
cluster_id,
password,
tier,
username,
maintenance_window_config=null,
project_id=null,
Expand All @@ -52,6 +55,7 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet');
maintenance_window_config: maintenance_window_config,
password: password,
project_id: project_id,
tier: tier,
timeouts: timeouts,
username: username,
}),
Expand Down Expand Up @@ -117,6 +121,16 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet');
},
},
},
'#withTier':: d.fn(help='`hcp.string.withTier` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the tier 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 `tier` field.\n', args=[]),
withTier(resourceLabel, value): {
resource+: {
hcp_boundary_cluster+: {
[resourceLabel]+: {
tier: value,
},
},
},
},
'#withTimeouts':: d.fn(help='`hcp.obj.withTimeouts` constructs a mixin object that can be merged into the `obj`\nTerraform resource block to set or update the timeouts field.\n\nThis function will replace the map with the passed in `value`. If you wish to instead merge the\npassed in value to the existing map, use the [hcp.obj.withTimeoutsMixin](TODO) function.\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block to update.\n - `value` (`obj`): The value to set for the `timeouts` field.\n', args=[]),
withTimeouts(resourceLabel, value): {
resource+: {
Expand Down
19 changes: 19 additions & 0 deletions docs/0.x/boundary_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ This package contains functions and utilities for setting up the resource using
* [`fn withMaintenanceWindowConfigMixin()`](#fn-withmaintenancewindowconfigmixin)
* [`fn withPassword()`](#fn-withpassword)
* [`fn withProjectId()`](#fn-withprojectid)
* [`fn withTier()`](#fn-withtier)
* [`fn withTimeouts()`](#fn-withtimeouts)
* [`fn withTimeoutsMixin()`](#fn-withtimeoutsmixin)
* [`fn withUsername()`](#fn-withusername)
Expand Down Expand Up @@ -63,6 +64,7 @@ or `$` to refer to the root object. Instead, make an explicit outer object using
The ID of the HCP project where the Boundary cluster is located.
If not specified, the project specified in the HCP Provider config block will be used, if configured.
If a project is not configured in the HCP Provider config block, the oldest project in the organization will be used. When `null`, the `project_id` field will be omitted from the resulting object.
- `tier` (`string`): The tier that the HCP Boundary cluster will be provisioned as, &#39;Standard&#39; or &#39;Plus&#39;.
- `username` (`string`): The username of the initial admin user. This must be at least 3 characters in length, alphanumeric, hyphen, or period.
- `maintenance_window_config` (`list[obj]`): The maintenance window configuration for when cluster upgrades can take place. When `null`, the `maintenance_window_config` sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the [hcp.boundary_cluster.maintenance_window_config.new](#fn-maintenance_window_confignew) constructor.
- `timeouts` (`obj`): Set the `timeouts` field on the resulting resource block. When `null`, the `timeouts` sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the [hcp.boundary_cluster.timeouts.new](#fn-timeoutsnew) constructor.
Expand Down Expand Up @@ -95,6 +97,7 @@ injecting into a complete block.
The ID of the HCP project where the Boundary cluster is located.
If not specified, the project specified in the HCP Provider config block will be used, if configured.
If a project is not configured in the HCP Provider config block, the oldest project in the organization will be used. When `null`, the `project_id` field will be omitted from the resulting object.
- `tier` (`string`): The tier that the HCP Boundary cluster will be provisioned as, &#39;Standard&#39; or &#39;Plus&#39;.
- `username` (`string`): The username of the initial admin user. This must be at least 3 characters in length, alphanumeric, hyphen, or period.
- `maintenance_window_config` (`list[obj]`): The maintenance window configuration for when cluster upgrades can take place. When `null`, the `maintenance_window_config` sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the [hcp.boundary_cluster.maintenance_window_config.new](#fn-maintenance_window_confignew) constructor.
- `timeouts` (`obj`): Set the `timeouts` field on the resulting object. When `null`, the `timeouts` sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the [hcp.boundary_cluster.timeouts.new](#fn-timeoutsnew) constructor.
Expand Down Expand Up @@ -188,6 +191,22 @@ Terraform resource block to set or update the project_id field.
- `value` (`string`): The value to set for the `project_id` field.


### fn withTier

```ts
withTier()
```

`hcp.string.withTier` constructs a mixin object that can be merged into the `string`
Terraform resource block to set or update the tier field.



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


### fn withTimeouts

```ts
Expand Down

0 comments on commit 9ea83ba

Please sign in to comment.