diff --git a/0.x/_gen/data/main.libsonnet b/0.x/_gen/data/main.libsonnet index 498990e..2042735 100644 --- a/0.x/_gen/data/main.libsonnet +++ b/0.x/_gen/data/main.libsonnet @@ -12,12 +12,15 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'); hvn: (import 'hvn.libsonnet'), hvn_peering_connection: (import 'hvn_peering_connection.libsonnet'), hvn_route: (import 'hvn_route.libsonnet'), + organization: (import 'organization.libsonnet'), packer_bucket_names: (import 'packer_bucket_names.libsonnet'), packer_image: (import 'packer_image.libsonnet'), - packer_image_iteration: (import 'packer_image_iteration.libsonnet'), packer_iteration: (import 'packer_iteration.libsonnet'), packer_run_task: (import 'packer_run_task.libsonnet'), + project: (import 'project.libsonnet'), + service_principal: (import 'service_principal.libsonnet'), vault_cluster: (import 'vault_cluster.libsonnet'), vault_plugin: (import 'vault_plugin.libsonnet'), vault_secrets_app: (import 'vault_secrets_app.libsonnet'), + vault_secrets_secret: (import 'vault_secrets_secret.libsonnet'), } diff --git a/0.x/_gen/data/organization.libsonnet b/0.x/_gen/data/organization.libsonnet new file mode 100644 index 0000000..16baeb3 --- /dev/null +++ b/0.x/_gen/data/organization.libsonnet @@ -0,0 +1,19 @@ +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='organization', url='', help='`organization` represents the `hcp_organization` Terraform data source.\n\nThe organization data source retrieves the HCP organization the provider is configured for.\n\nThis package contains functions and utilities for setting up the data source using Jsonnet code.\n'), + '#new':: d.fn(help="\n`hcp.data.organization.new` injects a new `data_hcp_organization` Terraform `data source`\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.data.organization.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.data.organization` using the reference:\n\n $._ref.data_hcp_organization.some_id.get('id')\n\nThis is the same as directly entering `\"${ data_hcp_organization.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 - `dataSrcLabel` (`string`): The name label of the block.\n\n**Returns**:\n- A mixin object that injects the new data source into the root Terraform configuration.\n", args=[]), + new( + dataSrcLabel, + _meta={} + ):: tf.withData( + type='hcp_organization', + label=dataSrcLabel, + attrs=self.newAttrs(), + _meta=_meta + ), + '#newAttrs':: d.fn(help='\n`hcp.data.organization.newAttrs` constructs a new object with attributes and blocks configured for the `organization`\nTerraform data source.\n\nUnlike [hcp.data.organization.new](#fn-new), this function will not inject the `data source`\nblock into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the\n[tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) 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**Returns**:\n - An attribute object that can be used with [tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) to construct a new `organization` data source into the root Terraform configuration.\n', args=[]), + newAttrs( + + ):: std.prune(a={}), +} diff --git a/0.x/_gen/data/packer_image_iteration.libsonnet b/0.x/_gen/data/packer_image_iteration.libsonnet deleted file mode 100644 index 7224323..0000000 --- a/0.x/_gen/data/packer_image_iteration.libsonnet +++ /dev/null @@ -1,94 +0,0 @@ -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='packer_image_iteration', url='', help='`packer_image_iteration` represents the `hcp_packer_image_iteration` Terraform data source.\n\nThe Packer ImageIteration data source iteration gets the most recent iteration (or build) of an image, given a channel.\n\nThis package contains functions and utilities for setting up the data source using Jsonnet code.\n'), - '#new':: d.fn(help="\n`hcp.data.packer_image_iteration.new` injects a new `data_hcp_packer_image_iteration` Terraform `data source`\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.data.packer_image_iteration.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.data.packer_image_iteration` using the reference:\n\n $._ref.data_hcp_packer_image_iteration.some_id.get('id')\n\nThis is the same as directly entering `\"${ data_hcp_packer_image_iteration.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 - `dataSrcLabel` (`string`): The name label of the block.\n - `bucket_name` (`string`): The slug of the HCP Packer Registry bucket to pull from.\n - `channel` (`string`): The channel that points to the version of the image you want.\n - `project_id` (`string`): \nThe ID of the HCP project where the HCP Packer registry 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 - `timeouts` (`obj`): Set the `timeouts` field on the resulting data source 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.data.packer_image_iteration.timeouts.new](#fn-timeoutsnew) constructor.\n\n**Returns**:\n- A mixin object that injects the new data source into the root Terraform configuration.\n", args=[]), - new( - dataSrcLabel, - bucket_name, - channel, - project_id=null, - timeouts=null, - _meta={} - ):: tf.withData( - type='hcp_packer_image_iteration', - label=dataSrcLabel, - attrs=self.newAttrs( - bucket_name=bucket_name, - channel=channel, - project_id=project_id, - timeouts=timeouts - ), - _meta=_meta - ), - '#newAttrs':: d.fn(help='\n`hcp.data.packer_image_iteration.newAttrs` constructs a new object with attributes and blocks configured for the `packer_image_iteration`\nTerraform data source.\n\nUnlike [hcp.data.packer_image_iteration.new](#fn-new), this function will not inject the `data source`\nblock into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the\n[tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) 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 - `bucket_name` (`string`): The slug of the HCP Packer Registry bucket to pull from.\n - `channel` (`string`): The channel that points to the version of the image you want.\n - `project_id` (`string`): \nThe ID of the HCP project where the HCP Packer registry 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 - `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.data.packer_image_iteration.timeouts.new](#fn-timeoutsnew) constructor.\n\n**Returns**:\n - An attribute object that can be used with [tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) to construct a new `packer_image_iteration` data source into the root Terraform configuration.\n', args=[]), - newAttrs( - bucket_name, - channel, - project_id=null, - timeouts=null - ):: std.prune(a={ - bucket_name: bucket_name, - channel: channel, - project_id: project_id, - timeouts: timeouts, - }), - timeouts:: { - '#new':: d.fn(help='\n`hcp.packer_image_iteration.timeouts.new` constructs a new object with attributes and blocks configured for the `timeouts`\nTerraform sub block.\n\n\n\n**Args**:\n - `default` (`string`): Set the `default` field on the resulting object. When `null`, the `default` field will be omitted from the resulting object.\n\n**Returns**:\n - An attribute object that represents the `timeouts` sub block.\n', args=[]), - new( - default=null - ):: std.prune(a={ - default: default, - }), - }, - '#withBucketName':: d.fn(help='`hcp.string.withBucketName` constructs a mixin object that can be merged into the `string`\nTerraform data source block to set or update the bucket_name field.\n\n\n\n**Args**:\n - `dataSrcLabel` (`string`): The name label of the block to update.\n - `value` (`string`): The value to set for the `bucket_name` field.\n', args=[]), - withBucketName(dataSrcLabel, value): { - data+: { - hcp_packer_image_iteration+: { - [dataSrcLabel]+: { - bucket_name: value, - }, - }, - }, - }, - '#withChannel':: d.fn(help='`hcp.string.withChannel` constructs a mixin object that can be merged into the `string`\nTerraform data source block to set or update the channel field.\n\n\n\n**Args**:\n - `dataSrcLabel` (`string`): The name label of the block to update.\n - `value` (`string`): The value to set for the `channel` field.\n', args=[]), - withChannel(dataSrcLabel, value): { - data+: { - hcp_packer_image_iteration+: { - [dataSrcLabel]+: { - channel: value, - }, - }, - }, - }, - '#withProjectId':: d.fn(help='`hcp.string.withProjectId` constructs a mixin object that can be merged into the `string`\nTerraform data source block to set or update the project_id field.\n\n\n\n**Args**:\n - `dataSrcLabel` (`string`): The name label of the block to update.\n - `value` (`string`): The value to set for the `project_id` field.\n', args=[]), - withProjectId(dataSrcLabel, value): { - data+: { - hcp_packer_image_iteration+: { - [dataSrcLabel]+: { - project_id: value, - }, - }, - }, - }, - '#withTimeouts':: d.fn(help='`hcp.obj.withTimeouts` constructs a mixin object that can be merged into the `obj`\nTerraform data source 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 - `dataSrcLabel` (`string`): The name label of the block to update.\n - `value` (`obj`): The value to set for the `timeouts` field.\n', args=[]), - withTimeouts(dataSrcLabel, value): { - data+: { - hcp_packer_image_iteration+: { - [dataSrcLabel]+: { - timeouts: value, - }, - }, - }, - }, - '#withTimeoutsMixin':: d.fn(help='`hcp.obj.withTimeoutsMixin` constructs a mixin object that can be merged into the `obj`\nTerraform data source block to set or update the timeouts field.\n\nThis function will merge the passed in value to the existing map. If you wish\nto instead replace the entire map with the passed in `value`, use the [hcp.obj.withTimeouts](TODO)\nfunction.\n\n\n**Args**:\n - `dataSrcLabel` (`string`): The name label of the block to update.\n - `value` (`obj`): The value to set for the `timeouts` field.\n', args=[]), - withTimeoutsMixin(dataSrcLabel, value): { - data+: { - hcp_packer_image_iteration+: { - [dataSrcLabel]+: { - timeouts+: value, - }, - }, - }, - }, -} diff --git a/0.x/_gen/data/project.libsonnet b/0.x/_gen/data/project.libsonnet new file mode 100644 index 0000000..42900e1 --- /dev/null +++ b/0.x/_gen/data/project.libsonnet @@ -0,0 +1,32 @@ +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='project', url='', help='`project` represents the `hcp_project` Terraform data source.\n\nThe project data source retrieves the given HCP project.\n\nThis package contains functions and utilities for setting up the data source using Jsonnet code.\n'), + '#new':: d.fn(help="\n`hcp.data.project.new` injects a new `data_hcp_project` Terraform `data source`\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.data.project.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.data.project` using the reference:\n\n $._ref.data_hcp_project.some_id.get('id')\n\nThis is the same as directly entering `\"${ data_hcp_project.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 - `dataSrcLabel` (`string`): The name label of the block.\n - `project` (`string`): The id of the project. May be given as \u0026#34;\u0026lt;id\u0026gt;\u0026#34; or \u0026#34;project/\u0026lt;id\u0026gt;\u0026#34;. If not set, the provider project is used. When `null`, the `project` field will be omitted from the resulting object.\n\n**Returns**:\n- A mixin object that injects the new data source into the root Terraform configuration.\n", args=[]), + new( + dataSrcLabel, + project=null, + _meta={} + ):: tf.withData( + type='hcp_project', + label=dataSrcLabel, + attrs=self.newAttrs(project=project), + _meta=_meta + ), + '#newAttrs':: d.fn(help='\n`hcp.data.project.newAttrs` constructs a new object with attributes and blocks configured for the `project`\nTerraform data source.\n\nUnlike [hcp.data.project.new](#fn-new), this function will not inject the `data source`\nblock into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the\n[tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) 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 - `project` (`string`): The id of the project. May be given as "<id>" or "project/<id>". If not set, the provider project is used. When `null`, the `project` field will be omitted from the resulting object.\n\n**Returns**:\n - An attribute object that can be used with [tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) to construct a new `project` data source into the root Terraform configuration.\n', args=[]), + newAttrs( + project=null + ):: std.prune(a={ + project: project, + }), + '#withProject':: d.fn(help='`hcp.string.withProject` constructs a mixin object that can be merged into the `string`\nTerraform data source block to set or update the project field.\n\n\n\n**Args**:\n - `dataSrcLabel` (`string`): The name label of the block to update.\n - `value` (`string`): The value to set for the `project` field.\n', args=[]), + withProject(dataSrcLabel, value): { + data+: { + hcp_project+: { + [dataSrcLabel]+: { + project: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data/service_principal.libsonnet b/0.x/_gen/data/service_principal.libsonnet new file mode 100644 index 0000000..99d9638 --- /dev/null +++ b/0.x/_gen/data/service_principal.libsonnet @@ -0,0 +1,32 @@ +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='service_principal', url='', help='`service_principal` represents the `hcp_service_principal` Terraform data source.\n\nThe service principal data source retrieves the given service principal.\n\nThis package contains functions and utilities for setting up the data source using Jsonnet code.\n'), + '#new':: d.fn(help="\n`hcp.data.service_principal.new` injects a new `data_hcp_service_principal` Terraform `data source`\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.data.service_principal.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.data.service_principal` using the reference:\n\n $._ref.data_hcp_service_principal.some_id.get('id')\n\nThis is the same as directly entering `\"${ data_hcp_service_principal.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 - `dataSrcLabel` (`string`): The name label of the block.\n - `resource_name` (`string`): The service principal\u0026#39;s resource name in format `iam/project/\u0026lt;project_id\u0026gt;/service-principal/\u0026lt;name\u0026gt;` or `iam/organization/\u0026lt;organization_id\u0026gt;/service-principal/\u0026lt;name\u0026gt;`\n\n**Returns**:\n- A mixin object that injects the new data source into the root Terraform configuration.\n", args=[]), + new( + dataSrcLabel, + resource_name, + _meta={} + ):: tf.withData( + type='hcp_service_principal', + label=dataSrcLabel, + attrs=self.newAttrs(resource_name=resource_name), + _meta=_meta + ), + '#newAttrs':: d.fn(help='\n`hcp.data.service_principal.newAttrs` constructs a new object with attributes and blocks configured for the `service_principal`\nTerraform data source.\n\nUnlike [hcp.data.service_principal.new](#fn-new), this function will not inject the `data source`\nblock into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the\n[tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) 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 - `resource_name` (`string`): The service principal's resource name in format `iam/project/<project_id>/service-principal/<name>` or `iam/organization/<organization_id>/service-principal/<name>`\n\n**Returns**:\n - An attribute object that can be used with [tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) to construct a new `service_principal` data source into the root Terraform configuration.\n', args=[]), + newAttrs( + resource_name + ):: std.prune(a={ + resource_name: resource_name, + }), + '#withResourceName':: d.fn(help='`hcp.string.withResourceName` constructs a mixin object that can be merged into the `string`\nTerraform data source block to set or update the resource_name field.\n\n\n\n**Args**:\n - `dataSrcLabel` (`string`): The name label of the block to update.\n - `value` (`string`): The value to set for the `resource_name` field.\n', args=[]), + withResourceName(dataSrcLabel, value): { + data+: { + hcp_service_principal+: { + [dataSrcLabel]+: { + resource_name: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data/vault_secrets_secret.libsonnet b/0.x/_gen/data/vault_secrets_secret.libsonnet new file mode 100644 index 0000000..6276f1c --- /dev/null +++ b/0.x/_gen/data/vault_secrets_secret.libsonnet @@ -0,0 +1,45 @@ +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='vault_secrets_secret', url='', help='`vault_secrets_secret` represents the `hcp_vault_secrets_secret` Terraform data source.\n\nThe Vault Secrets secret data source retrieves a singular secret and its latest version.\n\nThis package contains functions and utilities for setting up the data source using Jsonnet code.\n'), + '#new':: d.fn(help="\n`hcp.data.vault_secrets_secret.new` injects a new `data_hcp_vault_secrets_secret` Terraform `data source`\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.data.vault_secrets_secret.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.data.vault_secrets_secret` using the reference:\n\n $._ref.data_hcp_vault_secrets_secret.some_id.get('id')\n\nThis is the same as directly entering `\"${ data_hcp_vault_secrets_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 - `dataSrcLabel` (`string`): The name label of the block.\n - `app_name` (`string`): The name of the Vault Secrets application.\n - `secret_name` (`string`): The name of the Vault Secrets secret.\n\n**Returns**:\n- A mixin object that injects the new data source into the root Terraform configuration.\n", args=[]), + new( + dataSrcLabel, + app_name, + secret_name, + _meta={} + ):: tf.withData( + type='hcp_vault_secrets_secret', + label=dataSrcLabel, + attrs=self.newAttrs(app_name=app_name, secret_name=secret_name), + _meta=_meta + ), + '#newAttrs':: d.fn(help='\n`hcp.data.vault_secrets_secret.newAttrs` constructs a new object with attributes and blocks configured for the `vault_secrets_secret`\nTerraform data source.\n\nUnlike [hcp.data.vault_secrets_secret.new](#fn-new), this function will not inject the `data source`\nblock into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the\n[tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) 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 - `app_name` (`string`): The name of the Vault Secrets application.\n - `secret_name` (`string`): The name of the Vault Secrets secret.\n\n**Returns**:\n - An attribute object that can be used with [tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) to construct a new `vault_secrets_secret` data source into the root Terraform configuration.\n', args=[]), + newAttrs( + app_name, + secret_name + ):: std.prune(a={ + app_name: app_name, + secret_name: secret_name, + }), + '#withAppName':: d.fn(help='`hcp.string.withAppName` constructs a mixin object that can be merged into the `string`\nTerraform data source block to set or update the app_name field.\n\n\n\n**Args**:\n - `dataSrcLabel` (`string`): The name label of the block to update.\n - `value` (`string`): The value to set for the `app_name` field.\n', args=[]), + withAppName(dataSrcLabel, value): { + data+: { + hcp_vault_secrets_secret+: { + [dataSrcLabel]+: { + app_name: value, + }, + }, + }, + }, + '#withSecretName':: d.fn(help='`hcp.string.withSecretName` constructs a mixin object that can be merged into the `string`\nTerraform data source block to set or update the secret_name field.\n\n\n\n**Args**:\n - `dataSrcLabel` (`string`): The name label of the block to update.\n - `value` (`string`): The value to set for the `secret_name` field.\n', args=[]), + withSecretName(dataSrcLabel, value): { + data+: { + hcp_vault_secrets_secret+: { + [dataSrcLabel]+: { + secret_name: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/main.libsonnet b/0.x/_gen/main.libsonnet index 18a5a55..516c930 100644 --- a/0.x/_gen/main.libsonnet +++ b/0.x/_gen/main.libsonnet @@ -12,11 +12,17 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'); hvn: (import 'resources/hvn.libsonnet'), hvn_peering_connection: (import 'resources/hvn_peering_connection.libsonnet'), hvn_route: (import 'resources/hvn_route.libsonnet'), + iam_workload_identity_provider: (import 'resources/iam_workload_identity_provider.libsonnet'), packer_channel: (import 'resources/packer_channel.libsonnet'), packer_channel_assignment: (import 'resources/packer_channel_assignment.libsonnet'), packer_run_task: (import 'resources/packer_run_task.libsonnet'), + project: (import 'resources/project.libsonnet'), + service_principal: (import 'resources/service_principal.libsonnet'), + service_principal_key: (import 'resources/service_principal_key.libsonnet'), vault_cluster: (import 'resources/vault_cluster.libsonnet'), vault_cluster_admin_token: (import 'resources/vault_cluster_admin_token.libsonnet'), vault_plugin: (import 'resources/vault_plugin.libsonnet'), + vault_secrets_app: (import 'resources/vault_secrets_app.libsonnet'), + vault_secrets_secret: (import 'resources/vault_secrets_secret.libsonnet'), data: (import 'data/main.libsonnet'), } diff --git a/0.x/_gen/resources/iam_workload_identity_provider.libsonnet b/0.x/_gen/resources/iam_workload_identity_provider.libsonnet new file mode 100644 index 0000000..dc8d030 --- /dev/null +++ b/0.x/_gen/resources/iam_workload_identity_provider.libsonnet @@ -0,0 +1,124 @@ +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='iam_workload_identity_provider', url='', help='`iam_workload_identity_provider` represents the `hcp_iam_workload_identity_provider` Terraform resource.\n\nThe workload identity provider resource allows federating an external identity to a HCP Service Principal.\n\nThis package contains functions and utilities for setting up the resource using Jsonnet code.\n'), + '#new':: d.fn(help="\n`hcp.iam_workload_identity_provider.new` injects a new `hcp_iam_workload_identity_provider` 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.iam_workload_identity_provider.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.iam_workload_identity_provider` using the reference:\n\n $._ref.hcp_iam_workload_identity_provider.some_id.get('id')\n\nThis is the same as directly entering `\"${ hcp_iam_workload_identity_provider.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 - `aws` (`obj`): Set the `aws` field on the resulting resource block. When `null`, the `aws` field will be omitted from the resulting object.\n - `conditional_access` (`string`): conditional_access is a hashicorp/go-bexpr string that is evaluated when exchanging tokens. It restricts which upstream identities are allowed to access the service principal.\n - `description` (`string`): A description for the workload identity provider. When `null`, the `description` field will be omitted from the resulting object.\n - `name` (`string`): The workload identity provider\u0026#39;s name. Ideally, this should be descriptive of the workload being federated.\n - `oidc` (`obj`): Set the `oidc` field on the resulting resource block. When `null`, the `oidc` field will be omitted from the resulting object.\n - `service_principal` (`string`): The service principal\u0026#39;s resource name for which the workload identity provider will be created for. Only service principals created within a project are allowed.\n\n**Returns**:\n- A mixin object that injects the new resource into the root Terraform configuration.\n", args=[]), + new( + resourceLabel, + conditional_access, + name, + service_principal, + aws=null, + description=null, + oidc=null, + _meta={} + ):: tf.withResource( + type='hcp_iam_workload_identity_provider', + label=resourceLabel, + attrs=self.newAttrs( + aws=aws, + conditional_access=conditional_access, + description=description, + name=name, + oidc=oidc, + service_principal=service_principal + ), + _meta=_meta + ), + '#newAttrs':: d.fn(help='\n`hcp.iam_workload_identity_provider.newAttrs` constructs a new object with attributes and blocks configured for the `iam_workload_identity_provider`\nTerraform resource.\n\nUnlike [hcp.iam_workload_identity_provider.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 - `aws` (`obj`): Set the `aws` field on the resulting object. When `null`, the `aws` field will be omitted from the resulting object.\n - `conditional_access` (`string`): conditional_access is a hashicorp/go-bexpr string that is evaluated when exchanging tokens. It restricts which upstream identities are allowed to access the service principal.\n - `description` (`string`): A description for the workload identity provider. When `null`, the `description` field will be omitted from the resulting object.\n - `name` (`string`): The workload identity provider's name. Ideally, this should be descriptive of the workload being federated.\n - `oidc` (`obj`): Set the `oidc` field on the resulting object. When `null`, the `oidc` field will be omitted from the resulting object.\n - `service_principal` (`string`): The service principal's resource name for which the workload identity provider will be created for. Only service principals created within a project are allowed.\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 `iam_workload_identity_provider` resource into the root Terraform configuration.\n', args=[]), + newAttrs( + conditional_access, + name, + service_principal, + aws=null, + description=null, + oidc=null + ):: std.prune(a={ + aws: aws, + conditional_access: conditional_access, + description: description, + name: name, + oidc: oidc, + service_principal: service_principal, + }), + '#withAws':: d.fn(help='`hcp.obj.withAws` constructs a mixin object that can be merged into the `obj`\nTerraform resource block to set or update the aws field.\n\n\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block to update.\n - `value` (`obj`): The value to set for the `aws` field.\n', args=[]), + withAws(resourceLabel, value): { + resource+: { + hcp_iam_workload_identity_provider+: { + [resourceLabel]+: { + aws: value, + }, + }, + }, + }, + '#withAwsMixin':: d.fn(help='`hcp.obj.withAwsMixin` constructs a mixin object that can be merged into the `obj`\nTerraform resource block to set or update the aws field.\n\nThis function will merge the passed in value to the existing map. If you wish\nto instead replace the entire map with the passed in `value`, use the [hcp.obj.withAws](TODO)\nfunction.\n\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block to update.\n - `value` (`obj`): The value to set for the `aws` field.\n', args=[]), + withAwsMixin(resourceLabel, value):: { + resource+: { + hcp_iam_workload_identity_provider+: { + [resourceLabel]+: { + aws+: value, + }, + }, + }, + }, + '#withConditionalAccess':: d.fn(help='`hcp.string.withConditionalAccess` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the conditional_access 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 `conditional_access` field.\n', args=[]), + withConditionalAccess(resourceLabel, value): { + resource+: { + hcp_iam_workload_identity_provider+: { + [resourceLabel]+: { + conditional_access: value, + }, + }, + }, + }, + '#withDescription':: d.fn(help='`hcp.string.withDescription` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the description 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 `description` field.\n', args=[]), + withDescription(resourceLabel, value): { + resource+: { + hcp_iam_workload_identity_provider+: { + [resourceLabel]+: { + description: value, + }, + }, + }, + }, + '#withName':: d.fn(help='`hcp.string.withName` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the name 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 `name` field.\n', args=[]), + withName(resourceLabel, value): { + resource+: { + hcp_iam_workload_identity_provider+: { + [resourceLabel]+: { + name: value, + }, + }, + }, + }, + '#withOidc':: d.fn(help='`hcp.obj.withOidc` constructs a mixin object that can be merged into the `obj`\nTerraform resource block to set or update the oidc field.\n\n\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block to update.\n - `value` (`obj`): The value to set for the `oidc` field.\n', args=[]), + withOidc(resourceLabel, value): { + resource+: { + hcp_iam_workload_identity_provider+: { + [resourceLabel]+: { + oidc: value, + }, + }, + }, + }, + '#withOidcMixin':: d.fn(help='`hcp.obj.withOidcMixin` constructs a mixin object that can be merged into the `obj`\nTerraform resource block to set or update the oidc field.\n\nThis function will merge the passed in value to the existing map. If you wish\nto instead replace the entire map with the passed in `value`, use the [hcp.obj.withOidc](TODO)\nfunction.\n\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block to update.\n - `value` (`obj`): The value to set for the `oidc` field.\n', args=[]), + withOidcMixin(resourceLabel, value):: { + resource+: { + hcp_iam_workload_identity_provider+: { + [resourceLabel]+: { + oidc+: value, + }, + }, + }, + }, + '#withServicePrincipal':: d.fn(help='`hcp.string.withServicePrincipal` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the service_principal 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 `service_principal` field.\n', args=[]), + withServicePrincipal(resourceLabel, value): { + resource+: { + hcp_iam_workload_identity_provider+: { + [resourceLabel]+: { + service_principal: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resources/project.libsonnet b/0.x/_gen/resources/project.libsonnet new file mode 100644 index 0000000..37289f3 --- /dev/null +++ b/0.x/_gen/resources/project.libsonnet @@ -0,0 +1,45 @@ +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='project', url='', help='`project` represents the `hcp_project` Terraform resource.\n\nThe project resource manages a HCP Project.\n\nThe user or service account that is running Terraform when creating a `hcp_project` resource must have `roles/admin` on the specified organization.\n\nThis package contains functions and utilities for setting up the resource using Jsonnet code.\n'), + '#new':: d.fn(help="\n`hcp.project.new` injects a new `hcp_project` 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.project.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.project` using the reference:\n\n $._ref.hcp_project.some_id.get('id')\n\nThis is the same as directly entering `\"${ hcp_project.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 - `description` (`string`): The project\u0026#39;s description When `null`, the `description` field will be omitted from the resulting object.\n - `name` (`string`): The project\u0026#39;s name.\n\n**Returns**:\n- A mixin object that injects the new resource into the root Terraform configuration.\n", args=[]), + new( + resourceLabel, + name, + description=null, + _meta={} + ):: tf.withResource( + type='hcp_project', + label=resourceLabel, + attrs=self.newAttrs(description=description, name=name), + _meta=_meta + ), + '#newAttrs':: d.fn(help='\n`hcp.project.newAttrs` constructs a new object with attributes and blocks configured for the `project`\nTerraform resource.\n\nUnlike [hcp.project.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 - `description` (`string`): The project's description When `null`, the `description` field will be omitted from the resulting object.\n - `name` (`string`): The project's name.\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 `project` resource into the root Terraform configuration.\n', args=[]), + newAttrs( + name, + description=null + ):: std.prune(a={ + description: description, + name: name, + }), + '#withDescription':: d.fn(help='`hcp.string.withDescription` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the description 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 `description` field.\n', args=[]), + withDescription(resourceLabel, value): { + resource+: { + hcp_project+: { + [resourceLabel]+: { + description: value, + }, + }, + }, + }, + '#withName':: d.fn(help='`hcp.string.withName` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the name 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 `name` field.\n', args=[]), + withName(resourceLabel, value): { + resource+: { + hcp_project+: { + [resourceLabel]+: { + name: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resources/service_principal.libsonnet b/0.x/_gen/resources/service_principal.libsonnet new file mode 100644 index 0000000..07732c1 --- /dev/null +++ b/0.x/_gen/resources/service_principal.libsonnet @@ -0,0 +1,45 @@ +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='service_principal', url='', help='`service_principal` represents the `hcp_service_principal` Terraform resource.\n\nThe service principal resource manages a HCP Service Principal.\n\nThe user or service account that is running Terraform when creating a `hcp_service_principal` resource must have `roles/Admin` on the parent resource; either the project or organization.\n\nThis package contains functions and utilities for setting up the resource using Jsonnet code.\n'), + '#new':: d.fn(help="\n`hcp.service_principal.new` injects a new `hcp_service_principal` 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.service_principal.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.service_principal` using the reference:\n\n $._ref.hcp_service_principal.some_id.get('id')\n\nThis is the same as directly entering `\"${ hcp_service_principal.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 - `name` (`string`): The service principal\u0026#39;s name.\n - `parent` (`string`): The parent location to create the service principal under. If unspecified, the service principal will be created in the project the provider is configured with. If specified, the accepted values are \u0026#34;project/\u0026lt;project_id\u0026gt;\u0026#34; or \u0026#34;organization/\u0026lt;organization_id\u0026gt;\u0026#34; When `null`, the `parent` 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, + name, + parent=null, + _meta={} + ):: tf.withResource( + type='hcp_service_principal', + label=resourceLabel, + attrs=self.newAttrs(name=name, parent=parent), + _meta=_meta + ), + '#newAttrs':: d.fn(help='\n`hcp.service_principal.newAttrs` constructs a new object with attributes and blocks configured for the `service_principal`\nTerraform resource.\n\nUnlike [hcp.service_principal.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 - `name` (`string`): The service principal's name.\n - `parent` (`string`): The parent location to create the service principal under. If unspecified, the service principal will be created in the project the provider is configured with. If specified, the accepted values are "project/<project_id>" or "organization/<organization_id>" When `null`, the `parent` 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 `service_principal` resource into the root Terraform configuration.\n', args=[]), + newAttrs( + name, + parent=null + ):: std.prune(a={ + name: name, + parent: parent, + }), + '#withName':: d.fn(help='`hcp.string.withName` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the name 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 `name` field.\n', args=[]), + withName(resourceLabel, value): { + resource+: { + hcp_service_principal+: { + [resourceLabel]+: { + name: value, + }, + }, + }, + }, + '#withParent':: d.fn(help='`hcp.string.withParent` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the parent 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 `parent` field.\n', args=[]), + withParent(resourceLabel, value): { + resource+: { + hcp_service_principal+: { + [resourceLabel]+: { + parent: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resources/service_principal_key.libsonnet b/0.x/_gen/resources/service_principal_key.libsonnet new file mode 100644 index 0000000..42bfb36 --- /dev/null +++ b/0.x/_gen/resources/service_principal_key.libsonnet @@ -0,0 +1,45 @@ +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='service_principal_key', url='', help='`service_principal_key` represents the `hcp_service_principal_key` Terraform resource.\n\nThe service principal key resource manages a service principal key.\n\nThe user or service account that is running Terraform when creating a `hcp_service_principal_key` resource must have `roles/Admin` on the parent resource; either the project or organization.\n\nThis package contains functions and utilities for setting up the resource using Jsonnet code.\n'), + '#new':: d.fn(help="\n`hcp.service_principal_key.new` injects a new `hcp_service_principal_key` 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.service_principal_key.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.service_principal_key` using the reference:\n\n $._ref.hcp_service_principal_key.some_id.get('id')\n\nThis is the same as directly entering `\"${ hcp_service_principal_key.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 - `rotate_triggers` (`obj`): A map of arbitrary string key/value pairs that will force recreation of the key when they change, enabling key based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created. When `null`, the `rotate_triggers` field will be omitted from the resulting object.\n - `service_principal` (`string`): The service principal\u0026#39;s resource name for which a key should be created.\n\n**Returns**:\n- A mixin object that injects the new resource into the root Terraform configuration.\n", args=[]), + new( + resourceLabel, + service_principal, + rotate_triggers=null, + _meta={} + ):: tf.withResource( + type='hcp_service_principal_key', + label=resourceLabel, + attrs=self.newAttrs(rotate_triggers=rotate_triggers, service_principal=service_principal), + _meta=_meta + ), + '#newAttrs':: d.fn(help='\n`hcp.service_principal_key.newAttrs` constructs a new object with attributes and blocks configured for the `service_principal_key`\nTerraform resource.\n\nUnlike [hcp.service_principal_key.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 - `rotate_triggers` (`obj`): A map of arbitrary string key/value pairs that will force recreation of the key when they change, enabling key based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created. When `null`, the `rotate_triggers` field will be omitted from the resulting object.\n - `service_principal` (`string`): The service principal's resource name for which a key should be created.\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 `service_principal_key` resource into the root Terraform configuration.\n', args=[]), + newAttrs( + service_principal, + rotate_triggers=null + ):: std.prune(a={ + rotate_triggers: rotate_triggers, + service_principal: service_principal, + }), + '#withRotateTriggers':: d.fn(help='`hcp.obj.withRotateTriggers` constructs a mixin object that can be merged into the `obj`\nTerraform resource block to set or update the rotate_triggers field.\n\n\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block to update.\n - `value` (`obj`): The value to set for the `rotate_triggers` field.\n', args=[]), + withRotateTriggers(resourceLabel, value): { + resource+: { + hcp_service_principal_key+: { + [resourceLabel]+: { + rotate_triggers: value, + }, + }, + }, + }, + '#withServicePrincipal':: d.fn(help='`hcp.string.withServicePrincipal` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the service_principal 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 `service_principal` field.\n', args=[]), + withServicePrincipal(resourceLabel, value): { + resource+: { + hcp_service_principal_key+: { + [resourceLabel]+: { + service_principal: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resources/vault_cluster.libsonnet b/0.x/_gen/resources/vault_cluster.libsonnet index 114c0f1..5235cea 100644 --- a/0.x/_gen/resources/vault_cluster.libsonnet +++ b/0.x/_gen/resources/vault_cluster.libsonnet @@ -3,13 +3,16 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'); { '#':: d.pkg(name='vault_cluster', url='', help='`vault_cluster` represents the `hcp_vault_cluster` Terraform resource.\n\nThe Vault cluster resource allows you to manage an HCP Vault cluster.\n\nThis package contains functions and utilities for setting up the resource using Jsonnet code.\n'), audit_log_config:: { - '#new':: d.fn(help='\n`hcp.vault_cluster.audit_log_config.new` constructs a new object with attributes and blocks configured for the `audit_log_config`\nTerraform sub block.\n\n\n\n**Args**:\n - `cloudwatch_access_key_id` (`string`): CloudWatch access key ID for streaming audit logs When `null`, the `cloudwatch_access_key_id` field will be omitted from the resulting object.\n - `cloudwatch_region` (`string`): CloudWatch region for streaming audit logs When `null`, the `cloudwatch_region` field will be omitted from the resulting object.\n - `cloudwatch_secret_access_key` (`string`): CloudWatch secret access key for streaming audit logs When `null`, the `cloudwatch_secret_access_key` field will be omitted from the resulting object.\n - `datadog_api_key` (`string`): Datadog api key for streaming audit logs When `null`, the `datadog_api_key` field will be omitted from the resulting object.\n - `datadog_region` (`string`): Datadog region for streaming audit logs When `null`, the `datadog_region` field will be omitted from the resulting object.\n - `grafana_endpoint` (`string`): Grafana endpoint for streaming audit logs When `null`, the `grafana_endpoint` field will be omitted from the resulting object.\n - `grafana_password` (`string`): Grafana password for streaming audit logs When `null`, the `grafana_password` field will be omitted from the resulting object.\n - `grafana_user` (`string`): Grafana user for streaming audit logs When `null`, the `grafana_user` field will be omitted from the resulting object.\n - `splunk_hecendpoint` (`string`): Splunk endpoint for streaming audit logs When `null`, the `splunk_hecendpoint` field will be omitted from the resulting object.\n - `splunk_token` (`string`): Splunk token for streaming audit logs When `null`, the `splunk_token` field will be omitted from the resulting object.\n\n**Returns**:\n - An attribute object that represents the `audit_log_config` sub block.\n', args=[]), + '#new':: d.fn(help='\n`hcp.vault_cluster.audit_log_config.new` constructs a new object with attributes and blocks configured for the `audit_log_config`\nTerraform sub block.\n\n\n\n**Args**:\n - `cloudwatch_access_key_id` (`string`): CloudWatch access key ID for streaming audit logs When `null`, the `cloudwatch_access_key_id` field will be omitted from the resulting object.\n - `cloudwatch_region` (`string`): CloudWatch region for streaming audit logs When `null`, the `cloudwatch_region` field will be omitted from the resulting object.\n - `cloudwatch_secret_access_key` (`string`): CloudWatch secret access key for streaming audit logs When `null`, the `cloudwatch_secret_access_key` field will be omitted from the resulting object.\n - `datadog_api_key` (`string`): Datadog api key for streaming audit logs When `null`, the `datadog_api_key` field will be omitted from the resulting object.\n - `datadog_region` (`string`): Datadog region for streaming audit logs When `null`, the `datadog_region` field will be omitted from the resulting object.\n - `elasticsearch_endpoint` (`string`): ElasticSearch endpoint for streaming audit logs When `null`, the `elasticsearch_endpoint` field will be omitted from the resulting object.\n - `elasticsearch_password` (`string`): ElasticSearch password for streaming audit logs When `null`, the `elasticsearch_password` field will be omitted from the resulting object.\n - `elasticsearch_user` (`string`): ElasticSearch user for streaming audit logs When `null`, the `elasticsearch_user` field will be omitted from the resulting object.\n - `grafana_endpoint` (`string`): Grafana endpoint for streaming audit logs When `null`, the `grafana_endpoint` field will be omitted from the resulting object.\n - `grafana_password` (`string`): Grafana password for streaming audit logs When `null`, the `grafana_password` field will be omitted from the resulting object.\n - `grafana_user` (`string`): Grafana user for streaming audit logs When `null`, the `grafana_user` field will be omitted from the resulting object.\n - `splunk_hecendpoint` (`string`): Splunk endpoint for streaming audit logs When `null`, the `splunk_hecendpoint` field will be omitted from the resulting object.\n - `splunk_token` (`string`): Splunk token for streaming audit logs When `null`, the `splunk_token` field will be omitted from the resulting object.\n\n**Returns**:\n - An attribute object that represents the `audit_log_config` sub block.\n', args=[]), new( cloudwatch_access_key_id=null, cloudwatch_region=null, cloudwatch_secret_access_key=null, datadog_api_key=null, datadog_region=null, + elasticsearch_endpoint=null, + elasticsearch_password=null, + elasticsearch_user=null, grafana_endpoint=null, grafana_password=null, grafana_user=null, @@ -21,6 +24,9 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'); cloudwatch_secret_access_key: cloudwatch_secret_access_key, datadog_api_key: datadog_api_key, datadog_region: datadog_region, + elasticsearch_endpoint: elasticsearch_endpoint, + elasticsearch_password: elasticsearch_password, + elasticsearch_user: elasticsearch_user, grafana_endpoint: grafana_endpoint, grafana_password: grafana_password, grafana_user: grafana_user, @@ -41,13 +47,16 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'); }), }, metrics_config:: { - '#new':: d.fn(help='\n`hcp.vault_cluster.metrics_config.new` constructs a new object with attributes and blocks configured for the `metrics_config`\nTerraform sub block.\n\n\n\n**Args**:\n - `cloudwatch_access_key_id` (`string`): CloudWatch access key ID for streaming metrics When `null`, the `cloudwatch_access_key_id` field will be omitted from the resulting object.\n - `cloudwatch_region` (`string`): CloudWatch region for streaming metrics When `null`, the `cloudwatch_region` field will be omitted from the resulting object.\n - `cloudwatch_secret_access_key` (`string`): CloudWatch secret access key for streaming metrics When `null`, the `cloudwatch_secret_access_key` field will be omitted from the resulting object.\n - `datadog_api_key` (`string`): Datadog api key for streaming metrics When `null`, the `datadog_api_key` field will be omitted from the resulting object.\n - `datadog_region` (`string`): Datadog region for streaming metrics When `null`, the `datadog_region` field will be omitted from the resulting object.\n - `grafana_endpoint` (`string`): Grafana endpoint for streaming metrics When `null`, the `grafana_endpoint` field will be omitted from the resulting object.\n - `grafana_password` (`string`): Grafana password for streaming metrics When `null`, the `grafana_password` field will be omitted from the resulting object.\n - `grafana_user` (`string`): Grafana user for streaming metrics When `null`, the `grafana_user` field will be omitted from the resulting object.\n - `splunk_hecendpoint` (`string`): Splunk endpoint for streaming metrics When `null`, the `splunk_hecendpoint` field will be omitted from the resulting object.\n - `splunk_token` (`string`): Splunk token for streaming metrics When `null`, the `splunk_token` field will be omitted from the resulting object.\n\n**Returns**:\n - An attribute object that represents the `metrics_config` sub block.\n', args=[]), + '#new':: d.fn(help='\n`hcp.vault_cluster.metrics_config.new` constructs a new object with attributes and blocks configured for the `metrics_config`\nTerraform sub block.\n\n\n\n**Args**:\n - `cloudwatch_access_key_id` (`string`): CloudWatch access key ID for streaming metrics When `null`, the `cloudwatch_access_key_id` field will be omitted from the resulting object.\n - `cloudwatch_region` (`string`): CloudWatch region for streaming metrics When `null`, the `cloudwatch_region` field will be omitted from the resulting object.\n - `cloudwatch_secret_access_key` (`string`): CloudWatch secret access key for streaming metrics When `null`, the `cloudwatch_secret_access_key` field will be omitted from the resulting object.\n - `datadog_api_key` (`string`): Datadog api key for streaming metrics When `null`, the `datadog_api_key` field will be omitted from the resulting object.\n - `datadog_region` (`string`): Datadog region for streaming metrics When `null`, the `datadog_region` field will be omitted from the resulting object.\n - `elasticsearch_endpoint` (`string`): ElasticSearch endpoint for streaming metrics When `null`, the `elasticsearch_endpoint` field will be omitted from the resulting object.\n - `elasticsearch_password` (`string`): ElasticSearch password for streaming metrics When `null`, the `elasticsearch_password` field will be omitted from the resulting object.\n - `elasticsearch_user` (`string`): ElasticSearch user for streaming metrics When `null`, the `elasticsearch_user` field will be omitted from the resulting object.\n - `grafana_endpoint` (`string`): Grafana endpoint for streaming metrics When `null`, the `grafana_endpoint` field will be omitted from the resulting object.\n - `grafana_password` (`string`): Grafana password for streaming metrics When `null`, the `grafana_password` field will be omitted from the resulting object.\n - `grafana_user` (`string`): Grafana user for streaming metrics When `null`, the `grafana_user` field will be omitted from the resulting object.\n - `splunk_hecendpoint` (`string`): Splunk endpoint for streaming metrics When `null`, the `splunk_hecendpoint` field will be omitted from the resulting object.\n - `splunk_token` (`string`): Splunk token for streaming metrics When `null`, the `splunk_token` field will be omitted from the resulting object.\n\n**Returns**:\n - An attribute object that represents the `metrics_config` sub block.\n', args=[]), new( cloudwatch_access_key_id=null, cloudwatch_region=null, cloudwatch_secret_access_key=null, datadog_api_key=null, datadog_region=null, + elasticsearch_endpoint=null, + elasticsearch_password=null, + elasticsearch_user=null, grafana_endpoint=null, grafana_password=null, grafana_user=null, @@ -59,6 +68,9 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'); cloudwatch_secret_access_key: cloudwatch_secret_access_key, datadog_api_key: datadog_api_key, datadog_region: datadog_region, + elasticsearch_endpoint: elasticsearch_endpoint, + elasticsearch_password: elasticsearch_password, + elasticsearch_user: elasticsearch_user, grafana_endpoint: grafana_endpoint, grafana_password: grafana_password, grafana_user: grafana_user, diff --git a/0.x/_gen/resources/vault_secrets_app.libsonnet b/0.x/_gen/resources/vault_secrets_app.libsonnet new file mode 100644 index 0000000..8ae9cbb --- /dev/null +++ b/0.x/_gen/resources/vault_secrets_app.libsonnet @@ -0,0 +1,45 @@ +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='vault_secrets_app', url='', help='`vault_secrets_app` represents the `hcp_vault_secrets_app` Terraform resource.\n\nThe Vault Secrets app resource manages an application.\n\nThis package contains functions and utilities for setting up the resource using Jsonnet code.\n'), + '#new':: d.fn(help="\n`hcp.vault_secrets_app.new` injects a new `hcp_vault_secrets_app` 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.vault_secrets_app.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.vault_secrets_app` using the reference:\n\n $._ref.hcp_vault_secrets_app.some_id.get('id')\n\nThis is the same as directly entering `\"${ hcp_vault_secrets_app.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 - `app_name` (`string`): The Vault Secrets App name.\n - `description` (`string`): The Vault Secrets app description When `null`, the `description` 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, + app_name, + description=null, + _meta={} + ):: tf.withResource( + type='hcp_vault_secrets_app', + label=resourceLabel, + attrs=self.newAttrs(app_name=app_name, description=description), + _meta=_meta + ), + '#newAttrs':: d.fn(help='\n`hcp.vault_secrets_app.newAttrs` constructs a new object with attributes and blocks configured for the `vault_secrets_app`\nTerraform resource.\n\nUnlike [hcp.vault_secrets_app.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 - `app_name` (`string`): The Vault Secrets App name.\n - `description` (`string`): The Vault Secrets app description When `null`, the `description` 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 `vault_secrets_app` resource into the root Terraform configuration.\n', args=[]), + newAttrs( + app_name, + description=null + ):: std.prune(a={ + app_name: app_name, + description: description, + }), + '#withAppName':: d.fn(help='`hcp.string.withAppName` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the app_name 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 `app_name` field.\n', args=[]), + withAppName(resourceLabel, value): { + resource+: { + hcp_vault_secrets_app+: { + [resourceLabel]+: { + app_name: value, + }, + }, + }, + }, + '#withDescription':: d.fn(help='`hcp.string.withDescription` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the description 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 `description` field.\n', args=[]), + withDescription(resourceLabel, value): { + resource+: { + hcp_vault_secrets_app+: { + [resourceLabel]+: { + description: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resources/vault_secrets_secret.libsonnet b/0.x/_gen/resources/vault_secrets_secret.libsonnet new file mode 100644 index 0000000..dc89596 --- /dev/null +++ b/0.x/_gen/resources/vault_secrets_secret.libsonnet @@ -0,0 +1,58 @@ +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='vault_secrets_secret', url='', help='`vault_secrets_secret` represents the `hcp_vault_secrets_secret` Terraform resource.\n\nThe Vault Secrets secret resource manages a secret within a given application.\n\nThis package contains functions and utilities for setting up the resource using Jsonnet code.\n'), + '#new':: d.fn(help="\n`hcp.vault_secrets_secret.new` injects a new `hcp_vault_secrets_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 hcp.vault_secrets_secret.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.vault_secrets_secret` using the reference:\n\n $._ref.hcp_vault_secrets_secret.some_id.get('id')\n\nThis is the same as directly entering `\"${ hcp_vault_secrets_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 - `app_name` (`string`): The name of the application the secret can be found in\n - `secret_name` (`string`): The name of the secret\n - `secret_value` (`string`): The value of the secret\n\n**Returns**:\n- A mixin object that injects the new resource into the root Terraform configuration.\n", args=[]), + new( + resourceLabel, + app_name, + secret_name, + secret_value, + _meta={} + ):: tf.withResource( + type='hcp_vault_secrets_secret', + label=resourceLabel, + attrs=self.newAttrs(app_name=app_name, secret_name=secret_name, secret_value=secret_value), + _meta=_meta + ), + '#newAttrs':: d.fn(help='\n`hcp.vault_secrets_secret.newAttrs` constructs a new object with attributes and blocks configured for the `vault_secrets_secret`\nTerraform resource.\n\nUnlike [hcp.vault_secrets_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 - `app_name` (`string`): The name of the application the secret can be found in\n - `secret_name` (`string`): The name of the secret\n - `secret_value` (`string`): The value of the secret\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 `vault_secrets_secret` resource into the root Terraform configuration.\n', args=[]), + newAttrs( + app_name, + secret_name, + secret_value + ):: std.prune(a={ + app_name: app_name, + secret_name: secret_name, + secret_value: secret_value, + }), + '#withAppName':: d.fn(help='`hcp.string.withAppName` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the app_name 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 `app_name` field.\n', args=[]), + withAppName(resourceLabel, value): { + resource+: { + hcp_vault_secrets_secret+: { + [resourceLabel]+: { + app_name: value, + }, + }, + }, + }, + '#withSecretName':: d.fn(help='`hcp.string.withSecretName` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the secret_name 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 `secret_name` field.\n', args=[]), + withSecretName(resourceLabel, value): { + resource+: { + hcp_vault_secrets_secret+: { + [resourceLabel]+: { + secret_name: value, + }, + }, + }, + }, + '#withSecretValue':: d.fn(help='`hcp.string.withSecretValue` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the secret_value 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 `secret_value` field.\n', args=[]), + withSecretValue(resourceLabel, value): { + resource+: { + hcp_vault_secrets_secret+: { + [resourceLabel]+: { + secret_value: value, + }, + }, + }, + }, +} diff --git a/docs/0.x/README.md b/docs/0.x/README.md index 35f5394..4defbc0 100644 --- a/docs/0.x/README.md +++ b/docs/0.x/README.md @@ -22,10 +22,16 @@ project. * [hvn](hvn.md) * [hvn_peering_connection](hvn_peering_connection.md) * [hvn_route](hvn_route.md) +* [iam_workload_identity_provider](iam_workload_identity_provider.md) * [packer_channel](packer_channel.md) * [packer_channel_assignment](packer_channel_assignment.md) * [packer_run_task](packer_run_task.md) +* [project](project.md) * [provider](provider.md) +* [service_principal](service_principal.md) +* [service_principal_key](service_principal_key.md) * [vault_cluster](vault_cluster.md) * [vault_cluster_admin_token](vault_cluster_admin_token.md) -* [vault_plugin](vault_plugin.md) \ No newline at end of file +* [vault_plugin](vault_plugin.md) +* [vault_secrets_app](vault_secrets_app.md) +* [vault_secrets_secret](vault_secrets_secret.md) \ No newline at end of file diff --git a/docs/0.x/data/index.md b/docs/0.x/data/index.md index b737050..8e5161d 100644 --- a/docs/0.x/data/index.md +++ b/docs/0.x/data/index.md @@ -17,11 +17,14 @@ permalink: /data/ * [hvn](hvn.md) * [hvn_peering_connection](hvn_peering_connection.md) * [hvn_route](hvn_route.md) +* [organization](organization.md) * [packer_bucket_names](packer_bucket_names.md) * [packer_image](packer_image.md) -* [packer_image_iteration](packer_image_iteration.md) * [packer_iteration](packer_iteration.md) * [packer_run_task](packer_run_task.md) +* [project](project.md) +* [service_principal](service_principal.md) * [vault_cluster](vault_cluster.md) * [vault_plugin](vault_plugin.md) -* [vault_secrets_app](vault_secrets_app.md) \ No newline at end of file +* [vault_secrets_app](vault_secrets_app.md) +* [vault_secrets_secret](vault_secrets_secret.md) \ No newline at end of file diff --git a/docs/0.x/data/organization.md b/docs/0.x/data/organization.md new file mode 100644 index 0000000..bc021e2 --- /dev/null +++ b/docs/0.x/data/organization.md @@ -0,0 +1,71 @@ +--- +permalink: /data/organization/ +--- + +# data.organization + +`organization` represents the `hcp_organization` Terraform data source. + +The organization data source retrieves the HCP organization the provider is configured for. + +This package contains functions and utilities for setting up the data source using Jsonnet code. + + +## Index + +* [`fn new()`](#fn-new) +* [`fn newAttrs()`](#fn-newattrs) + +## Fields + +### fn new + +```ts +new() +``` + + +`hcp.data.organization.new` injects a new `data_hcp_organization` Terraform `data source` +block into the root module document. + +Additionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the +resource. For example, if you added a new instance to the root using: + + # arguments omitted for brevity + hcp.data.organization.new('some_id') + +You can get the reference to the `id` field of the created `hcp.data.organization` using the reference: + + $._ref.data_hcp_organization.some_id.get('id') + +This is the same as directly entering `"${ data_hcp_organization.some_id.id }"` as the value. + +NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`, +or `$` to refer to the root object. Instead, make an explicit outer object using `local`. + +**Args**: + - `dataSrcLabel` (`string`): The name label of the block. + +**Returns**: +- A mixin object that injects the new data source into the root Terraform configuration. + + +### fn newAttrs + +```ts +newAttrs() +``` + + +`hcp.data.organization.newAttrs` constructs a new object with attributes and blocks configured for the `organization` +Terraform data source. + +Unlike [hcp.data.organization.new](#fn-new), this function will not inject the `data source` +block into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the +[tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) function to build a complete block. + +This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to +injecting into a complete block. + +**Returns**: + - An attribute object that can be used with [tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) to construct a new `organization` data source into the root Terraform configuration. diff --git a/docs/0.x/data/packer_image_iteration.md b/docs/0.x/data/packer_image_iteration.md deleted file mode 100644 index 6f658c7..0000000 --- a/docs/0.x/data/packer_image_iteration.md +++ /dev/null @@ -1,201 +0,0 @@ ---- -permalink: /data/packer_image_iteration/ ---- - -# data.packer_image_iteration - -`packer_image_iteration` represents the `hcp_packer_image_iteration` Terraform data source. - -The Packer ImageIteration data source iteration gets the most recent iteration (or build) of an image, given a channel. - -This package contains functions and utilities for setting up the data source using Jsonnet code. - - -## Index - -* [`fn new()`](#fn-new) -* [`fn newAttrs()`](#fn-newattrs) -* [`fn withBucketName()`](#fn-withbucketname) -* [`fn withChannel()`](#fn-withchannel) -* [`fn withProjectId()`](#fn-withprojectid) -* [`fn withTimeouts()`](#fn-withtimeouts) -* [`fn withTimeoutsMixin()`](#fn-withtimeoutsmixin) -* [`obj timeouts`](#obj-timeouts) - * [`fn new()`](#fn-timeoutsnew) - -## Fields - -### fn new - -```ts -new() -``` - - -`hcp.data.packer_image_iteration.new` injects a new `data_hcp_packer_image_iteration` Terraform `data source` -block into the root module document. - -Additionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the -resource. For example, if you added a new instance to the root using: - - # arguments omitted for brevity - hcp.data.packer_image_iteration.new('some_id') - -You can get the reference to the `id` field of the created `hcp.data.packer_image_iteration` using the reference: - - $._ref.data_hcp_packer_image_iteration.some_id.get('id') - -This is the same as directly entering `"${ data_hcp_packer_image_iteration.some_id.id }"` as the value. - -NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`, -or `$` to refer to the root object. Instead, make an explicit outer object using `local`. - -**Args**: - - `dataSrcLabel` (`string`): The name label of the block. - - `bucket_name` (`string`): The slug of the HCP Packer Registry bucket to pull from. - - `channel` (`string`): The channel that points to the version of the image you want. - - `project_id` (`string`): -The ID of the HCP project where the HCP Packer registry 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. - - `timeouts` (`obj`): Set the `timeouts` field on the resulting data source 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.data.packer_image_iteration.timeouts.new](#fn-timeoutsnew) constructor. - -**Returns**: -- A mixin object that injects the new data source into the root Terraform configuration. - - -### fn newAttrs - -```ts -newAttrs() -``` - - -`hcp.data.packer_image_iteration.newAttrs` constructs a new object with attributes and blocks configured for the `packer_image_iteration` -Terraform data source. - -Unlike [hcp.data.packer_image_iteration.new](#fn-new), this function will not inject the `data source` -block into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the -[tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) function to build a complete block. - -This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to -injecting into a complete block. - -**Args**: - - `bucket_name` (`string`): The slug of the HCP Packer Registry bucket to pull from. - - `channel` (`string`): The channel that points to the version of the image you want. - - `project_id` (`string`): -The ID of the HCP project where the HCP Packer registry 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. - - `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.data.packer_image_iteration.timeouts.new](#fn-timeoutsnew) constructor. - -**Returns**: - - An attribute object that can be used with [tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) to construct a new `packer_image_iteration` data source into the root Terraform configuration. - - -### fn withBucketName - -```ts -withBucketName() -``` - -`hcp.string.withBucketName` constructs a mixin object that can be merged into the `string` -Terraform data source block to set or update the bucket_name field. - - - -**Args**: - - `dataSrcLabel` (`string`): The name label of the block to update. - - `value` (`string`): The value to set for the `bucket_name` field. - - -### fn withChannel - -```ts -withChannel() -``` - -`hcp.string.withChannel` constructs a mixin object that can be merged into the `string` -Terraform data source block to set or update the channel field. - - - -**Args**: - - `dataSrcLabel` (`string`): The name label of the block to update. - - `value` (`string`): The value to set for the `channel` field. - - -### fn withProjectId - -```ts -withProjectId() -``` - -`hcp.string.withProjectId` constructs a mixin object that can be merged into the `string` -Terraform data source block to set or update the project_id field. - - - -**Args**: - - `dataSrcLabel` (`string`): The name label of the block to update. - - `value` (`string`): The value to set for the `project_id` field. - - -### fn withTimeouts - -```ts -withTimeouts() -``` - -`hcp.obj.withTimeouts` constructs a mixin object that can be merged into the `obj` -Terraform data source block to set or update the timeouts field. - -This function will replace the map with the passed in `value`. If you wish to instead merge the -passed in value to the existing map, use the [hcp.obj.withTimeoutsMixin](TODO) function. - -**Args**: - - `dataSrcLabel` (`string`): The name label of the block to update. - - `value` (`obj`): The value to set for the `timeouts` field. - - -### fn withTimeoutsMixin - -```ts -withTimeoutsMixin() -``` - -`hcp.obj.withTimeoutsMixin` constructs a mixin object that can be merged into the `obj` -Terraform data source block to set or update the timeouts field. - -This function will merge the passed in value to the existing map. If you wish -to instead replace the entire map with the passed in `value`, use the [hcp.obj.withTimeouts](TODO) -function. - - -**Args**: - - `dataSrcLabel` (`string`): The name label of the block to update. - - `value` (`obj`): The value to set for the `timeouts` field. - - -## obj timeouts - - - -### fn timeouts.new - -```ts -new() -``` - - -`hcp.packer_image_iteration.timeouts.new` constructs a new object with attributes and blocks configured for the `timeouts` -Terraform sub block. - - - -**Args**: - - `default` (`string`): Set the `default` field on the resulting object. When `null`, the `default` field will be omitted from the resulting object. - -**Returns**: - - An attribute object that represents the `timeouts` sub block. diff --git a/docs/0.x/data/project.md b/docs/0.x/data/project.md new file mode 100644 index 0000000..b9bc93b --- /dev/null +++ b/docs/0.x/data/project.md @@ -0,0 +1,92 @@ +--- +permalink: /data/project/ +--- + +# data.project + +`project` represents the `hcp_project` Terraform data source. + +The project data source retrieves the given HCP project. + +This package contains functions and utilities for setting up the data source using Jsonnet code. + + +## Index + +* [`fn new()`](#fn-new) +* [`fn newAttrs()`](#fn-newattrs) +* [`fn withProject()`](#fn-withproject) + +## Fields + +### fn new + +```ts +new() +``` + + +`hcp.data.project.new` injects a new `data_hcp_project` Terraform `data source` +block into the root module document. + +Additionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the +resource. For example, if you added a new instance to the root using: + + # arguments omitted for brevity + hcp.data.project.new('some_id') + +You can get the reference to the `id` field of the created `hcp.data.project` using the reference: + + $._ref.data_hcp_project.some_id.get('id') + +This is the same as directly entering `"${ data_hcp_project.some_id.id }"` as the value. + +NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`, +or `$` to refer to the root object. Instead, make an explicit outer object using `local`. + +**Args**: + - `dataSrcLabel` (`string`): The name label of the block. + - `project` (`string`): The id of the project. May be given as "<id>" or "project/<id>". If not set, the provider project is used. When `null`, the `project` field will be omitted from the resulting object. + +**Returns**: +- A mixin object that injects the new data source into the root Terraform configuration. + + +### fn newAttrs + +```ts +newAttrs() +``` + + +`hcp.data.project.newAttrs` constructs a new object with attributes and blocks configured for the `project` +Terraform data source. + +Unlike [hcp.data.project.new](#fn-new), this function will not inject the `data source` +block into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the +[tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) function to build a complete block. + +This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to +injecting into a complete block. + +**Args**: + - `project` (`string`): The id of the project. May be given as "<id>" or "project/<id>". If not set, the provider project is used. When `null`, the `project` field will be omitted from the resulting object. + +**Returns**: + - An attribute object that can be used with [tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) to construct a new `project` data source into the root Terraform configuration. + + +### fn withProject + +```ts +withProject() +``` + +`hcp.string.withProject` constructs a mixin object that can be merged into the `string` +Terraform data source block to set or update the project field. + + + +**Args**: + - `dataSrcLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `project` field. diff --git a/docs/0.x/data/service_principal.md b/docs/0.x/data/service_principal.md new file mode 100644 index 0000000..34b54fb --- /dev/null +++ b/docs/0.x/data/service_principal.md @@ -0,0 +1,92 @@ +--- +permalink: /data/service_principal/ +--- + +# data.service_principal + +`service_principal` represents the `hcp_service_principal` Terraform data source. + +The service principal data source retrieves the given service principal. + +This package contains functions and utilities for setting up the data source using Jsonnet code. + + +## Index + +* [`fn new()`](#fn-new) +* [`fn newAttrs()`](#fn-newattrs) +* [`fn withResourceName()`](#fn-withresourcename) + +## Fields + +### fn new + +```ts +new() +``` + + +`hcp.data.service_principal.new` injects a new `data_hcp_service_principal` Terraform `data source` +block into the root module document. + +Additionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the +resource. For example, if you added a new instance to the root using: + + # arguments omitted for brevity + hcp.data.service_principal.new('some_id') + +You can get the reference to the `id` field of the created `hcp.data.service_principal` using the reference: + + $._ref.data_hcp_service_principal.some_id.get('id') + +This is the same as directly entering `"${ data_hcp_service_principal.some_id.id }"` as the value. + +NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`, +or `$` to refer to the root object. Instead, make an explicit outer object using `local`. + +**Args**: + - `dataSrcLabel` (`string`): The name label of the block. + - `resource_name` (`string`): The service principal's resource name in format `iam/project/<project_id>/service-principal/<name>` or `iam/organization/<organization_id>/service-principal/<name>` + +**Returns**: +- A mixin object that injects the new data source into the root Terraform configuration. + + +### fn newAttrs + +```ts +newAttrs() +``` + + +`hcp.data.service_principal.newAttrs` constructs a new object with attributes and blocks configured for the `service_principal` +Terraform data source. + +Unlike [hcp.data.service_principal.new](#fn-new), this function will not inject the `data source` +block into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the +[tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) function to build a complete block. + +This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to +injecting into a complete block. + +**Args**: + - `resource_name` (`string`): The service principal's resource name in format `iam/project/<project_id>/service-principal/<name>` or `iam/organization/<organization_id>/service-principal/<name>` + +**Returns**: + - An attribute object that can be used with [tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) to construct a new `service_principal` data source into the root Terraform configuration. + + +### fn withResourceName + +```ts +withResourceName() +``` + +`hcp.string.withResourceName` constructs a mixin object that can be merged into the `string` +Terraform data source block to set or update the resource_name field. + + + +**Args**: + - `dataSrcLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `resource_name` field. diff --git a/docs/0.x/data/vault_secrets_secret.md b/docs/0.x/data/vault_secrets_secret.md new file mode 100644 index 0000000..794cfd9 --- /dev/null +++ b/docs/0.x/data/vault_secrets_secret.md @@ -0,0 +1,111 @@ +--- +permalink: /data/vault_secrets_secret/ +--- + +# data.vault_secrets_secret + +`vault_secrets_secret` represents the `hcp_vault_secrets_secret` Terraform data source. + +The Vault Secrets secret data source retrieves a singular secret and its latest version. + +This package contains functions and utilities for setting up the data source using Jsonnet code. + + +## Index + +* [`fn new()`](#fn-new) +* [`fn newAttrs()`](#fn-newattrs) +* [`fn withAppName()`](#fn-withappname) +* [`fn withSecretName()`](#fn-withsecretname) + +## Fields + +### fn new + +```ts +new() +``` + + +`hcp.data.vault_secrets_secret.new` injects a new `data_hcp_vault_secrets_secret` Terraform `data source` +block into the root module document. + +Additionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the +resource. For example, if you added a new instance to the root using: + + # arguments omitted for brevity + hcp.data.vault_secrets_secret.new('some_id') + +You can get the reference to the `id` field of the created `hcp.data.vault_secrets_secret` using the reference: + + $._ref.data_hcp_vault_secrets_secret.some_id.get('id') + +This is the same as directly entering `"${ data_hcp_vault_secrets_secret.some_id.id }"` as the value. + +NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`, +or `$` to refer to the root object. Instead, make an explicit outer object using `local`. + +**Args**: + - `dataSrcLabel` (`string`): The name label of the block. + - `app_name` (`string`): The name of the Vault Secrets application. + - `secret_name` (`string`): The name of the Vault Secrets secret. + +**Returns**: +- A mixin object that injects the new data source into the root Terraform configuration. + + +### fn newAttrs + +```ts +newAttrs() +``` + + +`hcp.data.vault_secrets_secret.newAttrs` constructs a new object with attributes and blocks configured for the `vault_secrets_secret` +Terraform data source. + +Unlike [hcp.data.vault_secrets_secret.new](#fn-new), this function will not inject the `data source` +block into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the +[tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) function to build a complete block. + +This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to +injecting into a complete block. + +**Args**: + - `app_name` (`string`): The name of the Vault Secrets application. + - `secret_name` (`string`): The name of the Vault Secrets secret. + +**Returns**: + - An attribute object that can be used with [tf.withData](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withdata) to construct a new `vault_secrets_secret` data source into the root Terraform configuration. + + +### fn withAppName + +```ts +withAppName() +``` + +`hcp.string.withAppName` constructs a mixin object that can be merged into the `string` +Terraform data source block to set or update the app_name field. + + + +**Args**: + - `dataSrcLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `app_name` field. + + +### fn withSecretName + +```ts +withSecretName() +``` + +`hcp.string.withSecretName` constructs a mixin object that can be merged into the `string` +Terraform data source block to set or update the secret_name field. + + + +**Args**: + - `dataSrcLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `secret_name` field. diff --git a/docs/0.x/iam_workload_identity_provider.md b/docs/0.x/iam_workload_identity_provider.md new file mode 100644 index 0000000..445ab71 --- /dev/null +++ b/docs/0.x/iam_workload_identity_provider.md @@ -0,0 +1,227 @@ +--- +permalink: /iam_workload_identity_provider/ +--- + +# iam_workload_identity_provider + +`iam_workload_identity_provider` represents the `hcp_iam_workload_identity_provider` Terraform resource. + +The workload identity provider resource allows federating an external identity to a HCP Service Principal. + +This package contains functions and utilities for setting up the resource using Jsonnet code. + + +## Index + +* [`fn new()`](#fn-new) +* [`fn newAttrs()`](#fn-newattrs) +* [`fn withAws()`](#fn-withaws) +* [`fn withAwsMixin()`](#fn-withawsmixin) +* [`fn withConditionalAccess()`](#fn-withconditionalaccess) +* [`fn withDescription()`](#fn-withdescription) +* [`fn withName()`](#fn-withname) +* [`fn withOidc()`](#fn-withoidc) +* [`fn withOidcMixin()`](#fn-withoidcmixin) +* [`fn withServicePrincipal()`](#fn-withserviceprincipal) + +## Fields + +### fn new + +```ts +new() +``` + + +`hcp.iam_workload_identity_provider.new` injects a new `hcp_iam_workload_identity_provider` Terraform `resource` +block into the root module document. + +Additionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the +resource. For example, if you added a new instance to the root using: + + # arguments omitted for brevity + hcp.iam_workload_identity_provider.new('some_id') + +You can get the reference to the `id` field of the created `hcp.iam_workload_identity_provider` using the reference: + + $._ref.hcp_iam_workload_identity_provider.some_id.get('id') + +This is the same as directly entering `"${ hcp_iam_workload_identity_provider.some_id.id }"` as the value. + +NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`, +or `$` to refer to the root object. Instead, make an explicit outer object using `local`. + +**Args**: + - `resourceLabel` (`string`): The name label of the block. + - `aws` (`obj`): Set the `aws` field on the resulting resource block. When `null`, the `aws` field will be omitted from the resulting object. + - `conditional_access` (`string`): conditional_access is a hashicorp/go-bexpr string that is evaluated when exchanging tokens. It restricts which upstream identities are allowed to access the service principal. + - `description` (`string`): A description for the workload identity provider. When `null`, the `description` field will be omitted from the resulting object. + - `name` (`string`): The workload identity provider's name. Ideally, this should be descriptive of the workload being federated. + - `oidc` (`obj`): Set the `oidc` field on the resulting resource block. When `null`, the `oidc` field will be omitted from the resulting object. + - `service_principal` (`string`): The service principal's resource name for which the workload identity provider will be created for. Only service principals created within a project are allowed. + +**Returns**: +- A mixin object that injects the new resource into the root Terraform configuration. + + +### fn newAttrs + +```ts +newAttrs() +``` + + +`hcp.iam_workload_identity_provider.newAttrs` constructs a new object with attributes and blocks configured for the `iam_workload_identity_provider` +Terraform resource. + +Unlike [hcp.iam_workload_identity_provider.new](#fn-new), this function will not inject the `resource` +block into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the +[tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) function to build a complete block. + +This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to +injecting into a complete block. + +**Args**: + - `aws` (`obj`): Set the `aws` field on the resulting object. When `null`, the `aws` field will be omitted from the resulting object. + - `conditional_access` (`string`): conditional_access is a hashicorp/go-bexpr string that is evaluated when exchanging tokens. It restricts which upstream identities are allowed to access the service principal. + - `description` (`string`): A description for the workload identity provider. When `null`, the `description` field will be omitted from the resulting object. + - `name` (`string`): The workload identity provider's name. Ideally, this should be descriptive of the workload being federated. + - `oidc` (`obj`): Set the `oidc` field on the resulting object. When `null`, the `oidc` field will be omitted from the resulting object. + - `service_principal` (`string`): The service principal's resource name for which the workload identity provider will be created for. Only service principals created within a project are allowed. + +**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 `iam_workload_identity_provider` resource into the root Terraform configuration. + + +### fn withAws + +```ts +withAws() +``` + +`hcp.obj.withAws` constructs a mixin object that can be merged into the `obj` +Terraform resource block to set or update the aws field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`obj`): The value to set for the `aws` field. + + +### fn withAwsMixin + +```ts +withAwsMixin() +``` + +`hcp.obj.withAwsMixin` constructs a mixin object that can be merged into the `obj` +Terraform resource block to set or update the aws field. + +This function will merge the passed in value to the existing map. If you wish +to instead replace the entire map with the passed in `value`, use the [hcp.obj.withAws](TODO) +function. + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`obj`): The value to set for the `aws` field. + + +### fn withConditionalAccess + +```ts +withConditionalAccess() +``` + +`hcp.string.withConditionalAccess` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the conditional_access field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `conditional_access` field. + + +### fn withDescription + +```ts +withDescription() +``` + +`hcp.string.withDescription` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the description field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `description` field. + + +### fn withName + +```ts +withName() +``` + +`hcp.string.withName` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the name field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `name` field. + + +### fn withOidc + +```ts +withOidc() +``` + +`hcp.obj.withOidc` constructs a mixin object that can be merged into the `obj` +Terraform resource block to set or update the oidc field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`obj`): The value to set for the `oidc` field. + + +### fn withOidcMixin + +```ts +withOidcMixin() +``` + +`hcp.obj.withOidcMixin` constructs a mixin object that can be merged into the `obj` +Terraform resource block to set or update the oidc field. + +This function will merge the passed in value to the existing map. If you wish +to instead replace the entire map with the passed in `value`, use the [hcp.obj.withOidc](TODO) +function. + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`obj`): The value to set for the `oidc` field. + + +### fn withServicePrincipal + +```ts +withServicePrincipal() +``` + +`hcp.string.withServicePrincipal` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the service_principal field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `service_principal` field. diff --git a/docs/0.x/project.md b/docs/0.x/project.md new file mode 100644 index 0000000..26ccb09 --- /dev/null +++ b/docs/0.x/project.md @@ -0,0 +1,113 @@ +--- +permalink: /project/ +--- + +# project + +`project` represents the `hcp_project` Terraform resource. + +The project resource manages a HCP Project. + +The user or service account that is running Terraform when creating a `hcp_project` resource must have `roles/admin` on the specified organization. + +This package contains functions and utilities for setting up the resource using Jsonnet code. + + +## Index + +* [`fn new()`](#fn-new) +* [`fn newAttrs()`](#fn-newattrs) +* [`fn withDescription()`](#fn-withdescription) +* [`fn withName()`](#fn-withname) + +## Fields + +### fn new + +```ts +new() +``` + + +`hcp.project.new` injects a new `hcp_project` Terraform `resource` +block into the root module document. + +Additionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the +resource. For example, if you added a new instance to the root using: + + # arguments omitted for brevity + hcp.project.new('some_id') + +You can get the reference to the `id` field of the created `hcp.project` using the reference: + + $._ref.hcp_project.some_id.get('id') + +This is the same as directly entering `"${ hcp_project.some_id.id }"` as the value. + +NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`, +or `$` to refer to the root object. Instead, make an explicit outer object using `local`. + +**Args**: + - `resourceLabel` (`string`): The name label of the block. + - `description` (`string`): The project's description When `null`, the `description` field will be omitted from the resulting object. + - `name` (`string`): The project's name. + +**Returns**: +- A mixin object that injects the new resource into the root Terraform configuration. + + +### fn newAttrs + +```ts +newAttrs() +``` + + +`hcp.project.newAttrs` constructs a new object with attributes and blocks configured for the `project` +Terraform resource. + +Unlike [hcp.project.new](#fn-new), this function will not inject the `resource` +block into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the +[tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) function to build a complete block. + +This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to +injecting into a complete block. + +**Args**: + - `description` (`string`): The project's description When `null`, the `description` field will be omitted from the resulting object. + - `name` (`string`): The project's name. + +**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 `project` resource into the root Terraform configuration. + + +### fn withDescription + +```ts +withDescription() +``` + +`hcp.string.withDescription` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the description field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `description` field. + + +### fn withName + +```ts +withName() +``` + +`hcp.string.withName` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the name field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `name` field. diff --git a/docs/0.x/service_principal.md b/docs/0.x/service_principal.md new file mode 100644 index 0000000..aa9e4b6 --- /dev/null +++ b/docs/0.x/service_principal.md @@ -0,0 +1,113 @@ +--- +permalink: /service_principal/ +--- + +# service_principal + +`service_principal` represents the `hcp_service_principal` Terraform resource. + +The service principal resource manages a HCP Service Principal. + +The user or service account that is running Terraform when creating a `hcp_service_principal` resource must have `roles/Admin` on the parent resource; either the project or organization. + +This package contains functions and utilities for setting up the resource using Jsonnet code. + + +## Index + +* [`fn new()`](#fn-new) +* [`fn newAttrs()`](#fn-newattrs) +* [`fn withName()`](#fn-withname) +* [`fn withParent()`](#fn-withparent) + +## Fields + +### fn new + +```ts +new() +``` + + +`hcp.service_principal.new` injects a new `hcp_service_principal` Terraform `resource` +block into the root module document. + +Additionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the +resource. For example, if you added a new instance to the root using: + + # arguments omitted for brevity + hcp.service_principal.new('some_id') + +You can get the reference to the `id` field of the created `hcp.service_principal` using the reference: + + $._ref.hcp_service_principal.some_id.get('id') + +This is the same as directly entering `"${ hcp_service_principal.some_id.id }"` as the value. + +NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`, +or `$` to refer to the root object. Instead, make an explicit outer object using `local`. + +**Args**: + - `resourceLabel` (`string`): The name label of the block. + - `name` (`string`): The service principal's name. + - `parent` (`string`): The parent location to create the service principal under. If unspecified, the service principal will be created in the project the provider is configured with. If specified, the accepted values are "project/<project_id>" or "organization/<organization_id>" When `null`, the `parent` field will be omitted from the resulting object. + +**Returns**: +- A mixin object that injects the new resource into the root Terraform configuration. + + +### fn newAttrs + +```ts +newAttrs() +``` + + +`hcp.service_principal.newAttrs` constructs a new object with attributes and blocks configured for the `service_principal` +Terraform resource. + +Unlike [hcp.service_principal.new](#fn-new), this function will not inject the `resource` +block into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the +[tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) function to build a complete block. + +This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to +injecting into a complete block. + +**Args**: + - `name` (`string`): The service principal's name. + - `parent` (`string`): The parent location to create the service principal under. If unspecified, the service principal will be created in the project the provider is configured with. If specified, the accepted values are "project/<project_id>" or "organization/<organization_id>" When `null`, the `parent` 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 `service_principal` resource into the root Terraform configuration. + + +### fn withName + +```ts +withName() +``` + +`hcp.string.withName` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the name field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `name` field. + + +### fn withParent + +```ts +withParent() +``` + +`hcp.string.withParent` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the parent field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `parent` field. diff --git a/docs/0.x/service_principal_key.md b/docs/0.x/service_principal_key.md new file mode 100644 index 0000000..e181888 --- /dev/null +++ b/docs/0.x/service_principal_key.md @@ -0,0 +1,113 @@ +--- +permalink: /service_principal_key/ +--- + +# service_principal_key + +`service_principal_key` represents the `hcp_service_principal_key` Terraform resource. + +The service principal key resource manages a service principal key. + +The user or service account that is running Terraform when creating a `hcp_service_principal_key` resource must have `roles/Admin` on the parent resource; either the project or organization. + +This package contains functions and utilities for setting up the resource using Jsonnet code. + + +## Index + +* [`fn new()`](#fn-new) +* [`fn newAttrs()`](#fn-newattrs) +* [`fn withRotateTriggers()`](#fn-withrotatetriggers) +* [`fn withServicePrincipal()`](#fn-withserviceprincipal) + +## Fields + +### fn new + +```ts +new() +``` + + +`hcp.service_principal_key.new` injects a new `hcp_service_principal_key` Terraform `resource` +block into the root module document. + +Additionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the +resource. For example, if you added a new instance to the root using: + + # arguments omitted for brevity + hcp.service_principal_key.new('some_id') + +You can get the reference to the `id` field of the created `hcp.service_principal_key` using the reference: + + $._ref.hcp_service_principal_key.some_id.get('id') + +This is the same as directly entering `"${ hcp_service_principal_key.some_id.id }"` as the value. + +NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`, +or `$` to refer to the root object. Instead, make an explicit outer object using `local`. + +**Args**: + - `resourceLabel` (`string`): The name label of the block. + - `rotate_triggers` (`obj`): A map of arbitrary string key/value pairs that will force recreation of the key when they change, enabling key based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created. When `null`, the `rotate_triggers` field will be omitted from the resulting object. + - `service_principal` (`string`): The service principal's resource name for which a key should be created. + +**Returns**: +- A mixin object that injects the new resource into the root Terraform configuration. + + +### fn newAttrs + +```ts +newAttrs() +``` + + +`hcp.service_principal_key.newAttrs` constructs a new object with attributes and blocks configured for the `service_principal_key` +Terraform resource. + +Unlike [hcp.service_principal_key.new](#fn-new), this function will not inject the `resource` +block into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the +[tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) function to build a complete block. + +This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to +injecting into a complete block. + +**Args**: + - `rotate_triggers` (`obj`): A map of arbitrary string key/value pairs that will force recreation of the key when they change, enabling key based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created. When `null`, the `rotate_triggers` field will be omitted from the resulting object. + - `service_principal` (`string`): The service principal's resource name for which a key should be created. + +**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 `service_principal_key` resource into the root Terraform configuration. + + +### fn withRotateTriggers + +```ts +withRotateTriggers() +``` + +`hcp.obj.withRotateTriggers` constructs a mixin object that can be merged into the `obj` +Terraform resource block to set or update the rotate_triggers field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`obj`): The value to set for the `rotate_triggers` field. + + +### fn withServicePrincipal + +```ts +withServicePrincipal() +``` + +`hcp.string.withServicePrincipal` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the service_principal field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `service_principal` field. diff --git a/docs/0.x/vault_cluster.md b/docs/0.x/vault_cluster.md index 7ba4417..c867f3d 100644 --- a/docs/0.x/vault_cluster.md +++ b/docs/0.x/vault_cluster.md @@ -443,6 +443,9 @@ Terraform sub block. - `cloudwatch_secret_access_key` (`string`): CloudWatch secret access key for streaming audit logs When `null`, the `cloudwatch_secret_access_key` field will be omitted from the resulting object. - `datadog_api_key` (`string`): Datadog api key for streaming audit logs When `null`, the `datadog_api_key` field will be omitted from the resulting object. - `datadog_region` (`string`): Datadog region for streaming audit logs When `null`, the `datadog_region` field will be omitted from the resulting object. + - `elasticsearch_endpoint` (`string`): ElasticSearch endpoint for streaming audit logs When `null`, the `elasticsearch_endpoint` field will be omitted from the resulting object. + - `elasticsearch_password` (`string`): ElasticSearch password for streaming audit logs When `null`, the `elasticsearch_password` field will be omitted from the resulting object. + - `elasticsearch_user` (`string`): ElasticSearch user for streaming audit logs When `null`, the `elasticsearch_user` field will be omitted from the resulting object. - `grafana_endpoint` (`string`): Grafana endpoint for streaming audit logs When `null`, the `grafana_endpoint` field will be omitted from the resulting object. - `grafana_password` (`string`): Grafana password for streaming audit logs When `null`, the `grafana_password` field will be omitted from the resulting object. - `grafana_user` (`string`): Grafana user for streaming audit logs When `null`, the `grafana_user` field will be omitted from the resulting object. @@ -500,6 +503,9 @@ Terraform sub block. - `cloudwatch_secret_access_key` (`string`): CloudWatch secret access key for streaming metrics When `null`, the `cloudwatch_secret_access_key` field will be omitted from the resulting object. - `datadog_api_key` (`string`): Datadog api key for streaming metrics When `null`, the `datadog_api_key` field will be omitted from the resulting object. - `datadog_region` (`string`): Datadog region for streaming metrics When `null`, the `datadog_region` field will be omitted from the resulting object. + - `elasticsearch_endpoint` (`string`): ElasticSearch endpoint for streaming metrics When `null`, the `elasticsearch_endpoint` field will be omitted from the resulting object. + - `elasticsearch_password` (`string`): ElasticSearch password for streaming metrics When `null`, the `elasticsearch_password` field will be omitted from the resulting object. + - `elasticsearch_user` (`string`): ElasticSearch user for streaming metrics When `null`, the `elasticsearch_user` field will be omitted from the resulting object. - `grafana_endpoint` (`string`): Grafana endpoint for streaming metrics When `null`, the `grafana_endpoint` field will be omitted from the resulting object. - `grafana_password` (`string`): Grafana password for streaming metrics When `null`, the `grafana_password` field will be omitted from the resulting object. - `grafana_user` (`string`): Grafana user for streaming metrics When `null`, the `grafana_user` field will be omitted from the resulting object. diff --git a/docs/0.x/vault_secrets_app.md b/docs/0.x/vault_secrets_app.md new file mode 100644 index 0000000..7b2be77 --- /dev/null +++ b/docs/0.x/vault_secrets_app.md @@ -0,0 +1,111 @@ +--- +permalink: /vault_secrets_app/ +--- + +# vault_secrets_app + +`vault_secrets_app` represents the `hcp_vault_secrets_app` Terraform resource. + +The Vault Secrets app resource manages an application. + +This package contains functions and utilities for setting up the resource using Jsonnet code. + + +## Index + +* [`fn new()`](#fn-new) +* [`fn newAttrs()`](#fn-newattrs) +* [`fn withAppName()`](#fn-withappname) +* [`fn withDescription()`](#fn-withdescription) + +## Fields + +### fn new + +```ts +new() +``` + + +`hcp.vault_secrets_app.new` injects a new `hcp_vault_secrets_app` Terraform `resource` +block into the root module document. + +Additionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the +resource. For example, if you added a new instance to the root using: + + # arguments omitted for brevity + hcp.vault_secrets_app.new('some_id') + +You can get the reference to the `id` field of the created `hcp.vault_secrets_app` using the reference: + + $._ref.hcp_vault_secrets_app.some_id.get('id') + +This is the same as directly entering `"${ hcp_vault_secrets_app.some_id.id }"` as the value. + +NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`, +or `$` to refer to the root object. Instead, make an explicit outer object using `local`. + +**Args**: + - `resourceLabel` (`string`): The name label of the block. + - `app_name` (`string`): The Vault Secrets App name. + - `description` (`string`): The Vault Secrets app description When `null`, the `description` field will be omitted from the resulting object. + +**Returns**: +- A mixin object that injects the new resource into the root Terraform configuration. + + +### fn newAttrs + +```ts +newAttrs() +``` + + +`hcp.vault_secrets_app.newAttrs` constructs a new object with attributes and blocks configured for the `vault_secrets_app` +Terraform resource. + +Unlike [hcp.vault_secrets_app.new](#fn-new), this function will not inject the `resource` +block into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the +[tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) function to build a complete block. + +This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to +injecting into a complete block. + +**Args**: + - `app_name` (`string`): The Vault Secrets App name. + - `description` (`string`): The Vault Secrets app description When `null`, the `description` 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 `vault_secrets_app` resource into the root Terraform configuration. + + +### fn withAppName + +```ts +withAppName() +``` + +`hcp.string.withAppName` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the app_name field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `app_name` field. + + +### fn withDescription + +```ts +withDescription() +``` + +`hcp.string.withDescription` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the description field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `description` field. diff --git a/docs/0.x/vault_secrets_secret.md b/docs/0.x/vault_secrets_secret.md new file mode 100644 index 0000000..eaa5a37 --- /dev/null +++ b/docs/0.x/vault_secrets_secret.md @@ -0,0 +1,130 @@ +--- +permalink: /vault_secrets_secret/ +--- + +# vault_secrets_secret + +`vault_secrets_secret` represents the `hcp_vault_secrets_secret` Terraform resource. + +The Vault Secrets secret resource manages a secret within a given application. + +This package contains functions and utilities for setting up the resource using Jsonnet code. + + +## Index + +* [`fn new()`](#fn-new) +* [`fn newAttrs()`](#fn-newattrs) +* [`fn withAppName()`](#fn-withappname) +* [`fn withSecretName()`](#fn-withsecretname) +* [`fn withSecretValue()`](#fn-withsecretvalue) + +## Fields + +### fn new + +```ts +new() +``` + + +`hcp.vault_secrets_secret.new` injects a new `hcp_vault_secrets_secret` Terraform `resource` +block into the root module document. + +Additionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the +resource. For example, if you added a new instance to the root using: + + # arguments omitted for brevity + hcp.vault_secrets_secret.new('some_id') + +You can get the reference to the `id` field of the created `hcp.vault_secrets_secret` using the reference: + + $._ref.hcp_vault_secrets_secret.some_id.get('id') + +This is the same as directly entering `"${ hcp_vault_secrets_secret.some_id.id }"` as the value. + +NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`, +or `$` to refer to the root object. Instead, make an explicit outer object using `local`. + +**Args**: + - `resourceLabel` (`string`): The name label of the block. + - `app_name` (`string`): The name of the application the secret can be found in + - `secret_name` (`string`): The name of the secret + - `secret_value` (`string`): The value of the secret + +**Returns**: +- A mixin object that injects the new resource into the root Terraform configuration. + + +### fn newAttrs + +```ts +newAttrs() +``` + + +`hcp.vault_secrets_secret.newAttrs` constructs a new object with attributes and blocks configured for the `vault_secrets_secret` +Terraform resource. + +Unlike [hcp.vault_secrets_secret.new](#fn-new), this function will not inject the `resource` +block into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the +[tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) function to build a complete block. + +This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to +injecting into a complete block. + +**Args**: + - `app_name` (`string`): The name of the application the secret can be found in + - `secret_name` (`string`): The name of the secret + - `secret_value` (`string`): The value of the secret + +**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 `vault_secrets_secret` resource into the root Terraform configuration. + + +### fn withAppName + +```ts +withAppName() +``` + +`hcp.string.withAppName` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the app_name field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `app_name` field. + + +### fn withSecretName + +```ts +withSecretName() +``` + +`hcp.string.withSecretName` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the secret_name field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `secret_name` field. + + +### fn withSecretValue + +```ts +withSecretValue() +``` + +`hcp.string.withSecretValue` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the secret_value field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `secret_value` field.