Skip to content

Commit

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

Signed-off-by: tflibsonnet-ci <[email protected]>
  • Loading branch information
renovate[bot] authored and tflibsonnet-ci committed Jan 30, 2024
1 parent b148e71 commit ae54b3d
Show file tree
Hide file tree
Showing 14 changed files with 932 additions and 80 deletions.
2 changes: 2 additions & 0 deletions 0.x/_gen/data/main.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet');
hvn_route: (import 'hvn_route.libsonnet'),
iam_policy: (import 'iam_policy.libsonnet'),
organization: (import 'organization.libsonnet'),
packer_artifact: (import 'packer_artifact.libsonnet'),
packer_bucket_names: (import 'packer_bucket_names.libsonnet'),
packer_image: (import 'packer_image.libsonnet'),
packer_iteration: (import 'packer_iteration.libsonnet'),
packer_run_task: (import 'packer_run_task.libsonnet'),
packer_version: (import 'packer_version.libsonnet'),
project: (import 'project.libsonnet'),
service_principal: (import 'service_principal.libsonnet'),
vault_cluster: (import 'vault_cluster.libsonnet'),
Expand Down
118 changes: 118 additions & 0 deletions 0.x/_gen/data/packer_artifact.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
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_artifact', url='', help='`packer_artifact` represents the `hcp_packer_artifact` Terraform data source.\n\nThe HCP Packer Artifact data source retrieves information about an Artifact.\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_artifact.new` injects a new `data_hcp_packer_artifact` 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_artifact.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.data.packer_artifact` using the reference:\n\n $._ref.data_hcp_packer_artifact.some_id.get('id')\n\nThis is the same as directly entering `\"${ data_hcp_packer_artifact.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 name of the HCP Packer Bucket where the Artifact is located.\n - `channel_name` (`string`): \nThe name of the HCP Packer Channel the Version containing this Artifact is assigned to.\nThe Version currently assigned to the Channel will be fetched. \nExactly one of `channel_name` or `version_fingerprint` must be provided. When `null`, the `channel_name` field will be omitted from the resulting object.\n - `component_type` (`string`): Name of the Packer builder that built this Artifact. Ex: `amazon-ebs.example`. When `null`, the `component_type` field will be omitted from the resulting object.\n - `platform` (`string`): Name of the platform where the HCP Packer Artifact is stored.\n - `project_id` (`string`): The ID of the HCP Organization where the Artifact is located When `null`, the `project_id` field will be omitted from the resulting object.\n - `region` (`string`): The Region where the HCP Packer Artifact is stored, if any.\n - `version_fingerprint` (`string`): \nThe fingerprint of the HCP Packer Version where the Artifact is located. \nIf provided in the config, it is used to fetch the Version.\nExactly one of `channel_name` or `version_fingerprint` must be provided. When `null`, the `version_fingerprint` 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,
bucket_name,
platform,
region,
channel_name=null,
component_type=null,
project_id=null,
version_fingerprint=null,
_meta={}
):: tf.withData(
type='hcp_packer_artifact',
label=dataSrcLabel,
attrs=self.newAttrs(
bucket_name=bucket_name,
channel_name=channel_name,
component_type=component_type,
platform=platform,
project_id=project_id,
region=region,
version_fingerprint=version_fingerprint
),
_meta=_meta
),
'#newAttrs':: d.fn(help='\n`hcp.data.packer_artifact.newAttrs` constructs a new object with attributes and blocks configured for the `packer_artifact`\nTerraform data source.\n\nUnlike [hcp.data.packer_artifact.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 name of the HCP Packer Bucket where the Artifact is located.\n - `channel_name` (`string`): \nThe name of the HCP Packer Channel the Version containing this Artifact is assigned to.\nThe Version currently assigned to the Channel will be fetched. \nExactly one of `channel_name` or `version_fingerprint` must be provided. When `null`, the `channel_name` field will be omitted from the resulting object.\n - `component_type` (`string`): Name of the Packer builder that built this Artifact. Ex: `amazon-ebs.example`. When `null`, the `component_type` field will be omitted from the resulting object.\n - `platform` (`string`): Name of the platform where the HCP Packer Artifact is stored.\n - `project_id` (`string`): The ID of the HCP Organization where the Artifact is located When `null`, the `project_id` field will be omitted from the resulting object.\n - `region` (`string`): The Region where the HCP Packer Artifact is stored, if any.\n - `version_fingerprint` (`string`): \nThe fingerprint of the HCP Packer Version where the Artifact is located. \nIf provided in the config, it is used to fetch the Version.\nExactly one of `channel_name` or `version_fingerprint` must be provided. When `null`, the `version_fingerprint` 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 `packer_artifact` data source into the root Terraform configuration.\n', args=[]),
newAttrs(
bucket_name,
platform,
region,
channel_name=null,
component_type=null,
project_id=null,
version_fingerprint=null
):: std.prune(a={
bucket_name: bucket_name,
channel_name: channel_name,
component_type: component_type,
platform: platform,
project_id: project_id,
region: region,
version_fingerprint: version_fingerprint,
}),
'#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_artifact+: {
[dataSrcLabel]+: {
bucket_name: value,
},
},
},
},
'#withChannelName':: d.fn(help='`hcp.string.withChannelName` constructs a mixin object that can be merged into the `string`\nTerraform data source block to set or update the channel_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 `channel_name` field.\n', args=[]),
withChannelName(dataSrcLabel, value): {
data+: {
hcp_packer_artifact+: {
[dataSrcLabel]+: {
channel_name: value,
},
},
},
},
'#withComponentType':: d.fn(help='`hcp.string.withComponentType` constructs a mixin object that can be merged into the `string`\nTerraform data source block to set or update the component_type 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 `component_type` field.\n', args=[]),
withComponentType(dataSrcLabel, value): {
data+: {
hcp_packer_artifact+: {
[dataSrcLabel]+: {
component_type: value,
},
},
},
},
'#withPlatform':: d.fn(help='`hcp.string.withPlatform` constructs a mixin object that can be merged into the `string`\nTerraform data source block to set or update the platform 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 `platform` field.\n', args=[]),
withPlatform(dataSrcLabel, value): {
data+: {
hcp_packer_artifact+: {
[dataSrcLabel]+: {
platform: 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_artifact+: {
[dataSrcLabel]+: {
project_id: value,
},
},
},
},
'#withRegion':: d.fn(help='`hcp.string.withRegion` constructs a mixin object that can be merged into the `string`\nTerraform data source block to set or update the region 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 `region` field.\n', args=[]),
withRegion(dataSrcLabel, value): {
data+: {
hcp_packer_artifact+: {
[dataSrcLabel]+: {
region: value,
},
},
},
},
'#withVersionFingerprint':: d.fn(help='`hcp.string.withVersionFingerprint` constructs a mixin object that can be merged into the `string`\nTerraform data source block to set or update the version_fingerprint 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 `version_fingerprint` field.\n', args=[]),
withVersionFingerprint(dataSrcLabel, value): {
data+: {
hcp_packer_artifact+: {
[dataSrcLabel]+: {
version_fingerprint: value,
},
},
},
},
}
58 changes: 58 additions & 0 deletions 0.x/_gen/data/packer_version.libsonnet
Original file line number Diff line number Diff line change
@@ -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='packer_version', url='', help='`packer_version` represents the `hcp_packer_version` Terraform data source.\n\nThe HCP Packer Version data source retrieves information about a 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.packer_version.new` injects a new `data_hcp_packer_version` 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_version.new('some_id')\n\nYou can get the reference to the `id` field of the created `hcp.data.packer_version` using the reference:\n\n $._ref.data_hcp_packer_version.some_id.get('id')\n\nThis is the same as directly entering `\"${ data_hcp_packer_version.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 name of the HCP Packer Bucket where the Version is located\n - `channel_name` (`string`): \nThe name of the HCP Packer Channel the Version is assigned to.\nThe version currently assigned to the Channel will be fetched.\n - `project_id` (`string`): The ID of the HCP Organization where the Version is located When `null`, the `project_id` 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,
bucket_name,
channel_name,
project_id=null,
_meta={}
):: tf.withData(
type='hcp_packer_version',
label=dataSrcLabel,
attrs=self.newAttrs(bucket_name=bucket_name, channel_name=channel_name, project_id=project_id),
_meta=_meta
),
'#newAttrs':: d.fn(help='\n`hcp.data.packer_version.newAttrs` constructs a new object with attributes and blocks configured for the `packer_version`\nTerraform data source.\n\nUnlike [hcp.data.packer_version.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 name of the HCP Packer Bucket where the Version is located\n - `channel_name` (`string`): \nThe name of the HCP Packer Channel the Version is assigned to.\nThe version currently assigned to the Channel will be fetched.\n - `project_id` (`string`): The ID of the HCP Organization where the Version is located When `null`, the `project_id` 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 `packer_version` data source into the root Terraform configuration.\n', args=[]),
newAttrs(
bucket_name,
channel_name,
project_id=null
):: std.prune(a={
bucket_name: bucket_name,
channel_name: channel_name,
project_id: project_id,
}),
'#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_version+: {
[dataSrcLabel]+: {
bucket_name: value,
},
},
},
},
'#withChannelName':: d.fn(help='`hcp.string.withChannelName` constructs a mixin object that can be merged into the `string`\nTerraform data source block to set or update the channel_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 `channel_name` field.\n', args=[]),
withChannelName(dataSrcLabel, value): {
data+: {
hcp_packer_version+: {
[dataSrcLabel]+: {
channel_name: 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_version+: {
[dataSrcLabel]+: {
project_id: value,
},
},
},
},
}
1 change: 1 addition & 0 deletions 0.x/_gen/main.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ local d = (import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet');
hvn_route: (import 'resources/hvn_route.libsonnet'),
iam_workload_identity_provider: (import 'resources/iam_workload_identity_provider.libsonnet'),
log_streaming_destination: (import 'resources/log_streaming_destination.libsonnet'),
notifications_webhook: (import 'resources/notifications_webhook.libsonnet'),
organization_iam_binding: (import 'resources/organization_iam_binding.libsonnet'),
organization_iam_policy: (import 'resources/organization_iam_policy.libsonnet'),
packer_channel: (import 'resources/packer_channel.libsonnet'),
Expand Down
Loading

0 comments on commit ae54b3d

Please sign in to comment.