From a95a497ed24e59f34cdce28e7b5217cc051323cb Mon Sep 17 00:00:00 2001 From: tflibsonnet-ci <120686569+tflibsonnet-ci@users.noreply.github.com> Date: Fri, 16 Dec 2022 12:15:56 -0600 Subject: [PATCH] Add generator support for HCP (#1) Signed-off-by: tflibsonnet-ci <120686569+tflibsonnet-ci@users.noreply.github.com> Co-authored-by: yorinasub17 --- 0.x/_gen/data_aws_network_peering.libsonnet | 84 ++++++ ...a_aws_transit_gateway_attachment.libsonnet | 84 ++++++ .../data_azure_peering_connection.libsonnet | 84 ++++++ 0.x/_gen/data_boundary_cluster.libsonnet | 55 ++++ .../data_consul_agent_helm_config.libsonnet | 84 ++++++ ...a_consul_agent_kubernetes_secret.libsonnet | 55 ++++ 0.x/_gen/data_consul_cluster.libsonnet | 55 ++++ 0.x/_gen/data_consul_versions.libsonnet | 43 +++ 0.x/_gen/data_hvn.libsonnet | 55 ++++ .../data_hvn_peering_connection.libsonnet | 84 ++++++ 0.x/_gen/data_hvn_route.libsonnet | 67 +++++ 0.x/_gen/data_packer_image.libsonnet | 123 +++++++++ .../data_packer_image_iteration.libsonnet | 67 +++++ 0.x/_gen/data_packer_iteration.libsonnet | 67 +++++ 0.x/_gen/data_vault_cluster.libsonnet | 112 ++++++++ 0.x/_gen/main.libsonnet | 32 +++ 0.x/_gen/provider_hcp.libsonnet | 23 ++ .../resource_aws_network_peering.libsonnet | 114 ++++++++ ...e_aws_transit_gateway_attachment.libsonnet | 101 +++++++ ...esource_azure_peering_connection.libsonnet | 140 ++++++++++ 0.x/_gen/resource_boundary_cluster.libsonnet | 88 ++++++ 0.x/_gen/resource_consul_cluster.libsonnet | 181 ++++++++++++ ...source_consul_cluster_root_token.libsonnet | 55 ++++ 0.x/_gen/resource_consul_snapshot.libsonnet | 73 +++++ 0.x/_gen/resource_hvn.libsonnet | 101 +++++++ .../resource_hvn_peering_connection.libsonnet | 71 +++++ 0.x/_gen/resource_hvn_route.libsonnet | 101 +++++++ 0.x/_gen/resource_vault_cluster.libsonnet | 257 ++++++++++++++++++ ...source_vault_cluster_admin_token.libsonnet | 59 ++++ 0.x/main.libsonnet | 1 + 30 files changed, 2516 insertions(+) create mode 100644 0.x/_gen/data_aws_network_peering.libsonnet create mode 100644 0.x/_gen/data_aws_transit_gateway_attachment.libsonnet create mode 100644 0.x/_gen/data_azure_peering_connection.libsonnet create mode 100644 0.x/_gen/data_boundary_cluster.libsonnet create mode 100644 0.x/_gen/data_consul_agent_helm_config.libsonnet create mode 100644 0.x/_gen/data_consul_agent_kubernetes_secret.libsonnet create mode 100644 0.x/_gen/data_consul_cluster.libsonnet create mode 100644 0.x/_gen/data_consul_versions.libsonnet create mode 100644 0.x/_gen/data_hvn.libsonnet create mode 100644 0.x/_gen/data_hvn_peering_connection.libsonnet create mode 100644 0.x/_gen/data_hvn_route.libsonnet create mode 100644 0.x/_gen/data_packer_image.libsonnet create mode 100644 0.x/_gen/data_packer_image_iteration.libsonnet create mode 100644 0.x/_gen/data_packer_iteration.libsonnet create mode 100644 0.x/_gen/data_vault_cluster.libsonnet create mode 100644 0.x/_gen/main.libsonnet create mode 100644 0.x/_gen/provider_hcp.libsonnet create mode 100644 0.x/_gen/resource_aws_network_peering.libsonnet create mode 100644 0.x/_gen/resource_aws_transit_gateway_attachment.libsonnet create mode 100644 0.x/_gen/resource_azure_peering_connection.libsonnet create mode 100644 0.x/_gen/resource_boundary_cluster.libsonnet create mode 100644 0.x/_gen/resource_consul_cluster.libsonnet create mode 100644 0.x/_gen/resource_consul_cluster_root_token.libsonnet create mode 100644 0.x/_gen/resource_consul_snapshot.libsonnet create mode 100644 0.x/_gen/resource_hvn.libsonnet create mode 100644 0.x/_gen/resource_hvn_peering_connection.libsonnet create mode 100644 0.x/_gen/resource_hvn_route.libsonnet create mode 100644 0.x/_gen/resource_vault_cluster.libsonnet create mode 100644 0.x/_gen/resource_vault_cluster_admin_token.libsonnet create mode 100644 0.x/main.libsonnet diff --git a/0.x/_gen/data_aws_network_peering.libsonnet b/0.x/_gen/data_aws_network_peering.libsonnet new file mode 100644 index 0000000..da529a2 --- /dev/null +++ b/0.x/_gen/data_aws_network_peering.libsonnet @@ -0,0 +1,84 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + hvn_id, + peering_id, + timeouts=null, + wait_for_active_state=null, + _meta={} + ):: tf.withData( + type='hcp_aws_network_peering', + label=dataSrcLabel, + attrs=self.newAttrs( + hvn_id=hvn_id, + peering_id=peering_id, + timeouts=timeouts, + wait_for_active_state=wait_for_active_state + ), + _meta=_meta + ), + newAttrs( + hvn_id, + peering_id, + timeouts=null, + wait_for_active_state=null + ):: std.prune(a={ + hvn_id: hvn_id, + peering_id: peering_id, + timeouts: timeouts, + wait_for_active_state: wait_for_active_state, + }), + timeouts:: { + new( + read=null + ):: std.prune(a={ + read: read, + }), + }, + withHvnId(dataSrcLabel, value):: { + data+: { + hcp_aws_network_peering+: { + [dataSrcLabel]+: { + hvn_id: value, + }, + }, + }, + }, + withPeeringId(dataSrcLabel, value):: { + data+: { + hcp_aws_network_peering+: { + [dataSrcLabel]+: { + peering_id: value, + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_aws_network_peering+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_aws_network_peering+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, + withWaitForActiveState(dataSrcLabel, value):: { + data+: { + hcp_aws_network_peering+: { + [dataSrcLabel]+: { + wait_for_active_state: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_aws_transit_gateway_attachment.libsonnet b/0.x/_gen/data_aws_transit_gateway_attachment.libsonnet new file mode 100644 index 0000000..7f9759f --- /dev/null +++ b/0.x/_gen/data_aws_transit_gateway_attachment.libsonnet @@ -0,0 +1,84 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + hvn_id, + transit_gateway_attachment_id, + timeouts=null, + wait_for_active_state=null, + _meta={} + ):: tf.withData( + type='hcp_aws_transit_gateway_attachment', + label=dataSrcLabel, + attrs=self.newAttrs( + hvn_id=hvn_id, + timeouts=timeouts, + transit_gateway_attachment_id=transit_gateway_attachment_id, + wait_for_active_state=wait_for_active_state + ), + _meta=_meta + ), + newAttrs( + hvn_id, + transit_gateway_attachment_id, + timeouts=null, + wait_for_active_state=null + ):: std.prune(a={ + hvn_id: hvn_id, + timeouts: timeouts, + transit_gateway_attachment_id: transit_gateway_attachment_id, + wait_for_active_state: wait_for_active_state, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withHvnId(dataSrcLabel, value):: { + data+: { + hcp_aws_transit_gateway_attachment+: { + [dataSrcLabel]+: { + hvn_id: value, + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_aws_transit_gateway_attachment+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_aws_transit_gateway_attachment+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, + withTransitGatewayAttachmentId(dataSrcLabel, value):: { + data+: { + hcp_aws_transit_gateway_attachment+: { + [dataSrcLabel]+: { + transit_gateway_attachment_id: value, + }, + }, + }, + }, + withWaitForActiveState(dataSrcLabel, value):: { + data+: { + hcp_aws_transit_gateway_attachment+: { + [dataSrcLabel]+: { + wait_for_active_state: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_azure_peering_connection.libsonnet b/0.x/_gen/data_azure_peering_connection.libsonnet new file mode 100644 index 0000000..7cf5265 --- /dev/null +++ b/0.x/_gen/data_azure_peering_connection.libsonnet @@ -0,0 +1,84 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + hvn_link, + peering_id, + timeouts=null, + wait_for_active_state=null, + _meta={} + ):: tf.withData( + type='hcp_azure_peering_connection', + label=dataSrcLabel, + attrs=self.newAttrs( + hvn_link=hvn_link, + peering_id=peering_id, + timeouts=timeouts, + wait_for_active_state=wait_for_active_state + ), + _meta=_meta + ), + newAttrs( + hvn_link, + peering_id, + timeouts=null, + wait_for_active_state=null + ):: std.prune(a={ + hvn_link: hvn_link, + peering_id: peering_id, + timeouts: timeouts, + wait_for_active_state: wait_for_active_state, + }), + timeouts:: { + new( + read=null + ):: std.prune(a={ + read: read, + }), + }, + withHvnLink(dataSrcLabel, value):: { + data+: { + hcp_azure_peering_connection+: { + [dataSrcLabel]+: { + hvn_link: value, + }, + }, + }, + }, + withPeeringId(dataSrcLabel, value):: { + data+: { + hcp_azure_peering_connection+: { + [dataSrcLabel]+: { + peering_id: value, + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_azure_peering_connection+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_azure_peering_connection+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, + withWaitForActiveState(dataSrcLabel, value):: { + data+: { + hcp_azure_peering_connection+: { + [dataSrcLabel]+: { + wait_for_active_state: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_boundary_cluster.libsonnet b/0.x/_gen/data_boundary_cluster.libsonnet new file mode 100644 index 0000000..58615fa --- /dev/null +++ b/0.x/_gen/data_boundary_cluster.libsonnet @@ -0,0 +1,55 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + cluster_id, + timeouts=null, + _meta={} + ):: tf.withData( + type='hcp_boundary_cluster', + label=dataSrcLabel, + attrs=self.newAttrs(cluster_id=cluster_id, timeouts=timeouts), + _meta=_meta + ), + newAttrs( + cluster_id, + timeouts=null + ):: std.prune(a={ + cluster_id: cluster_id, + timeouts: timeouts, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withClusterId(dataSrcLabel, value):: { + data+: { + hcp_boundary_cluster+: { + [dataSrcLabel]+: { + cluster_id: value, + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_boundary_cluster+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_boundary_cluster+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_consul_agent_helm_config.libsonnet b/0.x/_gen/data_consul_agent_helm_config.libsonnet new file mode 100644 index 0000000..3d3382c --- /dev/null +++ b/0.x/_gen/data_consul_agent_helm_config.libsonnet @@ -0,0 +1,84 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + cluster_id, + kubernetes_endpoint, + expose_gossip_ports=null, + timeouts=null, + _meta={} + ):: tf.withData( + type='hcp_consul_agent_helm_config', + label=dataSrcLabel, + attrs=self.newAttrs( + cluster_id=cluster_id, + expose_gossip_ports=expose_gossip_ports, + kubernetes_endpoint=kubernetes_endpoint, + timeouts=timeouts + ), + _meta=_meta + ), + newAttrs( + cluster_id, + kubernetes_endpoint, + expose_gossip_ports=null, + timeouts=null + ):: std.prune(a={ + cluster_id: cluster_id, + expose_gossip_ports: expose_gossip_ports, + kubernetes_endpoint: kubernetes_endpoint, + timeouts: timeouts, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withClusterId(dataSrcLabel, value):: { + data+: { + hcp_consul_agent_helm_config+: { + [dataSrcLabel]+: { + cluster_id: value, + }, + }, + }, + }, + withExposeGossipPorts(dataSrcLabel, value):: { + data+: { + hcp_consul_agent_helm_config+: { + [dataSrcLabel]+: { + expose_gossip_ports: value, + }, + }, + }, + }, + withKubernetesEndpoint(dataSrcLabel, value):: { + data+: { + hcp_consul_agent_helm_config+: { + [dataSrcLabel]+: { + kubernetes_endpoint: value, + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_consul_agent_helm_config+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_consul_agent_helm_config+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_consul_agent_kubernetes_secret.libsonnet b/0.x/_gen/data_consul_agent_kubernetes_secret.libsonnet new file mode 100644 index 0000000..5778341 --- /dev/null +++ b/0.x/_gen/data_consul_agent_kubernetes_secret.libsonnet @@ -0,0 +1,55 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + cluster_id, + timeouts=null, + _meta={} + ):: tf.withData( + type='hcp_consul_agent_kubernetes_secret', + label=dataSrcLabel, + attrs=self.newAttrs(cluster_id=cluster_id, timeouts=timeouts), + _meta=_meta + ), + newAttrs( + cluster_id, + timeouts=null + ):: std.prune(a={ + cluster_id: cluster_id, + timeouts: timeouts, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withClusterId(dataSrcLabel, value):: { + data+: { + hcp_consul_agent_kubernetes_secret+: { + [dataSrcLabel]+: { + cluster_id: value, + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_consul_agent_kubernetes_secret+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_consul_agent_kubernetes_secret+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_consul_cluster.libsonnet b/0.x/_gen/data_consul_cluster.libsonnet new file mode 100644 index 0000000..37a663d --- /dev/null +++ b/0.x/_gen/data_consul_cluster.libsonnet @@ -0,0 +1,55 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + cluster_id, + timeouts=null, + _meta={} + ):: tf.withData( + type='hcp_consul_cluster', + label=dataSrcLabel, + attrs=self.newAttrs(cluster_id=cluster_id, timeouts=timeouts), + _meta=_meta + ), + newAttrs( + cluster_id, + timeouts=null + ):: std.prune(a={ + cluster_id: cluster_id, + timeouts: timeouts, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withClusterId(dataSrcLabel, value):: { + data+: { + hcp_consul_cluster+: { + [dataSrcLabel]+: { + cluster_id: value, + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_consul_cluster+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_consul_cluster+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_consul_versions.libsonnet b/0.x/_gen/data_consul_versions.libsonnet new file mode 100644 index 0000000..9cd7386 --- /dev/null +++ b/0.x/_gen/data_consul_versions.libsonnet @@ -0,0 +1,43 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + timeouts=null, + _meta={} + ):: tf.withData( + type='hcp_consul_versions', + label=dataSrcLabel, + attrs=self.newAttrs(timeouts=timeouts), + _meta=_meta + ), + newAttrs( + timeouts=null + ):: std.prune(a={ + timeouts: timeouts, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_consul_versions+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_consul_versions+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_hvn.libsonnet b/0.x/_gen/data_hvn.libsonnet new file mode 100644 index 0000000..733db7e --- /dev/null +++ b/0.x/_gen/data_hvn.libsonnet @@ -0,0 +1,55 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + hvn_id, + timeouts=null, + _meta={} + ):: tf.withData( + type='hcp_hvn', + label=dataSrcLabel, + attrs=self.newAttrs(hvn_id=hvn_id, timeouts=timeouts), + _meta=_meta + ), + newAttrs( + hvn_id, + timeouts=null + ):: std.prune(a={ + hvn_id: hvn_id, + timeouts: timeouts, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withHvnId(dataSrcLabel, value):: { + data+: { + hcp_hvn+: { + [dataSrcLabel]+: { + hvn_id: value, + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_hvn+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_hvn+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_hvn_peering_connection.libsonnet b/0.x/_gen/data_hvn_peering_connection.libsonnet new file mode 100644 index 0000000..d5514be --- /dev/null +++ b/0.x/_gen/data_hvn_peering_connection.libsonnet @@ -0,0 +1,84 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + hvn_1, + hvn_2, + peering_id, + timeouts=null, + _meta={} + ):: tf.withData( + type='hcp_hvn_peering_connection', + label=dataSrcLabel, + attrs=self.newAttrs( + hvn_1=hvn_1, + hvn_2=hvn_2, + peering_id=peering_id, + timeouts=timeouts + ), + _meta=_meta + ), + newAttrs( + hvn_1, + hvn_2, + peering_id, + timeouts=null + ):: std.prune(a={ + hvn_1: hvn_1, + hvn_2: hvn_2, + peering_id: peering_id, + timeouts: timeouts, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withHvn1(dataSrcLabel, value):: { + data+: { + hcp_hvn_peering_connection+: { + [dataSrcLabel]+: { + hvn_1: value, + }, + }, + }, + }, + withHvn2(dataSrcLabel, value):: { + data+: { + hcp_hvn_peering_connection+: { + [dataSrcLabel]+: { + hvn_2: value, + }, + }, + }, + }, + withPeeringId(dataSrcLabel, value):: { + data+: { + hcp_hvn_peering_connection+: { + [dataSrcLabel]+: { + peering_id: value, + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_hvn_peering_connection+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_hvn_peering_connection+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_hvn_route.libsonnet b/0.x/_gen/data_hvn_route.libsonnet new file mode 100644 index 0000000..d1f367d --- /dev/null +++ b/0.x/_gen/data_hvn_route.libsonnet @@ -0,0 +1,67 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + hvn_link, + hvn_route_id, + timeouts=null, + _meta={} + ):: tf.withData( + type='hcp_hvn_route', + label=dataSrcLabel, + attrs=self.newAttrs(hvn_link=hvn_link, hvn_route_id=hvn_route_id, timeouts=timeouts), + _meta=_meta + ), + newAttrs( + hvn_link, + hvn_route_id, + timeouts=null + ):: std.prune(a={ + hvn_link: hvn_link, + hvn_route_id: hvn_route_id, + timeouts: timeouts, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withHvnLink(dataSrcLabel, value):: { + data+: { + hcp_hvn_route+: { + [dataSrcLabel]+: { + hvn_link: value, + }, + }, + }, + }, + withHvnRouteId(dataSrcLabel, value):: { + data+: { + hcp_hvn_route+: { + [dataSrcLabel]+: { + hvn_route_id: value, + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_hvn_route+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_hvn_route+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_packer_image.libsonnet b/0.x/_gen/data_packer_image.libsonnet new file mode 100644 index 0000000..9ec6186 --- /dev/null +++ b/0.x/_gen/data_packer_image.libsonnet @@ -0,0 +1,123 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + bucket_name, + cloud_provider, + region, + channel=null, + component_type=null, + iteration_id=null, + timeouts=null, + _meta={} + ):: tf.withData( + type='hcp_packer_image', + label=dataSrcLabel, + attrs=self.newAttrs( + bucket_name=bucket_name, + channel=channel, + cloud_provider=cloud_provider, + component_type=component_type, + iteration_id=iteration_id, + region=region, + timeouts=timeouts + ), + _meta=_meta + ), + newAttrs( + bucket_name, + cloud_provider, + region, + channel=null, + component_type=null, + iteration_id=null, + timeouts=null + ):: std.prune(a={ + bucket_name: bucket_name, + channel: channel, + cloud_provider: cloud_provider, + component_type: component_type, + iteration_id: iteration_id, + region: region, + timeouts: timeouts, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withBucketName(dataSrcLabel, value):: { + data+: { + hcp_packer_image+: { + [dataSrcLabel]+: { + bucket_name: value, + }, + }, + }, + }, + withChannel(dataSrcLabel, value):: { + data+: { + hcp_packer_image+: { + [dataSrcLabel]+: { + channel: value, + }, + }, + }, + }, + withCloudProvider(dataSrcLabel, value):: { + data+: { + hcp_packer_image+: { + [dataSrcLabel]+: { + cloud_provider: value, + }, + }, + }, + }, + withComponentType(dataSrcLabel, value):: { + data+: { + hcp_packer_image+: { + [dataSrcLabel]+: { + component_type: value, + }, + }, + }, + }, + withIterationId(dataSrcLabel, value):: { + data+: { + hcp_packer_image+: { + [dataSrcLabel]+: { + iteration_id: value, + }, + }, + }, + }, + withRegion(dataSrcLabel, value):: { + data+: { + hcp_packer_image+: { + [dataSrcLabel]+: { + region: value, + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_packer_image+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_packer_image+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_packer_image_iteration.libsonnet b/0.x/_gen/data_packer_image_iteration.libsonnet new file mode 100644 index 0000000..861dca5 --- /dev/null +++ b/0.x/_gen/data_packer_image_iteration.libsonnet @@ -0,0 +1,67 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + bucket_name, + channel, + timeouts=null, + _meta={} + ):: tf.withData( + type='hcp_packer_image_iteration', + label=dataSrcLabel, + attrs=self.newAttrs(bucket_name=bucket_name, channel=channel, timeouts=timeouts), + _meta=_meta + ), + newAttrs( + bucket_name, + channel, + timeouts=null + ):: std.prune(a={ + bucket_name: bucket_name, + channel: channel, + timeouts: timeouts, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withBucketName(dataSrcLabel, value):: { + data+: { + hcp_packer_image_iteration+: { + [dataSrcLabel]+: { + bucket_name: value, + }, + }, + }, + }, + withChannel(dataSrcLabel, value):: { + data+: { + hcp_packer_image_iteration+: { + [dataSrcLabel]+: { + channel: value, + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_packer_image_iteration+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_packer_image_iteration+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_packer_iteration.libsonnet b/0.x/_gen/data_packer_iteration.libsonnet new file mode 100644 index 0000000..00c94b5 --- /dev/null +++ b/0.x/_gen/data_packer_iteration.libsonnet @@ -0,0 +1,67 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + dataSrcLabel, + bucket_name, + channel, + timeouts=null, + _meta={} + ):: tf.withData( + type='hcp_packer_iteration', + label=dataSrcLabel, + attrs=self.newAttrs(bucket_name=bucket_name, channel=channel, timeouts=timeouts), + _meta=_meta + ), + newAttrs( + bucket_name, + channel, + timeouts=null + ):: std.prune(a={ + bucket_name: bucket_name, + channel: channel, + timeouts: timeouts, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withBucketName(dataSrcLabel, value):: { + data+: { + hcp_packer_iteration+: { + [dataSrcLabel]+: { + bucket_name: value, + }, + }, + }, + }, + withChannel(dataSrcLabel, value):: { + data+: { + hcp_packer_iteration+: { + [dataSrcLabel]+: { + channel: value, + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_packer_iteration+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_packer_iteration+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/data_vault_cluster.libsonnet b/0.x/_gen/data_vault_cluster.libsonnet new file mode 100644 index 0000000..ed5ba7c --- /dev/null +++ b/0.x/_gen/data_vault_cluster.libsonnet @@ -0,0 +1,112 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + audit_log_config:: { + new( + + ):: std.prune(a={}), + }, + metrics_config:: { + new( + + ):: std.prune(a={}), + }, + new( + dataSrcLabel, + cluster_id, + audit_log_config=null, + metrics_config=null, + timeouts=null, + _meta={} + ):: tf.withData( + type='hcp_vault_cluster', + label=dataSrcLabel, + attrs=self.newAttrs( + audit_log_config=audit_log_config, + cluster_id=cluster_id, + metrics_config=metrics_config, + timeouts=timeouts + ), + _meta=_meta + ), + newAttrs( + cluster_id, + audit_log_config=null, + metrics_config=null, + timeouts=null + ):: std.prune(a={ + audit_log_config: audit_log_config, + cluster_id: cluster_id, + metrics_config: metrics_config, + timeouts: timeouts, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withAuditLogConfig(dataSrcLabel, value):: { + data+: { + hcp_vault_cluster+: { + [dataSrcLabel]+: { + audit_log_config: value, + }, + }, + }, + }, + withAuditLogConfigMixin(dataSrcLabel, value):: { + data+: { + hcp_vault_cluster+: { + [dataSrcLabel]+: { + audit_log_config+: if std.isArray(v=value) then value else [value], + }, + }, + }, + }, + withClusterId(dataSrcLabel, value):: { + data+: { + hcp_vault_cluster+: { + [dataSrcLabel]+: { + cluster_id: value, + }, + }, + }, + }, + withMetricsConfig(dataSrcLabel, value):: { + data+: { + hcp_vault_cluster+: { + [dataSrcLabel]+: { + metrics_config: value, + }, + }, + }, + }, + withMetricsConfigMixin(dataSrcLabel, value):: { + data+: { + hcp_vault_cluster+: { + [dataSrcLabel]+: { + metrics_config+: if std.isArray(v=value) then value else [value], + }, + }, + }, + }, + withTimeouts(dataSrcLabel, value):: { + data+: { + hcp_vault_cluster+: { + [dataSrcLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(dataSrcLabel, value):: { + data+: { + hcp_vault_cluster+: { + [dataSrcLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/main.libsonnet b/0.x/_gen/main.libsonnet new file mode 100644 index 0000000..cc9f923 --- /dev/null +++ b/0.x/_gen/main.libsonnet @@ -0,0 +1,32 @@ +{ + provider: (import 'provider_hcp.libsonnet'), + aws_network_peering: (import 'resource_aws_network_peering.libsonnet'), + aws_transit_gateway_attachment: (import 'resource_aws_transit_gateway_attachment.libsonnet'), + azure_peering_connection: (import 'resource_azure_peering_connection.libsonnet'), + boundary_cluster: (import 'resource_boundary_cluster.libsonnet'), + consul_cluster: (import 'resource_consul_cluster.libsonnet'), + consul_cluster_root_token: (import 'resource_consul_cluster_root_token.libsonnet'), + consul_snapshot: (import 'resource_consul_snapshot.libsonnet'), + hvn: (import 'resource_hvn.libsonnet'), + hvn_peering_connection: (import 'resource_hvn_peering_connection.libsonnet'), + hvn_route: (import 'resource_hvn_route.libsonnet'), + vault_cluster: (import 'resource_vault_cluster.libsonnet'), + vault_cluster_admin_token: (import 'resource_vault_cluster_admin_token.libsonnet'), + data: { + aws_network_peering: (import 'data_aws_network_peering.libsonnet'), + aws_transit_gateway_attachment: (import 'data_aws_transit_gateway_attachment.libsonnet'), + azure_peering_connection: (import 'data_azure_peering_connection.libsonnet'), + boundary_cluster: (import 'data_boundary_cluster.libsonnet'), + consul_agent_helm_config: (import 'data_consul_agent_helm_config.libsonnet'), + consul_agent_kubernetes_secret: (import 'data_consul_agent_kubernetes_secret.libsonnet'), + consul_cluster: (import 'data_consul_cluster.libsonnet'), + consul_versions: (import 'data_consul_versions.libsonnet'), + hvn: (import 'data_hvn.libsonnet'), + hvn_peering_connection: (import 'data_hvn_peering_connection.libsonnet'), + hvn_route: (import 'data_hvn_route.libsonnet'), + packer_image: (import 'data_packer_image.libsonnet'), + packer_image_iteration: (import 'data_packer_image_iteration.libsonnet'), + packer_iteration: (import 'data_packer_iteration.libsonnet'), + vault_cluster: (import 'data_vault_cluster.libsonnet'), + }, +} diff --git a/0.x/_gen/provider_hcp.libsonnet b/0.x/_gen/provider_hcp.libsonnet new file mode 100644 index 0000000..5fd39f7 --- /dev/null +++ b/0.x/_gen/provider_hcp.libsonnet @@ -0,0 +1,23 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + client_id=null, + client_secret=null, + alias=null, + src=null, + version=null + ):: tf.withProvider( + name='hcp', + alias=alias, + src=src, + version=version, + attrs=self.newAttrs(client_id=client_id, client_secret=client_secret) + ), + newAttrs( + client_id=null, + client_secret=null + ):: std.prune(a={ + client_id: client_id, + client_secret: client_secret, + }), +} diff --git a/0.x/_gen/resource_aws_network_peering.libsonnet b/0.x/_gen/resource_aws_network_peering.libsonnet new file mode 100644 index 0000000..f5389aa --- /dev/null +++ b/0.x/_gen/resource_aws_network_peering.libsonnet @@ -0,0 +1,114 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + resourceLabel, + hvn_id, + peer_account_id, + peer_vpc_id, + peer_vpc_region, + peering_id, + timeouts=null, + _meta={} + ):: tf.withResource( + type='hcp_aws_network_peering', + label=resourceLabel, + attrs=self.newAttrs( + hvn_id=hvn_id, + peer_account_id=peer_account_id, + peer_vpc_id=peer_vpc_id, + peer_vpc_region=peer_vpc_region, + peering_id=peering_id, + timeouts=timeouts + ), + _meta=_meta + ), + newAttrs( + hvn_id, + peer_account_id, + peer_vpc_id, + peer_vpc_region, + peering_id, + timeouts=null + ):: std.prune(a={ + hvn_id: hvn_id, + peer_account_id: peer_account_id, + peer_vpc_id: peer_vpc_id, + peer_vpc_region: peer_vpc_region, + peering_id: peering_id, + timeouts: timeouts, + }), + timeouts:: { + new( + create=null, + default=null, + delete=null + ):: std.prune(a={ + create: create, + default: default, + delete: delete, + }), + }, + withHvnId(resourceLabel, value):: { + resource+: { + hcp_aws_network_peering+: { + [resourceLabel]+: { + hvn_id: value, + }, + }, + }, + }, + withPeerAccountId(resourceLabel, value):: { + resource+: { + hcp_aws_network_peering+: { + [resourceLabel]+: { + peer_account_id: value, + }, + }, + }, + }, + withPeerVpcId(resourceLabel, value):: { + resource+: { + hcp_aws_network_peering+: { + [resourceLabel]+: { + peer_vpc_id: value, + }, + }, + }, + }, + withPeerVpcRegion(resourceLabel, value):: { + resource+: { + hcp_aws_network_peering+: { + [resourceLabel]+: { + peer_vpc_region: value, + }, + }, + }, + }, + withPeeringId(resourceLabel, value):: { + resource+: { + hcp_aws_network_peering+: { + [resourceLabel]+: { + peering_id: value, + }, + }, + }, + }, + withTimeouts(resourceLabel, value):: { + resource+: { + hcp_aws_network_peering+: { + [resourceLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(resourceLabel, value):: { + resource+: { + hcp_aws_network_peering+: { + [resourceLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resource_aws_transit_gateway_attachment.libsonnet b/0.x/_gen/resource_aws_transit_gateway_attachment.libsonnet new file mode 100644 index 0000000..302232d --- /dev/null +++ b/0.x/_gen/resource_aws_transit_gateway_attachment.libsonnet @@ -0,0 +1,101 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + resourceLabel, + hvn_id, + resource_share_arn, + transit_gateway_attachment_id, + transit_gateway_id, + timeouts=null, + _meta={} + ):: tf.withResource( + type='hcp_aws_transit_gateway_attachment', + label=resourceLabel, + attrs=self.newAttrs( + hvn_id=hvn_id, + resource_share_arn=resource_share_arn, + timeouts=timeouts, + transit_gateway_attachment_id=transit_gateway_attachment_id, + transit_gateway_id=transit_gateway_id + ), + _meta=_meta + ), + newAttrs( + hvn_id, + resource_share_arn, + transit_gateway_attachment_id, + transit_gateway_id, + timeouts=null + ):: std.prune(a={ + hvn_id: hvn_id, + resource_share_arn: resource_share_arn, + timeouts: timeouts, + transit_gateway_attachment_id: transit_gateway_attachment_id, + transit_gateway_id: transit_gateway_id, + }), + timeouts:: { + new( + create=null, + default=null, + delete=null + ):: std.prune(a={ + create: create, + default: default, + delete: delete, + }), + }, + withHvnId(resourceLabel, value):: { + resource+: { + hcp_aws_transit_gateway_attachment+: { + [resourceLabel]+: { + hvn_id: value, + }, + }, + }, + }, + withResourceShareArn(resourceLabel, value):: { + resource+: { + hcp_aws_transit_gateway_attachment+: { + [resourceLabel]+: { + resource_share_arn: value, + }, + }, + }, + }, + withTimeouts(resourceLabel, value):: { + resource+: { + hcp_aws_transit_gateway_attachment+: { + [resourceLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(resourceLabel, value):: { + resource+: { + hcp_aws_transit_gateway_attachment+: { + [resourceLabel]+: { + timeouts+: value, + }, + }, + }, + }, + withTransitGatewayAttachmentId(resourceLabel, value):: { + resource+: { + hcp_aws_transit_gateway_attachment+: { + [resourceLabel]+: { + transit_gateway_attachment_id: value, + }, + }, + }, + }, + withTransitGatewayId(resourceLabel, value):: { + resource+: { + hcp_aws_transit_gateway_attachment+: { + [resourceLabel]+: { + transit_gateway_id: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resource_azure_peering_connection.libsonnet b/0.x/_gen/resource_azure_peering_connection.libsonnet new file mode 100644 index 0000000..bb95051 --- /dev/null +++ b/0.x/_gen/resource_azure_peering_connection.libsonnet @@ -0,0 +1,140 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + resourceLabel, + hvn_link, + peer_resource_group_name, + peer_subscription_id, + peer_tenant_id, + peer_vnet_name, + peer_vnet_region, + peering_id, + timeouts=null, + _meta={} + ):: tf.withResource( + type='hcp_azure_peering_connection', + label=resourceLabel, + attrs=self.newAttrs( + hvn_link=hvn_link, + peer_resource_group_name=peer_resource_group_name, + peer_subscription_id=peer_subscription_id, + peer_tenant_id=peer_tenant_id, + peer_vnet_name=peer_vnet_name, + peer_vnet_region=peer_vnet_region, + peering_id=peering_id, + timeouts=timeouts + ), + _meta=_meta + ), + newAttrs( + hvn_link, + peer_resource_group_name, + peer_subscription_id, + peer_tenant_id, + peer_vnet_name, + peer_vnet_region, + peering_id, + timeouts=null + ):: std.prune(a={ + hvn_link: hvn_link, + peer_resource_group_name: peer_resource_group_name, + peer_subscription_id: peer_subscription_id, + peer_tenant_id: peer_tenant_id, + peer_vnet_name: peer_vnet_name, + peer_vnet_region: peer_vnet_region, + peering_id: peering_id, + timeouts: timeouts, + }), + timeouts:: { + new( + create=null, + default=null, + delete=null + ):: std.prune(a={ + create: create, + default: default, + delete: delete, + }), + }, + withHvnLink(resourceLabel, value):: { + resource+: { + hcp_azure_peering_connection+: { + [resourceLabel]+: { + hvn_link: value, + }, + }, + }, + }, + withPeerResourceGroupName(resourceLabel, value):: { + resource+: { + hcp_azure_peering_connection+: { + [resourceLabel]+: { + peer_resource_group_name: value, + }, + }, + }, + }, + withPeerSubscriptionId(resourceLabel, value):: { + resource+: { + hcp_azure_peering_connection+: { + [resourceLabel]+: { + peer_subscription_id: value, + }, + }, + }, + }, + withPeerTenantId(resourceLabel, value):: { + resource+: { + hcp_azure_peering_connection+: { + [resourceLabel]+: { + peer_tenant_id: value, + }, + }, + }, + }, + withPeerVnetName(resourceLabel, value):: { + resource+: { + hcp_azure_peering_connection+: { + [resourceLabel]+: { + peer_vnet_name: value, + }, + }, + }, + }, + withPeerVnetRegion(resourceLabel, value):: { + resource+: { + hcp_azure_peering_connection+: { + [resourceLabel]+: { + peer_vnet_region: value, + }, + }, + }, + }, + withPeeringId(resourceLabel, value):: { + resource+: { + hcp_azure_peering_connection+: { + [resourceLabel]+: { + peering_id: value, + }, + }, + }, + }, + withTimeouts(resourceLabel, value):: { + resource+: { + hcp_azure_peering_connection+: { + [resourceLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(resourceLabel, value):: { + resource+: { + hcp_azure_peering_connection+: { + [resourceLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resource_boundary_cluster.libsonnet b/0.x/_gen/resource_boundary_cluster.libsonnet new file mode 100644 index 0000000..a4a7877 --- /dev/null +++ b/0.x/_gen/resource_boundary_cluster.libsonnet @@ -0,0 +1,88 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + resourceLabel, + cluster_id, + password, + username, + timeouts=null, + _meta={} + ):: tf.withResource( + type='hcp_boundary_cluster', + label=resourceLabel, + attrs=self.newAttrs( + cluster_id=cluster_id, + password=password, + timeouts=timeouts, + username=username + ), + _meta=_meta + ), + newAttrs( + cluster_id, + password, + username, + timeouts=null + ):: std.prune(a={ + cluster_id: cluster_id, + password: password, + timeouts: timeouts, + username: username, + }), + timeouts:: { + new( + create=null, + default=null, + delete=null + ):: std.prune(a={ + create: create, + default: default, + delete: delete, + }), + }, + withClusterId(resourceLabel, value):: { + resource+: { + hcp_boundary_cluster+: { + [resourceLabel]+: { + cluster_id: value, + }, + }, + }, + }, + withPassword(resourceLabel, value):: { + resource+: { + hcp_boundary_cluster+: { + [resourceLabel]+: { + password: value, + }, + }, + }, + }, + withTimeouts(resourceLabel, value):: { + resource+: { + hcp_boundary_cluster+: { + [resourceLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(resourceLabel, value):: { + resource+: { + hcp_boundary_cluster+: { + [resourceLabel]+: { + timeouts+: value, + }, + }, + }, + }, + withUsername(resourceLabel, value):: { + resource+: { + hcp_boundary_cluster+: { + [resourceLabel]+: { + username: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resource_consul_cluster.libsonnet b/0.x/_gen/resource_consul_cluster.libsonnet new file mode 100644 index 0000000..f47b000 --- /dev/null +++ b/0.x/_gen/resource_consul_cluster.libsonnet @@ -0,0 +1,181 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + resourceLabel, + cluster_id, + hvn_id, + tier, + auto_hvn_to_hvn_peering=null, + connect_enabled=null, + datacenter=null, + min_consul_version=null, + primary_link=null, + public_endpoint=null, + size=null, + timeouts=null, + _meta={} + ):: tf.withResource( + type='hcp_consul_cluster', + label=resourceLabel, + attrs=self.newAttrs( + auto_hvn_to_hvn_peering=auto_hvn_to_hvn_peering, + cluster_id=cluster_id, + connect_enabled=connect_enabled, + datacenter=datacenter, + hvn_id=hvn_id, + min_consul_version=min_consul_version, + primary_link=primary_link, + public_endpoint=public_endpoint, + size=size, + tier=tier, + timeouts=timeouts + ), + _meta=_meta + ), + newAttrs( + cluster_id, + hvn_id, + tier, + auto_hvn_to_hvn_peering=null, + connect_enabled=null, + datacenter=null, + min_consul_version=null, + primary_link=null, + public_endpoint=null, + size=null, + timeouts=null + ):: std.prune(a={ + auto_hvn_to_hvn_peering: auto_hvn_to_hvn_peering, + cluster_id: cluster_id, + connect_enabled: connect_enabled, + datacenter: datacenter, + hvn_id: hvn_id, + min_consul_version: min_consul_version, + primary_link: primary_link, + public_endpoint: public_endpoint, + size: size, + tier: tier, + timeouts: timeouts, + }), + timeouts:: { + new( + create=null, + default=null, + delete=null, + update=null + ):: std.prune(a={ + create: create, + default: default, + delete: delete, + update: update, + }), + }, + withAutoHvnToHvnPeering(resourceLabel, value):: { + resource+: { + hcp_consul_cluster+: { + [resourceLabel]+: { + auto_hvn_to_hvn_peering: value, + }, + }, + }, + }, + withClusterId(resourceLabel, value):: { + resource+: { + hcp_consul_cluster+: { + [resourceLabel]+: { + cluster_id: value, + }, + }, + }, + }, + withConnectEnabled(resourceLabel, value):: { + resource+: { + hcp_consul_cluster+: { + [resourceLabel]+: { + connect_enabled: value, + }, + }, + }, + }, + withDatacenter(resourceLabel, value):: { + resource+: { + hcp_consul_cluster+: { + [resourceLabel]+: { + datacenter: value, + }, + }, + }, + }, + withHvnId(resourceLabel, value):: { + resource+: { + hcp_consul_cluster+: { + [resourceLabel]+: { + hvn_id: value, + }, + }, + }, + }, + withMinConsulVersion(resourceLabel, value):: { + resource+: { + hcp_consul_cluster+: { + [resourceLabel]+: { + min_consul_version: value, + }, + }, + }, + }, + withPrimaryLink(resourceLabel, value):: { + resource+: { + hcp_consul_cluster+: { + [resourceLabel]+: { + primary_link: value, + }, + }, + }, + }, + withPublicEndpoint(resourceLabel, value):: { + resource+: { + hcp_consul_cluster+: { + [resourceLabel]+: { + public_endpoint: value, + }, + }, + }, + }, + withSize(resourceLabel, value):: { + resource+: { + hcp_consul_cluster+: { + [resourceLabel]+: { + size: value, + }, + }, + }, + }, + withTier(resourceLabel, value):: { + resource+: { + hcp_consul_cluster+: { + [resourceLabel]+: { + tier: value, + }, + }, + }, + }, + withTimeouts(resourceLabel, value):: { + resource+: { + hcp_consul_cluster+: { + [resourceLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(resourceLabel, value):: { + resource+: { + hcp_consul_cluster+: { + [resourceLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resource_consul_cluster_root_token.libsonnet b/0.x/_gen/resource_consul_cluster_root_token.libsonnet new file mode 100644 index 0000000..2757740 --- /dev/null +++ b/0.x/_gen/resource_consul_cluster_root_token.libsonnet @@ -0,0 +1,55 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + resourceLabel, + cluster_id, + timeouts=null, + _meta={} + ):: tf.withResource( + type='hcp_consul_cluster_root_token', + label=resourceLabel, + attrs=self.newAttrs(cluster_id=cluster_id, timeouts=timeouts), + _meta=_meta + ), + newAttrs( + cluster_id, + timeouts=null + ):: std.prune(a={ + cluster_id: cluster_id, + timeouts: timeouts, + }), + timeouts:: { + new( + default=null + ):: std.prune(a={ + default: default, + }), + }, + withClusterId(resourceLabel, value):: { + resource+: { + hcp_consul_cluster_root_token+: { + [resourceLabel]+: { + cluster_id: value, + }, + }, + }, + }, + withTimeouts(resourceLabel, value):: { + resource+: { + hcp_consul_cluster_root_token+: { + [resourceLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(resourceLabel, value):: { + resource+: { + hcp_consul_cluster_root_token+: { + [resourceLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resource_consul_snapshot.libsonnet b/0.x/_gen/resource_consul_snapshot.libsonnet new file mode 100644 index 0000000..55c7973 --- /dev/null +++ b/0.x/_gen/resource_consul_snapshot.libsonnet @@ -0,0 +1,73 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + resourceLabel, + cluster_id, + snapshot_name, + timeouts=null, + _meta={} + ):: tf.withResource( + type='hcp_consul_snapshot', + label=resourceLabel, + attrs=self.newAttrs(cluster_id=cluster_id, snapshot_name=snapshot_name, timeouts=timeouts), + _meta=_meta + ), + newAttrs( + cluster_id, + snapshot_name, + timeouts=null + ):: std.prune(a={ + cluster_id: cluster_id, + snapshot_name: snapshot_name, + timeouts: timeouts, + }), + timeouts:: { + new( + create=null, + default=null, + delete=null, + update=null + ):: std.prune(a={ + create: create, + default: default, + delete: delete, + update: update, + }), + }, + withClusterId(resourceLabel, value):: { + resource+: { + hcp_consul_snapshot+: { + [resourceLabel]+: { + cluster_id: value, + }, + }, + }, + }, + withSnapshotName(resourceLabel, value):: { + resource+: { + hcp_consul_snapshot+: { + [resourceLabel]+: { + snapshot_name: value, + }, + }, + }, + }, + withTimeouts(resourceLabel, value):: { + resource+: { + hcp_consul_snapshot+: { + [resourceLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(resourceLabel, value):: { + resource+: { + hcp_consul_snapshot+: { + [resourceLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resource_hvn.libsonnet b/0.x/_gen/resource_hvn.libsonnet new file mode 100644 index 0000000..fb4610a --- /dev/null +++ b/0.x/_gen/resource_hvn.libsonnet @@ -0,0 +1,101 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + resourceLabel, + cloud_provider, + hvn_id, + region, + cidr_block=null, + timeouts=null, + _meta={} + ):: tf.withResource( + type='hcp_hvn', + label=resourceLabel, + attrs=self.newAttrs( + cidr_block=cidr_block, + cloud_provider=cloud_provider, + hvn_id=hvn_id, + region=region, + timeouts=timeouts + ), + _meta=_meta + ), + newAttrs( + cloud_provider, + hvn_id, + region, + cidr_block=null, + timeouts=null + ):: std.prune(a={ + cidr_block: cidr_block, + cloud_provider: cloud_provider, + hvn_id: hvn_id, + region: region, + timeouts: timeouts, + }), + timeouts:: { + new( + create=null, + default=null, + delete=null + ):: std.prune(a={ + create: create, + default: default, + delete: delete, + }), + }, + withCidrBlock(resourceLabel, value):: { + resource+: { + hcp_hvn+: { + [resourceLabel]+: { + cidr_block: value, + }, + }, + }, + }, + withCloudProvider(resourceLabel, value):: { + resource+: { + hcp_hvn+: { + [resourceLabel]+: { + cloud_provider: value, + }, + }, + }, + }, + withHvnId(resourceLabel, value):: { + resource+: { + hcp_hvn+: { + [resourceLabel]+: { + hvn_id: value, + }, + }, + }, + }, + withRegion(resourceLabel, value):: { + resource+: { + hcp_hvn+: { + [resourceLabel]+: { + region: value, + }, + }, + }, + }, + withTimeouts(resourceLabel, value):: { + resource+: { + hcp_hvn+: { + [resourceLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(resourceLabel, value):: { + resource+: { + hcp_hvn+: { + [resourceLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resource_hvn_peering_connection.libsonnet b/0.x/_gen/resource_hvn_peering_connection.libsonnet new file mode 100644 index 0000000..1df1d6a --- /dev/null +++ b/0.x/_gen/resource_hvn_peering_connection.libsonnet @@ -0,0 +1,71 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + resourceLabel, + hvn_1, + hvn_2, + timeouts=null, + _meta={} + ):: tf.withResource( + type='hcp_hvn_peering_connection', + label=resourceLabel, + attrs=self.newAttrs(hvn_1=hvn_1, hvn_2=hvn_2, timeouts=timeouts), + _meta=_meta + ), + newAttrs( + hvn_1, + hvn_2, + timeouts=null + ):: std.prune(a={ + hvn_1: hvn_1, + hvn_2: hvn_2, + timeouts: timeouts, + }), + timeouts:: { + new( + create=null, + default=null, + delete=null + ):: std.prune(a={ + create: create, + default: default, + delete: delete, + }), + }, + withHvn1(resourceLabel, value):: { + resource+: { + hcp_hvn_peering_connection+: { + [resourceLabel]+: { + hvn_1: value, + }, + }, + }, + }, + withHvn2(resourceLabel, value):: { + resource+: { + hcp_hvn_peering_connection+: { + [resourceLabel]+: { + hvn_2: value, + }, + }, + }, + }, + withTimeouts(resourceLabel, value):: { + resource+: { + hcp_hvn_peering_connection+: { + [resourceLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(resourceLabel, value):: { + resource+: { + hcp_hvn_peering_connection+: { + [resourceLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resource_hvn_route.libsonnet b/0.x/_gen/resource_hvn_route.libsonnet new file mode 100644 index 0000000..90040af --- /dev/null +++ b/0.x/_gen/resource_hvn_route.libsonnet @@ -0,0 +1,101 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + resourceLabel, + destination_cidr, + hvn_link, + hvn_route_id, + target_link, + timeouts=null, + _meta={} + ):: tf.withResource( + type='hcp_hvn_route', + label=resourceLabel, + attrs=self.newAttrs( + destination_cidr=destination_cidr, + hvn_link=hvn_link, + hvn_route_id=hvn_route_id, + target_link=target_link, + timeouts=timeouts + ), + _meta=_meta + ), + newAttrs( + destination_cidr, + hvn_link, + hvn_route_id, + target_link, + timeouts=null + ):: std.prune(a={ + destination_cidr: destination_cidr, + hvn_link: hvn_link, + hvn_route_id: hvn_route_id, + target_link: target_link, + timeouts: timeouts, + }), + timeouts:: { + new( + create=null, + default=null, + delete=null + ):: std.prune(a={ + create: create, + default: default, + delete: delete, + }), + }, + withDestinationCidr(resourceLabel, value):: { + resource+: { + hcp_hvn_route+: { + [resourceLabel]+: { + destination_cidr: value, + }, + }, + }, + }, + withHvnLink(resourceLabel, value):: { + resource+: { + hcp_hvn_route+: { + [resourceLabel]+: { + hvn_link: value, + }, + }, + }, + }, + withHvnRouteId(resourceLabel, value):: { + resource+: { + hcp_hvn_route+: { + [resourceLabel]+: { + hvn_route_id: value, + }, + }, + }, + }, + withTargetLink(resourceLabel, value):: { + resource+: { + hcp_hvn_route+: { + [resourceLabel]+: { + target_link: value, + }, + }, + }, + }, + withTimeouts(resourceLabel, value):: { + resource+: { + hcp_hvn_route+: { + [resourceLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(resourceLabel, value):: { + resource+: { + hcp_hvn_route+: { + [resourceLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resource_vault_cluster.libsonnet b/0.x/_gen/resource_vault_cluster.libsonnet new file mode 100644 index 0000000..2ed2829 --- /dev/null +++ b/0.x/_gen/resource_vault_cluster.libsonnet @@ -0,0 +1,257 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + audit_log_config:: { + new( + datadog_api_key=null, + datadog_region=null, + grafana_endpoint=null, + grafana_password=null, + grafana_user=null, + splunk_hecendpoint=null, + splunk_token=null + ):: std.prune(a={ + datadog_api_key: datadog_api_key, + datadog_region: datadog_region, + grafana_endpoint: grafana_endpoint, + grafana_password: grafana_password, + grafana_user: grafana_user, + splunk_hecendpoint: splunk_hecendpoint, + splunk_token: splunk_token, + }), + }, + major_version_upgrade_config:: { + new( + upgrade_type, + maintenance_window_day=null, + maintenance_window_time=null + ):: std.prune(a={ + maintenance_window_day: maintenance_window_day, + maintenance_window_time: maintenance_window_time, + upgrade_type: upgrade_type, + }), + }, + metrics_config:: { + new( + datadog_api_key=null, + datadog_region=null, + grafana_endpoint=null, + grafana_password=null, + grafana_user=null, + splunk_hecendpoint=null, + splunk_token=null + ):: std.prune(a={ + datadog_api_key: datadog_api_key, + datadog_region: datadog_region, + grafana_endpoint: grafana_endpoint, + grafana_password: grafana_password, + grafana_user: grafana_user, + splunk_hecendpoint: splunk_hecendpoint, + splunk_token: splunk_token, + }), + }, + new( + resourceLabel, + cluster_id, + hvn_id, + audit_log_config=null, + major_version_upgrade_config=null, + metrics_config=null, + min_vault_version=null, + paths_filter=null, + primary_link=null, + public_endpoint=null, + tier=null, + timeouts=null, + _meta={} + ):: tf.withResource( + type='hcp_vault_cluster', + label=resourceLabel, + attrs=self.newAttrs( + audit_log_config=audit_log_config, + cluster_id=cluster_id, + hvn_id=hvn_id, + major_version_upgrade_config=major_version_upgrade_config, + metrics_config=metrics_config, + min_vault_version=min_vault_version, + paths_filter=paths_filter, + primary_link=primary_link, + public_endpoint=public_endpoint, + tier=tier, + timeouts=timeouts + ), + _meta=_meta + ), + newAttrs( + cluster_id, + hvn_id, + audit_log_config=null, + major_version_upgrade_config=null, + metrics_config=null, + min_vault_version=null, + paths_filter=null, + primary_link=null, + public_endpoint=null, + tier=null, + timeouts=null + ):: std.prune(a={ + audit_log_config: audit_log_config, + cluster_id: cluster_id, + hvn_id: hvn_id, + major_version_upgrade_config: major_version_upgrade_config, + metrics_config: metrics_config, + min_vault_version: min_vault_version, + paths_filter: paths_filter, + primary_link: primary_link, + public_endpoint: public_endpoint, + tier: tier, + timeouts: timeouts, + }), + timeouts:: { + new( + create=null, + default=null, + delete=null, + update=null + ):: std.prune(a={ + create: create, + default: default, + delete: delete, + update: update, + }), + }, + withAuditLogConfig(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + audit_log_config: value, + }, + }, + }, + }, + withAuditLogConfigMixin(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + audit_log_config+: if std.isArray(v=value) then value else [value], + }, + }, + }, + }, + withClusterId(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + cluster_id: value, + }, + }, + }, + }, + withHvnId(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + hvn_id: value, + }, + }, + }, + }, + withMajorVersionUpgradeConfig(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + major_version_upgrade_config: value, + }, + }, + }, + }, + withMajorVersionUpgradeConfigMixin(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + major_version_upgrade_config+: if std.isArray(v=value) then value else [value], + }, + }, + }, + }, + withMetricsConfig(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + metrics_config: value, + }, + }, + }, + }, + withMetricsConfigMixin(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + metrics_config+: if std.isArray(v=value) then value else [value], + }, + }, + }, + }, + withMinVaultVersion(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + min_vault_version: value, + }, + }, + }, + }, + withPathsFilter(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + paths_filter: value, + }, + }, + }, + }, + withPrimaryLink(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + primary_link: value, + }, + }, + }, + }, + withPublicEndpoint(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + public_endpoint: value, + }, + }, + }, + }, + withTier(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + tier: value, + }, + }, + }, + }, + withTimeouts(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(resourceLabel, value):: { + resource+: { + hcp_vault_cluster+: { + [resourceLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/_gen/resource_vault_cluster_admin_token.libsonnet b/0.x/_gen/resource_vault_cluster_admin_token.libsonnet new file mode 100644 index 0000000..6f5a43d --- /dev/null +++ b/0.x/_gen/resource_vault_cluster_admin_token.libsonnet @@ -0,0 +1,59 @@ +local tf = (import 'github.com/tf-libsonnet/core/main.libsonnet'); +{ + new( + resourceLabel, + cluster_id, + timeouts=null, + _meta={} + ):: tf.withResource( + type='hcp_vault_cluster_admin_token', + label=resourceLabel, + attrs=self.newAttrs(cluster_id=cluster_id, timeouts=timeouts), + _meta=_meta + ), + newAttrs( + cluster_id, + timeouts=null + ):: std.prune(a={ + cluster_id: cluster_id, + timeouts: timeouts, + }), + timeouts:: { + new( + create=null, + delete=null, + read=null + ):: std.prune(a={ + create: create, + delete: delete, + read: read, + }), + }, + withClusterId(resourceLabel, value):: { + resource+: { + hcp_vault_cluster_admin_token+: { + [resourceLabel]+: { + cluster_id: value, + }, + }, + }, + }, + withTimeouts(resourceLabel, value):: { + resource+: { + hcp_vault_cluster_admin_token+: { + [resourceLabel]+: { + timeouts: value, + }, + }, + }, + }, + withTimeoutsMixin(resourceLabel, value):: { + resource+: { + hcp_vault_cluster_admin_token+: { + [resourceLabel]+: { + timeouts+: value, + }, + }, + }, + }, +} diff --git a/0.x/main.libsonnet b/0.x/main.libsonnet new file mode 100644 index 0000000..be0ee06 --- /dev/null +++ b/0.x/main.libsonnet @@ -0,0 +1 @@ +(import '_gen/main.libsonnet')