From df9ca0728cd027832c29b312c24b41affd803f6c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 25 Jan 2024 01:52:33 +0000 Subject: [PATCH 1/2] Generate libsonnet source from libgenerator PR https://github.com/tf-libsonnet/libgenerator/pull/251 Signed-off-by: tflibsonnet-ci <120686569+tflibsonnet-ci@users.noreply.github.com> --- ...secrets_sync_aws_secrets_manager.libsonnet | 22 +++++++++++++++---- docs/1.x/secrets_sync_aws_secrets_manager.md | 19 ++++++++++++++++ 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/1.x/_gen/resources/secrets_sync_aws_secrets_manager.libsonnet b/1.x/_gen/resources/secrets_sync_aws_secrets_manager.libsonnet index 5c0ebdd..4eb8daf 100644 --- a/1.x/_gen/resources/secrets_sync_aws_secrets_manager.libsonnet +++ b/1.x/_gen/resources/secrets_sync_aws_secrets_manager.libsonnet @@ -2,7 +2,7 @@ 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='secrets_sync_aws_secrets_manager', url='', help='`secrets_sync_aws_secrets_manager` represents the `doppler_secrets_sync_aws_secrets_manager` Terraform resource.\n\n\n\nThis package contains functions and utilities for setting up the resource using Jsonnet code.\n'), - '#new':: d.fn(help="\n`doppler.secrets_sync_aws_secrets_manager.new` injects a new `doppler_secrets_sync_aws_secrets_manager` Terraform `resource`\nblock into the root module document.\n\nAdditionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the\nresource. For example, if you added a new instance to the root using:\n\n # arguments omitted for brevity\n doppler.secrets_sync_aws_secrets_manager.new('some_id')\n\nYou can get the reference to the `id` field of the created `doppler.secrets_sync_aws_secrets_manager` using the reference:\n\n $._ref.doppler_secrets_sync_aws_secrets_manager.some_id.get('id')\n\nThis is the same as directly entering `\"${ doppler_secrets_sync_aws_secrets_manager.some_id.id }\"` as the value.\n\nNOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`,\nor `$` to refer to the root object. Instead, make an explicit outer object using `local`.\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block.\n - `config` (`string`): The name of the Doppler config\n - `integration` (`string`): The slug of the integration to use for this sync\n - `path` (`string`): The path to the secret in AWS\n - `project` (`string`): The name of the Doppler project\n - `region` (`string`): The AWS region\n\n**Returns**:\n- A mixin object that injects the new resource into the root Terraform configuration.\n", args=[]), + '#new':: d.fn(help="\n`doppler.secrets_sync_aws_secrets_manager.new` injects a new `doppler_secrets_sync_aws_secrets_manager` Terraform `resource`\nblock into the root module document.\n\nAdditionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the\nresource. For example, if you added a new instance to the root using:\n\n # arguments omitted for brevity\n doppler.secrets_sync_aws_secrets_manager.new('some_id')\n\nYou can get the reference to the `id` field of the created `doppler.secrets_sync_aws_secrets_manager` using the reference:\n\n $._ref.doppler_secrets_sync_aws_secrets_manager.some_id.get('id')\n\nThis is the same as directly entering `\"${ doppler_secrets_sync_aws_secrets_manager.some_id.id }\"` as the value.\n\nNOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`,\nor `$` to refer to the root object. Instead, make an explicit outer object using `local`.\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block.\n - `config` (`string`): The name of the Doppler config\n - `integration` (`string`): The slug of the integration to use for this sync\n - `path` (`string`): The path to the secret in AWS\n - `project` (`string`): The name of the Doppler project\n - `region` (`string`): The AWS region\n - `tags` (`obj`): AWS tags to attach to the secrets When `null`, the `tags` field will be omitted from the resulting object.\n\n**Returns**:\n- A mixin object that injects the new resource into the root Terraform configuration.\n", args=[]), new( resourceLabel, config, @@ -10,6 +10,7 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'); path, project, region, + tags=null, _meta={} ):: tf.withResource( type='doppler_secrets_sync_aws_secrets_manager', @@ -19,23 +20,26 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'); integration=integration, path=path, project=project, - region=region + region=region, + tags=tags ), _meta=_meta ), - '#newAttrs':: d.fn(help='\n`doppler.secrets_sync_aws_secrets_manager.newAttrs` constructs a new object with attributes and blocks configured for the `secrets_sync_aws_secrets_manager`\nTerraform resource.\n\nUnlike [doppler.secrets_sync_aws_secrets_manager.new](#fn-new), this function will not inject the `resource`\nblock into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the\n[tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) function to build a complete block.\n\nThis is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to\ninjecting into a complete block.\n\n**Args**:\n - `config` (`string`): The name of the Doppler config\n - `integration` (`string`): The slug of the integration to use for this sync\n - `path` (`string`): The path to the secret in AWS\n - `project` (`string`): The name of the Doppler project\n - `region` (`string`): The AWS region\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 `secrets_sync_aws_secrets_manager` resource into the root Terraform configuration.\n', args=[]), + '#newAttrs':: d.fn(help='\n`doppler.secrets_sync_aws_secrets_manager.newAttrs` constructs a new object with attributes and blocks configured for the `secrets_sync_aws_secrets_manager`\nTerraform resource.\n\nUnlike [doppler.secrets_sync_aws_secrets_manager.new](#fn-new), this function will not inject the `resource`\nblock into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the\n[tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) function to build a complete block.\n\nThis is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to\ninjecting into a complete block.\n\n**Args**:\n - `config` (`string`): The name of the Doppler config\n - `integration` (`string`): The slug of the integration to use for this sync\n - `path` (`string`): The path to the secret in AWS\n - `project` (`string`): The name of the Doppler project\n - `region` (`string`): The AWS region\n - `tags` (`obj`): AWS tags to attach to the secrets When `null`, the `tags` 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 `secrets_sync_aws_secrets_manager` resource into the root Terraform configuration.\n', args=[]), newAttrs( config, integration, path, project, - region + region, + tags=null ):: std.prune(a={ config: config, integration: integration, path: path, project: project, region: region, + tags: tags, }), '#withConfig':: d.fn(help='`doppler.string.withConfig` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the config field.\n\n\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block to update.\n - `value` (`string`): The value to set for the `config` field.\n', args=[]), withConfig(resourceLabel, value): { @@ -87,4 +91,14 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'); }, }, }, + '#withTags':: d.fn(help='`doppler.obj.withTags` constructs a mixin object that can be merged into the `obj`\nTerraform resource block to set or update the tags 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 `tags` field.\n', args=[]), + withTags(resourceLabel, value): { + resource+: { + doppler_secrets_sync_aws_secrets_manager+: { + [resourceLabel]+: { + tags: value, + }, + }, + }, + }, } diff --git a/docs/1.x/secrets_sync_aws_secrets_manager.md b/docs/1.x/secrets_sync_aws_secrets_manager.md index 4e7b894..da4a9c7 100644 --- a/docs/1.x/secrets_sync_aws_secrets_manager.md +++ b/docs/1.x/secrets_sync_aws_secrets_manager.md @@ -20,6 +20,7 @@ This package contains functions and utilities for setting up the resource using * [`fn withPath()`](#fn-withpath) * [`fn withProject()`](#fn-withproject) * [`fn withRegion()`](#fn-withregion) +* [`fn withTags()`](#fn-withtags) ## Fields @@ -55,6 +56,7 @@ or `$` to refer to the root object. Instead, make an explicit outer object using - `path` (`string`): The path to the secret in AWS - `project` (`string`): The name of the Doppler project - `region` (`string`): The AWS region + - `tags` (`obj`): AWS tags to attach to the secrets When `null`, the `tags` field will be omitted from the resulting object. **Returns**: - A mixin object that injects the new resource into the root Terraform configuration. @@ -83,6 +85,7 @@ injecting into a complete block. - `path` (`string`): The path to the secret in AWS - `project` (`string`): The name of the Doppler project - `region` (`string`): The AWS region + - `tags` (`obj`): AWS tags to attach to the secrets When `null`, the `tags` 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 `secrets_sync_aws_secrets_manager` resource into the root Terraform configuration. @@ -166,3 +169,19 @@ Terraform resource block to set or update the region field. **Args**: - `resourceLabel` (`string`): The name label of the block to update. - `value` (`string`): The value to set for the `region` field. + + +### fn withTags + +```ts +withTags() +``` + +`doppler.obj.withTags` constructs a mixin object that can be merged into the `obj` +Terraform resource block to set or update the tags field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`obj`): The value to set for the `tags` field. From ac3d95755ccf9f48779d8dda73dd95a1933a6b75 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 31 Jan 2024 16:08:40 +0000 Subject: [PATCH 2/2] Generate libsonnet source from libgenerator PR https://github.com/tf-libsonnet/libgenerator/pull/251 Signed-off-by: tflibsonnet-ci <120686569+tflibsonnet-ci@users.noreply.github.com> --- 1.x/_gen/main.libsonnet | 2 + 1.x/_gen/provider_doppler.libsonnet | 4 +- .../integration_terraform_cloud.libsonnet | 45 ++++ .../secrets_sync_terraform_cloud.libsonnet | 132 ++++++++++ docs/1.x/README.md | 2 + docs/1.x/integration_terraform_cloud.md | 111 +++++++++ docs/1.x/provider.md | 12 +- docs/1.x/secrets_sync_terraform_cloud.md | 225 ++++++++++++++++++ 8 files changed, 525 insertions(+), 8 deletions(-) create mode 100644 1.x/_gen/resources/integration_terraform_cloud.libsonnet create mode 100644 1.x/_gen/resources/secrets_sync_terraform_cloud.libsonnet create mode 100644 docs/1.x/integration_terraform_cloud.md create mode 100644 docs/1.x/secrets_sync_terraform_cloud.md diff --git a/1.x/_gen/main.libsonnet b/1.x/_gen/main.libsonnet index 0959e9f..f34017f 100644 --- a/1.x/_gen/main.libsonnet +++ b/1.x/_gen/main.libsonnet @@ -7,12 +7,14 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'); group: (import 'resources/group.libsonnet'), integration_aws_parameter_store: (import 'resources/integration_aws_parameter_store.libsonnet'), integration_aws_secrets_manager: (import 'resources/integration_aws_secrets_manager.libsonnet'), + integration_terraform_cloud: (import 'resources/integration_terraform_cloud.libsonnet'), project: (import 'resources/project.libsonnet'), project_member_group: (import 'resources/project_member_group.libsonnet'), project_member_service_account: (import 'resources/project_member_service_account.libsonnet'), secret: (import 'resources/secret.libsonnet'), secrets_sync_aws_parameter_store: (import 'resources/secrets_sync_aws_parameter_store.libsonnet'), secrets_sync_aws_secrets_manager: (import 'resources/secrets_sync_aws_secrets_manager.libsonnet'), + secrets_sync_terraform_cloud: (import 'resources/secrets_sync_terraform_cloud.libsonnet'), service_account: (import 'resources/service_account.libsonnet'), service_token: (import 'resources/service_token.libsonnet'), data: (import 'data/main.libsonnet'), diff --git a/1.x/_gen/provider_doppler.libsonnet b/1.x/_gen/provider_doppler.libsonnet index 4b08ec8..870608d 100644 --- a/1.x/_gen/provider_doppler.libsonnet +++ b/1.x/_gen/provider_doppler.libsonnet @@ -2,7 +2,7 @@ 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='provider', url='', help='`provider` represents the `doppler` Terraform provider config.\n\n\n\nThis package contains functions and utilities for setting up the provider using Jsonnet code.\n'), - '#new':: d.fn(help='\n`doppler.provider.new` injects a new `doppler` Terraform `provider`\nblock into the root module document.\n\nOptionally, this inserts the provider into the\n[required_providers](https://developer.hashicorp.com/terraform/language/providers/requirements) `terraform` sub block if\nthe `src` and/or `version` parameters are set.\n\n**Args**:\n - `doppler_token` (`string`): A Doppler token, either a personal or service token\n - `host` (`string`): The Doppler API host (i.e. https://api.doppler.com) When `null`, the `host` field will be omitted from the resulting object.\n - `verify_tls` (`bool`): Whether or not to verify TLS When `null`, the `verify_tls` field will be omitted from the resulting object.\n - `alias` (`string`): The provider `alias` to set for this instance of the provider block. When `null`, the `alias`\n field will be omitted from the resulting provider block.\n - `src` (`string`): The provider `source` to set on the resulting `required_providers` block. If `src` or `version` is\n set and is not `null`, a `required_providers` block and entry for the provider will be injected into the document.\n - `version` (`string`): The provider `version` to set on the resulting `required_providers` block. If `src` or\n `version` is set and is not `null`, a `required_providers` block and entry for the provider will be injected into the\n document.\n\n\n**Returns**:\n- A mixin object that injects the new provider (and optionally, `required_providers` block) into the root Terraform configuration.\n', args=[]), + '#new':: d.fn(help='\n`doppler.provider.new` injects a new `doppler` Terraform `provider`\nblock into the root module document.\n\nOptionally, this inserts the provider into the\n[required_providers](https://developer.hashicorp.com/terraform/language/providers/requirements) `terraform` sub block if\nthe `src` and/or `version` parameters are set.\n\n**Args**:\n - `doppler_token` (`string`): A Doppler token, either a personal or service token. This can also be set via the DOPPLER_TOKEN environment variable.\n - `host` (`string`): The Doppler API host (i.e. https://api.doppler.com). This can also be set via the DOPPLER_API_HOST environment variable. When `null`, the `host` field will be omitted from the resulting object.\n - `verify_tls` (`bool`): Whether or not to verify TLS. This can also be set via the DOPPLER_VERIFY_TLS environment variable. When `null`, the `verify_tls` field will be omitted from the resulting object.\n - `alias` (`string`): The provider `alias` to set for this instance of the provider block. When `null`, the `alias`\n field will be omitted from the resulting provider block.\n - `src` (`string`): The provider `source` to set on the resulting `required_providers` block. If `src` or `version` is\n set and is not `null`, a `required_providers` block and entry for the provider will be injected into the document.\n - `version` (`string`): The provider `version` to set on the resulting `required_providers` block. If `src` or\n `version` is set and is not `null`, a `required_providers` block and entry for the provider will be injected into the\n document.\n\n\n**Returns**:\n- A mixin object that injects the new provider (and optionally, `required_providers` block) into the root Terraform configuration.\n', args=[]), new( doppler_token, host=null, @@ -17,7 +17,7 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'); version=version, attrs=self.newAttrs(doppler_token=doppler_token, host=host, verify_tls=verify_tls) ), - '#newAttrs':: d.fn(help='\n`doppler.provider.` constructs a new object with attributes and blocks configured for the `doppler`\nTerraform `provider`.\n\nUnlike [doppler.provider.new](#fn-dopplernew), this function will not inject the `provider`\nblock into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the\n[tf.withProvider](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withprovider) 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 - `doppler_token` (`string`): A Doppler token, either a personal or service token\n - `host` (`string`): The Doppler API host (i.e. https://api.doppler.com) When `null`, the `host` field will be omitted from the resulting object.\n - `verify_tls` (`bool`): Whether or not to verify TLS When `null`, the `verify_tls` field will be omitted from the resulting object.\n\n**Returns**:\n - An attribute object that can be used with [tf.withProvider](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withprovider) to construct a new `doppler` provider\n configuration into the root Terraform configuration.\n', args=[]), + '#newAttrs':: d.fn(help='\n`doppler.provider.` constructs a new object with attributes and blocks configured for the `doppler`\nTerraform `provider`.\n\nUnlike [doppler.provider.new](#fn-dopplernew), this function will not inject the `provider`\nblock into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the\n[tf.withProvider](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withprovider) 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 - `doppler_token` (`string`): A Doppler token, either a personal or service token. This can also be set via the DOPPLER_TOKEN environment variable.\n - `host` (`string`): The Doppler API host (i.e. https://api.doppler.com). This can also be set via the DOPPLER_API_HOST environment variable. When `null`, the `host` field will be omitted from the resulting object.\n - `verify_tls` (`bool`): Whether or not to verify TLS. This can also be set via the DOPPLER_VERIFY_TLS environment variable. When `null`, the `verify_tls` field will be omitted from the resulting object.\n\n**Returns**:\n - An attribute object that can be used with [tf.withProvider](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withprovider) to construct a new `doppler` provider\n configuration into the root Terraform configuration.\n', args=[]), newAttrs( doppler_token, host=null, diff --git a/1.x/_gen/resources/integration_terraform_cloud.libsonnet b/1.x/_gen/resources/integration_terraform_cloud.libsonnet new file mode 100644 index 0000000..b5ecbf0 --- /dev/null +++ b/1.x/_gen/resources/integration_terraform_cloud.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='integration_terraform_cloud', url='', help='`integration_terraform_cloud` represents the `doppler_integration_terraform_cloud` Terraform resource.\n\n\n\nThis package contains functions and utilities for setting up the resource using Jsonnet code.\n'), + '#new':: d.fn(help="\n`doppler.integration_terraform_cloud.new` injects a new `doppler_integration_terraform_cloud` Terraform `resource`\nblock into the root module document.\n\nAdditionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the\nresource. For example, if you added a new instance to the root using:\n\n # arguments omitted for brevity\n doppler.integration_terraform_cloud.new('some_id')\n\nYou can get the reference to the `id` field of the created `doppler.integration_terraform_cloud` using the reference:\n\n $._ref.doppler_integration_terraform_cloud.some_id.get('id')\n\nThis is the same as directly entering `\"${ doppler_integration_terraform_cloud.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 - `api_key` (`string`): A Terraform Cloud API key.\n - `name` (`string`): The name of the integration\n\n**Returns**:\n- A mixin object that injects the new resource into the root Terraform configuration.\n", args=[]), + new( + resourceLabel, + api_key, + name, + _meta={} + ):: tf.withResource( + type='doppler_integration_terraform_cloud', + label=resourceLabel, + attrs=self.newAttrs(api_key=api_key, name=name), + _meta=_meta + ), + '#newAttrs':: d.fn(help='\n`doppler.integration_terraform_cloud.newAttrs` constructs a new object with attributes and blocks configured for the `integration_terraform_cloud`\nTerraform resource.\n\nUnlike [doppler.integration_terraform_cloud.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 - `api_key` (`string`): A Terraform Cloud API key.\n - `name` (`string`): The name of the integration\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 `integration_terraform_cloud` resource into the root Terraform configuration.\n', args=[]), + newAttrs( + api_key, + name + ):: std.prune(a={ + api_key: api_key, + name: name, + }), + '#withApiKey':: d.fn(help='`doppler.string.withApiKey` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the api_key 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 `api_key` field.\n', args=[]), + withApiKey(resourceLabel, value): { + resource+: { + doppler_integration_terraform_cloud+: { + [resourceLabel]+: { + api_key: value, + }, + }, + }, + }, + '#withName':: d.fn(help='`doppler.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+: { + doppler_integration_terraform_cloud+: { + [resourceLabel]+: { + name: value, + }, + }, + }, + }, +} diff --git a/1.x/_gen/resources/secrets_sync_terraform_cloud.libsonnet b/1.x/_gen/resources/secrets_sync_terraform_cloud.libsonnet new file mode 100644 index 0000000..e0c1980 --- /dev/null +++ b/1.x/_gen/resources/secrets_sync_terraform_cloud.libsonnet @@ -0,0 +1,132 @@ +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='secrets_sync_terraform_cloud', url='', help='`secrets_sync_terraform_cloud` represents the `doppler_secrets_sync_terraform_cloud` Terraform resource.\n\n\n\nThis package contains functions and utilities for setting up the resource using Jsonnet code.\n'), + '#new':: d.fn(help="\n`doppler.secrets_sync_terraform_cloud.new` injects a new `doppler_secrets_sync_terraform_cloud` Terraform `resource`\nblock into the root module document.\n\nAdditionally, this inserts a private function into the `_ref` attribute that generates references to attributes of the\nresource. For example, if you added a new instance to the root using:\n\n # arguments omitted for brevity\n doppler.secrets_sync_terraform_cloud.new('some_id')\n\nYou can get the reference to the `id` field of the created `doppler.secrets_sync_terraform_cloud` using the reference:\n\n $._ref.doppler_secrets_sync_terraform_cloud.some_id.get('id')\n\nThis is the same as directly entering `\"${ doppler_secrets_sync_terraform_cloud.some_id.id }\"` as the value.\n\nNOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use `super`, `self`,\nor `$` to refer to the root object. Instead, make an explicit outer object using `local`.\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block.\n - `config` (`string`): The name of the Doppler config\n - `integration` (`string`): The slug of the integration to use for this sync\n - `name_transform` (`string`): A name transform to apply before syncing secrets: \u0026#34;none\u0026#34; or \u0026#34;lowercase\u0026#34;\n - `project` (`string`): The name of the Doppler project\n - `sync_target` (`string`): Either \u0026#34;workspace\u0026#34; or \u0026#34;variableSet\u0026#34;, based on the resource type to sync to\n - `variable_set_id` (`string`): The Terraform Cloud variable set ID to sync to When `null`, the `variable_set_id` field will be omitted from the resulting object.\n - `variable_sync_type` (`string`): Either \u0026#34;terraform\u0026#34; to sync secrets as Terraform variables or \u0026#34;env\u0026#34; to sync as environment variables\n - `workspace_id` (`string`): The Terraform Cloud workspace ID to sync to When `null`, the `workspace_id` field will be omitted from the resulting object.\n\n**Returns**:\n- A mixin object that injects the new resource into the root Terraform configuration.\n", args=[]), + new( + resourceLabel, + config, + integration, + name_transform, + project, + sync_target, + variable_sync_type, + variable_set_id=null, + workspace_id=null, + _meta={} + ):: tf.withResource( + type='doppler_secrets_sync_terraform_cloud', + label=resourceLabel, + attrs=self.newAttrs( + config=config, + integration=integration, + name_transform=name_transform, + project=project, + sync_target=sync_target, + variable_set_id=variable_set_id, + variable_sync_type=variable_sync_type, + workspace_id=workspace_id + ), + _meta=_meta + ), + '#newAttrs':: d.fn(help='\n`doppler.secrets_sync_terraform_cloud.newAttrs` constructs a new object with attributes and blocks configured for the `secrets_sync_terraform_cloud`\nTerraform resource.\n\nUnlike [doppler.secrets_sync_terraform_cloud.new](#fn-new), this function will not inject the `resource`\nblock into the root Terraform document. Instead, this must be passed in as the `attrs` argument for the\n[tf.withResource](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withresource) function to build a complete block.\n\nThis is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to\ninjecting into a complete block.\n\n**Args**:\n - `config` (`string`): The name of the Doppler config\n - `integration` (`string`): The slug of the integration to use for this sync\n - `name_transform` (`string`): A name transform to apply before syncing secrets: "none" or "lowercase"\n - `project` (`string`): The name of the Doppler project\n - `sync_target` (`string`): Either "workspace" or "variableSet", based on the resource type to sync to\n - `variable_set_id` (`string`): The Terraform Cloud variable set ID to sync to When `null`, the `variable_set_id` field will be omitted from the resulting object.\n - `variable_sync_type` (`string`): Either "terraform" to sync secrets as Terraform variables or "env" to sync as environment variables\n - `workspace_id` (`string`): The Terraform Cloud workspace ID to sync to When `null`, the `workspace_id` 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 `secrets_sync_terraform_cloud` resource into the root Terraform configuration.\n', args=[]), + newAttrs( + config, + integration, + name_transform, + project, + sync_target, + variable_sync_type, + variable_set_id=null, + workspace_id=null + ):: std.prune(a={ + config: config, + integration: integration, + name_transform: name_transform, + project: project, + sync_target: sync_target, + variable_set_id: variable_set_id, + variable_sync_type: variable_sync_type, + workspace_id: workspace_id, + }), + '#withConfig':: d.fn(help='`doppler.string.withConfig` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the config field.\n\n\n\n**Args**:\n - `resourceLabel` (`string`): The name label of the block to update.\n - `value` (`string`): The value to set for the `config` field.\n', args=[]), + withConfig(resourceLabel, value): { + resource+: { + doppler_secrets_sync_terraform_cloud+: { + [resourceLabel]+: { + config: value, + }, + }, + }, + }, + '#withIntegration':: d.fn(help='`doppler.string.withIntegration` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the integration 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 `integration` field.\n', args=[]), + withIntegration(resourceLabel, value): { + resource+: { + doppler_secrets_sync_terraform_cloud+: { + [resourceLabel]+: { + integration: value, + }, + }, + }, + }, + '#withNameTransform':: d.fn(help='`doppler.string.withNameTransform` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the name_transform 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_transform` field.\n', args=[]), + withNameTransform(resourceLabel, value): { + resource+: { + doppler_secrets_sync_terraform_cloud+: { + [resourceLabel]+: { + name_transform: value, + }, + }, + }, + }, + '#withProject':: d.fn(help='`doppler.string.withProject` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the project 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 `project` field.\n', args=[]), + withProject(resourceLabel, value): { + resource+: { + doppler_secrets_sync_terraform_cloud+: { + [resourceLabel]+: { + project: value, + }, + }, + }, + }, + '#withSyncTarget':: d.fn(help='`doppler.string.withSyncTarget` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the sync_target 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 `sync_target` field.\n', args=[]), + withSyncTarget(resourceLabel, value): { + resource+: { + doppler_secrets_sync_terraform_cloud+: { + [resourceLabel]+: { + sync_target: value, + }, + }, + }, + }, + '#withVariableSetId':: d.fn(help='`doppler.string.withVariableSetId` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the variable_set_id 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 `variable_set_id` field.\n', args=[]), + withVariableSetId(resourceLabel, value): { + resource+: { + doppler_secrets_sync_terraform_cloud+: { + [resourceLabel]+: { + variable_set_id: value, + }, + }, + }, + }, + '#withVariableSyncType':: d.fn(help='`doppler.string.withVariableSyncType` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the variable_sync_type 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 `variable_sync_type` field.\n', args=[]), + withVariableSyncType(resourceLabel, value): { + resource+: { + doppler_secrets_sync_terraform_cloud+: { + [resourceLabel]+: { + variable_sync_type: value, + }, + }, + }, + }, + '#withWorkspaceId':: d.fn(help='`doppler.string.withWorkspaceId` constructs a mixin object that can be merged into the `string`\nTerraform resource block to set or update the workspace_id 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 `workspace_id` field.\n', args=[]), + withWorkspaceId(resourceLabel, value): { + resource+: { + doppler_secrets_sync_terraform_cloud+: { + [resourceLabel]+: { + workspace_id: value, + }, + }, + }, + }, +} diff --git a/docs/1.x/README.md b/docs/1.x/README.md index 9513124..6b73e3e 100644 --- a/docs/1.x/README.md +++ b/docs/1.x/README.md @@ -17,6 +17,7 @@ project. * [group](group.md) * [integration_aws_parameter_store](integration_aws_parameter_store.md) * [integration_aws_secrets_manager](integration_aws_secrets_manager.md) +* [integration_terraform_cloud](integration_terraform_cloud.md) * [project](project.md) * [project_member_group](project_member_group.md) * [project_member_service_account](project_member_service_account.md) @@ -24,5 +25,6 @@ project. * [secret](secret.md) * [secrets_sync_aws_parameter_store](secrets_sync_aws_parameter_store.md) * [secrets_sync_aws_secrets_manager](secrets_sync_aws_secrets_manager.md) +* [secrets_sync_terraform_cloud](secrets_sync_terraform_cloud.md) * [service_account](service_account.md) * [service_token](service_token.md) \ No newline at end of file diff --git a/docs/1.x/integration_terraform_cloud.md b/docs/1.x/integration_terraform_cloud.md new file mode 100644 index 0000000..5eba9a1 --- /dev/null +++ b/docs/1.x/integration_terraform_cloud.md @@ -0,0 +1,111 @@ +--- +permalink: /integration_terraform_cloud/ +--- + +# integration_terraform_cloud + +`integration_terraform_cloud` represents the `doppler_integration_terraform_cloud` Terraform resource. + + + +This package contains functions and utilities for setting up the resource using Jsonnet code. + + +## Index + +* [`fn new()`](#fn-new) +* [`fn newAttrs()`](#fn-newattrs) +* [`fn withApiKey()`](#fn-withapikey) +* [`fn withName()`](#fn-withname) + +## Fields + +### fn new + +```ts +new() +``` + + +`doppler.integration_terraform_cloud.new` injects a new `doppler_integration_terraform_cloud` 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 + doppler.integration_terraform_cloud.new('some_id') + +You can get the reference to the `id` field of the created `doppler.integration_terraform_cloud` using the reference: + + $._ref.doppler_integration_terraform_cloud.some_id.get('id') + +This is the same as directly entering `"${ doppler_integration_terraform_cloud.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. + - `api_key` (`string`): A Terraform Cloud API key. + - `name` (`string`): The name of the integration + +**Returns**: +- A mixin object that injects the new resource into the root Terraform configuration. + + +### fn newAttrs + +```ts +newAttrs() +``` + + +`doppler.integration_terraform_cloud.newAttrs` constructs a new object with attributes and blocks configured for the `integration_terraform_cloud` +Terraform resource. + +Unlike [doppler.integration_terraform_cloud.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**: + - `api_key` (`string`): A Terraform Cloud API key. + - `name` (`string`): The name of the integration + +**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 `integration_terraform_cloud` resource into the root Terraform configuration. + + +### fn withApiKey + +```ts +withApiKey() +``` + +`doppler.string.withApiKey` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the api_key field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `api_key` field. + + +### fn withName + +```ts +withName() +``` + +`doppler.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/1.x/provider.md b/docs/1.x/provider.md index 06a5b77..11f8d57 100644 --- a/docs/1.x/provider.md +++ b/docs/1.x/provider.md @@ -33,9 +33,9 @@ Optionally, this inserts the provider into the the `src` and/or `version` parameters are set. **Args**: - - `doppler_token` (`string`): A Doppler token, either a personal or service token - - `host` (`string`): The Doppler API host (i.e. https://api.doppler.com) When `null`, the `host` field will be omitted from the resulting object. - - `verify_tls` (`bool`): Whether or not to verify TLS When `null`, the `verify_tls` field will be omitted from the resulting object. + - `doppler_token` (`string`): A Doppler token, either a personal or service token. This can also be set via the DOPPLER_TOKEN environment variable. + - `host` (`string`): The Doppler API host (i.e. https://api.doppler.com). This can also be set via the DOPPLER_API_HOST environment variable. When `null`, the `host` field will be omitted from the resulting object. + - `verify_tls` (`bool`): Whether or not to verify TLS. This can also be set via the DOPPLER_VERIFY_TLS environment variable. When `null`, the `verify_tls` field will be omitted from the resulting object. - `alias` (`string`): The provider `alias` to set for this instance of the provider block. When `null`, the `alias` field will be omitted from the resulting provider block. - `src` (`string`): The provider `source` to set on the resulting `required_providers` block. If `src` or `version` is @@ -67,9 +67,9 @@ This is most useful when you need to preprocess the attributes with functions, c injecting into a complete block. **Args**: - - `doppler_token` (`string`): A Doppler token, either a personal or service token - - `host` (`string`): The Doppler API host (i.e. https://api.doppler.com) When `null`, the `host` field will be omitted from the resulting object. - - `verify_tls` (`bool`): Whether or not to verify TLS When `null`, the `verify_tls` field will be omitted from the resulting object. + - `doppler_token` (`string`): A Doppler token, either a personal or service token. This can also be set via the DOPPLER_TOKEN environment variable. + - `host` (`string`): The Doppler API host (i.e. https://api.doppler.com). This can also be set via the DOPPLER_API_HOST environment variable. When `null`, the `host` field will be omitted from the resulting object. + - `verify_tls` (`bool`): Whether or not to verify TLS. This can also be set via the DOPPLER_VERIFY_TLS environment variable. When `null`, the `verify_tls` field will be omitted from the resulting object. **Returns**: - An attribute object that can be used with [tf.withProvider](https://github.com/tf-libsonnet/core/tree/main/docs#fn-withprovider) to construct a new `doppler` provider diff --git a/docs/1.x/secrets_sync_terraform_cloud.md b/docs/1.x/secrets_sync_terraform_cloud.md new file mode 100644 index 0000000..487dad9 --- /dev/null +++ b/docs/1.x/secrets_sync_terraform_cloud.md @@ -0,0 +1,225 @@ +--- +permalink: /secrets_sync_terraform_cloud/ +--- + +# secrets_sync_terraform_cloud + +`secrets_sync_terraform_cloud` represents the `doppler_secrets_sync_terraform_cloud` Terraform resource. + + + +This package contains functions and utilities for setting up the resource using Jsonnet code. + + +## Index + +* [`fn new()`](#fn-new) +* [`fn newAttrs()`](#fn-newattrs) +* [`fn withConfig()`](#fn-withconfig) +* [`fn withIntegration()`](#fn-withintegration) +* [`fn withNameTransform()`](#fn-withnametransform) +* [`fn withProject()`](#fn-withproject) +* [`fn withSyncTarget()`](#fn-withsynctarget) +* [`fn withVariableSetId()`](#fn-withvariablesetid) +* [`fn withVariableSyncType()`](#fn-withvariablesynctype) +* [`fn withWorkspaceId()`](#fn-withworkspaceid) + +## Fields + +### fn new + +```ts +new() +``` + + +`doppler.secrets_sync_terraform_cloud.new` injects a new `doppler_secrets_sync_terraform_cloud` 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 + doppler.secrets_sync_terraform_cloud.new('some_id') + +You can get the reference to the `id` field of the created `doppler.secrets_sync_terraform_cloud` using the reference: + + $._ref.doppler_secrets_sync_terraform_cloud.some_id.get('id') + +This is the same as directly entering `"${ doppler_secrets_sync_terraform_cloud.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. + - `config` (`string`): The name of the Doppler config + - `integration` (`string`): The slug of the integration to use for this sync + - `name_transform` (`string`): A name transform to apply before syncing secrets: "none" or "lowercase" + - `project` (`string`): The name of the Doppler project + - `sync_target` (`string`): Either "workspace" or "variableSet", based on the resource type to sync to + - `variable_set_id` (`string`): The Terraform Cloud variable set ID to sync to When `null`, the `variable_set_id` field will be omitted from the resulting object. + - `variable_sync_type` (`string`): Either "terraform" to sync secrets as Terraform variables or "env" to sync as environment variables + - `workspace_id` (`string`): The Terraform Cloud workspace ID to sync to When `null`, the `workspace_id` 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() +``` + + +`doppler.secrets_sync_terraform_cloud.newAttrs` constructs a new object with attributes and blocks configured for the `secrets_sync_terraform_cloud` +Terraform resource. + +Unlike [doppler.secrets_sync_terraform_cloud.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**: + - `config` (`string`): The name of the Doppler config + - `integration` (`string`): The slug of the integration to use for this sync + - `name_transform` (`string`): A name transform to apply before syncing secrets: "none" or "lowercase" + - `project` (`string`): The name of the Doppler project + - `sync_target` (`string`): Either "workspace" or "variableSet", based on the resource type to sync to + - `variable_set_id` (`string`): The Terraform Cloud variable set ID to sync to When `null`, the `variable_set_id` field will be omitted from the resulting object. + - `variable_sync_type` (`string`): Either "terraform" to sync secrets as Terraform variables or "env" to sync as environment variables + - `workspace_id` (`string`): The Terraform Cloud workspace ID to sync to When `null`, the `workspace_id` 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 `secrets_sync_terraform_cloud` resource into the root Terraform configuration. + + +### fn withConfig + +```ts +withConfig() +``` + +`doppler.string.withConfig` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the config field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `config` field. + + +### fn withIntegration + +```ts +withIntegration() +``` + +`doppler.string.withIntegration` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the integration field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `integration` field. + + +### fn withNameTransform + +```ts +withNameTransform() +``` + +`doppler.string.withNameTransform` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the name_transform field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `name_transform` field. + + +### fn withProject + +```ts +withProject() +``` + +`doppler.string.withProject` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the project field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `project` field. + + +### fn withSyncTarget + +```ts +withSyncTarget() +``` + +`doppler.string.withSyncTarget` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the sync_target field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `sync_target` field. + + +### fn withVariableSetId + +```ts +withVariableSetId() +``` + +`doppler.string.withVariableSetId` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the variable_set_id field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `variable_set_id` field. + + +### fn withVariableSyncType + +```ts +withVariableSyncType() +``` + +`doppler.string.withVariableSyncType` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the variable_sync_type field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `variable_sync_type` field. + + +### fn withWorkspaceId + +```ts +withWorkspaceId() +``` + +`doppler.string.withWorkspaceId` constructs a mixin object that can be merged into the `string` +Terraform resource block to set or update the workspace_id field. + + + +**Args**: + - `resourceLabel` (`string`): The name label of the block to update. + - `value` (`string`): The value to set for the `workspace_id` field.