Skip to content

Commit

Permalink
Add generator support for HCP (#1)
Browse files Browse the repository at this point in the history
Signed-off-by: tflibsonnet-ci <[email protected]>
Co-authored-by: yorinasub17 <[email protected]>
  • Loading branch information
tflibsonnet-ci and yorinasub17 committed Dec 16, 2022
1 parent 7b55bb5 commit a95a497
Show file tree
Hide file tree
Showing 30 changed files with 2,516 additions and 0 deletions.
84 changes: 84 additions & 0 deletions 0.x/_gen/data_aws_network_peering.libsonnet
Original file line number Diff line number Diff line change
@@ -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,
},
},
},
},
}
84 changes: 84 additions & 0 deletions 0.x/_gen/data_aws_transit_gateway_attachment.libsonnet
Original file line number Diff line number Diff line change
@@ -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,
},
},
},
},
}
84 changes: 84 additions & 0 deletions 0.x/_gen/data_azure_peering_connection.libsonnet
Original file line number Diff line number Diff line change
@@ -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,
},
},
},
},
}
55 changes: 55 additions & 0 deletions 0.x/_gen/data_boundary_cluster.libsonnet
Original file line number Diff line number Diff line change
@@ -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,
},
},
},
},
}
84 changes: 84 additions & 0 deletions 0.x/_gen/data_consul_agent_helm_config.libsonnet
Original file line number Diff line number Diff line change
@@ -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,
},
},
},
},
}
Loading

0 comments on commit a95a497

Please sign in to comment.