From 468a301d900581e6fbe34bfe6cf64bc92727b35f Mon Sep 17 00:00:00 2001 From: rawdaGastan Date: Sun, 22 Sep 2024 23:15:12 +0300 Subject: [PATCH] add docs to resources --- .golangci.yml | 1 - docs/_index.md | 50 +- examples/go/kubernetes/main.go | 16 +- examples/go/virtual_machine/main.go | 2 +- examples/nodejs/kubernetes/index.ts | 6 +- examples/nodejs/virtual_machine/index.ts | 2 +- examples/python/kubernetes/__main__.py | 6 +- examples/python/virtual_machine/__main__.py | 2 +- examples/yaml/kubernetes/Pulumi.yaml | 6 +- examples/yaml/multiple_vms/Pulumi.yaml | 6 +- examples/yaml/virtual_machine/Pulumi.yaml | 2 +- provider/annotations.go | 247 ++++++ .../cmd/pulumi-resource-threefold/schema.json | 641 ++++++++++----- provider/deployment_parser.go | 6 +- provider/deployment_parser_test.go | 2 +- provider/deployment_resource.go | 12 - provider/gateway_fqdn_resource.go | 6 - provider/gateway_name_parser.go | 4 +- provider/gateway_name_parser_test.go | 4 +- provider/gateway_name_resource.go | 8 +- provider/k8s_parser.go | 88 +- provider/k8s_parser_test.go | 28 +- provider/k8s_resource.go | 23 +- provider/network_resource.go | 6 - provider/provider.go | 33 +- sdk/go/threefold/config/config.go | 14 +- sdk/go/threefold/deployment.go | 106 ++- sdk/go/threefold/gatewayFQDN.go | 86 +- sdk/go/threefold/gatewayName.go | 88 +- sdk/go/threefold/kubernetes.go | 82 +- sdk/go/threefold/network.go | 96 ++- sdk/go/threefold/provider.go | 27 +- sdk/go/threefold/pulumiTypes.go | 772 +++++++++++------- sdk/nodejs/config/vars.ts | 30 +- sdk/nodejs/deployment.ts | 63 ++ sdk/nodejs/gatewayFQDN.ts | 54 ++ sdk/nodejs/gatewayName.ts | 62 +- sdk/nodejs/kubernetes.ts | 52 +- sdk/nodejs/network.ts | 66 ++ sdk/nodejs/provider.ts | 22 +- sdk/nodejs/types/input.ts | 235 +++++- sdk/nodejs/types/output.ts | 278 ++++++- sdk/python/pulumi_threefold/_inputs.py | 455 ++++++++++- .../pulumi_threefold/config/__init__.pyi | 14 +- sdk/python/pulumi_threefold/config/vars.py | 18 +- sdk/python/pulumi_threefold/deployment.py | 81 ++ sdk/python/pulumi_threefold/gateway_fqdn.py | 70 ++ sdk/python/pulumi_threefold/gateway_name.py | 96 ++- sdk/python/pulumi_threefold/kubernetes.py | 64 +- sdk/python/pulumi_threefold/network.py | 82 ++ sdk/python/pulumi_threefold/outputs.py | 510 ++++++++++-- sdk/python/pulumi_threefold/provider.py | 72 +- tests/examples/kubernetes/Pulumi.yaml | 6 +- tests/examples/virtual_machine/Pulumi.yaml | 2 +- 54 files changed, 3807 insertions(+), 1003 deletions(-) create mode 100644 provider/annotations.go diff --git a/.golangci.yml b/.golangci.yml index 1f8cf7bd..6c6b9abf 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,7 +5,6 @@ linters: - gofmt - govet - ineffassign - - lll - misspell - nakedret - unconvert diff --git a/docs/_index.md b/docs/_index.md index 8076587a..4982f16b 100644 --- a/docs/_index.md +++ b/docs/_index.md @@ -229,7 +229,7 @@ func main() { Mycelium: pulumi.Bool(true), Mounts: threefold.MountArray{ &threefold.MountArgs{ - Disk_name: pulumi.String("data"), + Name: pulumi.String("data"), Mount_point: pulumi.String("/app"), }, }, @@ -300,7 +300,7 @@ deployment = threefold.Deployment("deployment", memory=256, #MB mycelium=True, mounts=[threefold.MountArgs( - disk_name="data", + name="data", mount_point="/app", )], env_vars={ @@ -379,7 +379,7 @@ resources: planetary: true mycelium: true mounts: - - disk_name: data + - name: data mount_point: /app env_vars: SSH_KEY: @@ -434,7 +434,7 @@ const deployment = new threefold.Deployment("deployment", { planetary: true, mycelium: true, mounts: [{ - disk_name: "data", + name: "data", mount_point: "/app", }], env_vars: { @@ -510,22 +510,24 @@ func main() { } kubernetes, err := threefold.NewKubernetes(ctx, "kubernetes", &threefold.KubernetesArgs{ Master: &threefold.K8sNodeInputArgs{ - Name: pulumi.String("kubernetes"), - Network_name: pulumi.String("test"), - Node: scheduler.Nodes.ApplyT(func(nodes []int) (int, error) { - return nodes[0], nil - }).(pulumi.IntOutput), + VMInput: &threefold.VMInput{ + Name: pulumi.String("kubernetes"), + Network_name: pulumi.String("test"), + NodeID: scheduler.Nodes.ApplyT(func(nodes []int) (int, error) { + return nodes[0], nil + }).(pulumi.IntOutput), + Planetary: pulumi.Bool(true), + Mycelium: pulumi.Bool(true), + Cpu: pulumi.Int(2), + Memory: pulumi.Int(2048), + }, Disk_size: pulumi.Int(2), - Planetary: pulumi.Bool(true), - Mycelium: pulumi.Bool(true), - Cpu: pulumi.Int(2), - Memory: pulumi.Int(2048), }, Workers: threefold.K8sNodeInputArray{ &threefold.K8sNodeInputArgs{ Name: pulumi.String("worker1"), Network_name: pulumi.String("test"), - Node: scheduler.Nodes.ApplyT(func(nodes []int) (int, error) { + Node_id: scheduler.Nodes.ApplyT(func(nodes []int) (int, error) { return nodes[0], nil }).(pulumi.IntOutput), Disk_size: pulumi.Int(2), @@ -535,7 +537,7 @@ func main() { &threefold.K8sNodeInputArgs{ Name: pulumi.String("worker2"), Network_name: pulumi.String("test"), - Node: scheduler.Nodes.ApplyT(func(nodes []int) (int, error) { + Node_id: scheduler.Nodes.ApplyT(func(nodes []int) (int, error) { return nodes[0], nil }).(pulumi.IntOutput), Disk_size: pulumi.Int(2), @@ -594,7 +596,7 @@ kubernetes = threefold.Kubernetes("kubernetes", master=threefold.K8sNodeInputArgs( name="kubernetes", network_name="example", - node=scheduler.nodes[0], + node_id=scheduler.nodes[0], disk_size=2, planetary=True, mycelium=True, @@ -605,7 +607,7 @@ kubernetes = threefold.Kubernetes("kubernetes", threefold.K8sNodeInputArgs( name="worker1", network_name="example", - node=scheduler.nodes[0], + node_id=scheduler.nodes[0], disk_size=2, cpu=2, memory=2048, @@ -613,7 +615,7 @@ kubernetes = threefold.Kubernetes("kubernetes", threefold.K8sNodeInputArgs( name="worker2", network_name="example", - node=scheduler.nodes[0], + node_id=scheduler.nodes[0], disk_size=2, cpu=2, memory=2048, @@ -678,7 +680,7 @@ resources: master: name: kubernetes network_name: test - node: ${scheduler.nodes[0]} + node_id: ${scheduler.nodes[0]} disk_size: 2 planetary: true mycelium: true @@ -688,14 +690,14 @@ resources: workers: - name: worker1 network_name: test - node: ${scheduler.nodes[0]} + node_id: ${scheduler.nodes[0]} disk_size: 2 cpu: 2 memory: 2048 mycelium: true - name: worker2 network_name: test - node: ${scheduler.nodes[0]} + node_id: ${scheduler.nodes[0]} disk_size: 2 cpu: 2 memory: 2048 @@ -740,7 +742,7 @@ const kubernetes = new threefold.Kubernetes("kubernetes", { master: { name: "kubernetes", network_name: "test", - node: scheduler.nodes[0], + node_id: scheduler.nodes[0], disk_size: 2, planetary: true, mycelium: true, @@ -751,7 +753,7 @@ const kubernetes = new threefold.Kubernetes("kubernetes", { { name: "worker1", network_name: "test", - node: scheduler.nodes[0], + node_id: scheduler.nodes[0], disk_size: 2, cpu: 2, memory: 2048, @@ -760,7 +762,7 @@ const kubernetes = new threefold.Kubernetes("kubernetes", { { name: "worker2", network_name: "test", - node: scheduler.nodes[0], + node_id: scheduler.nodes[0], disk_size: 2, cpu: 2, memory: 2048, diff --git a/examples/go/kubernetes/main.go b/examples/go/kubernetes/main.go index ba7ce30c..f12aae86 100644 --- a/examples/go/kubernetes/main.go +++ b/examples/go/kubernetes/main.go @@ -45,35 +45,35 @@ func main() { Master: &threefold.K8sNodeInputArgs{ Name: pulumi.String("kubernetes"), Network_name: pulumi.String("test"), - Node: scheduler.Nodes.ApplyT(func(nodes []int) (int, error) { + Node_id: scheduler.Nodes.ApplyT(func(nodes []int) (int, error) { return nodes[0], nil }).(pulumi.IntOutput), - Disk_size: pulumi.Int(2), Planetary: pulumi.Bool(true), Mycelium: pulumi.Bool(true), Cpu: pulumi.Int(2), Memory: pulumi.Int(2048), + Disk_size: pulumi.Int(2), }, Workers: threefold.K8sNodeInputArray{ &threefold.K8sNodeInputArgs{ Name: pulumi.String("worker1"), Network_name: pulumi.String("test"), - Node: scheduler.Nodes.ApplyT(func(nodes []int) (int, error) { + Node_id: scheduler.Nodes.ApplyT(func(nodes []int) (int, error) { return nodes[0], nil }).(pulumi.IntOutput), - Disk_size: pulumi.Int(2), Cpu: pulumi.Int(2), Memory: pulumi.Int(2048), + Disk_size: pulumi.Int(2), }, &threefold.K8sNodeInputArgs{ Name: pulumi.String("worker2"), Network_name: pulumi.String("test"), - Node: scheduler.Nodes.ApplyT(func(nodes []int) (int, error) { + Node_id: scheduler.Nodes.ApplyT(func(nodes []int) (int, error) { return nodes[0], nil }).(pulumi.IntOutput), - Disk_size: pulumi.Int(2), Cpu: pulumi.Int(2), Memory: pulumi.Int(2048), + Disk_size: pulumi.Int(2), }, }, Token: pulumi.String("t123456789"), @@ -86,10 +86,10 @@ func main() { return err } ctx.Export("node_deployment_id", kubernetes.Node_deployment_id) - ctx.Export("planetary_ip", kubernetes.Master_computed.ApplyT(func(master_computed threefold.K8sNodeComputed) (*string, error) { + ctx.Export("planetary_ip", kubernetes.Master_computed.ApplyT(func(master_computed threefold.VMComputed) (*string, error) { return &master_computed.Planetary_ip, nil }).(pulumi.StringPtrOutput)) - ctx.Export("mycelium_ip", kubernetes.Master_computed.ApplyT(func(master_computed threefold.K8sNodeComputed) (*string, error) { + ctx.Export("mycelium_ip", kubernetes.Master_computed.ApplyT(func(master_computed threefold.VMComputed) (*string, error) { return &master_computed.Mycelium_ip, nil }).(pulumi.StringPtrOutput)) return nil diff --git a/examples/go/virtual_machine/main.go b/examples/go/virtual_machine/main.go index debd0850..199a0c65 100644 --- a/examples/go/virtual_machine/main.go +++ b/examples/go/virtual_machine/main.go @@ -62,7 +62,7 @@ func main() { Mycelium: pulumi.Bool(true), Mounts: threefold.MountArray{ &threefold.MountArgs{ - Disk_name: pulumi.String("data"), + Name: pulumi.String("data"), Mount_point: pulumi.String("/app"), }, }, diff --git a/examples/nodejs/kubernetes/index.ts b/examples/nodejs/kubernetes/index.ts index acdb2037..0d552ec4 100644 --- a/examples/nodejs/kubernetes/index.ts +++ b/examples/nodejs/kubernetes/index.ts @@ -22,7 +22,7 @@ const kubernetes = new threefold.Kubernetes("kubernetes", { master: { name: "kubernetes", network_name: "test", - node: scheduler.nodes[0], + node_id: scheduler.nodes[0], disk_size: 2, planetary: true, mycelium: true, @@ -33,7 +33,7 @@ const kubernetes = new threefold.Kubernetes("kubernetes", { { name: "worker1", network_name: "test", - node: scheduler.nodes[0], + node_id: scheduler.nodes[0], disk_size: 2, cpu: 2, memory: 2048, @@ -41,7 +41,7 @@ const kubernetes = new threefold.Kubernetes("kubernetes", { { name: "worker2", network_name: "test", - node: scheduler.nodes[0], + node_id: scheduler.nodes[0], disk_size: 2, cpu: 2, memory: 2048, diff --git a/examples/nodejs/virtual_machine/index.ts b/examples/nodejs/virtual_machine/index.ts index 520d03fa..a3f124b6 100644 --- a/examples/nodejs/virtual_machine/index.ts +++ b/examples/nodejs/virtual_machine/index.ts @@ -33,7 +33,7 @@ const deployment = new threefold.Deployment("deployment", { planetary: true, mycelium: true, mounts: [{ - disk_name: "data", + name: "data", mount_point: "/app", }], env_vars: { diff --git a/examples/python/kubernetes/__main__.py b/examples/python/kubernetes/__main__.py index 391de65b..8c3706bc 100644 --- a/examples/python/kubernetes/__main__.py +++ b/examples/python/kubernetes/__main__.py @@ -23,7 +23,7 @@ master=threefold.K8sNodeInputArgs( name="kubernetes", network_name="test", - node=scheduler.nodes[0], + node_id=scheduler.nodes[0], disk_size=2, planetary=True, mycelium=True, @@ -34,7 +34,7 @@ threefold.K8sNodeInputArgs( name="worker1", network_name="test", - node=scheduler.nodes[0], + node_id=scheduler.nodes[0], disk_size=2, cpu=2, memory=2048, @@ -43,7 +43,7 @@ threefold.K8sNodeInputArgs( name="worker2", network_name="test", - node=scheduler.nodes[0], + node_id=scheduler.nodes[0], disk_size=2, cpu=2, memory=2048, diff --git a/examples/python/virtual_machine/__main__.py b/examples/python/virtual_machine/__main__.py index 2d1fb385..d7e54bb9 100644 --- a/examples/python/virtual_machine/__main__.py +++ b/examples/python/virtual_machine/__main__.py @@ -31,7 +31,7 @@ memory=256, #MB mycelium=True, mounts=[threefold.MountArgs( - disk_name="data", + name="data", mount_point="/app", )], env_vars={ diff --git a/examples/yaml/kubernetes/Pulumi.yaml b/examples/yaml/kubernetes/Pulumi.yaml index 52a5954a..b2a8075b 100644 --- a/examples/yaml/kubernetes/Pulumi.yaml +++ b/examples/yaml/kubernetes/Pulumi.yaml @@ -48,7 +48,7 @@ resources: master: name: kubernetes network_name: test - node: ${scheduler.nodes[0]} + node_id: ${scheduler.nodes[0]} disk_size: 2 planetary: true mycelium: true @@ -58,14 +58,14 @@ resources: workers: - name: worker1 network_name: test - node: ${scheduler.nodes[0]} + node_id: ${scheduler.nodes[0]} disk_size: 2 cpu: 2 memory: 2048 mycelium: true - name: worker2 network_name: test - node: ${scheduler.nodes[0]} + node_id: ${scheduler.nodes[0]} disk_size: 2 cpu: 2 memory: 2048 diff --git a/examples/yaml/multiple_vms/Pulumi.yaml b/examples/yaml/multiple_vms/Pulumi.yaml index 9fb51602..612197e3 100644 --- a/examples/yaml/multiple_vms/Pulumi.yaml +++ b/examples/yaml/multiple_vms/Pulumi.yaml @@ -55,7 +55,7 @@ resources: mycelium: true # mycelium_ip_seed: b60f2b7ec39c # hex encoded 6 bytes [example] mounts: - - disk_name: data + - name: data mount_point: /app env_vars: SSH_KEY: @@ -70,7 +70,7 @@ resources: mycelium: true # mycelium_ip_seed: b60f2b7ec39c # hex encoded 6 bytes [example] mounts: - - disk_name: data + - name: data mount_point: /app env_vars: SSH_KEY: @@ -85,7 +85,7 @@ resources: mycelium: true # mycelium_ip_seed: b60f2b7ec39c # hex encoded 6 bytes [example] mounts: - - disk_name: data + - name: data mount_point: /app env_vars: SSH_KEY: diff --git a/examples/yaml/virtual_machine/Pulumi.yaml b/examples/yaml/virtual_machine/Pulumi.yaml index 61406c2c..5bb53dcf 100644 --- a/examples/yaml/virtual_machine/Pulumi.yaml +++ b/examples/yaml/virtual_machine/Pulumi.yaml @@ -56,7 +56,7 @@ resources: mycelium: true # mycelium_ip_seed: b60f2b7ec39c # hex encoded 6 bytes [example] mounts: - - disk_name: data + - name: data mount_point: /app env_vars: SSH_KEY: diff --git a/provider/annotations.go b/provider/annotations.go new file mode 100644 index 00000000..66fb6c61 --- /dev/null +++ b/provider/annotations.go @@ -0,0 +1,247 @@ +package provider + +import ( + "fmt" + + "github.com/pulumi/pulumi-go-provider/infer" +) + +// TODO: computed + +var _ = (infer.Annotated)((*NetworkArgs)(nil)) +var _ = (infer.Annotated)((*NetworkState)(nil)) + +func (n *NetworkArgs) Annotate(a infer.Annotator) { + a.SetDefault(&n.SolutionType, "Network") + + a.Describe(&n.Name, "The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported") + a.Describe(&n.Description, "The description of the network workload, optional with no restrictions") + a.Describe(&n.SolutionType, "The solution type of the network, displayed as project name in contract metadata") + a.Describe(&n.Nodes, "The nodes used to deploy the network on, shouldn't be empty") + a.Describe(&n.IPRange, "The IP range for the network, subnet should be 16") + a.Describe(&n.Mycelium, "A flag to generate a random mycelium key to support mycelium in the network") + a.Describe(&n.MyceliumKeys, "A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes") + a.Describe(&n.AddWGAccess, "A flag to support wireguard in the network") +} + +func (n *NetworkState) Annotate(a infer.Annotator) { + a.Describe(&n.MyceliumKeys, "A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes") + a.Describe(&n.AccessWGConfig, "Generated wireguard configuration for external user access to the network") + a.Describe(&n.ExternalIP, "Wireguard IP assigned for external user access") + a.Describe(&n.ExternalSK, "External user private key used in encryption while communicating through Wireguard network") + a.Describe(&n.PublicNodeID, "Public node id (in case it's added). Used for wireguard access and supporting hidden nodes") + a.Describe(&n.NodesIPRange, "Computed values of nodes' IP ranges after deployment") + a.Describe(&n.NodeDeploymentID, "Mapping from each node to its deployment id") +} + +var _ = (infer.Annotated)((*DeploymentArgs)(nil)) +var _ = (infer.Annotated)((*DeploymentState)(nil)) + +var _ = (infer.Annotated)((*Mount)(nil)) +var _ = (infer.Annotated)((*Zlog)(nil)) +var _ = (infer.Annotated)((*Metadata)(nil)) +var _ = (infer.Annotated)((*Backend)(nil)) +var _ = (infer.Annotated)((*Group)(nil)) +var _ = (infer.Annotated)((*Disk)(nil)) + +// var _ = (infer.Annotated)((*VMInput)(nil)) +var _ = (infer.Annotated)((*VMComputed)(nil)) +var _ = (infer.Annotated)((*ZDBInput)(nil)) +var _ = (infer.Annotated)((*ZDBComputed)(nil)) +var _ = (infer.Annotated)((*QSFSInput)(nil)) +var _ = (infer.Annotated)((*QSFSComputed)(nil)) + +func (d *DeploymentArgs) Annotate(a infer.Annotator) { + a.SetDefault(&d.SolutionType, fmt.Sprintf("vm/%s", d.Name)) + + a.Describe(&d.Name, "The name of the deployment, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported") + a.Describe(&d.NodeID, "The node ID to deploy on, required and should match the requested resources") + a.Describe(&d.NetworkName, "The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist") + a.Describe(&d.SolutionType, "The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata)") + a.Describe(&d.SolutionProvider, "ID for the deployed solution which allows the creator of the solution to gain a percentage of the rewards") + a.Describe(&d.Disks, "The disks requested to be included in the deployment") + a.Describe(&d.ZdbsInputs, "The zdbs requested to be included in the deployment") + a.Describe(&d.VmsInputs, "The vms requested to be included in the deployment") + a.Describe(&d.QSFSInputs, "The qsfs instances requested to be included in the deployment") +} + +func (d *DeploymentState) Annotate(a infer.Annotator) { + a.Describe(&d.NodeDeploymentID, "Mapping from each node to its deployment ID") + a.Describe(&d.ContractID, "The deployment ID") + a.Describe(&d.IPrange, "IP range of the node for the wireguard network (e.g. 10.1.2.0/24). Has to have a subnet mask of 24") + a.Describe(&d.ZdbsInputs, "The zdbs output requested to be included in the deployment") + a.Describe(&d.VmsInputs, "The vms output requested to be included in the deployment") + a.Describe(&d.QSFSInputs, "The qsfs output instances requested to be included in the deployment") +} + +func (v *VMInput) Annotate(a infer.Annotator) { + a.Describe(&v.Name, "The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported") + a.Describe(&v.NetworkName, "The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist") + a.Describe(&v.Description, "The description of the virtual machine workload, optional with no restrictions") + a.Describe(&v.NodeID, "The node ID to deploy the virtual machine on, required and should match the requested resources") + a.Describe(&v.Flist, "The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist") + a.Describe(&v.Entrypoint, "The entry point for the flist. Example: /sbin/zinit init") + a.Describe(&v.FlistChecksum, "The checksum of the flist which should match the checksum of the given flist, optional") + a.Describe(&v.CPU, "The cpu units needed for the virtual machine. Range in [1: 32]") + a.Describe(&v.Memory, "The memory capacity for the virtual machine in MB. Min is 250 MB") + a.Describe(&v.RootfsSize, "The root fs size in GB (type SSD). Can be set as 0 to get the default minimum") + a.Describe(&v.EnvVars, "The environment variables to be passed to the virtual machine. Example: SSH_KEY") + a.Describe(&v.GPUs, "A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f") + a.Describe(&v.Mounts, "A list of mounted disks or volumes") + a.Describe(&v.Zlogs, "A list of virtual machine loggers") + a.Describe(&v.Mycelium, "A flag to generate a random mycelium IP seed to support mycelium in the virtual machine") + a.Describe(&v.MyceliumIPSeed, "The seed used for mycelium IP generated for the virtual machine. It's length should be 6") + a.Describe(&v.Planetary, "A flag to enable generating a yggdrasil IP for the virtual machine") + a.Describe(&v.PublicIP, "A flag to enable generating a public IP for the virtual machine, public node is required for it") + a.Describe(&v.PublicIP6, "A flag to enable generating a public IPv6 for the virtual machine, public node is required for it") +} + +func (v *VMComputed) Annotate(a infer.Annotator) { + a.Describe(&v.MyceliumIPSeed, "The seed used for mycelium IP generated for the virtual machine. It's length should be 6") + a.Describe(&v.ComputedIP, "The reserved public ipv4 if any") + a.Describe(&v.ComputedIP6, "The reserved public ipv6 if any") + a.Describe(&v.PlanetaryIP, "The allocated Yggdrasil IP") + a.Describe(&v.MyceliumIP, "The allocated mycelium IP") + a.Describe(&v.ConsoleURL, "The url to access the vm via cloud console on private interface using wireguard") + a.Describe(&v.IP, "The private wireguard IP of the vm") +} + +func (m *Mount) Annotate(a infer.Annotator) { + a.Describe(&m.Name, "The name of the mounted disk/volume, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported") + a.Describe(&m.MountPoint, "The mount point of the disk/volume") +} + +func (z *Zlog) Annotate(a infer.Annotator) { + a.Describe(&z.Zmachine, "The name of virtual machine, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported") + a.Describe(&z.Output, "The output logs URL, should be a valid url") +} + +func (z *ZDBInput) Annotate(a infer.Annotator) { + a.SetDefault(&z.Mode, "user", "") + + a.Describe(&z.Name, "The name of the 0-db workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported") + a.Describe(&z.Description, "The description of the 0-db workload, optional with no restrictions") + a.Describe(&z.Size, "The 0-db size in GB (type HDD)") + a.Describe(&z.Password, "The 0-db password") + a.Describe(&z.Public, "A flag to make 0-db namespace public - readable by anyone") + a.Describe(&z.Mode, "the enumeration of the modes 0-db can operate in (default user)") +} + +func (z *ZDBComputed) Annotate(a infer.Annotator) { + a.Describe(&z.IPs, "Computed IPs of the ZDB. Two IPs are returned: a public IPv6, and a YggIP, in this order") + a.Describe(&z.Port, "Port of the ZDB") + a.Describe(&z.Namespace, "Namespace of the ZDB") +} + +func (d *Disk) Annotate(a infer.Annotator) { + a.Describe(&d.Name, "The name of the disk workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported") + a.Describe(&d.Description, "The description of the disk workload, optional with no restrictions") + a.Describe(&d.Size, "The disk size in GB (type SSD)") +} + +func (q *QSFSInput) Annotate(a infer.Annotator) { + a.Describe(&q.Name, "The name of the qsfs workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported") + a.Describe(&q.Description, "The description of the qsfs workload, optional with no restrictions") + a.Describe(&q.Cache, "The size of the fuse mountpoint on the node in MBs (holds qsfs local data before pushing)") + a.Describe(&q.CompressionAlgorithm, "configuration to use for the compression stage. Currently only snappy is supported") + a.Describe(&q.EncryptionAlgorithm, "configuration to use for the encryption stage. Currently only AES is supported") + a.Describe(&q.EncryptionKey, "64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000)") + a.Describe(&q.Groups, "The backend groups to write the data to") + a.Describe(&q.MaxZDBDataDirSize, "Maximum size of the data dir in MiB, if this is set and the sum of the file sizes in the data dir gets higher than this value, the least used, already encoded file will be removed") + a.Describe(&q.Metadata, "List of ZDB backends configurations") + a.Describe(&q.MinimalShards, "The minimum amount of shards which are needed to recover the original data") + a.Describe(&q.ExpectedShards, "The amount of shards which are generated when the data is encoded. Essentially, this is the amount of shards which is needed to be able to recover the data, and some disposable shards which could be lost. The amount of disposable shards can be calculated as expected_shards - minimal_shards") + a.Describe(&q.RedundantGroups, "The amount of groups which one should be able to loose while still being able to recover the original data") + a.Describe(&q.RedundantNodes, "The amount of nodes that can be lost in every group while still being able to recover the original data") +} + +func (q *QSFSComputed) Annotate(a infer.Annotator) { + a.Describe(&q.MetricsEndpoint, "Exposed metrics endpoint") + +} +func (m *Metadata) Annotate(a infer.Annotator) { + a.Describe(&m.EncryptionAlgorithm, "configuration to use for the encryption stage. Currently only AES is supported") + a.Describe(&m.EncryptionKey, "64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000)") + a.Describe(&m.Prefix, "Data stored on the remote metadata is prefixed with") + a.Describe(&m.Type, "configuration for the metadata store to use, currently only ZDB is supported") + a.Describe(&m.Backends, "List of ZDB backends configurations") +} + +func (g *Group) Annotate(a infer.Annotator) { + a.Describe(&g.Backends, "List of ZDB backends configurations") +} + +func (b *Backend) Annotate(a infer.Annotator) { + a.Describe(&b.Address, "Address of backend ZDB (e.g. [300:a582:c60c:df75:f6da:8a92:d5ed:71ad]:9900 or 60.60.60.60:9900)") + a.Describe(&b.Namespace, "ZDB namespace") + a.Describe(&b.Password, "Namespace password") +} + +var _ = (infer.Annotated)((*KubernetesArgs)(nil)) +var _ = (infer.Annotated)((*KubernetesState)(nil)) +var _ = (infer.Annotated)((*K8sNodeInput)(nil)) + +func (k *KubernetesArgs) Annotate(a infer.Annotator) { + a.SetDefault(&k.SolutionType, fmt.Sprintf("kubernetes/%s", k.Master.Name)) + + a.Describe(&k.Master, "Master holds the configuration of master node in the kubernetes cluster") + a.Describe(&k.Workers, "Workers is a list holding the workers configuration for the kubernetes cluster") + a.Describe(&k.NetworkName, "The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist") + a.Describe(&k.SolutionType, "The solution type of the cluster, displayed as project name in contract metadata") + a.Describe(&k.SSHKey, "SSH key to access the cluster nodes") + a.Describe(&k.Token, "The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string") +} + +func (k *KubernetesState) Annotate(a infer.Annotator) { + a.Describe(&k.MasterComputed, "The computed fields of the master node") + a.Describe(&k.WorkersComputed, "List of the computed fields of the worker nodes") + a.Describe(&k.NodesIPRange, "Computed values of nodes' IP ranges after deployment") + a.Describe(&k.NodeDeploymentID, "Mapping from each node to its deployment ID") +} + +func (k *K8sNodeInput) Annotate(a infer.Annotator) { + a.Describe(&k.DiskSize, "Data disk size in GBs. Must be between 1GB and 10240GBs (10TBs)") +} + +var _ = (infer.Annotated)((*GatewayFQDNArgs)(nil)) +var _ = (infer.Annotated)((*GatewayFQDNState)(nil)) + +func (g *GatewayFQDNArgs) Annotate(a infer.Annotator) { + a.SetDefault(&g.SolutionType, g.Name) + + a.Describe(&g.Name, "Gateway workload name. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters") + a.Describe(&g.NodeID, "The gateway's node ID") + a.Describe(&g.FQDN, "The fully qualified domain name of the deployed workload") + a.Describe(&g.Backends, "The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port]") + a.Describe(&g.NetworkName, "Network name to join, if backend IP is private") + a.Describe(&g.TLSPassthrough, "TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service") + a.Describe(&g.Description, "The description of the virtual machine workload, optional with no restrictions") + a.Describe(&g.SolutionType, "The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata)") +} + +func (g *GatewayFQDNState) Annotate(a infer.Annotator) { + a.Describe(&g.NodeDeploymentID, "Mapping from each node to its deployment ID") + a.Describe(&g.ContractID, "The deployment ID") +} + +var _ = (infer.Annotated)((*GatewayNameArgs)(nil)) +var _ = (infer.Annotated)((*GatewayNameState)(nil)) + +func (g *GatewayNameArgs) Annotate(a infer.Annotator) { + a.SetDefault(&g.SolutionType, g.Name) + + a.Describe(&g.Name, "Domain prefix. The fqdn will be .. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters") + a.Describe(&g.NodeID, "The gateway's node ID") + a.Describe(&g.Backends, "The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port]") + a.Describe(&g.NetworkName, "Network name to join, if backend IP is private") + a.Describe(&g.TLSPassthrough, "TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service") + a.Describe(&g.Description, "The description of the virtual machine workload, optional with no restrictions") + a.Describe(&g.SolutionType, "The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata)") +} + +func (g *GatewayNameState) Annotate(a infer.Annotator) { + a.Describe(&g.NodeDeploymentID, "Mapping from each node to its deployment ID") + a.Describe(&g.ContractID, "The deployment ID") + a.Describe(&g.NameContractID, "The reserved name contract ID") + a.Describe(&g.FQDN, "The computed fully qualified domain name of the deployed workload") +} diff --git a/provider/cmd/pulumi-resource-threefold/schema.json b/provider/cmd/pulumi-resource-threefold/schema.json index 2e223dee..6017db28 100644 --- a/provider/cmd/pulumi-resource-threefold/schema.json +++ b/provider/cmd/pulumi-resource-threefold/schema.json @@ -30,6 +30,13 @@ }, "config": { "variables": { + "graphql_url": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The graphql urls, example: https://graphql.grid.tf/graphql" + }, "key_type": { "type": "string", "description": "The key type registered on substrate (ed25519 or sr25519).", @@ -61,20 +68,30 @@ ] } }, + "proxy_url": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The proxy urls, example: https://gridproxy.grid.tf/" + }, "relay_url": { "type": "array", "items": { "type": "string" }, - "description": "The relay urls, example: wss://relay.dev.grid.tf" + "description": "The relay urls, example: wss://relay.grid.tf" }, "rmb_timeout": { "type": "string", "description": "The timeout duration in seconds for rmb calls" }, "substrate_url": { - "type": "string", - "description": "The substrate url, example: wss://tfchain.dev.grid.tf/ws" + "type": "array", + "items": { + "type": "string" + }, + "description": "The substrate url, example: wss://tfchain.grid.tf/ws" } } }, @@ -82,13 +99,16 @@ "threefold:index:Backend": { "properties": { "address": { - "type": "string" + "type": "string", + "description": "Address of backend ZDB (e.g. [300:a582:c60c:df75:f6da:8a92:d5ed:71ad]:9900 or 60.60.60.60:9900)" }, "namespace": { - "type": "string" + "type": "string", + "description": "ZDB namespace" }, "password": { - "type": "string" + "type": "string", + "description": "Namespace password" } }, "type": "object", @@ -101,13 +121,16 @@ "threefold:index:Disk": { "properties": { "description": { - "type": "string" + "type": "string", + "description": "The description of the disk workload, optional with no restrictions" }, "name": { - "type": "string" + "type": "string", + "description": "The name of the disk workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported" }, "size": { - "type": "integer" + "type": "integer", + "description": "The disk size in GB (type SSD)" } }, "type": "object", @@ -122,96 +145,116 @@ "type": "array", "items": { "$ref": "#/types/threefold:index:Backend" - } + }, + "description": "List of ZDB backends configurations" } }, "type": "object" }, - "threefold:index:K8sNodeComputed": { - "properties": { - "computed_ip": { - "type": "string" - }, - "computed_ip6": { - "type": "string" - }, - "console_url": { - "type": "string" - }, - "ip": { - "type": "string" - }, - "mycelium_ip": { - "type": "string" - }, - "mycelium_ip_seed": { - "type": "string" - }, - "planetary_ip": { - "type": "string" - } - }, - "type": "object", - "required": [ - "computed_ip", - "computed_ip6", - "console_url", - "ip", - "mycelium_ip", - "mycelium_ip_seed", - "planetary_ip" - ] - }, "threefold:index:K8sNodeInput": { "properties": { "cpu": { - "type": "integer" + "type": "integer", + "description": "The cpu units needed for the virtual machine. Range in [1: 32]" + }, + "description": { + "type": "string", + "description": "The description of the virtual machine workload, optional with no restrictions" }, "disk_size": { - "type": "integer" + "type": "integer", + "description": "Data disk size in GBs. Must be between 1GB and 10240GBs (10TBs)" + }, + "entrypoint": { + "type": "string", + "description": "The entry point for the flist. Example: /sbin/zinit init" + }, + "env_vars": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The environment variables to be passed to the virtual machine. Example: SSH_KEY" }, "flist": { - "type": "string" + "type": "string", + "description": "The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist" }, "flist_checksum": { - "type": "string" + "type": "string", + "description": "The checksum of the flist which should match the checksum of the given flist, optional" + }, + "gpus": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of gpu IDs to be used in the virtual machine. GPU ID format: \u003cslot\u003e/\u003cvendor\u003e/\u003cdevice\u003e. Example: 0000:28:00.0/1002/731f" }, "memory": { - "type": "integer" + "type": "integer", + "description": "The memory capacity for the virtual machine in MB. Min is 250 MB" + }, + "mounts": { + "type": "array", + "items": { + "$ref": "#/types/threefold:index:Mount" + }, + "description": "A list of mounted disks or volumes" }, "mycelium": { - "type": "boolean" + "type": "boolean", + "description": "A flag to generate a random mycelium IP seed to support mycelium in the virtual machine" }, "mycelium_ip_seed": { - "type": "string" + "type": "string", + "description": "The seed used for mycelium IP generated for the virtual machine. It's length should be 6" }, "name": { - "type": "string" + "type": "string", + "description": "The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported" }, "network_name": { - "type": "string" + "type": "string", + "description": "The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist" }, - "node": { - "$ref": "pulumi.json#/Any" + "node_id": { + "$ref": "pulumi.json#/Any", + "description": "The node ID to deploy the virtual machine on, required and should match the requested resources" }, "planetary": { - "type": "boolean" + "type": "boolean", + "description": "A flag to enable generating a yggdrasil IP for the virtual machine" }, "public_ip": { - "type": "boolean" + "type": "boolean", + "description": "A flag to enable generating a public IP for the virtual machine, public node is required for it" }, "public_ip6": { - "type": "boolean" + "type": "boolean", + "description": "A flag to enable generating a public IPv6 for the virtual machine, public node is required for it" + }, + "rootfs_size": { + "type": "integer", + "description": "The root fs size in GB (type SSD). Can be set as 0 to get the default minimum" + }, + "zlogs": { + "type": "array", + "items": { + "$ref": "#/types/threefold:index:Zlog" + }, + "description": "A list of virtual machine loggers" } }, "type": "object", "required": [ "cpu", "disk_size", + "flist", "memory", "name", "network_name", - "node" + "node_id" ] }, "threefold:index:Metadata": { @@ -220,19 +263,24 @@ "type": "array", "items": { "$ref": "#/types/threefold:index:Backend" - } + }, + "description": "List of ZDB backends configurations" }, "encryption_algorithm": { - "type": "string" + "type": "string", + "description": "configuration to use for the encryption stage. Currently only AES is supported" }, "encryption_key": { - "type": "string" + "type": "string", + "description": "64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000)" }, "prefix": { - "type": "string" + "type": "string", + "description": "Data stored on the remote metadata is prefixed with" }, "type": { - "type": "string" + "type": "string", + "description": "configuration for the metadata store to use, currently only ZDB is supported" } }, "type": "object", @@ -243,23 +291,26 @@ }, "threefold:index:Mount": { "properties": { - "disk_name": { - "type": "string" - }, "mount_point": { - "type": "string" + "type": "string", + "description": "The mount point of the disk/volume" + }, + "name": { + "type": "string", + "description": "The name of the mounted disk/volume, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported" } }, "type": "object", "required": [ - "disk_name", - "mount_point" + "mount_point", + "name" ] }, "threefold:index:QSFSComputed": { "properties": { "metrics_endpoint": { - "type": "string" + "type": "string", + "description": "Exposed metrics endpoint" } }, "type": "object", @@ -270,46 +321,59 @@ "threefold:index:QSFSInput": { "properties": { "cache": { - "type": "integer" + "type": "integer", + "description": "The size of the fuse mountpoint on the node in MBs (holds qsfs local data before pushing)" }, "compression_algorithm": { - "type": "string" + "type": "string", + "description": "configuration to use for the compression stage. Currently only snappy is supported" }, "description": { - "type": "string" + "type": "string", + "description": "The description of the qsfs workload, optional with no restrictions" }, "encryption_algorithm": { - "type": "string" + "type": "string", + "description": "configuration to use for the encryption stage. Currently only AES is supported" }, "encryption_key": { - "type": "string" + "type": "string", + "description": "64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000)" }, "expected_shards": { - "type": "integer" + "type": "integer", + "description": "The amount of shards which are generated when the data is encoded. Essentially, this is the amount of shards which is needed to be able to recover the data, and some disposable shards which could be lost. The amount of disposable shards can be calculated as expected_shards - minimal_shards" }, "groups": { "type": "array", "items": { "$ref": "#/types/threefold:index:Group" - } + }, + "description": "The backend groups to write the data to" }, "max_zdb_data_dir_size": { - "type": "integer" + "type": "integer", + "description": "Maximum size of the data dir in MiB, if this is set and the sum of the file sizes in the data dir gets higher than this value, the least used, already encoded file will be removed" }, "metadata": { - "$ref": "#/types/threefold:index:Metadata" + "$ref": "#/types/threefold:index:Metadata", + "description": "List of ZDB backends configurations" }, "minimal_shards": { - "type": "integer" + "type": "integer", + "description": "The minimum amount of shards which are needed to recover the original data" }, "name": { - "type": "string" + "type": "string", + "description": "The name of the qsfs workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported" }, "redundant_groups": { - "type": "integer" + "type": "integer", + "description": "The amount of groups which one should be able to loose while still being able to recover the original data" }, "redundant_nodes": { - "type": "integer" + "type": "integer", + "description": "The amount of nodes that can be lost in every group while still being able to recover the original data" } }, "type": "object", @@ -329,25 +393,32 @@ "threefold:index:VMComputed": { "properties": { "computed_ip": { - "type": "string" + "type": "string", + "description": "The reserved public ipv4 if any" }, "computed_ip6": { - "type": "string" + "type": "string", + "description": "The reserved public ipv6 if any" }, "console_url": { - "type": "string" + "type": "string", + "description": "The url to access the vm via cloud console on private interface using wireguard" }, "ip": { - "type": "string" + "type": "string", + "description": "The private wireguard IP of the vm" }, "mycelium_ip": { - "type": "string" + "type": "string", + "description": "The allocated mycelium IP" }, "mycelium_ip_seed": { - "type": "string" + "type": "string", + "description": "The seed used for mycelium IP generated for the virtual machine. It's length should be 6" }, "planetary_ip": { - "type": "string" + "type": "string", + "description": "The allocated Yggdrasil IP" } }, "type": "object", @@ -363,73 +434,92 @@ "threefold:index:VMInput": { "properties": { "cpu": { - "type": "integer" + "type": "integer", + "description": "The cpu units needed for the virtual machine. Range in [1: 32]" }, "description": { - "type": "string" + "type": "string", + "description": "The description of the virtual machine workload, optional with no restrictions" }, "entrypoint": { - "type": "string" + "type": "string", + "description": "The entry point for the flist. Example: /sbin/zinit init" }, "env_vars": { "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "The environment variables to be passed to the virtual machine. Example: SSH_KEY" }, "flist": { - "type": "string" + "type": "string", + "description": "The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist" }, "flist_checksum": { - "type": "string" + "type": "string", + "description": "The checksum of the flist which should match the checksum of the given flist, optional" }, "gpus": { "type": "array", "items": { "type": "string" - } + }, + "description": "A list of gpu IDs to be used in the virtual machine. GPU ID format: \u003cslot\u003e/\u003cvendor\u003e/\u003cdevice\u003e. Example: 0000:28:00.0/1002/731f" }, "memory": { - "type": "integer" + "type": "integer", + "description": "The memory capacity for the virtual machine in MB. Min is 250 MB" }, "mounts": { "type": "array", "items": { "$ref": "#/types/threefold:index:Mount" - } + }, + "description": "A list of mounted disks or volumes" }, "mycelium": { - "type": "boolean" + "type": "boolean", + "description": "A flag to generate a random mycelium IP seed to support mycelium in the virtual machine" }, "mycelium_ip_seed": { - "type": "string" + "type": "string", + "description": "The seed used for mycelium IP generated for the virtual machine. It's length should be 6" }, "name": { - "type": "string" + "type": "string", + "description": "The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported" }, "network_name": { - "type": "string" + "type": "string", + "description": "The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist" }, "node_id": { - "$ref": "pulumi.json#/Any" + "$ref": "pulumi.json#/Any", + "description": "The node ID to deploy the virtual machine on, required and should match the requested resources" }, "planetary": { - "type": "boolean" + "type": "boolean", + "description": "A flag to enable generating a yggdrasil IP for the virtual machine" }, "public_ip": { - "type": "boolean" + "type": "boolean", + "description": "A flag to enable generating a public IP for the virtual machine, public node is required for it" }, "public_ip6": { - "type": "boolean" + "type": "boolean", + "description": "A flag to enable generating a public IPv6 for the virtual machine, public node is required for it" }, "rootfs_size": { - "type": "integer" + "type": "integer", + "description": "The root fs size in GB (type SSD). Can be set as 0 to get the default minimum" }, "zlogs": { "type": "array", "items": { "$ref": "#/types/threefold:index:Zlog" - } + }, + "description": "A list of virtual machine loggers" } }, "type": "object", @@ -448,13 +538,16 @@ "type": "array", "items": { "type": "string" - } + }, + "description": "Computed IPs of the ZDB. Two IPs are returned: a public IPv6, and a YggIP, in this order" }, "namespace": { - "type": "string" + "type": "string", + "description": "Namespace of the ZDB" }, "port": { - "type": "integer" + "type": "integer", + "description": "Port of the ZDB" } }, "type": "object", @@ -467,10 +560,12 @@ "threefold:index:ZDBInput": { "properties": { "description": { - "type": "string" + "type": "string", + "description": "The description of the 0-db workload, optional with no restrictions" }, "mode": { "type": "string", + "description": "the enumeration of the modes 0-db can operate in (default user)", "default": "user", "defaultInfo": { "environment": [ @@ -479,16 +574,20 @@ } }, "name": { - "type": "string" + "type": "string", + "description": "The name of the 0-db workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported" }, "password": { - "type": "string" + "type": "string", + "description": "The 0-db password" }, "public": { - "type": "boolean" + "type": "boolean", + "description": "A flag to make 0-db namespace public - readable by anyone" }, "size": { - "type": "integer" + "type": "integer", + "description": "The 0-db size in GB (type HDD)" } }, "type": "object", @@ -501,10 +600,12 @@ "threefold:index:Zlog": { "properties": { "output": { - "type": "string" + "type": "string", + "description": "The output logs URL, should be a valid url" }, "zmachine": { - "type": "string" + "type": "string", + "description": "The name of virtual machine, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported" } }, "type": "object", @@ -550,14 +651,17 @@ "rmb_timeout": { "type": "string", "description": "The timeout duration in seconds for rmb calls" - }, - "substrate_url": { - "type": "string", - "description": "The substrate url, example: wss://tfchain.dev.grid.tf/ws" } }, "type": "object", "inputProperties": { + "graphql_url": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The graphql urls, example: https://graphql.grid.tf/graphql" + }, "key_type": { "type": "string", "description": "The key type registered on substrate (ed25519 or sr25519).", @@ -589,20 +693,30 @@ ] } }, + "proxy_url": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The proxy urls, example: https://gridproxy.grid.tf/" + }, "relay_url": { "type": "array", "items": { "type": "string" }, - "description": "The relay urls, example: wss://relay.dev.grid.tf" + "description": "The relay urls, example: wss://relay.grid.tf" }, "rmb_timeout": { "type": "string", "description": "The timeout duration in seconds for rmb calls" }, "substrate_url": { - "type": "string", - "description": "The substrate url, example: wss://tfchain.dev.grid.tf/ws" + "type": "array", + "items": { + "type": "string" + }, + "description": "The substrate url, example: wss://tfchain.grid.tf/ws" } } }, @@ -610,37 +724,45 @@ "threefold:index:Deployment": { "properties": { "contract_id": { - "type": "integer" + "type": "integer", + "description": "The deployment ID" }, "disks": { "type": "array", "items": { "$ref": "#/types/threefold:index:Disk" - } + }, + "description": "The disks requested to be included in the deployment" }, "ip_range": { - "type": "string" + "type": "string", + "description": "IP range of the node for the wireguard network (e.g. 10.1.2.0/24). Has to have a subnet mask of 24" }, "name": { - "type": "string" + "type": "string", + "description": "The name of the deployment, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported" }, "network_name": { - "type": "string" + "type": "string", + "description": "The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist" }, "node_deployment_id": { "type": "object", "additionalProperties": { "type": "integer" - } + }, + "description": "Mapping from each node to its deployment ID" }, "node_id": { - "$ref": "pulumi.json#/Any" + "$ref": "pulumi.json#/Any", + "description": "The node ID to deploy on, required and should match the requested resources" }, "qsfs": { "type": "array", "items": { "$ref": "#/types/threefold:index:QSFSInput" - } + }, + "description": "The qsfs output instances requested to be included in the deployment" }, "qsfs_computed": { "type": "array", @@ -649,17 +771,20 @@ } }, "solution_provider": { - "type": "integer" + "type": "integer", + "description": "ID for the deployed solution which allows the creator of the solution to gain a percentage of the rewards" }, "solution_type": { "type": "string", + "description": "The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata)", "default": "vm/" }, "vms": { "type": "array", "items": { "$ref": "#/types/threefold:index:VMInput" - } + }, + "description": "The vms output requested to be included in the deployment" }, "vms_computed": { "type": "array", @@ -671,7 +796,8 @@ "type": "array", "items": { "$ref": "#/types/threefold:index:ZDBInput" - } + }, + "description": "The zdbs output requested to be included in the deployment" }, "zdbs_computed": { "type": "array", @@ -696,41 +822,50 @@ "type": "array", "items": { "$ref": "#/types/threefold:index:Disk" - } + }, + "description": "The disks requested to be included in the deployment" }, "name": { - "type": "string" + "type": "string", + "description": "The name of the deployment, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported" }, "network_name": { - "type": "string" + "type": "string", + "description": "The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist" }, "node_id": { - "$ref": "pulumi.json#/Any" + "$ref": "pulumi.json#/Any", + "description": "The node ID to deploy on, required and should match the requested resources" }, "qsfs": { "type": "array", "items": { "$ref": "#/types/threefold:index:QSFSInput" - } + }, + "description": "The qsfs instances requested to be included in the deployment" }, "solution_provider": { - "type": "integer" + "type": "integer", + "description": "ID for the deployed solution which allows the creator of the solution to gain a percentage of the rewards" }, "solution_type": { "type": "string", + "description": "The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata)", "default": "vm/" }, "vms": { "type": "array", "items": { "$ref": "#/types/threefold:index:VMInput" - } + }, + "description": "The vms requested to be included in the deployment" }, "zdbs": { "type": "array", "items": { "$ref": "#/types/threefold:index:ZDBInput" - } + }, + "description": "The zdbs requested to be included in the deployment" } }, "requiredInputs": [ @@ -744,38 +879,48 @@ "type": "array", "items": { "type": "string" - } + }, + "description": "The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port]" }, "contract_id": { - "type": "integer" + "type": "integer", + "description": "The deployment ID" }, "description": { - "type": "string" + "type": "string", + "description": "The description of the virtual machine workload, optional with no restrictions" }, "fqdn": { - "type": "string" + "type": "string", + "description": "The fully qualified domain name of the deployed workload" }, "name": { - "type": "string" + "type": "string", + "description": "Gateway workload name. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters" }, "network_name": { - "type": "string" + "type": "string", + "description": "Network name to join, if backend IP is private" }, "node_deployment_id": { "type": "object", "additionalProperties": { "type": "integer" - } + }, + "description": "Mapping from each node to its deployment ID" }, "node_id": { - "$ref": "pulumi.json#/Any" + "$ref": "pulumi.json#/Any", + "description": "The gateway's node ID" }, "solution_type": { "type": "string", + "description": "The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata)", "default": "" }, "tls_pass_through": { - "type": "boolean" + "type": "boolean", + "description": "TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service" } }, "type": "object", @@ -792,29 +937,37 @@ "type": "array", "items": { "type": "string" - } + }, + "description": "The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port]" }, "description": { - "type": "string" + "type": "string", + "description": "The description of the virtual machine workload, optional with no restrictions" }, "fqdn": { - "type": "string" + "type": "string", + "description": "The fully qualified domain name of the deployed workload" }, "name": { - "type": "string" + "type": "string", + "description": "Gateway workload name. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters" }, "network_name": { - "type": "string" + "type": "string", + "description": "Network name to join, if backend IP is private" }, "node_id": { - "$ref": "pulumi.json#/Any" + "$ref": "pulumi.json#/Any", + "description": "The gateway's node ID" }, "solution_type": { "type": "string", + "description": "The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata)", "default": "" }, "tls_pass_through": { - "type": "boolean" + "type": "boolean", + "description": "TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service" } }, "requiredInputs": [ @@ -830,41 +983,52 @@ "type": "array", "items": { "type": "string" - } + }, + "description": "The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port]" }, "contract_id": { - "type": "integer" + "type": "integer", + "description": "The deployment ID" }, "description": { - "type": "string" + "type": "string", + "description": "The description of the virtual machine workload, optional with no restrictions" }, "fqdn": { - "type": "string" + "type": "string", + "description": "The computed fully qualified domain name of the deployed workload" }, "name": { - "type": "string" + "type": "string", + "description": "Domain prefix. The fqdn will be \u003cname\u003e.\u003cgateway-domain\u003e. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters" }, "name_contract_id": { - "type": "integer" + "type": "integer", + "description": "The reserved name contract ID" }, - "network": { - "type": "string" + "network_name": { + "type": "string", + "description": "Network name to join, if backend IP is private" }, "node_deployment_id": { "type": "object", "additionalProperties": { "type": "integer" - } + }, + "description": "Mapping from each node to its deployment ID" }, "node_id": { - "$ref": "pulumi.json#/Any" + "$ref": "pulumi.json#/Any", + "description": "The gateway's node ID" }, "solution_type": { "type": "string", + "description": "The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata)", "default": "" }, "tls_passthrough": { - "type": "boolean" + "type": "boolean", + "description": "TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service" } }, "type": "object", @@ -882,26 +1046,33 @@ "type": "array", "items": { "type": "string" - } + }, + "description": "The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port]" }, "description": { - "type": "string" + "type": "string", + "description": "The description of the virtual machine workload, optional with no restrictions" }, "name": { - "type": "string" + "type": "string", + "description": "Domain prefix. The fqdn will be \u003cname\u003e.\u003cgateway-domain\u003e. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters" }, - "network": { - "type": "string" + "network_name": { + "type": "string", + "description": "Network name to join, if backend IP is private" }, "node_id": { - "$ref": "pulumi.json#/Any" + "$ref": "pulumi.json#/Any", + "description": "The gateway's node ID" }, "solution_type": { "type": "string", + "description": "The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata)", "default": "" }, "tls_passthrough": { - "type": "boolean" + "type": "boolean", + "description": "TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service" } }, "requiredInputs": [ @@ -913,47 +1084,57 @@ "threefold:index:Kubernetes": { "properties": { "master": { - "$ref": "#/types/threefold:index:K8sNodeInput" + "$ref": "#/types/threefold:index:K8sNodeInput", + "description": "Master holds the configuration of master node in the kubernetes cluster" }, "master_computed": { - "$ref": "#/types/threefold:index:K8sNodeComputed" + "$ref": "#/types/threefold:index:VMComputed", + "description": "The computed fields of the master node" }, "network_name": { - "type": "string" + "type": "string", + "description": "The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist" }, "node_deployment_id": { "type": "object", "additionalProperties": { "type": "integer" - } + }, + "description": "Mapping from each node to its deployment ID" }, "nodes_ip_range": { "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "Computed values of nodes' IP ranges after deployment" }, "solution_type": { "type": "string", + "description": "The solution type of the cluster, displayed as project name in contract metadata", "default": "kubernetes/" }, "ssh_key": { - "type": "string" + "type": "string", + "description": "SSH key to access the cluster nodes" }, "token": { - "type": "string" + "type": "string", + "description": "The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string" }, "workers": { "type": "array", "items": { "$ref": "#/types/threefold:index:K8sNodeInput" - } + }, + "description": "Workers is a list holding the workers configuration for the kubernetes cluster" }, "workers_computed": { "type": "object", "additionalProperties": { - "$ref": "#/types/threefold:index:K8sNodeComputed" - } + "$ref": "#/types/threefold:index:VMComputed" + }, + "description": "List of the computed fields of the worker nodes" } }, "type": "object", @@ -969,26 +1150,32 @@ ], "inputProperties": { "master": { - "$ref": "#/types/threefold:index:K8sNodeInput" + "$ref": "#/types/threefold:index:K8sNodeInput", + "description": "Master holds the configuration of master node in the kubernetes cluster" }, "network_name": { - "type": "string" + "type": "string", + "description": "The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist" }, "solution_type": { "type": "string", + "description": "The solution type of the cluster, displayed as project name in contract metadata", "default": "kubernetes/" }, "ssh_key": { - "type": "string" + "type": "string", + "description": "SSH key to access the cluster nodes" }, "token": { - "type": "string" + "type": "string", + "description": "The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string" }, "workers": { "type": "array", "items": { "$ref": "#/types/threefold:index:K8sNodeInput" - } + }, + "description": "Workers is a list holding the workers configuration for the kubernetes cluster" } }, "requiredInputs": [ @@ -1001,58 +1188,72 @@ "threefold:index:Network": { "properties": { "access_wg_config": { - "type": "string" + "type": "string", + "description": "Generated wireguard configuration for external user access to the network" }, "add_wg_access": { - "type": "boolean" + "type": "boolean", + "description": "A flag to support wireguard in the network" }, "description": { - "type": "string" + "type": "string", + "description": "The description of the network workload, optional with no restrictions" }, "external_ip": { - "type": "string" + "type": "string", + "description": "Wireguard IP assigned for external user access" }, "external_sk": { - "type": "string" + "type": "string", + "description": "External user private key used in encryption while communicating through Wireguard network" }, "ip_range": { - "type": "string" + "type": "string", + "description": "The IP range for the network, subnet should be 16" }, "mycelium": { - "type": "boolean" + "type": "boolean", + "description": "A flag to generate a random mycelium key to support mycelium in the network" }, "mycelium_keys": { "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes" }, "name": { - "type": "string" + "type": "string", + "description": "The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported" }, "node_deployment_id": { "type": "object", "additionalProperties": { "type": "integer" - } + }, + "description": "Mapping from each node to its deployment id" }, "nodes": { "type": "array", "items": { "$ref": "pulumi.json#/Any" - } + }, + "description": "The nodes used to deploy the network on, shouldn't be empty" }, "nodes_ip_range": { "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "Computed values of nodes' IP ranges after deployment" }, "public_node_id": { - "type": "integer" + "type": "integer", + "description": "Public node id (in case it's added). Used for wireguard access and supporting hidden nodes" }, "solution_type": { "type": "string", + "description": "The solution type of the network, displayed as project name in contract metadata", "default": "Network" } }, @@ -1071,34 +1272,42 @@ ], "inputProperties": { "add_wg_access": { - "type": "boolean" + "type": "boolean", + "description": "A flag to support wireguard in the network" }, "description": { - "type": "string" + "type": "string", + "description": "The description of the network workload, optional with no restrictions" }, "ip_range": { - "type": "string" + "type": "string", + "description": "The IP range for the network, subnet should be 16" }, "mycelium": { - "type": "boolean" + "type": "boolean", + "description": "A flag to generate a random mycelium key to support mycelium in the network" }, "mycelium_keys": { "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes" }, "name": { - "type": "string" + "type": "string", + "description": "The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported" }, "nodes": { "type": "array", "items": { "$ref": "pulumi.json#/Any" - } + }, + "description": "The nodes used to deploy the network on, shouldn't be empty" }, "solution_type": { "type": "string", + "description": "The solution type of the network, displayed as project name in contract metadata", "default": "Network" } }, diff --git a/provider/deployment_parser.go b/provider/deployment_parser.go index adf3fdb4..1a5bc299 100644 --- a/provider/deployment_parser.go +++ b/provider/deployment_parser.go @@ -19,7 +19,7 @@ type Disk struct { // Mount represents mounting of disks type Mount struct { - DiskName string `pulumi:"disk_name"` + Name string `pulumi:"name"` MountPoint string `pulumi:"mount_point"` } @@ -164,7 +164,7 @@ func parseInputToDeployment(deploymentArgs DeploymentArgs) (workloads.Deployment var mounts []workloads.Mount for _, mount := range vm.Mounts { mounts = append(mounts, workloads.Mount{ - Name: mount.DiskName, + Name: mount.Name, MountPoint: mount.MountPoint, }) } @@ -323,7 +323,7 @@ func parseDeploymentToState(deployment workloads.Deployment) DeploymentState { var mounts []Mount for _, mount := range vm.Mounts { mounts = append(mounts, Mount{ - DiskName: mount.Name, + Name: mount.Name, MountPoint: mount.MountPoint, }) } diff --git a/provider/deployment_parser_test.go b/provider/deployment_parser_test.go index 3e3c8e12..3be558d9 100644 --- a/provider/deployment_parser_test.go +++ b/provider/deployment_parser_test.go @@ -44,7 +44,7 @@ func generateInputs() (Disk, ZDBInput, VMInput, QSFSInput, DeploymentArgs) { RootfsSize: 0, Entrypoint: "entrypoint", Mounts: []Mount{{ - DiskName: diskInput.Name, + Name: diskInput.Name, MountPoint: fmt.Sprintf("/%s", diskInput.Name), }}, Zlogs: []Zlog{zlogInput}, diff --git a/provider/deployment_resource.go b/provider/deployment_resource.go index 97bd2cab..e3e3e2fe 100644 --- a/provider/deployment_resource.go +++ b/provider/deployment_resource.go @@ -2,7 +2,6 @@ package provider import ( "context" - "fmt" p "github.com/pulumi/pulumi-go-provider" "github.com/pulumi/pulumi-go-provider/infer" @@ -37,17 +36,6 @@ type DeploymentState struct { QsfsComputed []QSFSComputed `pulumi:"qsfs_computed"` } -var _ = (infer.Annotated)((*DeploymentArgs)(nil)) - -func (d *DeploymentArgs) Annotate(a infer.Annotator) { - a.SetDefault(&d.SolutionType, fmt.Sprintf("vm/%s", d.Name)) -} - -// Annotate sets defaults and descriptions for zdb resource -func (z *ZDBInput) Annotate(a infer.Annotator) { - a.SetDefault(&z.Mode, "user", "") -} - // Check validates the Deployment func (*Deployment) Check( ctx context.Context, diff --git a/provider/gateway_fqdn_resource.go b/provider/gateway_fqdn_resource.go index 8494c956..65bc0c8e 100644 --- a/provider/gateway_fqdn_resource.go +++ b/provider/gateway_fqdn_resource.go @@ -32,12 +32,6 @@ type GatewayFQDNState struct { NodeDeploymentID map[string]int64 `pulumi:"node_deployment_id"` } -var _ = (infer.Annotated)((*GatewayFQDNArgs)(nil)) - -func (g *GatewayFQDNArgs) Annotate(a infer.Annotator) { - a.SetDefault(&g.SolutionType, g.Name) -} - // Check validates fqdn gateway data func (*GatewayFQDN) Check( ctx context.Context, diff --git a/provider/gateway_name_parser.go b/provider/gateway_name_parser.go index 2f3d80c5..6de00fd7 100644 --- a/provider/gateway_name_parser.go +++ b/provider/gateway_name_parser.go @@ -28,7 +28,7 @@ func parseToGWNameState(gw workloads.GatewayNameProxy) GatewayNameState { NodeID: int32(gw.NodeID), Backends: backends, TLSPassthrough: gw.TLSPassthrough, - Network: gw.Network, + NetworkName: gw.Network, Description: gw.Description, SolutionType: gw.SolutionType, }, @@ -56,7 +56,7 @@ func parseToGWName(gwArgs GatewayNameArgs) (workloads.GatewayNameProxy, error) { NodeID: uint32(nodeID), Backends: backends, TLSPassthrough: gwArgs.TLSPassthrough, - Network: gwArgs.Network, + Network: gwArgs.NetworkName, Description: gwArgs.Description, SolutionType: gwArgs.SolutionType, }, nil diff --git a/provider/gateway_name_parser_test.go b/provider/gateway_name_parser_test.go index 3be9ee77..4e7ab47b 100644 --- a/provider/gateway_name_parser_test.go +++ b/provider/gateway_name_parser_test.go @@ -13,7 +13,7 @@ func TestNameGatewayParser(t *testing.T) { NodeID: 1, Backends: []string{"backend"}, TLSPassthrough: false, - Network: "network", + NetworkName: "network", Description: "description", SolutionType: "solution", } @@ -24,7 +24,7 @@ func TestNameGatewayParser(t *testing.T) { assert.Equal(t, nameGateway.NodeID, uint32(nameGatewayInput.NodeID.(int))) assert.Equal(t, nameGateway.Name, nameGatewayInput.Name) assert.Equal(t, nameGateway.Backends[0], zos.Backend(nameGatewayInput.Backends[0])) - assert.Equal(t, nameGateway.Network, nameGatewayInput.Network) + assert.Equal(t, nameGateway.Network, nameGatewayInput.NetworkName) assert.Equal(t, nameGateway.Description, nameGatewayInput.Description) assert.Equal(t, nameGateway.SolutionType, nameGatewayInput.SolutionType) assert.Equal(t, nameGateway.TLSPassthrough, nameGatewayInput.TLSPassthrough) diff --git a/provider/gateway_name_resource.go b/provider/gateway_name_resource.go index bf241512..fe73ae8d 100644 --- a/provider/gateway_name_resource.go +++ b/provider/gateway_name_resource.go @@ -17,7 +17,7 @@ type GatewayNameArgs struct { NodeID interface{} `pulumi:"node_id"` Backends []string `pulumi:"backends"` TLSPassthrough bool `pulumi:"tls_passthrough,optional"` - Network string `pulumi:"network,optional"` + NetworkName string `pulumi:"network_name,optional"` Description string `pulumi:"description,optional"` SolutionType string `pulumi:"solution_type,optional"` } @@ -32,12 +32,6 @@ type GatewayNameState struct { ContractID int64 `pulumi:"contract_id"` } -var _ = (infer.Annotated)((*GatewayNameArgs)(nil)) - -func (g *GatewayNameArgs) Annotate(a infer.Annotator) { - a.SetDefault(&g.SolutionType, g.Name) -} - // Check validates name gateway data func (*GatewayName) Check( ctx context.Context, diff --git a/provider/k8s_parser.go b/provider/k8s_parser.go index 79762f61..cf399887 100644 --- a/provider/k8s_parser.go +++ b/provider/k8s_parser.go @@ -12,30 +12,8 @@ import ( // K8sNodeInput struct of input data type K8sNodeInput struct { - Name string `pulumi:"name"` - NetworkName string `pulumi:"network_name"` - Node interface{} `pulumi:"node"` - DiskSize int `pulumi:"disk_size"` - Flist string `pulumi:"flist,optional"` - FlistChecksum string `pulumi:"flist_checksum,optional"` - CPU int `pulumi:"cpu"` - Memory int `pulumi:"memory"` - PublicIP bool `pulumi:"public_ip,optional"` - PublicIP6 bool `pulumi:"public_ip6,optional"` - Planetary bool `pulumi:"planetary,optional"` - Mycelium bool `pulumi:"mycelium,optional"` - MyceliumIPSeed string `pulumi:"mycelium_ip_seed,optional"` -} - -// K8sNodeComputed struct of computed data -type K8sNodeComputed struct { - MyceliumIPSeed string `pulumi:"mycelium_ip_seed"` - ComputedIP string `pulumi:"computed_ip"` - ComputedIP6 string `pulumi:"computed_ip6"` - IP string `pulumi:"ip"` - PlanetaryIP string `pulumi:"planetary_ip"` - MyceliumIP string `pulumi:"mycelium_ip"` - ConsoleURL string `pulumi:"console_url"` + VMInput + DiskSize int `pulumi:"disk_size"` } func parseToK8sState(k8sCluster workloads.K8sCluster) KubernetesState { @@ -52,7 +30,7 @@ func parseToK8sState(k8sCluster workloads.K8sCluster) KubernetesState { } // parse master computed - masterComputed := K8sNodeComputed{ + masterComputed := VMComputed{ MyceliumIPSeed: hex.EncodeToString(k8sCluster.Master.MyceliumIPSeed), ComputedIP: k8sCluster.Master.ComputedIP, ComputedIP6: k8sCluster.Master.ComputedIP6, @@ -64,25 +42,27 @@ func parseToK8sState(k8sCluster workloads.K8sCluster) KubernetesState { // parse master input masterInput := K8sNodeInput{ - Name: k8sCluster.Master.Name, - NetworkName: k8sCluster.Master.NetworkName, - Node: int(k8sCluster.Master.NodeID), - DiskSize: int(k8sCluster.Master.DiskSizeGB), - PublicIP: k8sCluster.Master.PublicIP, - PublicIP6: k8sCluster.Master.PublicIP6, - Planetary: k8sCluster.Master.Planetary, - MyceliumIPSeed: hex.EncodeToString(k8sCluster.Master.MyceliumIPSeed), - Flist: k8sCluster.Master.Flist, - FlistChecksum: k8sCluster.Master.FlistChecksum, - CPU: int(k8sCluster.Master.CPU), - Memory: int(k8sCluster.Master.MemoryMB), + VMInput: VMInput{ + Name: k8sCluster.Master.Name, + NetworkName: k8sCluster.Master.NetworkName, + NodeID: int(k8sCluster.Master.NodeID), + PublicIP: k8sCluster.Master.PublicIP, + PublicIP6: k8sCluster.Master.PublicIP6, + Planetary: k8sCluster.Master.Planetary, + MyceliumIPSeed: hex.EncodeToString(k8sCluster.Master.MyceliumIPSeed), + Flist: k8sCluster.Master.Flist, + FlistChecksum: k8sCluster.Master.FlistChecksum, + CPU: int(k8sCluster.Master.CPU), + Memory: int(k8sCluster.Master.MemoryMB), + }, + DiskSize: int(k8sCluster.Master.DiskSizeGB), } // parse workers computed & input - workersComputed := make(map[string]K8sNodeComputed) + workersComputed := make(map[string]VMComputed) workersInput := []K8sNodeInput{} for _, w := range k8sCluster.Workers { - newWorkerComputed := K8sNodeComputed{ + newWorkerComputed := VMComputed{ MyceliumIPSeed: hex.EncodeToString(w.MyceliumIPSeed), ComputedIP: w.ComputedIP, ComputedIP6: w.ComputedIP6, @@ -94,18 +74,20 @@ func parseToK8sState(k8sCluster workloads.K8sCluster) KubernetesState { workersComputed[w.Name] = newWorkerComputed newWorkerInput := K8sNodeInput{ - Name: w.Name, - NetworkName: w.NetworkName, - Node: int(w.NodeID), - DiskSize: int(w.DiskSizeGB), - PublicIP: w.PublicIP, - PublicIP6: w.PublicIP6, - Planetary: w.Planetary, - MyceliumIPSeed: hex.EncodeToString(w.MyceliumIPSeed), - Flist: w.Flist, - FlistChecksum: w.FlistChecksum, - CPU: int(w.CPU), - Memory: int(w.MemoryMB), + VMInput: VMInput{ + Name: w.Name, + NetworkName: w.NetworkName, + NodeID: int(w.NodeID), + PublicIP: w.PublicIP, + PublicIP6: w.PublicIP6, + Planetary: w.Planetary, + MyceliumIPSeed: hex.EncodeToString(w.MyceliumIPSeed), + Flist: w.Flist, + FlistChecksum: w.FlistChecksum, + CPU: int(w.CPU), + Memory: int(w.MemoryMB), + }, + DiskSize: int(w.DiskSizeGB), } workersInput = append(workersInput, newWorkerInput) } @@ -133,7 +115,7 @@ func parseToK8sCluster(kubernetesArgs KubernetesArgs) (workloads.K8sCluster, err kubernetesArgs.SSHKey = sshKey } - nodeID, err := strconv.Atoi(fmt.Sprint(kubernetesArgs.Master.Node)) + nodeID, err := strconv.Atoi(fmt.Sprint(kubernetesArgs.Master.NodeID)) if err != nil { return workloads.K8sCluster{}, err } @@ -180,7 +162,7 @@ func parseToK8sCluster(kubernetesArgs KubernetesArgs) (workloads.K8sCluster, err // parse workers workers := []workloads.K8sNode{} for _, w := range kubernetesArgs.Workers { - nodeID, err := strconv.Atoi(fmt.Sprint(w.Node)) + nodeID, err := strconv.Atoi(fmt.Sprint(w.NodeID)) if err != nil { return workloads.K8sCluster{}, err } diff --git a/provider/k8s_parser_test.go b/provider/k8s_parser_test.go index c102c666..60d20b15 100644 --- a/provider/k8s_parser_test.go +++ b/provider/k8s_parser_test.go @@ -9,15 +9,17 @@ import ( func TestK8sParser(t *testing.T) { k8sNodeInput := K8sNodeInput{ - Name: "master", - Node: 1, - DiskSize: 1, - Flist: "", - CPU: 1, - Memory: 1, - PublicIP: false, - PublicIP6: false, - Planetary: false, + VMInput: VMInput{ + Name: "master", + NodeID: 1, + Flist: "", + CPU: 1, + Memory: 1, + PublicIP: false, + PublicIP6: false, + Planetary: false, + }, + DiskSize: 1, } k8sWorkerInput1 := k8sNodeInput @@ -47,17 +49,17 @@ func TestK8sParser(t *testing.T) { }) t.Run("parsing input failed: wrong node id type", func(t *testing.T) { - k8sInput.Master.Node = "" + k8sInput.Master.NodeID = "" _, err := parseToK8sCluster(k8sInput) assert.Error(t, err) - k8sInput.Master.Node = 1 + k8sInput.Master.NodeID = 1 }) t.Run("parsing input failed: wrong worker node id type", func(t *testing.T) { - k8sInput.Workers[0].Node = "" + k8sInput.Workers[0].NodeID = "" _, err := parseToK8sCluster(k8sInput) assert.Error(t, err) - k8sInput.Workers[0].Node = 1 + k8sInput.Workers[0].NodeID = 1 }) t.Run("parsing and update k8s success", func(t *testing.T) { diff --git a/provider/k8s_resource.go b/provider/k8s_resource.go index 8484fa26..1b9a9f43 100644 --- a/provider/k8s_resource.go +++ b/provider/k8s_resource.go @@ -2,7 +2,6 @@ package provider import ( "context" - "fmt" p "github.com/pulumi/pulumi-go-provider" "github.com/pulumi/pulumi-go-provider/infer" @@ -26,16 +25,10 @@ type KubernetesArgs struct { type KubernetesState struct { KubernetesArgs - MasterComputed K8sNodeComputed `pulumi:"master_computed"` - WorkersComputed map[string]K8sNodeComputed `pulumi:"workers_computed"` - NodesIPRange map[string]string `pulumi:"nodes_ip_range"` - NodeDeploymentID map[string]int64 `pulumi:"node_deployment_id"` -} - -var _ = (infer.Annotated)((*KubernetesArgs)(nil)) - -func (k *KubernetesArgs) Annotate(a infer.Annotator) { - a.SetDefault(&k.SolutionType, fmt.Sprintf("kubernetes/%s", k.Master.Name)) + MasterComputed VMComputed `pulumi:"master_computed"` + WorkersComputed map[string]VMComputed `pulumi:"workers_computed"` + NodesIPRange map[string]string `pulumi:"nodes_ip_range"` + NodeDeploymentID map[string]int64 `pulumi:"node_deployment_id"` } // Check validates kubernetes data @@ -50,13 +43,13 @@ func (*Kubernetes) Check( } // TODO: bypass validation of empty node (will be assigned from scheduler) - if nodeID, ok := args.Master.Node.(string); ok && len(nodeID) == 0 { - args.Master.Node = 1 + if nodeID, ok := args.Master.NodeID.(string); ok && len(nodeID) == 0 { + args.Master.NodeID = 1 } for i := range args.Workers { - if nodeID, ok := args.Workers[i].Node.(string); ok && len(nodeID) == 0 { - args.Workers[i].Node = 1 + if nodeID, ok := args.Workers[i].NodeID.(string); ok && len(nodeID) == 0 { + args.Workers[i].NodeID = 1 } } diff --git a/provider/network_resource.go b/provider/network_resource.go index eddf2fc2..463d5895 100644 --- a/provider/network_resource.go +++ b/provider/network_resource.go @@ -36,12 +36,6 @@ type NetworkState struct { NodeDeploymentID map[string]int64 `pulumi:"node_deployment_id"` } -var _ = (infer.Annotated)((*NetworkArgs)(nil)) - -func (n *NetworkArgs) Annotate(a infer.Annotator) { - a.SetDefault(&n.SolutionType, "Network") -} - // Check validates the network func (*Network) Check( ctx context.Context, diff --git a/provider/provider.go b/provider/provider.go index 8e12bfaa..63fd8db1 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -61,12 +61,14 @@ func RunProvider(providerName, Version string) error { // Config struct holds the configuration fields for the provider type Config struct { - Mnemonic string `pulumi:"mnemonic,optional" provider:"secret"` - Network string `pulumi:"network,optional"` - KeyType string `pulumi:"key_type,optional"` - SubstrateURL string `pulumi:"substrate_url,optional"` - RelayURLs []string `pulumi:"relay_url,optional"` - RmbTimeout string `pulumi:"rmb_timeout,optional"` + Mnemonic string `pulumi:"mnemonic,optional" provider:"secret"` + Network string `pulumi:"network,optional"` + KeyType string `pulumi:"key_type,optional"` + SubstrateURLs []string `pulumi:"substrate_url,optional"` + RelayURLs []string `pulumi:"relay_url,optional"` + ProxyURLs []string `pulumi:"proxy_url,optional"` + GraphqlURLs []string `pulumi:"graphql_url,optional"` + RmbTimeout string `pulumi:"rmb_timeout,optional"` TFPluginClient deployer.TFPluginClient } @@ -78,9 +80,12 @@ func (c *Config) Annotate(a infer.Annotator) { a.Describe(&c.Mnemonic, "The mnemonic of the user. It is very secret.") a.Describe(&c.Network, "The network to deploy on.") a.Describe(&c.KeyType, "The key type registered on substrate (ed25519 or sr25519).") - a.Describe(&c.SubstrateURL, "The substrate url, example: wss://tfchain.dev.grid.tf/ws") - a.Describe(&c.RelayURLs, "The relay urls, example: wss://relay.dev.grid.tf") + a.Describe(&c.SubstrateURLs, "The substrate url, example: wss://tfchain.grid.tf/ws") + a.Describe(&c.RelayURLs, "The relay urls, example: wss://relay.grid.tf") + a.Describe(&c.ProxyURLs, "The proxy urls, example: https://gridproxy.grid.tf/") + a.Describe(&c.GraphqlURLs, "The graphql urls, example: https://graphql.grid.tf/graphql") a.Describe(&c.RmbTimeout, "The timeout duration in seconds for rmb calls") + a.SetDefault(&c.Mnemonic, os.Getenv("MNEMONIC"), "") a.SetDefault(&c.Network, os.Getenv("NETWORK"), "") a.SetDefault(&c.KeyType, "sr25519", "") @@ -103,14 +108,22 @@ func (c *Config) Configure(ctx context.Context) error { deployer.WithNetwork(c.Network), } - if c.SubstrateURL != "" { - opts = append(opts, deployer.WithSubstrateURL(c.SubstrateURL)) + if len(c.SubstrateURLs) > 0 { + opts = append(opts, deployer.WithSubstrateURL(c.SubstrateURLs...)) } if len(c.RelayURLs) > 0 { opts = append(opts, deployer.WithRelayURL(c.RelayURLs...)) } + if len(c.ProxyURLs) > 0 { + opts = append(opts, deployer.WithProxyURL(c.ProxyURLs...)) + } + + if len(c.GraphqlURLs) > 0 { + opts = append(opts, deployer.WithGraphQlURL(c.GraphqlURLs...)) + } + tfPluginClient, err := deployer.NewTFPluginClient( c.Mnemonic, opts..., diff --git a/sdk/go/threefold/config/config.go b/sdk/go/threefold/config/config.go index 7485d3d2..219003e5 100644 --- a/sdk/go/threefold/config/config.go +++ b/sdk/go/threefold/config/config.go @@ -11,6 +11,11 @@ import ( var _ = internal.GetEnvOrDefault +// The graphql urls, example: https://graphql.grid.tf/graphql +func GetGraphql_url(ctx *pulumi.Context) string { + return config.Get(ctx, "threefold:graphql_url") +} + // The key type registered on substrate (ed25519 or sr25519). func GetKey_type(ctx *pulumi.Context) string { v, err := config.Try(ctx, "threefold:key_type") @@ -50,7 +55,12 @@ func GetNetwork(ctx *pulumi.Context) string { return value } -// The relay urls, example: wss://relay.dev.grid.tf +// The proxy urls, example: https://gridproxy.grid.tf/ +func GetProxy_url(ctx *pulumi.Context) string { + return config.Get(ctx, "threefold:proxy_url") +} + +// The relay urls, example: wss://relay.grid.tf func GetRelay_url(ctx *pulumi.Context) string { return config.Get(ctx, "threefold:relay_url") } @@ -60,7 +70,7 @@ func GetRmb_timeout(ctx *pulumi.Context) string { return config.Get(ctx, "threefold:rmb_timeout") } -// The substrate url, example: wss://tfchain.dev.grid.tf/ws +// The substrate url, example: wss://tfchain.grid.tf/ws func GetSubstrate_url(ctx *pulumi.Context) string { return config.Get(ctx, "threefold:substrate_url") } diff --git a/sdk/go/threefold/deployment.go b/sdk/go/threefold/deployment.go index c9c136c6..832a7546 100644 --- a/sdk/go/threefold/deployment.go +++ b/sdk/go/threefold/deployment.go @@ -15,21 +15,33 @@ import ( type Deployment struct { pulumi.CustomResourceState - Contract_id pulumi.IntOutput `pulumi:"contract_id"` - Disks DiskArrayOutput `pulumi:"disks"` - Ip_range pulumi.StringOutput `pulumi:"ip_range"` - Name pulumi.StringOutput `pulumi:"name"` - Network_name pulumi.StringPtrOutput `pulumi:"network_name"` - Node_deployment_id pulumi.IntMapOutput `pulumi:"node_deployment_id"` - Node_id pulumi.AnyOutput `pulumi:"node_id"` - Qsfs QSFSInputArrayOutput `pulumi:"qsfs"` - Qsfs_computed QSFSComputedArrayOutput `pulumi:"qsfs_computed"` - Solution_provider pulumi.IntPtrOutput `pulumi:"solution_provider"` - Solution_type pulumi.StringPtrOutput `pulumi:"solution_type"` - Vms VMInputArrayOutput `pulumi:"vms"` - Vms_computed VMComputedArrayOutput `pulumi:"vms_computed"` - Zdbs ZDBInputArrayOutput `pulumi:"zdbs"` - Zdbs_computed ZDBComputedArrayOutput `pulumi:"zdbs_computed"` + // The deployment ID + Contract_id pulumi.IntOutput `pulumi:"contract_id"` + // The disks requested to be included in the deployment + Disks DiskArrayOutput `pulumi:"disks"` + // IP range of the node for the wireguard network (e.g. 10.1.2.0/24). Has to have a subnet mask of 24 + Ip_range pulumi.StringOutput `pulumi:"ip_range"` + // The name of the deployment, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name pulumi.StringOutput `pulumi:"name"` + // The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + Network_name pulumi.StringPtrOutput `pulumi:"network_name"` + // Mapping from each node to its deployment ID + Node_deployment_id pulumi.IntMapOutput `pulumi:"node_deployment_id"` + // The node ID to deploy on, required and should match the requested resources + Node_id pulumi.AnyOutput `pulumi:"node_id"` + // The qsfs output instances requested to be included in the deployment + Qsfs QSFSInputArrayOutput `pulumi:"qsfs"` + Qsfs_computed QSFSComputedArrayOutput `pulumi:"qsfs_computed"` + // ID for the deployed solution which allows the creator of the solution to gain a percentage of the rewards + Solution_provider pulumi.IntPtrOutput `pulumi:"solution_provider"` + // The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + Solution_type pulumi.StringPtrOutput `pulumi:"solution_type"` + // The vms output requested to be included in the deployment + Vms VMInputArrayOutput `pulumi:"vms"` + Vms_computed VMComputedArrayOutput `pulumi:"vms_computed"` + // The zdbs output requested to be included in the deployment + Zdbs ZDBInputArrayOutput `pulumi:"zdbs"` + Zdbs_computed ZDBComputedArrayOutput `pulumi:"zdbs_computed"` } // NewDeployment registers a new resource with the given unique name, arguments, and options. @@ -81,28 +93,46 @@ func (DeploymentState) ElementType() reflect.Type { } type deploymentArgs struct { - Disks []Disk `pulumi:"disks"` - Name string `pulumi:"name"` - Network_name *string `pulumi:"network_name"` - Node_id interface{} `pulumi:"node_id"` - Qsfs []QSFSInput `pulumi:"qsfs"` - Solution_provider *int `pulumi:"solution_provider"` - Solution_type *string `pulumi:"solution_type"` - Vms []VMInput `pulumi:"vms"` - Zdbs []ZDBInput `pulumi:"zdbs"` + // The disks requested to be included in the deployment + Disks []Disk `pulumi:"disks"` + // The name of the deployment, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name string `pulumi:"name"` + // The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + Network_name *string `pulumi:"network_name"` + // The node ID to deploy on, required and should match the requested resources + Node_id interface{} `pulumi:"node_id"` + // The qsfs instances requested to be included in the deployment + Qsfs []QSFSInput `pulumi:"qsfs"` + // ID for the deployed solution which allows the creator of the solution to gain a percentage of the rewards + Solution_provider *int `pulumi:"solution_provider"` + // The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + Solution_type *string `pulumi:"solution_type"` + // The vms requested to be included in the deployment + Vms []VMInput `pulumi:"vms"` + // The zdbs requested to be included in the deployment + Zdbs []ZDBInput `pulumi:"zdbs"` } // The set of arguments for constructing a Deployment resource. type DeploymentArgs struct { - Disks DiskArrayInput - Name pulumi.StringInput - Network_name pulumi.StringPtrInput - Node_id pulumi.Input - Qsfs QSFSInputArrayInput + // The disks requested to be included in the deployment + Disks DiskArrayInput + // The name of the deployment, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name pulumi.StringInput + // The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + Network_name pulumi.StringPtrInput + // The node ID to deploy on, required and should match the requested resources + Node_id pulumi.Input + // The qsfs instances requested to be included in the deployment + Qsfs QSFSInputArrayInput + // ID for the deployed solution which allows the creator of the solution to gain a percentage of the rewards Solution_provider pulumi.IntPtrInput - Solution_type pulumi.StringPtrInput - Vms VMInputArrayInput - Zdbs ZDBInputArrayInput + // The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + Solution_type pulumi.StringPtrInput + // The vms requested to be included in the deployment + Vms VMInputArrayInput + // The zdbs requested to be included in the deployment + Zdbs ZDBInputArrayInput } func (DeploymentArgs) ElementType() reflect.Type { @@ -192,34 +222,42 @@ func (o DeploymentOutput) ToDeploymentOutputWithContext(ctx context.Context) Dep return o } +// The deployment ID func (o DeploymentOutput) Contract_id() pulumi.IntOutput { return o.ApplyT(func(v *Deployment) pulumi.IntOutput { return v.Contract_id }).(pulumi.IntOutput) } +// The disks requested to be included in the deployment func (o DeploymentOutput) Disks() DiskArrayOutput { return o.ApplyT(func(v *Deployment) DiskArrayOutput { return v.Disks }).(DiskArrayOutput) } +// IP range of the node for the wireguard network (e.g. 10.1.2.0/24). Has to have a subnet mask of 24 func (o DeploymentOutput) Ip_range() pulumi.StringOutput { return o.ApplyT(func(v *Deployment) pulumi.StringOutput { return v.Ip_range }).(pulumi.StringOutput) } +// The name of the deployment, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported func (o DeploymentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Deployment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } +// The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist func (o DeploymentOutput) Network_name() pulumi.StringPtrOutput { return o.ApplyT(func(v *Deployment) pulumi.StringPtrOutput { return v.Network_name }).(pulumi.StringPtrOutput) } +// Mapping from each node to its deployment ID func (o DeploymentOutput) Node_deployment_id() pulumi.IntMapOutput { return o.ApplyT(func(v *Deployment) pulumi.IntMapOutput { return v.Node_deployment_id }).(pulumi.IntMapOutput) } +// The node ID to deploy on, required and should match the requested resources func (o DeploymentOutput) Node_id() pulumi.AnyOutput { return o.ApplyT(func(v *Deployment) pulumi.AnyOutput { return v.Node_id }).(pulumi.AnyOutput) } +// The qsfs output instances requested to be included in the deployment func (o DeploymentOutput) Qsfs() QSFSInputArrayOutput { return o.ApplyT(func(v *Deployment) QSFSInputArrayOutput { return v.Qsfs }).(QSFSInputArrayOutput) } @@ -228,14 +266,17 @@ func (o DeploymentOutput) Qsfs_computed() QSFSComputedArrayOutput { return o.ApplyT(func(v *Deployment) QSFSComputedArrayOutput { return v.Qsfs_computed }).(QSFSComputedArrayOutput) } +// ID for the deployed solution which allows the creator of the solution to gain a percentage of the rewards func (o DeploymentOutput) Solution_provider() pulumi.IntPtrOutput { return o.ApplyT(func(v *Deployment) pulumi.IntPtrOutput { return v.Solution_provider }).(pulumi.IntPtrOutput) } +// The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) func (o DeploymentOutput) Solution_type() pulumi.StringPtrOutput { return o.ApplyT(func(v *Deployment) pulumi.StringPtrOutput { return v.Solution_type }).(pulumi.StringPtrOutput) } +// The vms output requested to be included in the deployment func (o DeploymentOutput) Vms() VMInputArrayOutput { return o.ApplyT(func(v *Deployment) VMInputArrayOutput { return v.Vms }).(VMInputArrayOutput) } @@ -244,6 +285,7 @@ func (o DeploymentOutput) Vms_computed() VMComputedArrayOutput { return o.ApplyT(func(v *Deployment) VMComputedArrayOutput { return v.Vms_computed }).(VMComputedArrayOutput) } +// The zdbs output requested to be included in the deployment func (o DeploymentOutput) Zdbs() ZDBInputArrayOutput { return o.ApplyT(func(v *Deployment) ZDBInputArrayOutput { return v.Zdbs }).(ZDBInputArrayOutput) } diff --git a/sdk/go/threefold/gatewayFQDN.go b/sdk/go/threefold/gatewayFQDN.go index 1975cc98..1cbd3fda 100644 --- a/sdk/go/threefold/gatewayFQDN.go +++ b/sdk/go/threefold/gatewayFQDN.go @@ -15,16 +15,26 @@ import ( type GatewayFQDN struct { pulumi.CustomResourceState - Backends pulumi.StringArrayOutput `pulumi:"backends"` - Contract_id pulumi.IntOutput `pulumi:"contract_id"` - Description pulumi.StringPtrOutput `pulumi:"description"` - Fqdn pulumi.StringOutput `pulumi:"fqdn"` - Name pulumi.StringOutput `pulumi:"name"` - Network_name pulumi.StringPtrOutput `pulumi:"network_name"` - Node_deployment_id pulumi.IntMapOutput `pulumi:"node_deployment_id"` - Node_id pulumi.AnyOutput `pulumi:"node_id"` - Solution_type pulumi.StringPtrOutput `pulumi:"solution_type"` - Tls_pass_through pulumi.BoolPtrOutput `pulumi:"tls_pass_through"` + // The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + Backends pulumi.StringArrayOutput `pulumi:"backends"` + // The deployment ID + Contract_id pulumi.IntOutput `pulumi:"contract_id"` + // The description of the virtual machine workload, optional with no restrictions + Description pulumi.StringPtrOutput `pulumi:"description"` + // The fully qualified domain name of the deployed workload + Fqdn pulumi.StringOutput `pulumi:"fqdn"` + // Gateway workload name. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + Name pulumi.StringOutput `pulumi:"name"` + // Network name to join, if backend IP is private + Network_name pulumi.StringPtrOutput `pulumi:"network_name"` + // Mapping from each node to its deployment ID + Node_deployment_id pulumi.IntMapOutput `pulumi:"node_deployment_id"` + // The gateway's node ID + Node_id pulumi.AnyOutput `pulumi:"node_id"` + // The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + Solution_type pulumi.StringPtrOutput `pulumi:"solution_type"` + // TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service + Tls_pass_through pulumi.BoolPtrOutput `pulumi:"tls_pass_through"` } // NewGatewayFQDN registers a new resource with the given unique name, arguments, and options. @@ -82,25 +92,41 @@ func (GatewayFQDNState) ElementType() reflect.Type { } type gatewayFQDNArgs struct { - Backends []string `pulumi:"backends"` - Description *string `pulumi:"description"` - Fqdn string `pulumi:"fqdn"` - Name string `pulumi:"name"` - Network_name *string `pulumi:"network_name"` - Node_id interface{} `pulumi:"node_id"` - Solution_type *string `pulumi:"solution_type"` - Tls_pass_through *bool `pulumi:"tls_pass_through"` + // The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + Backends []string `pulumi:"backends"` + // The description of the virtual machine workload, optional with no restrictions + Description *string `pulumi:"description"` + // The fully qualified domain name of the deployed workload + Fqdn string `pulumi:"fqdn"` + // Gateway workload name. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + Name string `pulumi:"name"` + // Network name to join, if backend IP is private + Network_name *string `pulumi:"network_name"` + // The gateway's node ID + Node_id interface{} `pulumi:"node_id"` + // The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + Solution_type *string `pulumi:"solution_type"` + // TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service + Tls_pass_through *bool `pulumi:"tls_pass_through"` } // The set of arguments for constructing a GatewayFQDN resource. type GatewayFQDNArgs struct { - Backends pulumi.StringArrayInput - Description pulumi.StringPtrInput - Fqdn pulumi.StringInput - Name pulumi.StringInput - Network_name pulumi.StringPtrInput - Node_id pulumi.Input - Solution_type pulumi.StringPtrInput + // The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + Backends pulumi.StringArrayInput + // The description of the virtual machine workload, optional with no restrictions + Description pulumi.StringPtrInput + // The fully qualified domain name of the deployed workload + Fqdn pulumi.StringInput + // Gateway workload name. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + Name pulumi.StringInput + // Network name to join, if backend IP is private + Network_name pulumi.StringPtrInput + // The gateway's node ID + Node_id pulumi.Input + // The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + Solution_type pulumi.StringPtrInput + // TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service Tls_pass_through pulumi.BoolPtrInput } @@ -191,42 +217,52 @@ func (o GatewayFQDNOutput) ToGatewayFQDNOutputWithContext(ctx context.Context) G return o } +// The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] func (o GatewayFQDNOutput) Backends() pulumi.StringArrayOutput { return o.ApplyT(func(v *GatewayFQDN) pulumi.StringArrayOutput { return v.Backends }).(pulumi.StringArrayOutput) } +// The deployment ID func (o GatewayFQDNOutput) Contract_id() pulumi.IntOutput { return o.ApplyT(func(v *GatewayFQDN) pulumi.IntOutput { return v.Contract_id }).(pulumi.IntOutput) } +// The description of the virtual machine workload, optional with no restrictions func (o GatewayFQDNOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *GatewayFQDN) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } +// The fully qualified domain name of the deployed workload func (o GatewayFQDNOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *GatewayFQDN) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } +// Gateway workload name. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters func (o GatewayFQDNOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *GatewayFQDN) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } +// Network name to join, if backend IP is private func (o GatewayFQDNOutput) Network_name() pulumi.StringPtrOutput { return o.ApplyT(func(v *GatewayFQDN) pulumi.StringPtrOutput { return v.Network_name }).(pulumi.StringPtrOutput) } +// Mapping from each node to its deployment ID func (o GatewayFQDNOutput) Node_deployment_id() pulumi.IntMapOutput { return o.ApplyT(func(v *GatewayFQDN) pulumi.IntMapOutput { return v.Node_deployment_id }).(pulumi.IntMapOutput) } +// The gateway's node ID func (o GatewayFQDNOutput) Node_id() pulumi.AnyOutput { return o.ApplyT(func(v *GatewayFQDN) pulumi.AnyOutput { return v.Node_id }).(pulumi.AnyOutput) } +// The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) func (o GatewayFQDNOutput) Solution_type() pulumi.StringPtrOutput { return o.ApplyT(func(v *GatewayFQDN) pulumi.StringPtrOutput { return v.Solution_type }).(pulumi.StringPtrOutput) } +// TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service func (o GatewayFQDNOutput) Tls_pass_through() pulumi.BoolPtrOutput { return o.ApplyT(func(v *GatewayFQDN) pulumi.BoolPtrOutput { return v.Tls_pass_through }).(pulumi.BoolPtrOutput) } diff --git a/sdk/go/threefold/gatewayName.go b/sdk/go/threefold/gatewayName.go index d885dcc1..f6c91f80 100644 --- a/sdk/go/threefold/gatewayName.go +++ b/sdk/go/threefold/gatewayName.go @@ -15,17 +15,28 @@ import ( type GatewayName struct { pulumi.CustomResourceState - Backends pulumi.StringArrayOutput `pulumi:"backends"` - Contract_id pulumi.IntOutput `pulumi:"contract_id"` - Description pulumi.StringPtrOutput `pulumi:"description"` - Fqdn pulumi.StringOutput `pulumi:"fqdn"` - Name pulumi.StringOutput `pulumi:"name"` - Name_contract_id pulumi.IntOutput `pulumi:"name_contract_id"` - Network pulumi.StringPtrOutput `pulumi:"network"` - Node_deployment_id pulumi.IntMapOutput `pulumi:"node_deployment_id"` - Node_id pulumi.AnyOutput `pulumi:"node_id"` - Solution_type pulumi.StringPtrOutput `pulumi:"solution_type"` - Tls_passthrough pulumi.BoolPtrOutput `pulumi:"tls_passthrough"` + // The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + Backends pulumi.StringArrayOutput `pulumi:"backends"` + // The deployment ID + Contract_id pulumi.IntOutput `pulumi:"contract_id"` + // The description of the virtual machine workload, optional with no restrictions + Description pulumi.StringPtrOutput `pulumi:"description"` + // The computed fully qualified domain name of the deployed workload + Fqdn pulumi.StringOutput `pulumi:"fqdn"` + // Domain prefix. The fqdn will be .. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + Name pulumi.StringOutput `pulumi:"name"` + // The reserved name contract ID + Name_contract_id pulumi.IntOutput `pulumi:"name_contract_id"` + // Network name to join, if backend IP is private + Network_name pulumi.StringPtrOutput `pulumi:"network_name"` + // Mapping from each node to its deployment ID + Node_deployment_id pulumi.IntMapOutput `pulumi:"node_deployment_id"` + // The gateway's node ID + Node_id pulumi.AnyOutput `pulumi:"node_id"` + // The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + Solution_type pulumi.StringPtrOutput `pulumi:"solution_type"` + // TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service + Tls_passthrough pulumi.BoolPtrOutput `pulumi:"tls_passthrough"` } // NewGatewayName registers a new resource with the given unique name, arguments, and options. @@ -80,23 +91,37 @@ func (GatewayNameState) ElementType() reflect.Type { } type gatewayNameArgs struct { - Backends []string `pulumi:"backends"` - Description *string `pulumi:"description"` - Name string `pulumi:"name"` - Network *string `pulumi:"network"` - Node_id interface{} `pulumi:"node_id"` - Solution_type *string `pulumi:"solution_type"` - Tls_passthrough *bool `pulumi:"tls_passthrough"` + // The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + Backends []string `pulumi:"backends"` + // The description of the virtual machine workload, optional with no restrictions + Description *string `pulumi:"description"` + // Domain prefix. The fqdn will be .. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + Name string `pulumi:"name"` + // Network name to join, if backend IP is private + Network_name *string `pulumi:"network_name"` + // The gateway's node ID + Node_id interface{} `pulumi:"node_id"` + // The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + Solution_type *string `pulumi:"solution_type"` + // TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service + Tls_passthrough *bool `pulumi:"tls_passthrough"` } // The set of arguments for constructing a GatewayName resource. type GatewayNameArgs struct { - Backends pulumi.StringArrayInput - Description pulumi.StringPtrInput - Name pulumi.StringInput - Network pulumi.StringPtrInput - Node_id pulumi.Input - Solution_type pulumi.StringPtrInput + // The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + Backends pulumi.StringArrayInput + // The description of the virtual machine workload, optional with no restrictions + Description pulumi.StringPtrInput + // Domain prefix. The fqdn will be .. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + Name pulumi.StringInput + // Network name to join, if backend IP is private + Network_name pulumi.StringPtrInput + // The gateway's node ID + Node_id pulumi.Input + // The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + Solution_type pulumi.StringPtrInput + // TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service Tls_passthrough pulumi.BoolPtrInput } @@ -187,46 +212,57 @@ func (o GatewayNameOutput) ToGatewayNameOutputWithContext(ctx context.Context) G return o } +// The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] func (o GatewayNameOutput) Backends() pulumi.StringArrayOutput { return o.ApplyT(func(v *GatewayName) pulumi.StringArrayOutput { return v.Backends }).(pulumi.StringArrayOutput) } +// The deployment ID func (o GatewayNameOutput) Contract_id() pulumi.IntOutput { return o.ApplyT(func(v *GatewayName) pulumi.IntOutput { return v.Contract_id }).(pulumi.IntOutput) } +// The description of the virtual machine workload, optional with no restrictions func (o GatewayNameOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *GatewayName) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } +// The computed fully qualified domain name of the deployed workload func (o GatewayNameOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *GatewayName) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } +// Domain prefix. The fqdn will be .. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters func (o GatewayNameOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *GatewayName) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } +// The reserved name contract ID func (o GatewayNameOutput) Name_contract_id() pulumi.IntOutput { return o.ApplyT(func(v *GatewayName) pulumi.IntOutput { return v.Name_contract_id }).(pulumi.IntOutput) } -func (o GatewayNameOutput) Network() pulumi.StringPtrOutput { - return o.ApplyT(func(v *GatewayName) pulumi.StringPtrOutput { return v.Network }).(pulumi.StringPtrOutput) +// Network name to join, if backend IP is private +func (o GatewayNameOutput) Network_name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *GatewayName) pulumi.StringPtrOutput { return v.Network_name }).(pulumi.StringPtrOutput) } +// Mapping from each node to its deployment ID func (o GatewayNameOutput) Node_deployment_id() pulumi.IntMapOutput { return o.ApplyT(func(v *GatewayName) pulumi.IntMapOutput { return v.Node_deployment_id }).(pulumi.IntMapOutput) } +// The gateway's node ID func (o GatewayNameOutput) Node_id() pulumi.AnyOutput { return o.ApplyT(func(v *GatewayName) pulumi.AnyOutput { return v.Node_id }).(pulumi.AnyOutput) } +// The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) func (o GatewayNameOutput) Solution_type() pulumi.StringPtrOutput { return o.ApplyT(func(v *GatewayName) pulumi.StringPtrOutput { return v.Solution_type }).(pulumi.StringPtrOutput) } +// TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service func (o GatewayNameOutput) Tls_passthrough() pulumi.BoolPtrOutput { return o.ApplyT(func(v *GatewayName) pulumi.BoolPtrOutput { return v.Tls_passthrough }).(pulumi.BoolPtrOutput) } diff --git a/sdk/go/threefold/kubernetes.go b/sdk/go/threefold/kubernetes.go index 0c82161d..bd253c00 100644 --- a/sdk/go/threefold/kubernetes.go +++ b/sdk/go/threefold/kubernetes.go @@ -15,16 +15,26 @@ import ( type Kubernetes struct { pulumi.CustomResourceState - Master K8sNodeInputOutput `pulumi:"master"` - Master_computed K8sNodeComputedOutput `pulumi:"master_computed"` - Network_name pulumi.StringOutput `pulumi:"network_name"` - Node_deployment_id pulumi.IntMapOutput `pulumi:"node_deployment_id"` - Nodes_ip_range pulumi.StringMapOutput `pulumi:"nodes_ip_range"` - Solution_type pulumi.StringPtrOutput `pulumi:"solution_type"` - Ssh_key pulumi.StringPtrOutput `pulumi:"ssh_key"` - Token pulumi.StringOutput `pulumi:"token"` - Workers K8sNodeInputArrayOutput `pulumi:"workers"` - Workers_computed K8sNodeComputedMapOutput `pulumi:"workers_computed"` + // Master holds the configuration of master node in the kubernetes cluster + Master K8sNodeInputOutput `pulumi:"master"` + // The computed fields of the master node + Master_computed VMComputedOutput `pulumi:"master_computed"` + // The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + Network_name pulumi.StringOutput `pulumi:"network_name"` + // Mapping from each node to its deployment ID + Node_deployment_id pulumi.IntMapOutput `pulumi:"node_deployment_id"` + // Computed values of nodes' IP ranges after deployment + Nodes_ip_range pulumi.StringMapOutput `pulumi:"nodes_ip_range"` + // The solution type of the cluster, displayed as project name in contract metadata + Solution_type pulumi.StringPtrOutput `pulumi:"solution_type"` + // SSH key to access the cluster nodes + Ssh_key pulumi.StringPtrOutput `pulumi:"ssh_key"` + // The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string + Token pulumi.StringOutput `pulumi:"token"` + // Workers is a list holding the workers configuration for the kubernetes cluster + Workers K8sNodeInputArrayOutput `pulumi:"workers"` + // List of the computed fields of the worker nodes + Workers_computed VMComputedMapOutput `pulumi:"workers_computed"` } // NewKubernetes registers a new resource with the given unique name, arguments, and options. @@ -82,22 +92,34 @@ func (KubernetesState) ElementType() reflect.Type { } type kubernetesArgs struct { - Master K8sNodeInput `pulumi:"master"` - Network_name string `pulumi:"network_name"` - Solution_type *string `pulumi:"solution_type"` - Ssh_key *string `pulumi:"ssh_key"` - Token string `pulumi:"token"` - Workers []K8sNodeInput `pulumi:"workers"` + // Master holds the configuration of master node in the kubernetes cluster + Master K8sNodeInput `pulumi:"master"` + // The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + Network_name string `pulumi:"network_name"` + // The solution type of the cluster, displayed as project name in contract metadata + Solution_type *string `pulumi:"solution_type"` + // SSH key to access the cluster nodes + Ssh_key *string `pulumi:"ssh_key"` + // The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string + Token string `pulumi:"token"` + // Workers is a list holding the workers configuration for the kubernetes cluster + Workers []K8sNodeInput `pulumi:"workers"` } // The set of arguments for constructing a Kubernetes resource. type KubernetesArgs struct { - Master K8sNodeInputInput - Network_name pulumi.StringInput + // Master holds the configuration of master node in the kubernetes cluster + Master K8sNodeInputInput + // The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + Network_name pulumi.StringInput + // The solution type of the cluster, displayed as project name in contract metadata Solution_type pulumi.StringPtrInput - Ssh_key pulumi.StringPtrInput - Token pulumi.StringInput - Workers K8sNodeInputArrayInput + // SSH key to access the cluster nodes + Ssh_key pulumi.StringPtrInput + // The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string + Token pulumi.StringInput + // Workers is a list holding the workers configuration for the kubernetes cluster + Workers K8sNodeInputArrayInput } func (KubernetesArgs) ElementType() reflect.Type { @@ -187,44 +209,54 @@ func (o KubernetesOutput) ToKubernetesOutputWithContext(ctx context.Context) Kub return o } +// Master holds the configuration of master node in the kubernetes cluster func (o KubernetesOutput) Master() K8sNodeInputOutput { return o.ApplyT(func(v *Kubernetes) K8sNodeInputOutput { return v.Master }).(K8sNodeInputOutput) } -func (o KubernetesOutput) Master_computed() K8sNodeComputedOutput { - return o.ApplyT(func(v *Kubernetes) K8sNodeComputedOutput { return v.Master_computed }).(K8sNodeComputedOutput) +// The computed fields of the master node +func (o KubernetesOutput) Master_computed() VMComputedOutput { + return o.ApplyT(func(v *Kubernetes) VMComputedOutput { return v.Master_computed }).(VMComputedOutput) } +// The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist func (o KubernetesOutput) Network_name() pulumi.StringOutput { return o.ApplyT(func(v *Kubernetes) pulumi.StringOutput { return v.Network_name }).(pulumi.StringOutput) } +// Mapping from each node to its deployment ID func (o KubernetesOutput) Node_deployment_id() pulumi.IntMapOutput { return o.ApplyT(func(v *Kubernetes) pulumi.IntMapOutput { return v.Node_deployment_id }).(pulumi.IntMapOutput) } +// Computed values of nodes' IP ranges after deployment func (o KubernetesOutput) Nodes_ip_range() pulumi.StringMapOutput { return o.ApplyT(func(v *Kubernetes) pulumi.StringMapOutput { return v.Nodes_ip_range }).(pulumi.StringMapOutput) } +// The solution type of the cluster, displayed as project name in contract metadata func (o KubernetesOutput) Solution_type() pulumi.StringPtrOutput { return o.ApplyT(func(v *Kubernetes) pulumi.StringPtrOutput { return v.Solution_type }).(pulumi.StringPtrOutput) } +// SSH key to access the cluster nodes func (o KubernetesOutput) Ssh_key() pulumi.StringPtrOutput { return o.ApplyT(func(v *Kubernetes) pulumi.StringPtrOutput { return v.Ssh_key }).(pulumi.StringPtrOutput) } +// The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string func (o KubernetesOutput) Token() pulumi.StringOutput { return o.ApplyT(func(v *Kubernetes) pulumi.StringOutput { return v.Token }).(pulumi.StringOutput) } +// Workers is a list holding the workers configuration for the kubernetes cluster func (o KubernetesOutput) Workers() K8sNodeInputArrayOutput { return o.ApplyT(func(v *Kubernetes) K8sNodeInputArrayOutput { return v.Workers }).(K8sNodeInputArrayOutput) } -func (o KubernetesOutput) Workers_computed() K8sNodeComputedMapOutput { - return o.ApplyT(func(v *Kubernetes) K8sNodeComputedMapOutput { return v.Workers_computed }).(K8sNodeComputedMapOutput) +// List of the computed fields of the worker nodes +func (o KubernetesOutput) Workers_computed() VMComputedMapOutput { + return o.ApplyT(func(v *Kubernetes) VMComputedMapOutput { return v.Workers_computed }).(VMComputedMapOutput) } type KubernetesArrayOutput struct{ *pulumi.OutputState } diff --git a/sdk/go/threefold/network.go b/sdk/go/threefold/network.go index 2cc6fee2..fa090d03 100644 --- a/sdk/go/threefold/network.go +++ b/sdk/go/threefold/network.go @@ -15,20 +15,34 @@ import ( type Network struct { pulumi.CustomResourceState - Access_wg_config pulumi.StringOutput `pulumi:"access_wg_config"` - Add_wg_access pulumi.BoolPtrOutput `pulumi:"add_wg_access"` - Description pulumi.StringOutput `pulumi:"description"` - External_ip pulumi.StringOutput `pulumi:"external_ip"` - External_sk pulumi.StringOutput `pulumi:"external_sk"` - Ip_range pulumi.StringOutput `pulumi:"ip_range"` - Mycelium pulumi.BoolPtrOutput `pulumi:"mycelium"` - Mycelium_keys pulumi.StringMapOutput `pulumi:"mycelium_keys"` - Name pulumi.StringOutput `pulumi:"name"` - Node_deployment_id pulumi.IntMapOutput `pulumi:"node_deployment_id"` - Nodes pulumi.ArrayOutput `pulumi:"nodes"` - Nodes_ip_range pulumi.StringMapOutput `pulumi:"nodes_ip_range"` - Public_node_id pulumi.IntOutput `pulumi:"public_node_id"` - Solution_type pulumi.StringPtrOutput `pulumi:"solution_type"` + // Generated wireguard configuration for external user access to the network + Access_wg_config pulumi.StringOutput `pulumi:"access_wg_config"` + // A flag to support wireguard in the network + Add_wg_access pulumi.BoolPtrOutput `pulumi:"add_wg_access"` + // The description of the network workload, optional with no restrictions + Description pulumi.StringOutput `pulumi:"description"` + // Wireguard IP assigned for external user access + External_ip pulumi.StringOutput `pulumi:"external_ip"` + // External user private key used in encryption while communicating through Wireguard network + External_sk pulumi.StringOutput `pulumi:"external_sk"` + // The IP range for the network, subnet should be 16 + Ip_range pulumi.StringOutput `pulumi:"ip_range"` + // A flag to generate a random mycelium key to support mycelium in the network + Mycelium pulumi.BoolPtrOutput `pulumi:"mycelium"` + // A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes + Mycelium_keys pulumi.StringMapOutput `pulumi:"mycelium_keys"` + // The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name pulumi.StringOutput `pulumi:"name"` + // Mapping from each node to its deployment id + Node_deployment_id pulumi.IntMapOutput `pulumi:"node_deployment_id"` + // The nodes used to deploy the network on, shouldn't be empty + Nodes pulumi.ArrayOutput `pulumi:"nodes"` + // Computed values of nodes' IP ranges after deployment + Nodes_ip_range pulumi.StringMapOutput `pulumi:"nodes_ip_range"` + // Public node id (in case it's added). Used for wireguard access and supporting hidden nodes + Public_node_id pulumi.IntOutput `pulumi:"public_node_id"` + // The solution type of the network, displayed as project name in contract metadata + Solution_type pulumi.StringPtrOutput `pulumi:"solution_type"` } // NewNetwork registers a new resource with the given unique name, arguments, and options. @@ -86,25 +100,41 @@ func (NetworkState) ElementType() reflect.Type { } type networkArgs struct { - Add_wg_access *bool `pulumi:"add_wg_access"` - Description string `pulumi:"description"` - Ip_range string `pulumi:"ip_range"` - Mycelium *bool `pulumi:"mycelium"` + // A flag to support wireguard in the network + Add_wg_access *bool `pulumi:"add_wg_access"` + // The description of the network workload, optional with no restrictions + Description string `pulumi:"description"` + // The IP range for the network, subnet should be 16 + Ip_range string `pulumi:"ip_range"` + // A flag to generate a random mycelium key to support mycelium in the network + Mycelium *bool `pulumi:"mycelium"` + // A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes Mycelium_keys map[string]string `pulumi:"mycelium_keys"` - Name string `pulumi:"name"` - Nodes []interface{} `pulumi:"nodes"` - Solution_type *string `pulumi:"solution_type"` + // The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name string `pulumi:"name"` + // The nodes used to deploy the network on, shouldn't be empty + Nodes []interface{} `pulumi:"nodes"` + // The solution type of the network, displayed as project name in contract metadata + Solution_type *string `pulumi:"solution_type"` } // The set of arguments for constructing a Network resource. type NetworkArgs struct { + // A flag to support wireguard in the network Add_wg_access pulumi.BoolPtrInput - Description pulumi.StringInput - Ip_range pulumi.StringInput - Mycelium pulumi.BoolPtrInput + // The description of the network workload, optional with no restrictions + Description pulumi.StringInput + // The IP range for the network, subnet should be 16 + Ip_range pulumi.StringInput + // A flag to generate a random mycelium key to support mycelium in the network + Mycelium pulumi.BoolPtrInput + // A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes Mycelium_keys pulumi.StringMapInput - Name pulumi.StringInput - Nodes pulumi.ArrayInput + // The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name pulumi.StringInput + // The nodes used to deploy the network on, shouldn't be empty + Nodes pulumi.ArrayInput + // The solution type of the network, displayed as project name in contract metadata Solution_type pulumi.StringPtrInput } @@ -195,58 +225,72 @@ func (o NetworkOutput) ToNetworkOutputWithContext(ctx context.Context) NetworkOu return o } +// Generated wireguard configuration for external user access to the network func (o NetworkOutput) Access_wg_config() pulumi.StringOutput { return o.ApplyT(func(v *Network) pulumi.StringOutput { return v.Access_wg_config }).(pulumi.StringOutput) } +// A flag to support wireguard in the network func (o NetworkOutput) Add_wg_access() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Network) pulumi.BoolPtrOutput { return v.Add_wg_access }).(pulumi.BoolPtrOutput) } +// The description of the network workload, optional with no restrictions func (o NetworkOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v *Network) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) } +// Wireguard IP assigned for external user access func (o NetworkOutput) External_ip() pulumi.StringOutput { return o.ApplyT(func(v *Network) pulumi.StringOutput { return v.External_ip }).(pulumi.StringOutput) } +// External user private key used in encryption while communicating through Wireguard network func (o NetworkOutput) External_sk() pulumi.StringOutput { return o.ApplyT(func(v *Network) pulumi.StringOutput { return v.External_sk }).(pulumi.StringOutput) } +// The IP range for the network, subnet should be 16 func (o NetworkOutput) Ip_range() pulumi.StringOutput { return o.ApplyT(func(v *Network) pulumi.StringOutput { return v.Ip_range }).(pulumi.StringOutput) } +// A flag to generate a random mycelium key to support mycelium in the network func (o NetworkOutput) Mycelium() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Network) pulumi.BoolPtrOutput { return v.Mycelium }).(pulumi.BoolPtrOutput) } +// A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes func (o NetworkOutput) Mycelium_keys() pulumi.StringMapOutput { return o.ApplyT(func(v *Network) pulumi.StringMapOutput { return v.Mycelium_keys }).(pulumi.StringMapOutput) } +// The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported func (o NetworkOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Network) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } +// Mapping from each node to its deployment id func (o NetworkOutput) Node_deployment_id() pulumi.IntMapOutput { return o.ApplyT(func(v *Network) pulumi.IntMapOutput { return v.Node_deployment_id }).(pulumi.IntMapOutput) } +// The nodes used to deploy the network on, shouldn't be empty func (o NetworkOutput) Nodes() pulumi.ArrayOutput { return o.ApplyT(func(v *Network) pulumi.ArrayOutput { return v.Nodes }).(pulumi.ArrayOutput) } +// Computed values of nodes' IP ranges after deployment func (o NetworkOutput) Nodes_ip_range() pulumi.StringMapOutput { return o.ApplyT(func(v *Network) pulumi.StringMapOutput { return v.Nodes_ip_range }).(pulumi.StringMapOutput) } +// Public node id (in case it's added). Used for wireguard access and supporting hidden nodes func (o NetworkOutput) Public_node_id() pulumi.IntOutput { return o.ApplyT(func(v *Network) pulumi.IntOutput { return v.Public_node_id }).(pulumi.IntOutput) } +// The solution type of the network, displayed as project name in contract metadata func (o NetworkOutput) Solution_type() pulumi.StringPtrOutput { return o.ApplyT(func(v *Network) pulumi.StringPtrOutput { return v.Solution_type }).(pulumi.StringPtrOutput) } diff --git a/sdk/go/threefold/provider.go b/sdk/go/threefold/provider.go index aa7fa425..f2cacc98 100644 --- a/sdk/go/threefold/provider.go +++ b/sdk/go/threefold/provider.go @@ -22,8 +22,6 @@ type Provider struct { Network pulumi.StringPtrOutput `pulumi:"network"` // The timeout duration in seconds for rmb calls Rmb_timeout pulumi.StringPtrOutput `pulumi:"rmb_timeout"` - // The substrate url, example: wss://tfchain.dev.grid.tf/ws - Substrate_url pulumi.StringPtrOutput `pulumi:"substrate_url"` } // NewProvider registers a new resource with the given unique name, arguments, and options. @@ -65,34 +63,42 @@ func NewProvider(ctx *pulumi.Context, } type providerArgs struct { + // The graphql urls, example: https://graphql.grid.tf/graphql + Graphql_url []string `pulumi:"graphql_url"` // The key type registered on substrate (ed25519 or sr25519). Key_type *string `pulumi:"key_type"` // The mnemonic of the user. It is very secret. Mnemonic *string `pulumi:"mnemonic"` // The network to deploy on. Network *string `pulumi:"network"` - // The relay urls, example: wss://relay.dev.grid.tf + // The proxy urls, example: https://gridproxy.grid.tf/ + Proxy_url []string `pulumi:"proxy_url"` + // The relay urls, example: wss://relay.grid.tf Relay_url []string `pulumi:"relay_url"` // The timeout duration in seconds for rmb calls Rmb_timeout *string `pulumi:"rmb_timeout"` - // The substrate url, example: wss://tfchain.dev.grid.tf/ws - Substrate_url *string `pulumi:"substrate_url"` + // The substrate url, example: wss://tfchain.grid.tf/ws + Substrate_url []string `pulumi:"substrate_url"` } // The set of arguments for constructing a Provider resource. type ProviderArgs struct { + // The graphql urls, example: https://graphql.grid.tf/graphql + Graphql_url pulumi.StringArrayInput // The key type registered on substrate (ed25519 or sr25519). Key_type pulumi.StringPtrInput // The mnemonic of the user. It is very secret. Mnemonic pulumi.StringPtrInput // The network to deploy on. Network pulumi.StringPtrInput - // The relay urls, example: wss://relay.dev.grid.tf + // The proxy urls, example: https://gridproxy.grid.tf/ + Proxy_url pulumi.StringArrayInput + // The relay urls, example: wss://relay.grid.tf Relay_url pulumi.StringArrayInput // The timeout duration in seconds for rmb calls Rmb_timeout pulumi.StringPtrInput - // The substrate url, example: wss://tfchain.dev.grid.tf/ws - Substrate_url pulumi.StringPtrInput + // The substrate url, example: wss://tfchain.grid.tf/ws + Substrate_url pulumi.StringArrayInput } func (ProviderArgs) ElementType() reflect.Type { @@ -152,11 +158,6 @@ func (o ProviderOutput) Rmb_timeout() pulumi.StringPtrOutput { return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Rmb_timeout }).(pulumi.StringPtrOutput) } -// The substrate url, example: wss://tfchain.dev.grid.tf/ws -func (o ProviderOutput) Substrate_url() pulumi.StringPtrOutput { - return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Substrate_url }).(pulumi.StringPtrOutput) -} - func init() { pulumi.RegisterInputType(reflect.TypeOf((*ProviderInput)(nil)).Elem(), &Provider{}) pulumi.RegisterOutputType(ProviderOutput{}) diff --git a/sdk/go/threefold/pulumiTypes.go b/sdk/go/threefold/pulumiTypes.go index 1ddc2e11..9c4e45c4 100644 --- a/sdk/go/threefold/pulumiTypes.go +++ b/sdk/go/threefold/pulumiTypes.go @@ -14,9 +14,12 @@ import ( var _ = internal.GetEnvOrDefault type Backend struct { - Address string `pulumi:"address"` + // Address of backend ZDB (e.g. [300:a582:c60c:df75:f6da:8a92:d5ed:71ad]:9900 or 60.60.60.60:9900) + Address string `pulumi:"address"` + // ZDB namespace Namespace string `pulumi:"namespace"` - Password string `pulumi:"password"` + // Namespace password + Password string `pulumi:"password"` } // BackendInput is an input type that accepts BackendArgs and BackendOutput values. @@ -31,9 +34,12 @@ type BackendInput interface { } type BackendArgs struct { - Address pulumi.StringInput `pulumi:"address"` + // Address of backend ZDB (e.g. [300:a582:c60c:df75:f6da:8a92:d5ed:71ad]:9900 or 60.60.60.60:9900) + Address pulumi.StringInput `pulumi:"address"` + // ZDB namespace Namespace pulumi.StringInput `pulumi:"namespace"` - Password pulumi.StringInput `pulumi:"password"` + // Namespace password + Password pulumi.StringInput `pulumi:"password"` } func (BackendArgs) ElementType() reflect.Type { @@ -87,14 +93,17 @@ func (o BackendOutput) ToBackendOutputWithContext(ctx context.Context) BackendOu return o } +// Address of backend ZDB (e.g. [300:a582:c60c:df75:f6da:8a92:d5ed:71ad]:9900 or 60.60.60.60:9900) func (o BackendOutput) Address() pulumi.StringOutput { return o.ApplyT(func(v Backend) string { return v.Address }).(pulumi.StringOutput) } +// ZDB namespace func (o BackendOutput) Namespace() pulumi.StringOutput { return o.ApplyT(func(v Backend) string { return v.Namespace }).(pulumi.StringOutput) } +// Namespace password func (o BackendOutput) Password() pulumi.StringOutput { return o.ApplyT(func(v Backend) string { return v.Password }).(pulumi.StringOutput) } @@ -120,9 +129,12 @@ func (o BackendArrayOutput) Index(i pulumi.IntInput) BackendOutput { } type Disk struct { + // The description of the disk workload, optional with no restrictions Description *string `pulumi:"description"` - Name string `pulumi:"name"` - Size int `pulumi:"size"` + // The name of the disk workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name string `pulumi:"name"` + // The disk size in GB (type SSD) + Size int `pulumi:"size"` } // DiskInput is an input type that accepts DiskArgs and DiskOutput values. @@ -137,9 +149,12 @@ type DiskInput interface { } type DiskArgs struct { + // The description of the disk workload, optional with no restrictions Description pulumi.StringPtrInput `pulumi:"description"` - Name pulumi.StringInput `pulumi:"name"` - Size pulumi.IntInput `pulumi:"size"` + // The name of the disk workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name pulumi.StringInput `pulumi:"name"` + // The disk size in GB (type SSD) + Size pulumi.IntInput `pulumi:"size"` } func (DiskArgs) ElementType() reflect.Type { @@ -193,14 +208,17 @@ func (o DiskOutput) ToDiskOutputWithContext(ctx context.Context) DiskOutput { return o } +// The description of the disk workload, optional with no restrictions func (o DiskOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v Disk) *string { return v.Description }).(pulumi.StringPtrOutput) } +// The name of the disk workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported func (o DiskOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v Disk) string { return v.Name }).(pulumi.StringOutput) } +// The disk size in GB (type SSD) func (o DiskOutput) Size() pulumi.IntOutput { return o.ApplyT(func(v Disk) int { return v.Size }).(pulumi.IntOutput) } @@ -226,6 +244,7 @@ func (o DiskArrayOutput) Index(i pulumi.IntInput) DiskOutput { } type Group struct { + // List of ZDB backends configurations Backends []Backend `pulumi:"backends"` } @@ -241,6 +260,7 @@ type GroupInput interface { } type GroupArgs struct { + // List of ZDB backends configurations Backends BackendArrayInput `pulumi:"backends"` } @@ -295,6 +315,7 @@ func (o GroupOutput) ToGroupOutputWithContext(ctx context.Context) GroupOutput { return o } +// List of ZDB backends configurations func (o GroupOutput) Backends() BackendArrayOutput { return o.ApplyT(func(v Group) []Backend { return v.Backends }).(BackendArrayOutput) } @@ -319,150 +340,47 @@ func (o GroupArrayOutput) Index(i pulumi.IntInput) GroupOutput { }).(GroupOutput) } -type K8sNodeComputed struct { - Computed_ip string `pulumi:"computed_ip"` - Computed_ip6 string `pulumi:"computed_ip6"` - Console_url string `pulumi:"console_url"` - Ip string `pulumi:"ip"` - Mycelium_ip string `pulumi:"mycelium_ip"` - Mycelium_ip_seed string `pulumi:"mycelium_ip_seed"` - Planetary_ip string `pulumi:"planetary_ip"` -} - -// K8sNodeComputedInput is an input type that accepts K8sNodeComputedArgs and K8sNodeComputedOutput values. -// You can construct a concrete instance of `K8sNodeComputedInput` via: -// -// K8sNodeComputedArgs{...} -type K8sNodeComputedInput interface { - pulumi.Input - - ToK8sNodeComputedOutput() K8sNodeComputedOutput - ToK8sNodeComputedOutputWithContext(context.Context) K8sNodeComputedOutput -} - -type K8sNodeComputedArgs struct { - Computed_ip pulumi.StringInput `pulumi:"computed_ip"` - Computed_ip6 pulumi.StringInput `pulumi:"computed_ip6"` - Console_url pulumi.StringInput `pulumi:"console_url"` - Ip pulumi.StringInput `pulumi:"ip"` - Mycelium_ip pulumi.StringInput `pulumi:"mycelium_ip"` - Mycelium_ip_seed pulumi.StringInput `pulumi:"mycelium_ip_seed"` - Planetary_ip pulumi.StringInput `pulumi:"planetary_ip"` -} - -func (K8sNodeComputedArgs) ElementType() reflect.Type { - return reflect.TypeOf((*K8sNodeComputed)(nil)).Elem() -} - -func (i K8sNodeComputedArgs) ToK8sNodeComputedOutput() K8sNodeComputedOutput { - return i.ToK8sNodeComputedOutputWithContext(context.Background()) -} - -func (i K8sNodeComputedArgs) ToK8sNodeComputedOutputWithContext(ctx context.Context) K8sNodeComputedOutput { - return pulumi.ToOutputWithContext(ctx, i).(K8sNodeComputedOutput) -} - -// K8sNodeComputedMapInput is an input type that accepts K8sNodeComputedMap and K8sNodeComputedMapOutput values. -// You can construct a concrete instance of `K8sNodeComputedMapInput` via: -// -// K8sNodeComputedMap{ "key": K8sNodeComputedArgs{...} } -type K8sNodeComputedMapInput interface { - pulumi.Input - - ToK8sNodeComputedMapOutput() K8sNodeComputedMapOutput - ToK8sNodeComputedMapOutputWithContext(context.Context) K8sNodeComputedMapOutput -} - -type K8sNodeComputedMap map[string]K8sNodeComputedInput - -func (K8sNodeComputedMap) ElementType() reflect.Type { - return reflect.TypeOf((*map[string]K8sNodeComputed)(nil)).Elem() -} - -func (i K8sNodeComputedMap) ToK8sNodeComputedMapOutput() K8sNodeComputedMapOutput { - return i.ToK8sNodeComputedMapOutputWithContext(context.Background()) -} - -func (i K8sNodeComputedMap) ToK8sNodeComputedMapOutputWithContext(ctx context.Context) K8sNodeComputedMapOutput { - return pulumi.ToOutputWithContext(ctx, i).(K8sNodeComputedMapOutput) -} - -type K8sNodeComputedOutput struct{ *pulumi.OutputState } - -func (K8sNodeComputedOutput) ElementType() reflect.Type { - return reflect.TypeOf((*K8sNodeComputed)(nil)).Elem() -} - -func (o K8sNodeComputedOutput) ToK8sNodeComputedOutput() K8sNodeComputedOutput { - return o -} - -func (o K8sNodeComputedOutput) ToK8sNodeComputedOutputWithContext(ctx context.Context) K8sNodeComputedOutput { - return o -} - -func (o K8sNodeComputedOutput) Computed_ip() pulumi.StringOutput { - return o.ApplyT(func(v K8sNodeComputed) string { return v.Computed_ip }).(pulumi.StringOutput) -} - -func (o K8sNodeComputedOutput) Computed_ip6() pulumi.StringOutput { - return o.ApplyT(func(v K8sNodeComputed) string { return v.Computed_ip6 }).(pulumi.StringOutput) -} - -func (o K8sNodeComputedOutput) Console_url() pulumi.StringOutput { - return o.ApplyT(func(v K8sNodeComputed) string { return v.Console_url }).(pulumi.StringOutput) -} - -func (o K8sNodeComputedOutput) Ip() pulumi.StringOutput { - return o.ApplyT(func(v K8sNodeComputed) string { return v.Ip }).(pulumi.StringOutput) -} - -func (o K8sNodeComputedOutput) Mycelium_ip() pulumi.StringOutput { - return o.ApplyT(func(v K8sNodeComputed) string { return v.Mycelium_ip }).(pulumi.StringOutput) -} - -func (o K8sNodeComputedOutput) Mycelium_ip_seed() pulumi.StringOutput { - return o.ApplyT(func(v K8sNodeComputed) string { return v.Mycelium_ip_seed }).(pulumi.StringOutput) -} - -func (o K8sNodeComputedOutput) Planetary_ip() pulumi.StringOutput { - return o.ApplyT(func(v K8sNodeComputed) string { return v.Planetary_ip }).(pulumi.StringOutput) -} - -type K8sNodeComputedMapOutput struct{ *pulumi.OutputState } - -func (K8sNodeComputedMapOutput) ElementType() reflect.Type { - return reflect.TypeOf((*map[string]K8sNodeComputed)(nil)).Elem() -} - -func (o K8sNodeComputedMapOutput) ToK8sNodeComputedMapOutput() K8sNodeComputedMapOutput { - return o -} - -func (o K8sNodeComputedMapOutput) ToK8sNodeComputedMapOutputWithContext(ctx context.Context) K8sNodeComputedMapOutput { - return o -} - -func (o K8sNodeComputedMapOutput) MapIndex(k pulumi.StringInput) K8sNodeComputedOutput { - return pulumi.All(o, k).ApplyT(func(vs []interface{}) K8sNodeComputed { - return vs[0].(map[string]K8sNodeComputed)[vs[1].(string)] - }).(K8sNodeComputedOutput) -} - type K8sNodeInput struct { - Cpu int `pulumi:"cpu"` - Disk_size int `pulumi:"disk_size"` - Flist *string `pulumi:"flist"` - Flist_checksum *string `pulumi:"flist_checksum"` - Memory int `pulumi:"memory"` - Mycelium *bool `pulumi:"mycelium"` - Mycelium_ip_seed *string `pulumi:"mycelium_ip_seed"` - Name string `pulumi:"name"` - Network_name string `pulumi:"network_name"` - Node interface{} `pulumi:"node"` - Planetary *bool `pulumi:"planetary"` - Public_ip *bool `pulumi:"public_ip"` - Public_ip6 *bool `pulumi:"public_ip6"` + // The cpu units needed for the virtual machine. Range in [1: 32] + Cpu int `pulumi:"cpu"` + // The description of the virtual machine workload, optional with no restrictions + Description *string `pulumi:"description"` + // Data disk size in GBs. Must be between 1GB and 10240GBs (10TBs) + Disk_size int `pulumi:"disk_size"` + // The entry point for the flist. Example: /sbin/zinit init + Entrypoint *string `pulumi:"entrypoint"` + // The environment variables to be passed to the virtual machine. Example: SSH_KEY + Env_vars map[string]string `pulumi:"env_vars"` + // The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + Flist string `pulumi:"flist"` + // The checksum of the flist which should match the checksum of the given flist, optional + Flist_checksum *string `pulumi:"flist_checksum"` + // A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + Gpus []string `pulumi:"gpus"` + // The memory capacity for the virtual machine in MB. Min is 250 MB + Memory int `pulumi:"memory"` + // A list of mounted disks or volumes + Mounts []Mount `pulumi:"mounts"` + // A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + Mycelium *bool `pulumi:"mycelium"` + // The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + Mycelium_ip_seed *string `pulumi:"mycelium_ip_seed"` + // The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name string `pulumi:"name"` + // The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + Network_name string `pulumi:"network_name"` + // The node ID to deploy the virtual machine on, required and should match the requested resources + Node_id interface{} `pulumi:"node_id"` + // A flag to enable generating a yggdrasil IP for the virtual machine + Planetary *bool `pulumi:"planetary"` + // A flag to enable generating a public IP for the virtual machine, public node is required for it + Public_ip *bool `pulumi:"public_ip"` + // A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + Public_ip6 *bool `pulumi:"public_ip6"` + // The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + Rootfs_size *int `pulumi:"rootfs_size"` + // A list of virtual machine loggers + Zlogs []Zlog `pulumi:"zlogs"` } // K8sNodeInputInput is an input type that accepts K8sNodeInputArgs and K8sNodeInputOutput values. @@ -477,19 +395,46 @@ type K8sNodeInputInput interface { } type K8sNodeInputArgs struct { - Cpu pulumi.IntInput `pulumi:"cpu"` - Disk_size pulumi.IntInput `pulumi:"disk_size"` - Flist pulumi.StringPtrInput `pulumi:"flist"` - Flist_checksum pulumi.StringPtrInput `pulumi:"flist_checksum"` - Memory pulumi.IntInput `pulumi:"memory"` - Mycelium pulumi.BoolPtrInput `pulumi:"mycelium"` + // The cpu units needed for the virtual machine. Range in [1: 32] + Cpu pulumi.IntInput `pulumi:"cpu"` + // The description of the virtual machine workload, optional with no restrictions + Description pulumi.StringPtrInput `pulumi:"description"` + // Data disk size in GBs. Must be between 1GB and 10240GBs (10TBs) + Disk_size pulumi.IntInput `pulumi:"disk_size"` + // The entry point for the flist. Example: /sbin/zinit init + Entrypoint pulumi.StringPtrInput `pulumi:"entrypoint"` + // The environment variables to be passed to the virtual machine. Example: SSH_KEY + Env_vars pulumi.StringMapInput `pulumi:"env_vars"` + // The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + Flist pulumi.StringInput `pulumi:"flist"` + // The checksum of the flist which should match the checksum of the given flist, optional + Flist_checksum pulumi.StringPtrInput `pulumi:"flist_checksum"` + // A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + Gpus pulumi.StringArrayInput `pulumi:"gpus"` + // The memory capacity for the virtual machine in MB. Min is 250 MB + Memory pulumi.IntInput `pulumi:"memory"` + // A list of mounted disks or volumes + Mounts MountArrayInput `pulumi:"mounts"` + // A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + Mycelium pulumi.BoolPtrInput `pulumi:"mycelium"` + // The seed used for mycelium IP generated for the virtual machine. It's length should be 6 Mycelium_ip_seed pulumi.StringPtrInput `pulumi:"mycelium_ip_seed"` - Name pulumi.StringInput `pulumi:"name"` - Network_name pulumi.StringInput `pulumi:"network_name"` - Node pulumi.Input `pulumi:"node"` - Planetary pulumi.BoolPtrInput `pulumi:"planetary"` - Public_ip pulumi.BoolPtrInput `pulumi:"public_ip"` - Public_ip6 pulumi.BoolPtrInput `pulumi:"public_ip6"` + // The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name pulumi.StringInput `pulumi:"name"` + // The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + Network_name pulumi.StringInput `pulumi:"network_name"` + // The node ID to deploy the virtual machine on, required and should match the requested resources + Node_id pulumi.Input `pulumi:"node_id"` + // A flag to enable generating a yggdrasil IP for the virtual machine + Planetary pulumi.BoolPtrInput `pulumi:"planetary"` + // A flag to enable generating a public IP for the virtual machine, public node is required for it + Public_ip pulumi.BoolPtrInput `pulumi:"public_ip"` + // A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + Public_ip6 pulumi.BoolPtrInput `pulumi:"public_ip6"` + // The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + Rootfs_size pulumi.IntPtrInput `pulumi:"rootfs_size"` + // A list of virtual machine loggers + Zlogs ZlogArrayInput `pulumi:"zlogs"` } func (K8sNodeInputArgs) ElementType() reflect.Type { @@ -543,58 +488,106 @@ func (o K8sNodeInputOutput) ToK8sNodeInputOutputWithContext(ctx context.Context) return o } +// The cpu units needed for the virtual machine. Range in [1: 32] func (o K8sNodeInputOutput) Cpu() pulumi.IntOutput { return o.ApplyT(func(v K8sNodeInput) int { return v.Cpu }).(pulumi.IntOutput) } +// The description of the virtual machine workload, optional with no restrictions +func (o K8sNodeInputOutput) Description() pulumi.StringPtrOutput { + return o.ApplyT(func(v K8sNodeInput) *string { return v.Description }).(pulumi.StringPtrOutput) +} + +// Data disk size in GBs. Must be between 1GB and 10240GBs (10TBs) func (o K8sNodeInputOutput) Disk_size() pulumi.IntOutput { return o.ApplyT(func(v K8sNodeInput) int { return v.Disk_size }).(pulumi.IntOutput) } -func (o K8sNodeInputOutput) Flist() pulumi.StringPtrOutput { - return o.ApplyT(func(v K8sNodeInput) *string { return v.Flist }).(pulumi.StringPtrOutput) +// The entry point for the flist. Example: /sbin/zinit init +func (o K8sNodeInputOutput) Entrypoint() pulumi.StringPtrOutput { + return o.ApplyT(func(v K8sNodeInput) *string { return v.Entrypoint }).(pulumi.StringPtrOutput) } +// The environment variables to be passed to the virtual machine. Example: SSH_KEY +func (o K8sNodeInputOutput) Env_vars() pulumi.StringMapOutput { + return o.ApplyT(func(v K8sNodeInput) map[string]string { return v.Env_vars }).(pulumi.StringMapOutput) +} + +// The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist +func (o K8sNodeInputOutput) Flist() pulumi.StringOutput { + return o.ApplyT(func(v K8sNodeInput) string { return v.Flist }).(pulumi.StringOutput) +} + +// The checksum of the flist which should match the checksum of the given flist, optional func (o K8sNodeInputOutput) Flist_checksum() pulumi.StringPtrOutput { return o.ApplyT(func(v K8sNodeInput) *string { return v.Flist_checksum }).(pulumi.StringPtrOutput) } +// A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f +func (o K8sNodeInputOutput) Gpus() pulumi.StringArrayOutput { + return o.ApplyT(func(v K8sNodeInput) []string { return v.Gpus }).(pulumi.StringArrayOutput) +} + +// The memory capacity for the virtual machine in MB. Min is 250 MB func (o K8sNodeInputOutput) Memory() pulumi.IntOutput { return o.ApplyT(func(v K8sNodeInput) int { return v.Memory }).(pulumi.IntOutput) } +// A list of mounted disks or volumes +func (o K8sNodeInputOutput) Mounts() MountArrayOutput { + return o.ApplyT(func(v K8sNodeInput) []Mount { return v.Mounts }).(MountArrayOutput) +} + +// A flag to generate a random mycelium IP seed to support mycelium in the virtual machine func (o K8sNodeInputOutput) Mycelium() pulumi.BoolPtrOutput { return o.ApplyT(func(v K8sNodeInput) *bool { return v.Mycelium }).(pulumi.BoolPtrOutput) } +// The seed used for mycelium IP generated for the virtual machine. It's length should be 6 func (o K8sNodeInputOutput) Mycelium_ip_seed() pulumi.StringPtrOutput { return o.ApplyT(func(v K8sNodeInput) *string { return v.Mycelium_ip_seed }).(pulumi.StringPtrOutput) } +// The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported func (o K8sNodeInputOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v K8sNodeInput) string { return v.Name }).(pulumi.StringOutput) } +// The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist func (o K8sNodeInputOutput) Network_name() pulumi.StringOutput { return o.ApplyT(func(v K8sNodeInput) string { return v.Network_name }).(pulumi.StringOutput) } -func (o K8sNodeInputOutput) Node() pulumi.AnyOutput { - return o.ApplyT(func(v K8sNodeInput) interface{} { return v.Node }).(pulumi.AnyOutput) +// The node ID to deploy the virtual machine on, required and should match the requested resources +func (o K8sNodeInputOutput) Node_id() pulumi.AnyOutput { + return o.ApplyT(func(v K8sNodeInput) interface{} { return v.Node_id }).(pulumi.AnyOutput) } +// A flag to enable generating a yggdrasil IP for the virtual machine func (o K8sNodeInputOutput) Planetary() pulumi.BoolPtrOutput { return o.ApplyT(func(v K8sNodeInput) *bool { return v.Planetary }).(pulumi.BoolPtrOutput) } +// A flag to enable generating a public IP for the virtual machine, public node is required for it func (o K8sNodeInputOutput) Public_ip() pulumi.BoolPtrOutput { return o.ApplyT(func(v K8sNodeInput) *bool { return v.Public_ip }).(pulumi.BoolPtrOutput) } +// A flag to enable generating a public IPv6 for the virtual machine, public node is required for it func (o K8sNodeInputOutput) Public_ip6() pulumi.BoolPtrOutput { return o.ApplyT(func(v K8sNodeInput) *bool { return v.Public_ip6 }).(pulumi.BoolPtrOutput) } +// The root fs size in GB (type SSD). Can be set as 0 to get the default minimum +func (o K8sNodeInputOutput) Rootfs_size() pulumi.IntPtrOutput { + return o.ApplyT(func(v K8sNodeInput) *int { return v.Rootfs_size }).(pulumi.IntPtrOutput) +} + +// A list of virtual machine loggers +func (o K8sNodeInputOutput) Zlogs() ZlogArrayOutput { + return o.ApplyT(func(v K8sNodeInput) []Zlog { return v.Zlogs }).(ZlogArrayOutput) +} + type K8sNodeInputArrayOutput struct{ *pulumi.OutputState } func (K8sNodeInputArrayOutput) ElementType() reflect.Type { @@ -616,11 +609,16 @@ func (o K8sNodeInputArrayOutput) Index(i pulumi.IntInput) K8sNodeInputOutput { } type Metadata struct { - Backends []Backend `pulumi:"backends"` - Encryption_algorithm *string `pulumi:"encryption_algorithm"` - Encryption_key string `pulumi:"encryption_key"` - Prefix string `pulumi:"prefix"` - Type *string `pulumi:"type"` + // List of ZDB backends configurations + Backends []Backend `pulumi:"backends"` + // configuration to use for the encryption stage. Currently only AES is supported + Encryption_algorithm *string `pulumi:"encryption_algorithm"` + // 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + Encryption_key string `pulumi:"encryption_key"` + // Data stored on the remote metadata is prefixed with + Prefix string `pulumi:"prefix"` + // configuration for the metadata store to use, currently only ZDB is supported + Type *string `pulumi:"type"` } // MetadataInput is an input type that accepts MetadataArgs and MetadataOutput values. @@ -635,11 +633,16 @@ type MetadataInput interface { } type MetadataArgs struct { - Backends BackendArrayInput `pulumi:"backends"` + // List of ZDB backends configurations + Backends BackendArrayInput `pulumi:"backends"` + // configuration to use for the encryption stage. Currently only AES is supported Encryption_algorithm pulumi.StringPtrInput `pulumi:"encryption_algorithm"` - Encryption_key pulumi.StringInput `pulumi:"encryption_key"` - Prefix pulumi.StringInput `pulumi:"prefix"` - Type pulumi.StringPtrInput `pulumi:"type"` + // 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + Encryption_key pulumi.StringInput `pulumi:"encryption_key"` + // Data stored on the remote metadata is prefixed with + Prefix pulumi.StringInput `pulumi:"prefix"` + // configuration for the metadata store to use, currently only ZDB is supported + Type pulumi.StringPtrInput `pulumi:"type"` } func (MetadataArgs) ElementType() reflect.Type { @@ -668,29 +671,36 @@ func (o MetadataOutput) ToMetadataOutputWithContext(ctx context.Context) Metadat return o } +// List of ZDB backends configurations func (o MetadataOutput) Backends() BackendArrayOutput { return o.ApplyT(func(v Metadata) []Backend { return v.Backends }).(BackendArrayOutput) } +// configuration to use for the encryption stage. Currently only AES is supported func (o MetadataOutput) Encryption_algorithm() pulumi.StringPtrOutput { return o.ApplyT(func(v Metadata) *string { return v.Encryption_algorithm }).(pulumi.StringPtrOutput) } +// 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) func (o MetadataOutput) Encryption_key() pulumi.StringOutput { return o.ApplyT(func(v Metadata) string { return v.Encryption_key }).(pulumi.StringOutput) } +// Data stored on the remote metadata is prefixed with func (o MetadataOutput) Prefix() pulumi.StringOutput { return o.ApplyT(func(v Metadata) string { return v.Prefix }).(pulumi.StringOutput) } +// configuration for the metadata store to use, currently only ZDB is supported func (o MetadataOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v Metadata) *string { return v.Type }).(pulumi.StringPtrOutput) } type Mount struct { - Disk_name string `pulumi:"disk_name"` + // The mount point of the disk/volume Mount_point string `pulumi:"mount_point"` + // The name of the mounted disk/volume, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name string `pulumi:"name"` } // MountInput is an input type that accepts MountArgs and MountOutput values. @@ -705,8 +715,10 @@ type MountInput interface { } type MountArgs struct { - Disk_name pulumi.StringInput `pulumi:"disk_name"` + // The mount point of the disk/volume Mount_point pulumi.StringInput `pulumi:"mount_point"` + // The name of the mounted disk/volume, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name pulumi.StringInput `pulumi:"name"` } func (MountArgs) ElementType() reflect.Type { @@ -760,14 +772,16 @@ func (o MountOutput) ToMountOutputWithContext(ctx context.Context) MountOutput { return o } -func (o MountOutput) Disk_name() pulumi.StringOutput { - return o.ApplyT(func(v Mount) string { return v.Disk_name }).(pulumi.StringOutput) -} - +// The mount point of the disk/volume func (o MountOutput) Mount_point() pulumi.StringOutput { return o.ApplyT(func(v Mount) string { return v.Mount_point }).(pulumi.StringOutput) } +// The name of the mounted disk/volume, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported +func (o MountOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v Mount) string { return v.Name }).(pulumi.StringOutput) +} + type MountArrayOutput struct{ *pulumi.OutputState } func (MountArrayOutput) ElementType() reflect.Type { @@ -789,6 +803,7 @@ func (o MountArrayOutput) Index(i pulumi.IntInput) MountOutput { } type QSFSComputed struct { + // Exposed metrics endpoint Metrics_endpoint string `pulumi:"metrics_endpoint"` } @@ -804,6 +819,7 @@ type QSFSComputedInput interface { } type QSFSComputedArgs struct { + // Exposed metrics endpoint Metrics_endpoint pulumi.StringInput `pulumi:"metrics_endpoint"` } @@ -858,6 +874,7 @@ func (o QSFSComputedOutput) ToQSFSComputedOutputWithContext(ctx context.Context) return o } +// Exposed metrics endpoint func (o QSFSComputedOutput) Metrics_endpoint() pulumi.StringOutput { return o.ApplyT(func(v QSFSComputed) string { return v.Metrics_endpoint }).(pulumi.StringOutput) } @@ -883,19 +900,32 @@ func (o QSFSComputedArrayOutput) Index(i pulumi.IntInput) QSFSComputedOutput { } type QSFSInput struct { - Cache int `pulumi:"cache"` - Compression_algorithm *string `pulumi:"compression_algorithm"` - Description *string `pulumi:"description"` - Encryption_algorithm *string `pulumi:"encryption_algorithm"` - Encryption_key string `pulumi:"encryption_key"` - Expected_shards int `pulumi:"expected_shards"` - Groups []Group `pulumi:"groups"` - Max_zdb_data_dir_size int `pulumi:"max_zdb_data_dir_size"` - Metadata Metadata `pulumi:"metadata"` - Minimal_shards int `pulumi:"minimal_shards"` - Name string `pulumi:"name"` - Redundant_groups int `pulumi:"redundant_groups"` - Redundant_nodes int `pulumi:"redundant_nodes"` + // The size of the fuse mountpoint on the node in MBs (holds qsfs local data before pushing) + Cache int `pulumi:"cache"` + // configuration to use for the compression stage. Currently only snappy is supported + Compression_algorithm *string `pulumi:"compression_algorithm"` + // The description of the qsfs workload, optional with no restrictions + Description *string `pulumi:"description"` + // configuration to use for the encryption stage. Currently only AES is supported + Encryption_algorithm *string `pulumi:"encryption_algorithm"` + // 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + Encryption_key string `pulumi:"encryption_key"` + // The amount of shards which are generated when the data is encoded. Essentially, this is the amount of shards which is needed to be able to recover the data, and some disposable shards which could be lost. The amount of disposable shards can be calculated as expected_shards - minimal_shards + Expected_shards int `pulumi:"expected_shards"` + // The backend groups to write the data to + Groups []Group `pulumi:"groups"` + // Maximum size of the data dir in MiB, if this is set and the sum of the file sizes in the data dir gets higher than this value, the least used, already encoded file will be removed + Max_zdb_data_dir_size int `pulumi:"max_zdb_data_dir_size"` + // List of ZDB backends configurations + Metadata Metadata `pulumi:"metadata"` + // The minimum amount of shards which are needed to recover the original data + Minimal_shards int `pulumi:"minimal_shards"` + // The name of the qsfs workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name string `pulumi:"name"` + // The amount of groups which one should be able to loose while still being able to recover the original data + Redundant_groups int `pulumi:"redundant_groups"` + // The amount of nodes that can be lost in every group while still being able to recover the original data + Redundant_nodes int `pulumi:"redundant_nodes"` } // QSFSInputInput is an input type that accepts QSFSInputArgs and QSFSInputOutput values. @@ -910,19 +940,32 @@ type QSFSInputInput interface { } type QSFSInputArgs struct { - Cache pulumi.IntInput `pulumi:"cache"` + // The size of the fuse mountpoint on the node in MBs (holds qsfs local data before pushing) + Cache pulumi.IntInput `pulumi:"cache"` + // configuration to use for the compression stage. Currently only snappy is supported Compression_algorithm pulumi.StringPtrInput `pulumi:"compression_algorithm"` - Description pulumi.StringPtrInput `pulumi:"description"` - Encryption_algorithm pulumi.StringPtrInput `pulumi:"encryption_algorithm"` - Encryption_key pulumi.StringInput `pulumi:"encryption_key"` - Expected_shards pulumi.IntInput `pulumi:"expected_shards"` - Groups GroupArrayInput `pulumi:"groups"` - Max_zdb_data_dir_size pulumi.IntInput `pulumi:"max_zdb_data_dir_size"` - Metadata MetadataInput `pulumi:"metadata"` - Minimal_shards pulumi.IntInput `pulumi:"minimal_shards"` - Name pulumi.StringInput `pulumi:"name"` - Redundant_groups pulumi.IntInput `pulumi:"redundant_groups"` - Redundant_nodes pulumi.IntInput `pulumi:"redundant_nodes"` + // The description of the qsfs workload, optional with no restrictions + Description pulumi.StringPtrInput `pulumi:"description"` + // configuration to use for the encryption stage. Currently only AES is supported + Encryption_algorithm pulumi.StringPtrInput `pulumi:"encryption_algorithm"` + // 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + Encryption_key pulumi.StringInput `pulumi:"encryption_key"` + // The amount of shards which are generated when the data is encoded. Essentially, this is the amount of shards which is needed to be able to recover the data, and some disposable shards which could be lost. The amount of disposable shards can be calculated as expected_shards - minimal_shards + Expected_shards pulumi.IntInput `pulumi:"expected_shards"` + // The backend groups to write the data to + Groups GroupArrayInput `pulumi:"groups"` + // Maximum size of the data dir in MiB, if this is set and the sum of the file sizes in the data dir gets higher than this value, the least used, already encoded file will be removed + Max_zdb_data_dir_size pulumi.IntInput `pulumi:"max_zdb_data_dir_size"` + // List of ZDB backends configurations + Metadata MetadataInput `pulumi:"metadata"` + // The minimum amount of shards which are needed to recover the original data + Minimal_shards pulumi.IntInput `pulumi:"minimal_shards"` + // The name of the qsfs workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name pulumi.StringInput `pulumi:"name"` + // The amount of groups which one should be able to loose while still being able to recover the original data + Redundant_groups pulumi.IntInput `pulumi:"redundant_groups"` + // The amount of nodes that can be lost in every group while still being able to recover the original data + Redundant_nodes pulumi.IntInput `pulumi:"redundant_nodes"` } func (QSFSInputArgs) ElementType() reflect.Type { @@ -976,54 +1019,67 @@ func (o QSFSInputOutput) ToQSFSInputOutputWithContext(ctx context.Context) QSFSI return o } +// The size of the fuse mountpoint on the node in MBs (holds qsfs local data before pushing) func (o QSFSInputOutput) Cache() pulumi.IntOutput { return o.ApplyT(func(v QSFSInput) int { return v.Cache }).(pulumi.IntOutput) } +// configuration to use for the compression stage. Currently only snappy is supported func (o QSFSInputOutput) Compression_algorithm() pulumi.StringPtrOutput { return o.ApplyT(func(v QSFSInput) *string { return v.Compression_algorithm }).(pulumi.StringPtrOutput) } +// The description of the qsfs workload, optional with no restrictions func (o QSFSInputOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v QSFSInput) *string { return v.Description }).(pulumi.StringPtrOutput) } +// configuration to use for the encryption stage. Currently only AES is supported func (o QSFSInputOutput) Encryption_algorithm() pulumi.StringPtrOutput { return o.ApplyT(func(v QSFSInput) *string { return v.Encryption_algorithm }).(pulumi.StringPtrOutput) } +// 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) func (o QSFSInputOutput) Encryption_key() pulumi.StringOutput { return o.ApplyT(func(v QSFSInput) string { return v.Encryption_key }).(pulumi.StringOutput) } +// The amount of shards which are generated when the data is encoded. Essentially, this is the amount of shards which is needed to be able to recover the data, and some disposable shards which could be lost. The amount of disposable shards can be calculated as expected_shards - minimal_shards func (o QSFSInputOutput) Expected_shards() pulumi.IntOutput { return o.ApplyT(func(v QSFSInput) int { return v.Expected_shards }).(pulumi.IntOutput) } +// The backend groups to write the data to func (o QSFSInputOutput) Groups() GroupArrayOutput { return o.ApplyT(func(v QSFSInput) []Group { return v.Groups }).(GroupArrayOutput) } +// Maximum size of the data dir in MiB, if this is set and the sum of the file sizes in the data dir gets higher than this value, the least used, already encoded file will be removed func (o QSFSInputOutput) Max_zdb_data_dir_size() pulumi.IntOutput { return o.ApplyT(func(v QSFSInput) int { return v.Max_zdb_data_dir_size }).(pulumi.IntOutput) } +// List of ZDB backends configurations func (o QSFSInputOutput) Metadata() MetadataOutput { return o.ApplyT(func(v QSFSInput) Metadata { return v.Metadata }).(MetadataOutput) } +// The minimum amount of shards which are needed to recover the original data func (o QSFSInputOutput) Minimal_shards() pulumi.IntOutput { return o.ApplyT(func(v QSFSInput) int { return v.Minimal_shards }).(pulumi.IntOutput) } +// The name of the qsfs workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported func (o QSFSInputOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v QSFSInput) string { return v.Name }).(pulumi.StringOutput) } +// The amount of groups which one should be able to loose while still being able to recover the original data func (o QSFSInputOutput) Redundant_groups() pulumi.IntOutput { return o.ApplyT(func(v QSFSInput) int { return v.Redundant_groups }).(pulumi.IntOutput) } +// The amount of nodes that can be lost in every group while still being able to recover the original data func (o QSFSInputOutput) Redundant_nodes() pulumi.IntOutput { return o.ApplyT(func(v QSFSInput) int { return v.Redundant_nodes }).(pulumi.IntOutput) } @@ -1049,13 +1105,20 @@ func (o QSFSInputArrayOutput) Index(i pulumi.IntInput) QSFSInputOutput { } type VMComputed struct { - Computed_ip string `pulumi:"computed_ip"` - Computed_ip6 string `pulumi:"computed_ip6"` - Console_url string `pulumi:"console_url"` - Ip *string `pulumi:"ip"` - Mycelium_ip string `pulumi:"mycelium_ip"` - Mycelium_ip_seed string `pulumi:"mycelium_ip_seed"` - Planetary_ip string `pulumi:"planetary_ip"` + // The reserved public ipv4 if any + Computed_ip string `pulumi:"computed_ip"` + // The reserved public ipv6 if any + Computed_ip6 string `pulumi:"computed_ip6"` + // The url to access the vm via cloud console on private interface using wireguard + Console_url string `pulumi:"console_url"` + // The private wireguard IP of the vm + Ip *string `pulumi:"ip"` + // The allocated mycelium IP + Mycelium_ip string `pulumi:"mycelium_ip"` + // The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + Mycelium_ip_seed string `pulumi:"mycelium_ip_seed"` + // The allocated Yggdrasil IP + Planetary_ip string `pulumi:"planetary_ip"` } // VMComputedInput is an input type that accepts VMComputedArgs and VMComputedOutput values. @@ -1070,13 +1133,20 @@ type VMComputedInput interface { } type VMComputedArgs struct { - Computed_ip pulumi.StringInput `pulumi:"computed_ip"` - Computed_ip6 pulumi.StringInput `pulumi:"computed_ip6"` - Console_url pulumi.StringInput `pulumi:"console_url"` - Ip pulumi.StringPtrInput `pulumi:"ip"` - Mycelium_ip pulumi.StringInput `pulumi:"mycelium_ip"` - Mycelium_ip_seed pulumi.StringInput `pulumi:"mycelium_ip_seed"` - Planetary_ip pulumi.StringInput `pulumi:"planetary_ip"` + // The reserved public ipv4 if any + Computed_ip pulumi.StringInput `pulumi:"computed_ip"` + // The reserved public ipv6 if any + Computed_ip6 pulumi.StringInput `pulumi:"computed_ip6"` + // The url to access the vm via cloud console on private interface using wireguard + Console_url pulumi.StringInput `pulumi:"console_url"` + // The private wireguard IP of the vm + Ip pulumi.StringPtrInput `pulumi:"ip"` + // The allocated mycelium IP + Mycelium_ip pulumi.StringInput `pulumi:"mycelium_ip"` + // The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + Mycelium_ip_seed pulumi.StringInput `pulumi:"mycelium_ip_seed"` + // The allocated Yggdrasil IP + Planetary_ip pulumi.StringInput `pulumi:"planetary_ip"` } func (VMComputedArgs) ElementType() reflect.Type { @@ -1116,6 +1186,31 @@ func (i VMComputedArray) ToVMComputedArrayOutputWithContext(ctx context.Context) return pulumi.ToOutputWithContext(ctx, i).(VMComputedArrayOutput) } +// VMComputedMapInput is an input type that accepts VMComputedMap and VMComputedMapOutput values. +// You can construct a concrete instance of `VMComputedMapInput` via: +// +// VMComputedMap{ "key": VMComputedArgs{...} } +type VMComputedMapInput interface { + pulumi.Input + + ToVMComputedMapOutput() VMComputedMapOutput + ToVMComputedMapOutputWithContext(context.Context) VMComputedMapOutput +} + +type VMComputedMap map[string]VMComputedInput + +func (VMComputedMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]VMComputed)(nil)).Elem() +} + +func (i VMComputedMap) ToVMComputedMapOutput() VMComputedMapOutput { + return i.ToVMComputedMapOutputWithContext(context.Background()) +} + +func (i VMComputedMap) ToVMComputedMapOutputWithContext(ctx context.Context) VMComputedMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(VMComputedMapOutput) +} + type VMComputedOutput struct{ *pulumi.OutputState } func (VMComputedOutput) ElementType() reflect.Type { @@ -1130,30 +1225,37 @@ func (o VMComputedOutput) ToVMComputedOutputWithContext(ctx context.Context) VMC return o } +// The reserved public ipv4 if any func (o VMComputedOutput) Computed_ip() pulumi.StringOutput { return o.ApplyT(func(v VMComputed) string { return v.Computed_ip }).(pulumi.StringOutput) } +// The reserved public ipv6 if any func (o VMComputedOutput) Computed_ip6() pulumi.StringOutput { return o.ApplyT(func(v VMComputed) string { return v.Computed_ip6 }).(pulumi.StringOutput) } +// The url to access the vm via cloud console on private interface using wireguard func (o VMComputedOutput) Console_url() pulumi.StringOutput { return o.ApplyT(func(v VMComputed) string { return v.Console_url }).(pulumi.StringOutput) } +// The private wireguard IP of the vm func (o VMComputedOutput) Ip() pulumi.StringPtrOutput { return o.ApplyT(func(v VMComputed) *string { return v.Ip }).(pulumi.StringPtrOutput) } +// The allocated mycelium IP func (o VMComputedOutput) Mycelium_ip() pulumi.StringOutput { return o.ApplyT(func(v VMComputed) string { return v.Mycelium_ip }).(pulumi.StringOutput) } +// The seed used for mycelium IP generated for the virtual machine. It's length should be 6 func (o VMComputedOutput) Mycelium_ip_seed() pulumi.StringOutput { return o.ApplyT(func(v VMComputed) string { return v.Mycelium_ip_seed }).(pulumi.StringOutput) } +// The allocated Yggdrasil IP func (o VMComputedOutput) Planetary_ip() pulumi.StringOutput { return o.ApplyT(func(v VMComputed) string { return v.Planetary_ip }).(pulumi.StringOutput) } @@ -1178,26 +1280,65 @@ func (o VMComputedArrayOutput) Index(i pulumi.IntInput) VMComputedOutput { }).(VMComputedOutput) } +type VMComputedMapOutput struct{ *pulumi.OutputState } + +func (VMComputedMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]VMComputed)(nil)).Elem() +} + +func (o VMComputedMapOutput) ToVMComputedMapOutput() VMComputedMapOutput { + return o +} + +func (o VMComputedMapOutput) ToVMComputedMapOutputWithContext(ctx context.Context) VMComputedMapOutput { + return o +} + +func (o VMComputedMapOutput) MapIndex(k pulumi.StringInput) VMComputedOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) VMComputed { + return vs[0].(map[string]VMComputed)[vs[1].(string)] + }).(VMComputedOutput) +} + type VMInput struct { - Cpu int `pulumi:"cpu"` - Description *string `pulumi:"description"` - Entrypoint *string `pulumi:"entrypoint"` - Env_vars map[string]string `pulumi:"env_vars"` - Flist string `pulumi:"flist"` - Flist_checksum *string `pulumi:"flist_checksum"` - Gpus []string `pulumi:"gpus"` - Memory int `pulumi:"memory"` - Mounts []Mount `pulumi:"mounts"` - Mycelium *bool `pulumi:"mycelium"` - Mycelium_ip_seed *string `pulumi:"mycelium_ip_seed"` - Name string `pulumi:"name"` - Network_name string `pulumi:"network_name"` - Node_id interface{} `pulumi:"node_id"` - Planetary *bool `pulumi:"planetary"` - Public_ip *bool `pulumi:"public_ip"` - Public_ip6 *bool `pulumi:"public_ip6"` - Rootfs_size *int `pulumi:"rootfs_size"` - Zlogs []Zlog `pulumi:"zlogs"` + // The cpu units needed for the virtual machine. Range in [1: 32] + Cpu int `pulumi:"cpu"` + // The description of the virtual machine workload, optional with no restrictions + Description *string `pulumi:"description"` + // The entry point for the flist. Example: /sbin/zinit init + Entrypoint *string `pulumi:"entrypoint"` + // The environment variables to be passed to the virtual machine. Example: SSH_KEY + Env_vars map[string]string `pulumi:"env_vars"` + // The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + Flist string `pulumi:"flist"` + // The checksum of the flist which should match the checksum of the given flist, optional + Flist_checksum *string `pulumi:"flist_checksum"` + // A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + Gpus []string `pulumi:"gpus"` + // The memory capacity for the virtual machine in MB. Min is 250 MB + Memory int `pulumi:"memory"` + // A list of mounted disks or volumes + Mounts []Mount `pulumi:"mounts"` + // A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + Mycelium *bool `pulumi:"mycelium"` + // The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + Mycelium_ip_seed *string `pulumi:"mycelium_ip_seed"` + // The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name string `pulumi:"name"` + // The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + Network_name string `pulumi:"network_name"` + // The node ID to deploy the virtual machine on, required and should match the requested resources + Node_id interface{} `pulumi:"node_id"` + // A flag to enable generating a yggdrasil IP for the virtual machine + Planetary *bool `pulumi:"planetary"` + // A flag to enable generating a public IP for the virtual machine, public node is required for it + Public_ip *bool `pulumi:"public_ip"` + // A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + Public_ip6 *bool `pulumi:"public_ip6"` + // The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + Rootfs_size *int `pulumi:"rootfs_size"` + // A list of virtual machine loggers + Zlogs []Zlog `pulumi:"zlogs"` } // VMInputInput is an input type that accepts VMInputArgs and VMInputOutput values. @@ -1212,25 +1353,44 @@ type VMInputInput interface { } type VMInputArgs struct { - Cpu pulumi.IntInput `pulumi:"cpu"` - Description pulumi.StringPtrInput `pulumi:"description"` - Entrypoint pulumi.StringPtrInput `pulumi:"entrypoint"` - Env_vars pulumi.StringMapInput `pulumi:"env_vars"` - Flist pulumi.StringInput `pulumi:"flist"` - Flist_checksum pulumi.StringPtrInput `pulumi:"flist_checksum"` - Gpus pulumi.StringArrayInput `pulumi:"gpus"` - Memory pulumi.IntInput `pulumi:"memory"` - Mounts MountArrayInput `pulumi:"mounts"` - Mycelium pulumi.BoolPtrInput `pulumi:"mycelium"` - Mycelium_ip_seed pulumi.StringPtrInput `pulumi:"mycelium_ip_seed"` - Name pulumi.StringInput `pulumi:"name"` - Network_name pulumi.StringInput `pulumi:"network_name"` - Node_id pulumi.Input `pulumi:"node_id"` - Planetary pulumi.BoolPtrInput `pulumi:"planetary"` - Public_ip pulumi.BoolPtrInput `pulumi:"public_ip"` - Public_ip6 pulumi.BoolPtrInput `pulumi:"public_ip6"` - Rootfs_size pulumi.IntPtrInput `pulumi:"rootfs_size"` - Zlogs ZlogArrayInput `pulumi:"zlogs"` + // The cpu units needed for the virtual machine. Range in [1: 32] + Cpu pulumi.IntInput `pulumi:"cpu"` + // The description of the virtual machine workload, optional with no restrictions + Description pulumi.StringPtrInput `pulumi:"description"` + // The entry point for the flist. Example: /sbin/zinit init + Entrypoint pulumi.StringPtrInput `pulumi:"entrypoint"` + // The environment variables to be passed to the virtual machine. Example: SSH_KEY + Env_vars pulumi.StringMapInput `pulumi:"env_vars"` + // The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + Flist pulumi.StringInput `pulumi:"flist"` + // The checksum of the flist which should match the checksum of the given flist, optional + Flist_checksum pulumi.StringPtrInput `pulumi:"flist_checksum"` + // A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + Gpus pulumi.StringArrayInput `pulumi:"gpus"` + // The memory capacity for the virtual machine in MB. Min is 250 MB + Memory pulumi.IntInput `pulumi:"memory"` + // A list of mounted disks or volumes + Mounts MountArrayInput `pulumi:"mounts"` + // A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + Mycelium pulumi.BoolPtrInput `pulumi:"mycelium"` + // The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + Mycelium_ip_seed pulumi.StringPtrInput `pulumi:"mycelium_ip_seed"` + // The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name pulumi.StringInput `pulumi:"name"` + // The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + Network_name pulumi.StringInput `pulumi:"network_name"` + // The node ID to deploy the virtual machine on, required and should match the requested resources + Node_id pulumi.Input `pulumi:"node_id"` + // A flag to enable generating a yggdrasil IP for the virtual machine + Planetary pulumi.BoolPtrInput `pulumi:"planetary"` + // A flag to enable generating a public IP for the virtual machine, public node is required for it + Public_ip pulumi.BoolPtrInput `pulumi:"public_ip"` + // A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + Public_ip6 pulumi.BoolPtrInput `pulumi:"public_ip6"` + // The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + Rootfs_size pulumi.IntPtrInput `pulumi:"rootfs_size"` + // A list of virtual machine loggers + Zlogs ZlogArrayInput `pulumi:"zlogs"` } func (VMInputArgs) ElementType() reflect.Type { @@ -1284,78 +1444,97 @@ func (o VMInputOutput) ToVMInputOutputWithContext(ctx context.Context) VMInputOu return o } +// The cpu units needed for the virtual machine. Range in [1: 32] func (o VMInputOutput) Cpu() pulumi.IntOutput { return o.ApplyT(func(v VMInput) int { return v.Cpu }).(pulumi.IntOutput) } +// The description of the virtual machine workload, optional with no restrictions func (o VMInputOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v VMInput) *string { return v.Description }).(pulumi.StringPtrOutput) } +// The entry point for the flist. Example: /sbin/zinit init func (o VMInputOutput) Entrypoint() pulumi.StringPtrOutput { return o.ApplyT(func(v VMInput) *string { return v.Entrypoint }).(pulumi.StringPtrOutput) } +// The environment variables to be passed to the virtual machine. Example: SSH_KEY func (o VMInputOutput) Env_vars() pulumi.StringMapOutput { return o.ApplyT(func(v VMInput) map[string]string { return v.Env_vars }).(pulumi.StringMapOutput) } +// The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist func (o VMInputOutput) Flist() pulumi.StringOutput { return o.ApplyT(func(v VMInput) string { return v.Flist }).(pulumi.StringOutput) } +// The checksum of the flist which should match the checksum of the given flist, optional func (o VMInputOutput) Flist_checksum() pulumi.StringPtrOutput { return o.ApplyT(func(v VMInput) *string { return v.Flist_checksum }).(pulumi.StringPtrOutput) } +// A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f func (o VMInputOutput) Gpus() pulumi.StringArrayOutput { return o.ApplyT(func(v VMInput) []string { return v.Gpus }).(pulumi.StringArrayOutput) } +// The memory capacity for the virtual machine in MB. Min is 250 MB func (o VMInputOutput) Memory() pulumi.IntOutput { return o.ApplyT(func(v VMInput) int { return v.Memory }).(pulumi.IntOutput) } +// A list of mounted disks or volumes func (o VMInputOutput) Mounts() MountArrayOutput { return o.ApplyT(func(v VMInput) []Mount { return v.Mounts }).(MountArrayOutput) } +// A flag to generate a random mycelium IP seed to support mycelium in the virtual machine func (o VMInputOutput) Mycelium() pulumi.BoolPtrOutput { return o.ApplyT(func(v VMInput) *bool { return v.Mycelium }).(pulumi.BoolPtrOutput) } +// The seed used for mycelium IP generated for the virtual machine. It's length should be 6 func (o VMInputOutput) Mycelium_ip_seed() pulumi.StringPtrOutput { return o.ApplyT(func(v VMInput) *string { return v.Mycelium_ip_seed }).(pulumi.StringPtrOutput) } +// The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported func (o VMInputOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v VMInput) string { return v.Name }).(pulumi.StringOutput) } +// The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist func (o VMInputOutput) Network_name() pulumi.StringOutput { return o.ApplyT(func(v VMInput) string { return v.Network_name }).(pulumi.StringOutput) } +// The node ID to deploy the virtual machine on, required and should match the requested resources func (o VMInputOutput) Node_id() pulumi.AnyOutput { return o.ApplyT(func(v VMInput) interface{} { return v.Node_id }).(pulumi.AnyOutput) } +// A flag to enable generating a yggdrasil IP for the virtual machine func (o VMInputOutput) Planetary() pulumi.BoolPtrOutput { return o.ApplyT(func(v VMInput) *bool { return v.Planetary }).(pulumi.BoolPtrOutput) } +// A flag to enable generating a public IP for the virtual machine, public node is required for it func (o VMInputOutput) Public_ip() pulumi.BoolPtrOutput { return o.ApplyT(func(v VMInput) *bool { return v.Public_ip }).(pulumi.BoolPtrOutput) } +// A flag to enable generating a public IPv6 for the virtual machine, public node is required for it func (o VMInputOutput) Public_ip6() pulumi.BoolPtrOutput { return o.ApplyT(func(v VMInput) *bool { return v.Public_ip6 }).(pulumi.BoolPtrOutput) } +// The root fs size in GB (type SSD). Can be set as 0 to get the default minimum func (o VMInputOutput) Rootfs_size() pulumi.IntPtrOutput { return o.ApplyT(func(v VMInput) *int { return v.Rootfs_size }).(pulumi.IntPtrOutput) } +// A list of virtual machine loggers func (o VMInputOutput) Zlogs() ZlogArrayOutput { return o.ApplyT(func(v VMInput) []Zlog { return v.Zlogs }).(ZlogArrayOutput) } @@ -1381,9 +1560,12 @@ func (o VMInputArrayOutput) Index(i pulumi.IntInput) VMInputOutput { } type ZDBComputed struct { - Ips []string `pulumi:"ips"` - Namespace string `pulumi:"namespace"` - Port int `pulumi:"port"` + // Computed IPs of the ZDB. Two IPs are returned: a public IPv6, and a YggIP, in this order + Ips []string `pulumi:"ips"` + // Namespace of the ZDB + Namespace string `pulumi:"namespace"` + // Port of the ZDB + Port int `pulumi:"port"` } // ZDBComputedInput is an input type that accepts ZDBComputedArgs and ZDBComputedOutput values. @@ -1398,9 +1580,12 @@ type ZDBComputedInput interface { } type ZDBComputedArgs struct { - Ips pulumi.StringArrayInput `pulumi:"ips"` - Namespace pulumi.StringInput `pulumi:"namespace"` - Port pulumi.IntInput `pulumi:"port"` + // Computed IPs of the ZDB. Two IPs are returned: a public IPv6, and a YggIP, in this order + Ips pulumi.StringArrayInput `pulumi:"ips"` + // Namespace of the ZDB + Namespace pulumi.StringInput `pulumi:"namespace"` + // Port of the ZDB + Port pulumi.IntInput `pulumi:"port"` } func (ZDBComputedArgs) ElementType() reflect.Type { @@ -1454,14 +1639,17 @@ func (o ZDBComputedOutput) ToZDBComputedOutputWithContext(ctx context.Context) Z return o } +// Computed IPs of the ZDB. Two IPs are returned: a public IPv6, and a YggIP, in this order func (o ZDBComputedOutput) Ips() pulumi.StringArrayOutput { return o.ApplyT(func(v ZDBComputed) []string { return v.Ips }).(pulumi.StringArrayOutput) } +// Namespace of the ZDB func (o ZDBComputedOutput) Namespace() pulumi.StringOutput { return o.ApplyT(func(v ZDBComputed) string { return v.Namespace }).(pulumi.StringOutput) } +// Port of the ZDB func (o ZDBComputedOutput) Port() pulumi.IntOutput { return o.ApplyT(func(v ZDBComputed) int { return v.Port }).(pulumi.IntOutput) } @@ -1487,12 +1675,18 @@ func (o ZDBComputedArrayOutput) Index(i pulumi.IntInput) ZDBComputedOutput { } type ZDBInput struct { + // The description of the 0-db workload, optional with no restrictions Description *string `pulumi:"description"` - Mode *string `pulumi:"mode"` - Name string `pulumi:"name"` - Password string `pulumi:"password"` - Public *bool `pulumi:"public"` - Size int `pulumi:"size"` + // the enumeration of the modes 0-db can operate in (default user) + Mode *string `pulumi:"mode"` + // The name of the 0-db workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name string `pulumi:"name"` + // The 0-db password + Password string `pulumi:"password"` + // A flag to make 0-db namespace public - readable by anyone + Public *bool `pulumi:"public"` + // The 0-db size in GB (type HDD) + Size int `pulumi:"size"` } // Defaults sets the appropriate defaults for ZDBInput @@ -1522,12 +1716,18 @@ type ZDBInputInput interface { } type ZDBInputArgs struct { + // The description of the 0-db workload, optional with no restrictions Description pulumi.StringPtrInput `pulumi:"description"` - Mode pulumi.StringPtrInput `pulumi:"mode"` - Name pulumi.StringInput `pulumi:"name"` - Password pulumi.StringInput `pulumi:"password"` - Public pulumi.BoolPtrInput `pulumi:"public"` - Size pulumi.IntInput `pulumi:"size"` + // the enumeration of the modes 0-db can operate in (default user) + Mode pulumi.StringPtrInput `pulumi:"mode"` + // The name of the 0-db workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + Name pulumi.StringInput `pulumi:"name"` + // The 0-db password + Password pulumi.StringInput `pulumi:"password"` + // A flag to make 0-db namespace public - readable by anyone + Public pulumi.BoolPtrInput `pulumi:"public"` + // The 0-db size in GB (type HDD) + Size pulumi.IntInput `pulumi:"size"` } // Defaults sets the appropriate defaults for ZDBInputArgs @@ -1594,26 +1794,32 @@ func (o ZDBInputOutput) ToZDBInputOutputWithContext(ctx context.Context) ZDBInpu return o } +// The description of the 0-db workload, optional with no restrictions func (o ZDBInputOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v ZDBInput) *string { return v.Description }).(pulumi.StringPtrOutput) } +// the enumeration of the modes 0-db can operate in (default user) func (o ZDBInputOutput) Mode() pulumi.StringPtrOutput { return o.ApplyT(func(v ZDBInput) *string { return v.Mode }).(pulumi.StringPtrOutput) } +// The name of the 0-db workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported func (o ZDBInputOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ZDBInput) string { return v.Name }).(pulumi.StringOutput) } +// The 0-db password func (o ZDBInputOutput) Password() pulumi.StringOutput { return o.ApplyT(func(v ZDBInput) string { return v.Password }).(pulumi.StringOutput) } +// A flag to make 0-db namespace public - readable by anyone func (o ZDBInputOutput) Public() pulumi.BoolPtrOutput { return o.ApplyT(func(v ZDBInput) *bool { return v.Public }).(pulumi.BoolPtrOutput) } +// The 0-db size in GB (type HDD) func (o ZDBInputOutput) Size() pulumi.IntOutput { return o.ApplyT(func(v ZDBInput) int { return v.Size }).(pulumi.IntOutput) } @@ -1639,7 +1845,9 @@ func (o ZDBInputArrayOutput) Index(i pulumi.IntInput) ZDBInputOutput { } type Zlog struct { - Output string `pulumi:"output"` + // The output logs URL, should be a valid url + Output string `pulumi:"output"` + // The name of virtual machine, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported Zmachine string `pulumi:"zmachine"` } @@ -1655,7 +1863,9 @@ type ZlogInput interface { } type ZlogArgs struct { - Output pulumi.StringInput `pulumi:"output"` + // The output logs URL, should be a valid url + Output pulumi.StringInput `pulumi:"output"` + // The name of virtual machine, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported Zmachine pulumi.StringInput `pulumi:"zmachine"` } @@ -1710,10 +1920,12 @@ func (o ZlogOutput) ToZlogOutputWithContext(ctx context.Context) ZlogOutput { return o } +// The output logs URL, should be a valid url func (o ZlogOutput) Output() pulumi.StringOutput { return o.ApplyT(func(v Zlog) string { return v.Output }).(pulumi.StringOutput) } +// The name of virtual machine, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported func (o ZlogOutput) Zmachine() pulumi.StringOutput { return o.ApplyT(func(v Zlog) string { return v.Zmachine }).(pulumi.StringOutput) } @@ -1745,8 +1957,6 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*DiskArrayInput)(nil)).Elem(), DiskArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GroupInput)(nil)).Elem(), GroupArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GroupArrayInput)(nil)).Elem(), GroupArray{}) - pulumi.RegisterInputType(reflect.TypeOf((*K8sNodeComputedInput)(nil)).Elem(), K8sNodeComputedArgs{}) - pulumi.RegisterInputType(reflect.TypeOf((*K8sNodeComputedMapInput)(nil)).Elem(), K8sNodeComputedMap{}) pulumi.RegisterInputType(reflect.TypeOf((*K8sNodeInputInput)(nil)).Elem(), K8sNodeInputArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*K8sNodeInputArrayInput)(nil)).Elem(), K8sNodeInputArray{}) pulumi.RegisterInputType(reflect.TypeOf((*MetadataInput)(nil)).Elem(), MetadataArgs{}) @@ -1758,6 +1968,7 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*QSFSInputArrayInput)(nil)).Elem(), QSFSInputArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VMComputedInput)(nil)).Elem(), VMComputedArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*VMComputedArrayInput)(nil)).Elem(), VMComputedArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*VMComputedMapInput)(nil)).Elem(), VMComputedMap{}) pulumi.RegisterInputType(reflect.TypeOf((*VMInputInput)(nil)).Elem(), VMInputArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*VMInputArrayInput)(nil)).Elem(), VMInputArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ZDBComputedInput)(nil)).Elem(), ZDBComputedArgs{}) @@ -1772,8 +1983,6 @@ func init() { pulumi.RegisterOutputType(DiskArrayOutput{}) pulumi.RegisterOutputType(GroupOutput{}) pulumi.RegisterOutputType(GroupArrayOutput{}) - pulumi.RegisterOutputType(K8sNodeComputedOutput{}) - pulumi.RegisterOutputType(K8sNodeComputedMapOutput{}) pulumi.RegisterOutputType(K8sNodeInputOutput{}) pulumi.RegisterOutputType(K8sNodeInputArrayOutput{}) pulumi.RegisterOutputType(MetadataOutput{}) @@ -1785,6 +1994,7 @@ func init() { pulumi.RegisterOutputType(QSFSInputArrayOutput{}) pulumi.RegisterOutputType(VMComputedOutput{}) pulumi.RegisterOutputType(VMComputedArrayOutput{}) + pulumi.RegisterOutputType(VMComputedMapOutput{}) pulumi.RegisterOutputType(VMInputOutput{}) pulumi.RegisterOutputType(VMInputArrayOutput{}) pulumi.RegisterOutputType(ZDBComputedOutput{}) diff --git a/sdk/nodejs/config/vars.ts b/sdk/nodejs/config/vars.ts index 20901ef7..e5c6900f 100644 --- a/sdk/nodejs/config/vars.ts +++ b/sdk/nodejs/config/vars.ts @@ -7,6 +7,17 @@ import * as utilities from "../utilities"; declare var exports: any; const __config = new pulumi.Config("threefold"); +/** + * The graphql urls, example: https://graphql.grid.tf/graphql + */ +export declare const graphql_url: string[] | undefined; +Object.defineProperty(exports, "graphql_url", { + get() { + return __config.getObject("graphql_url"); + }, + enumerable: true, +}); + /** * The key type registered on substrate (ed25519 or sr25519). */ @@ -41,7 +52,18 @@ Object.defineProperty(exports, "network", { }); /** - * The relay urls, example: wss://relay.dev.grid.tf + * The proxy urls, example: https://gridproxy.grid.tf/ + */ +export declare const proxy_url: string[] | undefined; +Object.defineProperty(exports, "proxy_url", { + get() { + return __config.getObject("proxy_url"); + }, + enumerable: true, +}); + +/** + * The relay urls, example: wss://relay.grid.tf */ export declare const relay_url: string[] | undefined; Object.defineProperty(exports, "relay_url", { @@ -63,12 +85,12 @@ Object.defineProperty(exports, "rmb_timeout", { }); /** - * The substrate url, example: wss://tfchain.dev.grid.tf/ws + * The substrate url, example: wss://tfchain.grid.tf/ws */ -export declare const substrate_url: string | undefined; +export declare const substrate_url: string[] | undefined; Object.defineProperty(exports, "substrate_url", { get() { - return __config.get("substrate_url"); + return __config.getObject("substrate_url"); }, enumerable: true, }); diff --git a/sdk/nodejs/deployment.ts b/sdk/nodejs/deployment.ts index c0c7a5de..3ae9f5a2 100644 --- a/sdk/nodejs/deployment.ts +++ b/sdk/nodejs/deployment.ts @@ -33,19 +33,55 @@ export class Deployment extends pulumi.CustomResource { return obj['__pulumiType'] === Deployment.__pulumiType; } + /** + * The deployment ID + */ public /*out*/ readonly contract_id!: pulumi.Output; + /** + * The disks requested to be included in the deployment + */ public readonly disks!: pulumi.Output; + /** + * IP range of the node for the wireguard network (e.g. 10.1.2.0/24). Has to have a subnet mask of 24 + */ public /*out*/ readonly ip_range!: pulumi.Output; + /** + * The name of the deployment, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ public readonly name!: pulumi.Output; + /** + * The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + */ public readonly network_name!: pulumi.Output; + /** + * Mapping from each node to its deployment ID + */ public /*out*/ readonly node_deployment_id!: pulumi.Output<{[key: string]: number}>; + /** + * The node ID to deploy on, required and should match the requested resources + */ public readonly node_id!: pulumi.Output; + /** + * The qsfs output instances requested to be included in the deployment + */ public readonly qsfs!: pulumi.Output; public /*out*/ readonly qsfs_computed!: pulumi.Output; + /** + * ID for the deployed solution which allows the creator of the solution to gain a percentage of the rewards + */ public readonly solution_provider!: pulumi.Output; + /** + * The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + */ public readonly solution_type!: pulumi.Output; + /** + * The vms output requested to be included in the deployment + */ public readonly vms!: pulumi.Output; public /*out*/ readonly vms_computed!: pulumi.Output; + /** + * The zdbs output requested to be included in the deployment + */ public readonly zdbs!: pulumi.Output; public /*out*/ readonly zdbs_computed!: pulumi.Output; @@ -107,13 +143,40 @@ export class Deployment extends pulumi.CustomResource { * The set of arguments for constructing a Deployment resource. */ export interface DeploymentArgs { + /** + * The disks requested to be included in the deployment + */ disks?: pulumi.Input[]>; + /** + * The name of the deployment, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ name: pulumi.Input; + /** + * The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + */ network_name?: pulumi.Input; + /** + * The node ID to deploy on, required and should match the requested resources + */ node_id: any; + /** + * The qsfs instances requested to be included in the deployment + */ qsfs?: pulumi.Input[]>; + /** + * ID for the deployed solution which allows the creator of the solution to gain a percentage of the rewards + */ solution_provider?: pulumi.Input; + /** + * The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + */ solution_type?: pulumi.Input; + /** + * The vms requested to be included in the deployment + */ vms?: pulumi.Input[]>; + /** + * The zdbs requested to be included in the deployment + */ zdbs?: pulumi.Input[]>; } diff --git a/sdk/nodejs/gatewayFQDN.ts b/sdk/nodejs/gatewayFQDN.ts index fc97b89a..86928519 100644 --- a/sdk/nodejs/gatewayFQDN.ts +++ b/sdk/nodejs/gatewayFQDN.ts @@ -31,15 +31,45 @@ export class GatewayFQDN extends pulumi.CustomResource { return obj['__pulumiType'] === GatewayFQDN.__pulumiType; } + /** + * The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + */ public readonly backends!: pulumi.Output; + /** + * The deployment ID + */ public /*out*/ readonly contract_id!: pulumi.Output; + /** + * The description of the virtual machine workload, optional with no restrictions + */ public readonly description!: pulumi.Output; + /** + * The fully qualified domain name of the deployed workload + */ public readonly fqdn!: pulumi.Output; + /** + * Gateway workload name. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + */ public readonly name!: pulumi.Output; + /** + * Network name to join, if backend IP is private + */ public readonly network_name!: pulumi.Output; + /** + * Mapping from each node to its deployment ID + */ public /*out*/ readonly node_deployment_id!: pulumi.Output<{[key: string]: number}>; + /** + * The gateway's node ID + */ public readonly node_id!: pulumi.Output; + /** + * The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + */ public readonly solution_type!: pulumi.Output; + /** + * TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service + */ public readonly tls_pass_through!: pulumi.Output; /** @@ -96,12 +126,36 @@ export class GatewayFQDN extends pulumi.CustomResource { * The set of arguments for constructing a GatewayFQDN resource. */ export interface GatewayFQDNArgs { + /** + * The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + */ backends: pulumi.Input[]>; + /** + * The description of the virtual machine workload, optional with no restrictions + */ description?: pulumi.Input; + /** + * The fully qualified domain name of the deployed workload + */ fqdn: pulumi.Input; + /** + * Gateway workload name. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + */ name: pulumi.Input; + /** + * Network name to join, if backend IP is private + */ network_name?: pulumi.Input; + /** + * The gateway's node ID + */ node_id: any; + /** + * The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + */ solution_type?: pulumi.Input; + /** + * TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service + */ tls_pass_through?: pulumi.Input; } diff --git a/sdk/nodejs/gatewayName.ts b/sdk/nodejs/gatewayName.ts index 6568ef4e..d7a0fadc 100644 --- a/sdk/nodejs/gatewayName.ts +++ b/sdk/nodejs/gatewayName.ts @@ -31,16 +31,49 @@ export class GatewayName extends pulumi.CustomResource { return obj['__pulumiType'] === GatewayName.__pulumiType; } + /** + * The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + */ public readonly backends!: pulumi.Output; + /** + * The deployment ID + */ public /*out*/ readonly contract_id!: pulumi.Output; + /** + * The description of the virtual machine workload, optional with no restrictions + */ public readonly description!: pulumi.Output; + /** + * The computed fully qualified domain name of the deployed workload + */ public /*out*/ readonly fqdn!: pulumi.Output; + /** + * Domain prefix. The fqdn will be .. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + */ public readonly name!: pulumi.Output; + /** + * The reserved name contract ID + */ public /*out*/ readonly name_contract_id!: pulumi.Output; - public readonly network!: pulumi.Output; + /** + * Network name to join, if backend IP is private + */ + public readonly network_name!: pulumi.Output; + /** + * Mapping from each node to its deployment ID + */ public /*out*/ readonly node_deployment_id!: pulumi.Output<{[key: string]: number}>; + /** + * The gateway's node ID + */ public readonly node_id!: pulumi.Output; + /** + * The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + */ public readonly solution_type!: pulumi.Output; + /** + * TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service + */ public readonly tls_passthrough!: pulumi.Output; /** @@ -66,7 +99,7 @@ export class GatewayName extends pulumi.CustomResource { resourceInputs["backends"] = args ? args.backends : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["name"] = args ? args.name : undefined; - resourceInputs["network"] = args ? args.network : undefined; + resourceInputs["network_name"] = args ? args.network_name : undefined; resourceInputs["node_id"] = args ? args.node_id : undefined; resourceInputs["solution_type"] = (args ? args.solution_type : undefined) ?? ""; resourceInputs["tls_passthrough"] = args ? args.tls_passthrough : undefined; @@ -81,7 +114,7 @@ export class GatewayName extends pulumi.CustomResource { resourceInputs["fqdn"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["name_contract_id"] = undefined /*out*/; - resourceInputs["network"] = undefined /*out*/; + resourceInputs["network_name"] = undefined /*out*/; resourceInputs["node_deployment_id"] = undefined /*out*/; resourceInputs["node_id"] = undefined /*out*/; resourceInputs["solution_type"] = undefined /*out*/; @@ -96,11 +129,32 @@ export class GatewayName extends pulumi.CustomResource { * The set of arguments for constructing a GatewayName resource. */ export interface GatewayNameArgs { + /** + * The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + */ backends: pulumi.Input[]>; + /** + * The description of the virtual machine workload, optional with no restrictions + */ description?: pulumi.Input; + /** + * Domain prefix. The fqdn will be .. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + */ name: pulumi.Input; - network?: pulumi.Input; + /** + * Network name to join, if backend IP is private + */ + network_name?: pulumi.Input; + /** + * The gateway's node ID + */ node_id: any; + /** + * The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + */ solution_type?: pulumi.Input; + /** + * TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service + */ tls_passthrough?: pulumi.Input; } diff --git a/sdk/nodejs/kubernetes.ts b/sdk/nodejs/kubernetes.ts index 1d75201e..4ac02540 100644 --- a/sdk/nodejs/kubernetes.ts +++ b/sdk/nodejs/kubernetes.ts @@ -33,16 +33,46 @@ export class Kubernetes extends pulumi.CustomResource { return obj['__pulumiType'] === Kubernetes.__pulumiType; } + /** + * Master holds the configuration of master node in the kubernetes cluster + */ public readonly master!: pulumi.Output; - public /*out*/ readonly master_computed!: pulumi.Output; + /** + * The computed fields of the master node + */ + public /*out*/ readonly master_computed!: pulumi.Output; + /** + * The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + */ public readonly network_name!: pulumi.Output; + /** + * Mapping from each node to its deployment ID + */ public /*out*/ readonly node_deployment_id!: pulumi.Output<{[key: string]: number}>; + /** + * Computed values of nodes' IP ranges after deployment + */ public /*out*/ readonly nodes_ip_range!: pulumi.Output<{[key: string]: string}>; + /** + * The solution type of the cluster, displayed as project name in contract metadata + */ public readonly solution_type!: pulumi.Output; + /** + * SSH key to access the cluster nodes + */ public readonly ssh_key!: pulumi.Output; + /** + * The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string + */ public readonly token!: pulumi.Output; + /** + * Workers is a list holding the workers configuration for the kubernetes cluster + */ public readonly workers!: pulumi.Output; - public /*out*/ readonly workers_computed!: pulumi.Output<{[key: string]: outputs.K8sNodeComputed}>; + /** + * List of the computed fields of the worker nodes + */ + public /*out*/ readonly workers_computed!: pulumi.Output<{[key: string]: outputs.VMComputed}>; /** * Create a Kubernetes resource with the given unique name, arguments, and options. @@ -98,10 +128,28 @@ export class Kubernetes extends pulumi.CustomResource { * The set of arguments for constructing a Kubernetes resource. */ export interface KubernetesArgs { + /** + * Master holds the configuration of master node in the kubernetes cluster + */ master: pulumi.Input; + /** + * The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + */ network_name: pulumi.Input; + /** + * The solution type of the cluster, displayed as project name in contract metadata + */ solution_type?: pulumi.Input; + /** + * SSH key to access the cluster nodes + */ ssh_key?: pulumi.Input; + /** + * The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string + */ token: pulumi.Input; + /** + * Workers is a list holding the workers configuration for the kubernetes cluster + */ workers: pulumi.Input[]>; } diff --git a/sdk/nodejs/network.ts b/sdk/nodejs/network.ts index 00fe23de..ffb402dd 100644 --- a/sdk/nodejs/network.ts +++ b/sdk/nodejs/network.ts @@ -31,19 +31,61 @@ export class Network extends pulumi.CustomResource { return obj['__pulumiType'] === Network.__pulumiType; } + /** + * Generated wireguard configuration for external user access to the network + */ public /*out*/ readonly access_wg_config!: pulumi.Output; + /** + * A flag to support wireguard in the network + */ public readonly add_wg_access!: pulumi.Output; + /** + * The description of the network workload, optional with no restrictions + */ public readonly description!: pulumi.Output; + /** + * Wireguard IP assigned for external user access + */ public /*out*/ readonly external_ip!: pulumi.Output; + /** + * External user private key used in encryption while communicating through Wireguard network + */ public /*out*/ readonly external_sk!: pulumi.Output; + /** + * The IP range for the network, subnet should be 16 + */ public readonly ip_range!: pulumi.Output; + /** + * A flag to generate a random mycelium key to support mycelium in the network + */ public readonly mycelium!: pulumi.Output; + /** + * A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes + */ public readonly mycelium_keys!: pulumi.Output<{[key: string]: string} | undefined>; + /** + * The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ public readonly name!: pulumi.Output; + /** + * Mapping from each node to its deployment id + */ public /*out*/ readonly node_deployment_id!: pulumi.Output<{[key: string]: number}>; + /** + * The nodes used to deploy the network on, shouldn't be empty + */ public readonly nodes!: pulumi.Output; + /** + * Computed values of nodes' IP ranges after deployment + */ public /*out*/ readonly nodes_ip_range!: pulumi.Output<{[key: string]: string}>; + /** + * Public node id (in case it's added). Used for wireguard access and supporting hidden nodes + */ public /*out*/ readonly public_node_id!: pulumi.Output; + /** + * The solution type of the network, displayed as project name in contract metadata + */ public readonly solution_type!: pulumi.Output; /** @@ -108,12 +150,36 @@ export class Network extends pulumi.CustomResource { * The set of arguments for constructing a Network resource. */ export interface NetworkArgs { + /** + * A flag to support wireguard in the network + */ add_wg_access?: pulumi.Input; + /** + * The description of the network workload, optional with no restrictions + */ description: pulumi.Input; + /** + * The IP range for the network, subnet should be 16 + */ ip_range: pulumi.Input; + /** + * A flag to generate a random mycelium key to support mycelium in the network + */ mycelium?: pulumi.Input; + /** + * A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes + */ mycelium_keys?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ name: pulumi.Input; + /** + * The nodes used to deploy the network on, shouldn't be empty + */ nodes: pulumi.Input; + /** + * The solution type of the network, displayed as project name in contract metadata + */ solution_type?: pulumi.Input; } diff --git a/sdk/nodejs/provider.ts b/sdk/nodejs/provider.ts index 6140d1c8..2aa6bf33 100644 --- a/sdk/nodejs/provider.ts +++ b/sdk/nodejs/provider.ts @@ -35,10 +35,6 @@ export class Provider extends pulumi.ProviderResource { * The timeout duration in seconds for rmb calls */ public readonly rmb_timeout!: pulumi.Output; - /** - * The substrate url, example: wss://tfchain.dev.grid.tf/ws - */ - public readonly substrate_url!: pulumi.Output; /** * Create a Provider resource with the given unique name, arguments, and options. @@ -51,12 +47,14 @@ export class Provider extends pulumi.ProviderResource { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; { + resourceInputs["graphql_url"] = pulumi.output(args ? args.graphql_url : undefined).apply(JSON.stringify); resourceInputs["key_type"] = (args ? args.key_type : undefined) ?? (utilities.getEnv("") || "sr25519"); resourceInputs["mnemonic"] = (args?.mnemonic ? pulumi.secret(args.mnemonic) : undefined) ?? (utilities.getEnv("") || ""); resourceInputs["network"] = (args ? args.network : undefined) ?? (utilities.getEnv("") || ""); + resourceInputs["proxy_url"] = pulumi.output(args ? args.proxy_url : undefined).apply(JSON.stringify); resourceInputs["relay_url"] = pulumi.output(args ? args.relay_url : undefined).apply(JSON.stringify); resourceInputs["rmb_timeout"] = args ? args.rmb_timeout : undefined; - resourceInputs["substrate_url"] = args ? args.substrate_url : undefined; + resourceInputs["substrate_url"] = pulumi.output(args ? args.substrate_url : undefined).apply(JSON.stringify); } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["mnemonic"] }; @@ -69,6 +67,10 @@ export class Provider extends pulumi.ProviderResource { * The set of arguments for constructing a Provider resource. */ export interface ProviderArgs { + /** + * The graphql urls, example: https://graphql.grid.tf/graphql + */ + graphql_url?: pulumi.Input[]>; /** * The key type registered on substrate (ed25519 or sr25519). */ @@ -82,7 +84,11 @@ export interface ProviderArgs { */ network?: pulumi.Input; /** - * The relay urls, example: wss://relay.dev.grid.tf + * The proxy urls, example: https://gridproxy.grid.tf/ + */ + proxy_url?: pulumi.Input[]>; + /** + * The relay urls, example: wss://relay.grid.tf */ relay_url?: pulumi.Input[]>; /** @@ -90,7 +96,7 @@ export interface ProviderArgs { */ rmb_timeout?: pulumi.Input; /** - * The substrate url, example: wss://tfchain.dev.grid.tf/ws + * The substrate url, example: wss://tfchain.grid.tf/ws */ - substrate_url?: pulumi.Input; + substrate_url?: pulumi.Input[]>; } diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index a79b65a1..f795c647 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -8,94 +8,317 @@ import * as outputs from "../types/output"; import * as utilities from "../utilities"; export interface BackendArgs { + /** + * Address of backend ZDB (e.g. [300:a582:c60c:df75:f6da:8a92:d5ed:71ad]:9900 or 60.60.60.60:9900) + */ address: pulumi.Input; + /** + * ZDB namespace + */ namespace: pulumi.Input; + /** + * Namespace password + */ password: pulumi.Input; } export interface DiskArgs { + /** + * The description of the disk workload, optional with no restrictions + */ description?: pulumi.Input; + /** + * The name of the disk workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ name: pulumi.Input; + /** + * The disk size in GB (type SSD) + */ size: pulumi.Input; } export interface GroupArgs { + /** + * List of ZDB backends configurations + */ backends?: pulumi.Input[]>; } export interface K8sNodeInputArgs { + /** + * The cpu units needed for the virtual machine. Range in [1: 32] + */ cpu: pulumi.Input; + /** + * The description of the virtual machine workload, optional with no restrictions + */ + description?: pulumi.Input; + /** + * Data disk size in GBs. Must be between 1GB and 10240GBs (10TBs) + */ disk_size: pulumi.Input; - flist?: pulumi.Input; + /** + * The entry point for the flist. Example: /sbin/zinit init + */ + entrypoint?: pulumi.Input; + /** + * The environment variables to be passed to the virtual machine. Example: SSH_KEY + */ + env_vars?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + */ + flist: pulumi.Input; + /** + * The checksum of the flist which should match the checksum of the given flist, optional + */ flist_checksum?: pulumi.Input; + /** + * A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + */ + gpus?: pulumi.Input[]>; + /** + * The memory capacity for the virtual machine in MB. Min is 250 MB + */ memory: pulumi.Input; + /** + * A list of mounted disks or volumes + */ + mounts?: pulumi.Input[]>; + /** + * A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + */ mycelium?: pulumi.Input; + /** + * The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + */ mycelium_ip_seed?: pulumi.Input; + /** + * The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ name: pulumi.Input; + /** + * The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + */ network_name: pulumi.Input; - node: any; + /** + * The node ID to deploy the virtual machine on, required and should match the requested resources + */ + node_id: any; + /** + * A flag to enable generating a yggdrasil IP for the virtual machine + */ planetary?: pulumi.Input; + /** + * A flag to enable generating a public IP for the virtual machine, public node is required for it + */ public_ip?: pulumi.Input; + /** + * A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + */ public_ip6?: pulumi.Input; + /** + * The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + */ + rootfs_size?: pulumi.Input; + /** + * A list of virtual machine loggers + */ + zlogs?: pulumi.Input[]>; } export interface MetadataArgs { + /** + * List of ZDB backends configurations + */ backends?: pulumi.Input[]>; + /** + * configuration to use for the encryption stage. Currently only AES is supported + */ encryption_algorithm?: pulumi.Input; + /** + * 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + */ encryption_key: pulumi.Input; + /** + * Data stored on the remote metadata is prefixed with + */ prefix: pulumi.Input; + /** + * configuration for the metadata store to use, currently only ZDB is supported + */ type?: pulumi.Input; } export interface MountArgs { - disk_name: pulumi.Input; + /** + * The mount point of the disk/volume + */ mount_point: pulumi.Input; + /** + * The name of the mounted disk/volume, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ + name: pulumi.Input; } export interface QSFSInputArgs { + /** + * The size of the fuse mountpoint on the node in MBs (holds qsfs local data before pushing) + */ cache: pulumi.Input; + /** + * configuration to use for the compression stage. Currently only snappy is supported + */ compression_algorithm?: pulumi.Input; + /** + * The description of the qsfs workload, optional with no restrictions + */ description?: pulumi.Input; + /** + * configuration to use for the encryption stage. Currently only AES is supported + */ encryption_algorithm?: pulumi.Input; + /** + * 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + */ encryption_key: pulumi.Input; + /** + * The amount of shards which are generated when the data is encoded. Essentially, this is the amount of shards which is needed to be able to recover the data, and some disposable shards which could be lost. The amount of disposable shards can be calculated as expected_shards - minimal_shards + */ expected_shards: pulumi.Input; + /** + * The backend groups to write the data to + */ groups: pulumi.Input[]>; + /** + * Maximum size of the data dir in MiB, if this is set and the sum of the file sizes in the data dir gets higher than this value, the least used, already encoded file will be removed + */ max_zdb_data_dir_size: pulumi.Input; + /** + * List of ZDB backends configurations + */ metadata: pulumi.Input; + /** + * The minimum amount of shards which are needed to recover the original data + */ minimal_shards: pulumi.Input; + /** + * The name of the qsfs workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ name: pulumi.Input; + /** + * The amount of groups which one should be able to loose while still being able to recover the original data + */ redundant_groups: pulumi.Input; + /** + * The amount of nodes that can be lost in every group while still being able to recover the original data + */ redundant_nodes: pulumi.Input; } export interface VMInputArgs { + /** + * The cpu units needed for the virtual machine. Range in [1: 32] + */ cpu: pulumi.Input; + /** + * The description of the virtual machine workload, optional with no restrictions + */ description?: pulumi.Input; + /** + * The entry point for the flist. Example: /sbin/zinit init + */ entrypoint?: pulumi.Input; + /** + * The environment variables to be passed to the virtual machine. Example: SSH_KEY + */ env_vars?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + */ flist: pulumi.Input; + /** + * The checksum of the flist which should match the checksum of the given flist, optional + */ flist_checksum?: pulumi.Input; + /** + * A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + */ gpus?: pulumi.Input[]>; + /** + * The memory capacity for the virtual machine in MB. Min is 250 MB + */ memory: pulumi.Input; + /** + * A list of mounted disks or volumes + */ mounts?: pulumi.Input[]>; + /** + * A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + */ mycelium?: pulumi.Input; + /** + * The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + */ mycelium_ip_seed?: pulumi.Input; + /** + * The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ name: pulumi.Input; + /** + * The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + */ network_name: pulumi.Input; + /** + * The node ID to deploy the virtual machine on, required and should match the requested resources + */ node_id: any; + /** + * A flag to enable generating a yggdrasil IP for the virtual machine + */ planetary?: pulumi.Input; + /** + * A flag to enable generating a public IP for the virtual machine, public node is required for it + */ public_ip?: pulumi.Input; + /** + * A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + */ public_ip6?: pulumi.Input; + /** + * The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + */ rootfs_size?: pulumi.Input; + /** + * A list of virtual machine loggers + */ zlogs?: pulumi.Input[]>; } export interface ZDBInputArgs { + /** + * The description of the 0-db workload, optional with no restrictions + */ description?: pulumi.Input; + /** + * the enumeration of the modes 0-db can operate in (default user) + */ mode?: pulumi.Input; + /** + * The name of the 0-db workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ name: pulumi.Input; + /** + * The 0-db password + */ password: pulumi.Input; + /** + * A flag to make 0-db namespace public - readable by anyone + */ public?: pulumi.Input; + /** + * The 0-db size in GB (type HDD) + */ size: pulumi.Input; } /** @@ -109,6 +332,12 @@ export function zdbinputArgsProvideDefaults(val: ZDBInputArgs): ZDBInputArgs { } export interface ZlogArgs { + /** + * The output logs URL, should be a valid url + */ output: pulumi.Input; + /** + * The name of virtual machine, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ zmachine: pulumi.Input; } diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index e9b52d14..e20928a0 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -8,124 +8,370 @@ import * as outputs from "../types/output"; import * as utilities from "../utilities"; export interface Backend { + /** + * Address of backend ZDB (e.g. [300:a582:c60c:df75:f6da:8a92:d5ed:71ad]:9900 or 60.60.60.60:9900) + */ address: string; + /** + * ZDB namespace + */ namespace: string; + /** + * Namespace password + */ password: string; } export interface Disk { + /** + * The description of the disk workload, optional with no restrictions + */ description?: string; + /** + * The name of the disk workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ name: string; + /** + * The disk size in GB (type SSD) + */ size: number; } export interface Group { + /** + * List of ZDB backends configurations + */ backends?: outputs.Backend[]; } -export interface K8sNodeComputed { - computed_ip: string; - computed_ip6: string; - console_url: string; - ip: string; - mycelium_ip: string; - mycelium_ip_seed: string; - planetary_ip: string; -} - export interface K8sNodeInput { + /** + * The cpu units needed for the virtual machine. Range in [1: 32] + */ cpu: number; + /** + * The description of the virtual machine workload, optional with no restrictions + */ + description?: string; + /** + * Data disk size in GBs. Must be between 1GB and 10240GBs (10TBs) + */ disk_size: number; - flist?: string; + /** + * The entry point for the flist. Example: /sbin/zinit init + */ + entrypoint?: string; + /** + * The environment variables to be passed to the virtual machine. Example: SSH_KEY + */ + env_vars?: {[key: string]: string}; + /** + * The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + */ + flist: string; + /** + * The checksum of the flist which should match the checksum of the given flist, optional + */ flist_checksum?: string; + /** + * A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + */ + gpus?: string[]; + /** + * The memory capacity for the virtual machine in MB. Min is 250 MB + */ memory: number; + /** + * A list of mounted disks or volumes + */ + mounts?: outputs.Mount[]; + /** + * A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + */ mycelium?: boolean; + /** + * The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + */ mycelium_ip_seed?: string; + /** + * The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ name: string; + /** + * The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + */ network_name: string; - node: any; + /** + * The node ID to deploy the virtual machine on, required and should match the requested resources + */ + node_id: any; + /** + * A flag to enable generating a yggdrasil IP for the virtual machine + */ planetary?: boolean; + /** + * A flag to enable generating a public IP for the virtual machine, public node is required for it + */ public_ip?: boolean; + /** + * A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + */ public_ip6?: boolean; + /** + * The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + */ + rootfs_size?: number; + /** + * A list of virtual machine loggers + */ + zlogs?: outputs.Zlog[]; } export interface Metadata { + /** + * List of ZDB backends configurations + */ backends?: outputs.Backend[]; + /** + * configuration to use for the encryption stage. Currently only AES is supported + */ encryption_algorithm?: string; + /** + * 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + */ encryption_key: string; + /** + * Data stored on the remote metadata is prefixed with + */ prefix: string; + /** + * configuration for the metadata store to use, currently only ZDB is supported + */ type?: string; } export interface Mount { - disk_name: string; + /** + * The mount point of the disk/volume + */ mount_point: string; + /** + * The name of the mounted disk/volume, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ + name: string; } export interface QSFSComputed { + /** + * Exposed metrics endpoint + */ metrics_endpoint: string; } export interface QSFSInput { + /** + * The size of the fuse mountpoint on the node in MBs (holds qsfs local data before pushing) + */ cache: number; + /** + * configuration to use for the compression stage. Currently only snappy is supported + */ compression_algorithm?: string; + /** + * The description of the qsfs workload, optional with no restrictions + */ description?: string; + /** + * configuration to use for the encryption stage. Currently only AES is supported + */ encryption_algorithm?: string; + /** + * 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + */ encryption_key: string; + /** + * The amount of shards which are generated when the data is encoded. Essentially, this is the amount of shards which is needed to be able to recover the data, and some disposable shards which could be lost. The amount of disposable shards can be calculated as expected_shards - minimal_shards + */ expected_shards: number; + /** + * The backend groups to write the data to + */ groups: outputs.Group[]; + /** + * Maximum size of the data dir in MiB, if this is set and the sum of the file sizes in the data dir gets higher than this value, the least used, already encoded file will be removed + */ max_zdb_data_dir_size: number; + /** + * List of ZDB backends configurations + */ metadata: outputs.Metadata; + /** + * The minimum amount of shards which are needed to recover the original data + */ minimal_shards: number; + /** + * The name of the qsfs workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ name: string; + /** + * The amount of groups which one should be able to loose while still being able to recover the original data + */ redundant_groups: number; + /** + * The amount of nodes that can be lost in every group while still being able to recover the original data + */ redundant_nodes: number; } export interface VMComputed { + /** + * The reserved public ipv4 if any + */ computed_ip: string; + /** + * The reserved public ipv6 if any + */ computed_ip6: string; + /** + * The url to access the vm via cloud console on private interface using wireguard + */ console_url: string; + /** + * The private wireguard IP of the vm + */ ip?: string; + /** + * The allocated mycelium IP + */ mycelium_ip: string; + /** + * The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + */ mycelium_ip_seed: string; + /** + * The allocated Yggdrasil IP + */ planetary_ip: string; } export interface VMInput { + /** + * The cpu units needed for the virtual machine. Range in [1: 32] + */ cpu: number; + /** + * The description of the virtual machine workload, optional with no restrictions + */ description?: string; + /** + * The entry point for the flist. Example: /sbin/zinit init + */ entrypoint?: string; + /** + * The environment variables to be passed to the virtual machine. Example: SSH_KEY + */ env_vars?: {[key: string]: string}; + /** + * The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + */ flist: string; + /** + * The checksum of the flist which should match the checksum of the given flist, optional + */ flist_checksum?: string; + /** + * A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + */ gpus?: string[]; + /** + * The memory capacity for the virtual machine in MB. Min is 250 MB + */ memory: number; + /** + * A list of mounted disks or volumes + */ mounts?: outputs.Mount[]; + /** + * A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + */ mycelium?: boolean; + /** + * The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + */ mycelium_ip_seed?: string; + /** + * The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ name: string; + /** + * The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + */ network_name: string; + /** + * The node ID to deploy the virtual machine on, required and should match the requested resources + */ node_id: any; + /** + * A flag to enable generating a yggdrasil IP for the virtual machine + */ planetary?: boolean; + /** + * A flag to enable generating a public IP for the virtual machine, public node is required for it + */ public_ip?: boolean; + /** + * A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + */ public_ip6?: boolean; + /** + * The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + */ rootfs_size?: number; + /** + * A list of virtual machine loggers + */ zlogs?: outputs.Zlog[]; } export interface ZDBComputed { + /** + * Computed IPs of the ZDB. Two IPs are returned: a public IPv6, and a YggIP, in this order + */ ips: string[]; + /** + * Namespace of the ZDB + */ namespace: string; + /** + * Port of the ZDB + */ port: number; } export interface ZDBInput { + /** + * The description of the 0-db workload, optional with no restrictions + */ description?: string; + /** + * the enumeration of the modes 0-db can operate in (default user) + */ mode?: string; + /** + * The name of the 0-db workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ name: string; + /** + * The 0-db password + */ password: string; + /** + * A flag to make 0-db namespace public - readable by anyone + */ public?: boolean; + /** + * The 0-db size in GB (type HDD) + */ size: number; } /** @@ -139,7 +385,13 @@ export function zdbinputProvideDefaults(val: ZDBInput): ZDBInput { } export interface Zlog { + /** + * The output logs URL, should be a valid url + */ output: string; + /** + * The name of virtual machine, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + */ zmachine: string; } diff --git a/sdk/python/pulumi_threefold/_inputs.py b/sdk/python/pulumi_threefold/_inputs.py index 72a2fbc2..ba717a5a 100644 --- a/sdk/python/pulumi_threefold/_inputs.py +++ b/sdk/python/pulumi_threefold/_inputs.py @@ -28,6 +28,11 @@ def __init__(__self__, *, address: pulumi.Input[str], namespace: pulumi.Input[str], password: pulumi.Input[str]): + """ + :param pulumi.Input[str] address: Address of backend ZDB (e.g. [300:a582:c60c:df75:f6da:8a92:d5ed:71ad]:9900 or 60.60.60.60:9900) + :param pulumi.Input[str] namespace: ZDB namespace + :param pulumi.Input[str] password: Namespace password + """ pulumi.set(__self__, "address", address) pulumi.set(__self__, "namespace", namespace) pulumi.set(__self__, "password", password) @@ -35,6 +40,9 @@ def __init__(__self__, *, @property @pulumi.getter def address(self) -> pulumi.Input[str]: + """ + Address of backend ZDB (e.g. [300:a582:c60c:df75:f6da:8a92:d5ed:71ad]:9900 or 60.60.60.60:9900) + """ return pulumi.get(self, "address") @address.setter @@ -44,6 +52,9 @@ def address(self, value: pulumi.Input[str]): @property @pulumi.getter def namespace(self) -> pulumi.Input[str]: + """ + ZDB namespace + """ return pulumi.get(self, "namespace") @namespace.setter @@ -53,6 +64,9 @@ def namespace(self, value: pulumi.Input[str]): @property @pulumi.getter def password(self) -> pulumi.Input[str]: + """ + Namespace password + """ return pulumi.get(self, "password") @password.setter @@ -66,6 +80,11 @@ def __init__(__self__, *, name: pulumi.Input[str], size: pulumi.Input[int], description: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] name: The name of the disk workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param pulumi.Input[int] size: The disk size in GB (type SSD) + :param pulumi.Input[str] description: The description of the disk workload, optional with no restrictions + """ pulumi.set(__self__, "name", name) pulumi.set(__self__, "size", size) if description is not None: @@ -74,6 +93,9 @@ def __init__(__self__, *, @property @pulumi.getter def name(self) -> pulumi.Input[str]: + """ + The name of the disk workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @name.setter @@ -83,6 +105,9 @@ def name(self, value: pulumi.Input[str]): @property @pulumi.getter def size(self) -> pulumi.Input[int]: + """ + The disk size in GB (type SSD) + """ return pulumi.get(self, "size") @size.setter @@ -92,6 +117,9 @@ def size(self, value: pulumi.Input[int]): @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: + """ + The description of the disk workload, optional with no restrictions + """ return pulumi.get(self, "description") @description.setter @@ -103,12 +131,18 @@ def description(self, value: Optional[pulumi.Input[str]]): class GroupArgs: def __init__(__self__, *, backends: Optional[pulumi.Input[Sequence[pulumi.Input['BackendArgs']]]] = None): + """ + :param pulumi.Input[Sequence[pulumi.Input['BackendArgs']]] backends: List of ZDB backends configurations + """ if backends is not None: pulumi.set(__self__, "backends", backends) @property @pulumi.getter def backends(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['BackendArgs']]]]: + """ + List of ZDB backends configurations + """ return pulumi.get(self, "backends") @backends.setter @@ -121,27 +155,65 @@ class K8sNodeInputArgs: def __init__(__self__, *, cpu: pulumi.Input[int], disk_size: pulumi.Input[int], + flist: pulumi.Input[str], memory: pulumi.Input[int], name: pulumi.Input[str], network_name: pulumi.Input[str], - node: Any, - flist: Optional[pulumi.Input[str]] = None, + node_id: Any, + description: Optional[pulumi.Input[str]] = None, + entrypoint: Optional[pulumi.Input[str]] = None, + env_vars: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, flist_checksum: Optional[pulumi.Input[str]] = None, + gpus: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + mounts: Optional[pulumi.Input[Sequence[pulumi.Input['MountArgs']]]] = None, mycelium: Optional[pulumi.Input[bool]] = None, mycelium_ip_seed: Optional[pulumi.Input[str]] = None, planetary: Optional[pulumi.Input[bool]] = None, public_ip: Optional[pulumi.Input[bool]] = None, - public_ip6: Optional[pulumi.Input[bool]] = None): + public_ip6: Optional[pulumi.Input[bool]] = None, + rootfs_size: Optional[pulumi.Input[int]] = None, + zlogs: Optional[pulumi.Input[Sequence[pulumi.Input['ZlogArgs']]]] = None): + """ + :param pulumi.Input[int] cpu: The cpu units needed for the virtual machine. Range in [1: 32] + :param pulumi.Input[int] disk_size: Data disk size in GBs. Must be between 1GB and 10240GBs (10TBs) + :param pulumi.Input[str] flist: The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + :param pulumi.Input[int] memory: The memory capacity for the virtual machine in MB. Min is 250 MB + :param pulumi.Input[str] name: The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param pulumi.Input[str] network_name: The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + :param Any node_id: The node ID to deploy the virtual machine on, required and should match the requested resources + :param pulumi.Input[str] description: The description of the virtual machine workload, optional with no restrictions + :param pulumi.Input[str] entrypoint: The entry point for the flist. Example: /sbin/zinit init + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] env_vars: The environment variables to be passed to the virtual machine. Example: SSH_KEY + :param pulumi.Input[str] flist_checksum: The checksum of the flist which should match the checksum of the given flist, optional + :param pulumi.Input[Sequence[pulumi.Input[str]]] gpus: A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + :param pulumi.Input[Sequence[pulumi.Input['MountArgs']]] mounts: A list of mounted disks or volumes + :param pulumi.Input[bool] mycelium: A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + :param pulumi.Input[str] mycelium_ip_seed: The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + :param pulumi.Input[bool] planetary: A flag to enable generating a yggdrasil IP for the virtual machine + :param pulumi.Input[bool] public_ip: A flag to enable generating a public IP for the virtual machine, public node is required for it + :param pulumi.Input[bool] public_ip6: A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + :param pulumi.Input[int] rootfs_size: The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + :param pulumi.Input[Sequence[pulumi.Input['ZlogArgs']]] zlogs: A list of virtual machine loggers + """ pulumi.set(__self__, "cpu", cpu) pulumi.set(__self__, "disk_size", disk_size) + pulumi.set(__self__, "flist", flist) pulumi.set(__self__, "memory", memory) pulumi.set(__self__, "name", name) pulumi.set(__self__, "network_name", network_name) - pulumi.set(__self__, "node", node) - if flist is not None: - pulumi.set(__self__, "flist", flist) + pulumi.set(__self__, "node_id", node_id) + if description is not None: + pulumi.set(__self__, "description", description) + if entrypoint is not None: + pulumi.set(__self__, "entrypoint", entrypoint) + if env_vars is not None: + pulumi.set(__self__, "env_vars", env_vars) if flist_checksum is not None: pulumi.set(__self__, "flist_checksum", flist_checksum) + if gpus is not None: + pulumi.set(__self__, "gpus", gpus) + if mounts is not None: + pulumi.set(__self__, "mounts", mounts) if mycelium is not None: pulumi.set(__self__, "mycelium", mycelium) if mycelium_ip_seed is not None: @@ -152,10 +224,17 @@ def __init__(__self__, *, pulumi.set(__self__, "public_ip", public_ip) if public_ip6 is not None: pulumi.set(__self__, "public_ip6", public_ip6) + if rootfs_size is not None: + pulumi.set(__self__, "rootfs_size", rootfs_size) + if zlogs is not None: + pulumi.set(__self__, "zlogs", zlogs) @property @pulumi.getter def cpu(self) -> pulumi.Input[int]: + """ + The cpu units needed for the virtual machine. Range in [1: 32] + """ return pulumi.get(self, "cpu") @cpu.setter @@ -165,15 +244,33 @@ def cpu(self, value: pulumi.Input[int]): @property @pulumi.getter def disk_size(self) -> pulumi.Input[int]: + """ + Data disk size in GBs. Must be between 1GB and 10240GBs (10TBs) + """ return pulumi.get(self, "disk_size") @disk_size.setter def disk_size(self, value: pulumi.Input[int]): pulumi.set(self, "disk_size", value) + @property + @pulumi.getter + def flist(self) -> pulumi.Input[str]: + """ + The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + """ + return pulumi.get(self, "flist") + + @flist.setter + def flist(self, value: pulumi.Input[str]): + pulumi.set(self, "flist", value) + @property @pulumi.getter def memory(self) -> pulumi.Input[int]: + """ + The memory capacity for the virtual machine in MB. Min is 250 MB + """ return pulumi.get(self, "memory") @memory.setter @@ -183,6 +280,9 @@ def memory(self, value: pulumi.Input[int]): @property @pulumi.getter def name(self) -> pulumi.Input[str]: + """ + The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @name.setter @@ -192,6 +292,9 @@ def name(self, value: pulumi.Input[str]): @property @pulumi.getter def network_name(self) -> pulumi.Input[str]: + """ + The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + """ return pulumi.get(self, "network_name") @network_name.setter @@ -200,34 +303,94 @@ def network_name(self, value: pulumi.Input[str]): @property @pulumi.getter - def node(self) -> Any: - return pulumi.get(self, "node") + def node_id(self) -> Any: + """ + The node ID to deploy the virtual machine on, required and should match the requested resources + """ + return pulumi.get(self, "node_id") - @node.setter - def node(self, value: Any): - pulumi.set(self, "node", value) + @node_id.setter + def node_id(self, value: Any): + pulumi.set(self, "node_id", value) @property @pulumi.getter - def flist(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "flist") + def description(self) -> Optional[pulumi.Input[str]]: + """ + The description of the virtual machine workload, optional with no restrictions + """ + return pulumi.get(self, "description") - @flist.setter - def flist(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "flist", value) + @description.setter + def description(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter + def entrypoint(self) -> Optional[pulumi.Input[str]]: + """ + The entry point for the flist. Example: /sbin/zinit init + """ + return pulumi.get(self, "entrypoint") + + @entrypoint.setter + def entrypoint(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "entrypoint", value) + + @property + @pulumi.getter + def env_vars(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + The environment variables to be passed to the virtual machine. Example: SSH_KEY + """ + return pulumi.get(self, "env_vars") + + @env_vars.setter + def env_vars(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "env_vars", value) @property @pulumi.getter def flist_checksum(self) -> Optional[pulumi.Input[str]]: + """ + The checksum of the flist which should match the checksum of the given flist, optional + """ return pulumi.get(self, "flist_checksum") @flist_checksum.setter def flist_checksum(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "flist_checksum", value) + @property + @pulumi.getter + def gpus(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + """ + return pulumi.get(self, "gpus") + + @gpus.setter + def gpus(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "gpus", value) + + @property + @pulumi.getter + def mounts(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MountArgs']]]]: + """ + A list of mounted disks or volumes + """ + return pulumi.get(self, "mounts") + + @mounts.setter + def mounts(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MountArgs']]]]): + pulumi.set(self, "mounts", value) + @property @pulumi.getter def mycelium(self) -> Optional[pulumi.Input[bool]]: + """ + A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + """ return pulumi.get(self, "mycelium") @mycelium.setter @@ -237,6 +400,9 @@ def mycelium(self, value: Optional[pulumi.Input[bool]]): @property @pulumi.getter def mycelium_ip_seed(self) -> Optional[pulumi.Input[str]]: + """ + The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + """ return pulumi.get(self, "mycelium_ip_seed") @mycelium_ip_seed.setter @@ -246,6 +412,9 @@ def mycelium_ip_seed(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def planetary(self) -> Optional[pulumi.Input[bool]]: + """ + A flag to enable generating a yggdrasil IP for the virtual machine + """ return pulumi.get(self, "planetary") @planetary.setter @@ -255,6 +424,9 @@ def planetary(self, value: Optional[pulumi.Input[bool]]): @property @pulumi.getter def public_ip(self) -> Optional[pulumi.Input[bool]]: + """ + A flag to enable generating a public IP for the virtual machine, public node is required for it + """ return pulumi.get(self, "public_ip") @public_ip.setter @@ -264,12 +436,39 @@ def public_ip(self, value: Optional[pulumi.Input[bool]]): @property @pulumi.getter def public_ip6(self) -> Optional[pulumi.Input[bool]]: + """ + A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + """ return pulumi.get(self, "public_ip6") @public_ip6.setter def public_ip6(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "public_ip6", value) + @property + @pulumi.getter + def rootfs_size(self) -> Optional[pulumi.Input[int]]: + """ + The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + """ + return pulumi.get(self, "rootfs_size") + + @rootfs_size.setter + def rootfs_size(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "rootfs_size", value) + + @property + @pulumi.getter + def zlogs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ZlogArgs']]]]: + """ + A list of virtual machine loggers + """ + return pulumi.get(self, "zlogs") + + @zlogs.setter + def zlogs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ZlogArgs']]]]): + pulumi.set(self, "zlogs", value) + @pulumi.input_type class MetadataArgs: @@ -279,6 +478,13 @@ def __init__(__self__, *, backends: Optional[pulumi.Input[Sequence[pulumi.Input['BackendArgs']]]] = None, encryption_algorithm: Optional[pulumi.Input[str]] = None, type: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] encryption_key: 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + :param pulumi.Input[str] prefix: Data stored on the remote metadata is prefixed with + :param pulumi.Input[Sequence[pulumi.Input['BackendArgs']]] backends: List of ZDB backends configurations + :param pulumi.Input[str] encryption_algorithm: configuration to use for the encryption stage. Currently only AES is supported + :param pulumi.Input[str] type: configuration for the metadata store to use, currently only ZDB is supported + """ pulumi.set(__self__, "encryption_key", encryption_key) pulumi.set(__self__, "prefix", prefix) if backends is not None: @@ -291,6 +497,9 @@ def __init__(__self__, *, @property @pulumi.getter def encryption_key(self) -> pulumi.Input[str]: + """ + 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + """ return pulumi.get(self, "encryption_key") @encryption_key.setter @@ -300,6 +509,9 @@ def encryption_key(self, value: pulumi.Input[str]): @property @pulumi.getter def prefix(self) -> pulumi.Input[str]: + """ + Data stored on the remote metadata is prefixed with + """ return pulumi.get(self, "prefix") @prefix.setter @@ -309,6 +521,9 @@ def prefix(self, value: pulumi.Input[str]): @property @pulumi.getter def backends(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['BackendArgs']]]]: + """ + List of ZDB backends configurations + """ return pulumi.get(self, "backends") @backends.setter @@ -318,6 +533,9 @@ def backends(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['BackendAr @property @pulumi.getter def encryption_algorithm(self) -> Optional[pulumi.Input[str]]: + """ + configuration to use for the encryption stage. Currently only AES is supported + """ return pulumi.get(self, "encryption_algorithm") @encryption_algorithm.setter @@ -327,6 +545,9 @@ def encryption_algorithm(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def type(self) -> Optional[pulumi.Input[str]]: + """ + configuration for the metadata store to use, currently only ZDB is supported + """ return pulumi.get(self, "type") @type.setter @@ -337,29 +558,39 @@ def type(self, value: Optional[pulumi.Input[str]]): @pulumi.input_type class MountArgs: def __init__(__self__, *, - disk_name: pulumi.Input[str], - mount_point: pulumi.Input[str]): - pulumi.set(__self__, "disk_name", disk_name) + mount_point: pulumi.Input[str], + name: pulumi.Input[str]): + """ + :param pulumi.Input[str] mount_point: The mount point of the disk/volume + :param pulumi.Input[str] name: The name of the mounted disk/volume, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ pulumi.set(__self__, "mount_point", mount_point) - - @property - @pulumi.getter - def disk_name(self) -> pulumi.Input[str]: - return pulumi.get(self, "disk_name") - - @disk_name.setter - def disk_name(self, value: pulumi.Input[str]): - pulumi.set(self, "disk_name", value) + pulumi.set(__self__, "name", name) @property @pulumi.getter def mount_point(self) -> pulumi.Input[str]: + """ + The mount point of the disk/volume + """ return pulumi.get(self, "mount_point") @mount_point.setter def mount_point(self, value: pulumi.Input[str]): pulumi.set(self, "mount_point", value) + @property + @pulumi.getter + def name(self) -> pulumi.Input[str]: + """ + The name of the mounted disk/volume, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: pulumi.Input[str]): + pulumi.set(self, "name", value) + @pulumi.input_type class QSFSInputArgs: @@ -377,6 +608,21 @@ def __init__(__self__, *, compression_algorithm: Optional[pulumi.Input[str]] = None, description: Optional[pulumi.Input[str]] = None, encryption_algorithm: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[int] cache: The size of the fuse mountpoint on the node in MBs (holds qsfs local data before pushing) + :param pulumi.Input[str] encryption_key: 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + :param pulumi.Input[int] expected_shards: The amount of shards which are generated when the data is encoded. Essentially, this is the amount of shards which is needed to be able to recover the data, and some disposable shards which could be lost. The amount of disposable shards can be calculated as expected_shards - minimal_shards + :param pulumi.Input[Sequence[pulumi.Input['GroupArgs']]] groups: The backend groups to write the data to + :param pulumi.Input[int] max_zdb_data_dir_size: Maximum size of the data dir in MiB, if this is set and the sum of the file sizes in the data dir gets higher than this value, the least used, already encoded file will be removed + :param pulumi.Input['MetadataArgs'] metadata: List of ZDB backends configurations + :param pulumi.Input[int] minimal_shards: The minimum amount of shards which are needed to recover the original data + :param pulumi.Input[str] name: The name of the qsfs workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param pulumi.Input[int] redundant_groups: The amount of groups which one should be able to loose while still being able to recover the original data + :param pulumi.Input[int] redundant_nodes: The amount of nodes that can be lost in every group while still being able to recover the original data + :param pulumi.Input[str] compression_algorithm: configuration to use for the compression stage. Currently only snappy is supported + :param pulumi.Input[str] description: The description of the qsfs workload, optional with no restrictions + :param pulumi.Input[str] encryption_algorithm: configuration to use for the encryption stage. Currently only AES is supported + """ pulumi.set(__self__, "cache", cache) pulumi.set(__self__, "encryption_key", encryption_key) pulumi.set(__self__, "expected_shards", expected_shards) @@ -397,6 +643,9 @@ def __init__(__self__, *, @property @pulumi.getter def cache(self) -> pulumi.Input[int]: + """ + The size of the fuse mountpoint on the node in MBs (holds qsfs local data before pushing) + """ return pulumi.get(self, "cache") @cache.setter @@ -406,6 +655,9 @@ def cache(self, value: pulumi.Input[int]): @property @pulumi.getter def encryption_key(self) -> pulumi.Input[str]: + """ + 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + """ return pulumi.get(self, "encryption_key") @encryption_key.setter @@ -415,6 +667,9 @@ def encryption_key(self, value: pulumi.Input[str]): @property @pulumi.getter def expected_shards(self) -> pulumi.Input[int]: + """ + The amount of shards which are generated when the data is encoded. Essentially, this is the amount of shards which is needed to be able to recover the data, and some disposable shards which could be lost. The amount of disposable shards can be calculated as expected_shards - minimal_shards + """ return pulumi.get(self, "expected_shards") @expected_shards.setter @@ -424,6 +679,9 @@ def expected_shards(self, value: pulumi.Input[int]): @property @pulumi.getter def groups(self) -> pulumi.Input[Sequence[pulumi.Input['GroupArgs']]]: + """ + The backend groups to write the data to + """ return pulumi.get(self, "groups") @groups.setter @@ -433,6 +691,9 @@ def groups(self, value: pulumi.Input[Sequence[pulumi.Input['GroupArgs']]]): @property @pulumi.getter def max_zdb_data_dir_size(self) -> pulumi.Input[int]: + """ + Maximum size of the data dir in MiB, if this is set and the sum of the file sizes in the data dir gets higher than this value, the least used, already encoded file will be removed + """ return pulumi.get(self, "max_zdb_data_dir_size") @max_zdb_data_dir_size.setter @@ -442,6 +703,9 @@ def max_zdb_data_dir_size(self, value: pulumi.Input[int]): @property @pulumi.getter def metadata(self) -> pulumi.Input['MetadataArgs']: + """ + List of ZDB backends configurations + """ return pulumi.get(self, "metadata") @metadata.setter @@ -451,6 +715,9 @@ def metadata(self, value: pulumi.Input['MetadataArgs']): @property @pulumi.getter def minimal_shards(self) -> pulumi.Input[int]: + """ + The minimum amount of shards which are needed to recover the original data + """ return pulumi.get(self, "minimal_shards") @minimal_shards.setter @@ -460,6 +727,9 @@ def minimal_shards(self, value: pulumi.Input[int]): @property @pulumi.getter def name(self) -> pulumi.Input[str]: + """ + The name of the qsfs workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @name.setter @@ -469,6 +739,9 @@ def name(self, value: pulumi.Input[str]): @property @pulumi.getter def redundant_groups(self) -> pulumi.Input[int]: + """ + The amount of groups which one should be able to loose while still being able to recover the original data + """ return pulumi.get(self, "redundant_groups") @redundant_groups.setter @@ -478,6 +751,9 @@ def redundant_groups(self, value: pulumi.Input[int]): @property @pulumi.getter def redundant_nodes(self) -> pulumi.Input[int]: + """ + The amount of nodes that can be lost in every group while still being able to recover the original data + """ return pulumi.get(self, "redundant_nodes") @redundant_nodes.setter @@ -487,6 +763,9 @@ def redundant_nodes(self, value: pulumi.Input[int]): @property @pulumi.getter def compression_algorithm(self) -> Optional[pulumi.Input[str]]: + """ + configuration to use for the compression stage. Currently only snappy is supported + """ return pulumi.get(self, "compression_algorithm") @compression_algorithm.setter @@ -496,6 +775,9 @@ def compression_algorithm(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: + """ + The description of the qsfs workload, optional with no restrictions + """ return pulumi.get(self, "description") @description.setter @@ -505,6 +787,9 @@ def description(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def encryption_algorithm(self) -> Optional[pulumi.Input[str]]: + """ + configuration to use for the encryption stage. Currently only AES is supported + """ return pulumi.get(self, "encryption_algorithm") @encryption_algorithm.setter @@ -534,6 +819,27 @@ def __init__(__self__, *, public_ip6: Optional[pulumi.Input[bool]] = None, rootfs_size: Optional[pulumi.Input[int]] = None, zlogs: Optional[pulumi.Input[Sequence[pulumi.Input['ZlogArgs']]]] = None): + """ + :param pulumi.Input[int] cpu: The cpu units needed for the virtual machine. Range in [1: 32] + :param pulumi.Input[str] flist: The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + :param pulumi.Input[int] memory: The memory capacity for the virtual machine in MB. Min is 250 MB + :param pulumi.Input[str] name: The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param pulumi.Input[str] network_name: The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + :param Any node_id: The node ID to deploy the virtual machine on, required and should match the requested resources + :param pulumi.Input[str] description: The description of the virtual machine workload, optional with no restrictions + :param pulumi.Input[str] entrypoint: The entry point for the flist. Example: /sbin/zinit init + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] env_vars: The environment variables to be passed to the virtual machine. Example: SSH_KEY + :param pulumi.Input[str] flist_checksum: The checksum of the flist which should match the checksum of the given flist, optional + :param pulumi.Input[Sequence[pulumi.Input[str]]] gpus: A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + :param pulumi.Input[Sequence[pulumi.Input['MountArgs']]] mounts: A list of mounted disks or volumes + :param pulumi.Input[bool] mycelium: A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + :param pulumi.Input[str] mycelium_ip_seed: The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + :param pulumi.Input[bool] planetary: A flag to enable generating a yggdrasil IP for the virtual machine + :param pulumi.Input[bool] public_ip: A flag to enable generating a public IP for the virtual machine, public node is required for it + :param pulumi.Input[bool] public_ip6: A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + :param pulumi.Input[int] rootfs_size: The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + :param pulumi.Input[Sequence[pulumi.Input['ZlogArgs']]] zlogs: A list of virtual machine loggers + """ pulumi.set(__self__, "cpu", cpu) pulumi.set(__self__, "flist", flist) pulumi.set(__self__, "memory", memory) @@ -570,6 +876,9 @@ def __init__(__self__, *, @property @pulumi.getter def cpu(self) -> pulumi.Input[int]: + """ + The cpu units needed for the virtual machine. Range in [1: 32] + """ return pulumi.get(self, "cpu") @cpu.setter @@ -579,6 +888,9 @@ def cpu(self, value: pulumi.Input[int]): @property @pulumi.getter def flist(self) -> pulumi.Input[str]: + """ + The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + """ return pulumi.get(self, "flist") @flist.setter @@ -588,6 +900,9 @@ def flist(self, value: pulumi.Input[str]): @property @pulumi.getter def memory(self) -> pulumi.Input[int]: + """ + The memory capacity for the virtual machine in MB. Min is 250 MB + """ return pulumi.get(self, "memory") @memory.setter @@ -597,6 +912,9 @@ def memory(self, value: pulumi.Input[int]): @property @pulumi.getter def name(self) -> pulumi.Input[str]: + """ + The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @name.setter @@ -606,6 +924,9 @@ def name(self, value: pulumi.Input[str]): @property @pulumi.getter def network_name(self) -> pulumi.Input[str]: + """ + The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + """ return pulumi.get(self, "network_name") @network_name.setter @@ -615,6 +936,9 @@ def network_name(self, value: pulumi.Input[str]): @property @pulumi.getter def node_id(self) -> Any: + """ + The node ID to deploy the virtual machine on, required and should match the requested resources + """ return pulumi.get(self, "node_id") @node_id.setter @@ -624,6 +948,9 @@ def node_id(self, value: Any): @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: + """ + The description of the virtual machine workload, optional with no restrictions + """ return pulumi.get(self, "description") @description.setter @@ -633,6 +960,9 @@ def description(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def entrypoint(self) -> Optional[pulumi.Input[str]]: + """ + The entry point for the flist. Example: /sbin/zinit init + """ return pulumi.get(self, "entrypoint") @entrypoint.setter @@ -642,6 +972,9 @@ def entrypoint(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def env_vars(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + The environment variables to be passed to the virtual machine. Example: SSH_KEY + """ return pulumi.get(self, "env_vars") @env_vars.setter @@ -651,6 +984,9 @@ def env_vars(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]] @property @pulumi.getter def flist_checksum(self) -> Optional[pulumi.Input[str]]: + """ + The checksum of the flist which should match the checksum of the given flist, optional + """ return pulumi.get(self, "flist_checksum") @flist_checksum.setter @@ -660,6 +996,9 @@ def flist_checksum(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def gpus(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + """ return pulumi.get(self, "gpus") @gpus.setter @@ -669,6 +1008,9 @@ def gpus(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): @property @pulumi.getter def mounts(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MountArgs']]]]: + """ + A list of mounted disks or volumes + """ return pulumi.get(self, "mounts") @mounts.setter @@ -678,6 +1020,9 @@ def mounts(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MountArgs'] @property @pulumi.getter def mycelium(self) -> Optional[pulumi.Input[bool]]: + """ + A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + """ return pulumi.get(self, "mycelium") @mycelium.setter @@ -687,6 +1032,9 @@ def mycelium(self, value: Optional[pulumi.Input[bool]]): @property @pulumi.getter def mycelium_ip_seed(self) -> Optional[pulumi.Input[str]]: + """ + The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + """ return pulumi.get(self, "mycelium_ip_seed") @mycelium_ip_seed.setter @@ -696,6 +1044,9 @@ def mycelium_ip_seed(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def planetary(self) -> Optional[pulumi.Input[bool]]: + """ + A flag to enable generating a yggdrasil IP for the virtual machine + """ return pulumi.get(self, "planetary") @planetary.setter @@ -705,6 +1056,9 @@ def planetary(self, value: Optional[pulumi.Input[bool]]): @property @pulumi.getter def public_ip(self) -> Optional[pulumi.Input[bool]]: + """ + A flag to enable generating a public IP for the virtual machine, public node is required for it + """ return pulumi.get(self, "public_ip") @public_ip.setter @@ -714,6 +1068,9 @@ def public_ip(self, value: Optional[pulumi.Input[bool]]): @property @pulumi.getter def public_ip6(self) -> Optional[pulumi.Input[bool]]: + """ + A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + """ return pulumi.get(self, "public_ip6") @public_ip6.setter @@ -723,6 +1080,9 @@ def public_ip6(self, value: Optional[pulumi.Input[bool]]): @property @pulumi.getter def rootfs_size(self) -> Optional[pulumi.Input[int]]: + """ + The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + """ return pulumi.get(self, "rootfs_size") @rootfs_size.setter @@ -732,6 +1092,9 @@ def rootfs_size(self, value: Optional[pulumi.Input[int]]): @property @pulumi.getter def zlogs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ZlogArgs']]]]: + """ + A list of virtual machine loggers + """ return pulumi.get(self, "zlogs") @zlogs.setter @@ -748,6 +1111,14 @@ def __init__(__self__, *, description: Optional[pulumi.Input[str]] = None, mode: Optional[pulumi.Input[str]] = None, public: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[str] name: The name of the 0-db workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param pulumi.Input[str] password: The 0-db password + :param pulumi.Input[int] size: The 0-db size in GB (type HDD) + :param pulumi.Input[str] description: The description of the 0-db workload, optional with no restrictions + :param pulumi.Input[str] mode: the enumeration of the modes 0-db can operate in (default user) + :param pulumi.Input[bool] public: A flag to make 0-db namespace public - readable by anyone + """ pulumi.set(__self__, "name", name) pulumi.set(__self__, "password", password) pulumi.set(__self__, "size", size) @@ -763,6 +1134,9 @@ def __init__(__self__, *, @property @pulumi.getter def name(self) -> pulumi.Input[str]: + """ + The name of the 0-db workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @name.setter @@ -772,6 +1146,9 @@ def name(self, value: pulumi.Input[str]): @property @pulumi.getter def password(self) -> pulumi.Input[str]: + """ + The 0-db password + """ return pulumi.get(self, "password") @password.setter @@ -781,6 +1158,9 @@ def password(self, value: pulumi.Input[str]): @property @pulumi.getter def size(self) -> pulumi.Input[int]: + """ + The 0-db size in GB (type HDD) + """ return pulumi.get(self, "size") @size.setter @@ -790,6 +1170,9 @@ def size(self, value: pulumi.Input[int]): @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: + """ + The description of the 0-db workload, optional with no restrictions + """ return pulumi.get(self, "description") @description.setter @@ -799,6 +1182,9 @@ def description(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def mode(self) -> Optional[pulumi.Input[str]]: + """ + the enumeration of the modes 0-db can operate in (default user) + """ return pulumi.get(self, "mode") @mode.setter @@ -808,6 +1194,9 @@ def mode(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def public(self) -> Optional[pulumi.Input[bool]]: + """ + A flag to make 0-db namespace public - readable by anyone + """ return pulumi.get(self, "public") @public.setter @@ -820,12 +1209,19 @@ class ZlogArgs: def __init__(__self__, *, output: pulumi.Input[str], zmachine: pulumi.Input[str]): + """ + :param pulumi.Input[str] output: The output logs URL, should be a valid url + :param pulumi.Input[str] zmachine: The name of virtual machine, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ pulumi.set(__self__, "output", output) pulumi.set(__self__, "zmachine", zmachine) @property @pulumi.getter def output(self) -> pulumi.Input[str]: + """ + The output logs URL, should be a valid url + """ return pulumi.get(self, "output") @output.setter @@ -835,6 +1231,9 @@ def output(self, value: pulumi.Input[str]): @property @pulumi.getter def zmachine(self) -> pulumi.Input[str]: + """ + The name of virtual machine, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "zmachine") @zmachine.setter diff --git a/sdk/python/pulumi_threefold/config/__init__.pyi b/sdk/python/pulumi_threefold/config/__init__.pyi index 4845bc4f..0bdd3df1 100644 --- a/sdk/python/pulumi_threefold/config/__init__.pyi +++ b/sdk/python/pulumi_threefold/config/__init__.pyi @@ -9,6 +9,11 @@ import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities +graphql_url: Optional[str] +""" +The graphql urls, example: https://graphql.grid.tf/graphql +""" + key_type: str """ The key type registered on substrate (ed25519 or sr25519). @@ -24,9 +29,14 @@ network: str The network to deploy on. """ +proxy_url: Optional[str] +""" +The proxy urls, example: https://gridproxy.grid.tf/ +""" + relay_url: Optional[str] """ -The relay urls, example: wss://relay.dev.grid.tf +The relay urls, example: wss://relay.grid.tf """ rmb_timeout: Optional[str] @@ -36,6 +46,6 @@ The timeout duration in seconds for rmb calls substrate_url: Optional[str] """ -The substrate url, example: wss://tfchain.dev.grid.tf/ws +The substrate url, example: wss://tfchain.grid.tf/ws """ diff --git a/sdk/python/pulumi_threefold/config/vars.py b/sdk/python/pulumi_threefold/config/vars.py index 1b8ed821..31a2b9e9 100644 --- a/sdk/python/pulumi_threefold/config/vars.py +++ b/sdk/python/pulumi_threefold/config/vars.py @@ -15,6 +15,13 @@ class _ExportableConfig(types.ModuleType): + @property + def graphql_url(self) -> Optional[str]: + """ + The graphql urls, example: https://graphql.grid.tf/graphql + """ + return __config__.get('graphql_url') + @property def key_type(self) -> str: """ @@ -36,10 +43,17 @@ def network(self) -> str: """ return __config__.get('network') or (_utilities.get_env('') or '') + @property + def proxy_url(self) -> Optional[str]: + """ + The proxy urls, example: https://gridproxy.grid.tf/ + """ + return __config__.get('proxy_url') + @property def relay_url(self) -> Optional[str]: """ - The relay urls, example: wss://relay.dev.grid.tf + The relay urls, example: wss://relay.grid.tf """ return __config__.get('relay_url') @@ -53,7 +67,7 @@ def rmb_timeout(self) -> Optional[str]: @property def substrate_url(self) -> Optional[str]: """ - The substrate url, example: wss://tfchain.dev.grid.tf/ws + The substrate url, example: wss://tfchain.grid.tf/ws """ return __config__.get('substrate_url') diff --git a/sdk/python/pulumi_threefold/deployment.py b/sdk/python/pulumi_threefold/deployment.py index 533519c3..c8d06668 100644 --- a/sdk/python/pulumi_threefold/deployment.py +++ b/sdk/python/pulumi_threefold/deployment.py @@ -27,6 +27,15 @@ def __init__(__self__, *, zdbs: Optional[pulumi.Input[Sequence[pulumi.Input['ZDBInputArgs']]]] = None): """ The set of arguments for constructing a Deployment resource. + :param pulumi.Input[str] name: The name of the deployment, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param Any node_id: The node ID to deploy on, required and should match the requested resources + :param pulumi.Input[Sequence[pulumi.Input['DiskArgs']]] disks: The disks requested to be included in the deployment + :param pulumi.Input[str] network_name: The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + :param pulumi.Input[Sequence[pulumi.Input['QSFSInputArgs']]] qsfs: The qsfs instances requested to be included in the deployment + :param pulumi.Input[int] solution_provider: ID for the deployed solution which allows the creator of the solution to gain a percentage of the rewards + :param pulumi.Input[str] solution_type: The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + :param pulumi.Input[Sequence[pulumi.Input['VMInputArgs']]] vms: The vms requested to be included in the deployment + :param pulumi.Input[Sequence[pulumi.Input['ZDBInputArgs']]] zdbs: The zdbs requested to be included in the deployment """ pulumi.set(__self__, "name", name) pulumi.set(__self__, "node_id", node_id) @@ -50,6 +59,9 @@ def __init__(__self__, *, @property @pulumi.getter def name(self) -> pulumi.Input[str]: + """ + The name of the deployment, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @name.setter @@ -59,6 +71,9 @@ def name(self, value: pulumi.Input[str]): @property @pulumi.getter def node_id(self) -> Any: + """ + The node ID to deploy on, required and should match the requested resources + """ return pulumi.get(self, "node_id") @node_id.setter @@ -68,6 +83,9 @@ def node_id(self, value: Any): @property @pulumi.getter def disks(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DiskArgs']]]]: + """ + The disks requested to be included in the deployment + """ return pulumi.get(self, "disks") @disks.setter @@ -77,6 +95,9 @@ def disks(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DiskArgs']]] @property @pulumi.getter def network_name(self) -> Optional[pulumi.Input[str]]: + """ + The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + """ return pulumi.get(self, "network_name") @network_name.setter @@ -86,6 +107,9 @@ def network_name(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def qsfs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['QSFSInputArgs']]]]: + """ + The qsfs instances requested to be included in the deployment + """ return pulumi.get(self, "qsfs") @qsfs.setter @@ -95,6 +119,9 @@ def qsfs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['QSFSInputArgs @property @pulumi.getter def solution_provider(self) -> Optional[pulumi.Input[int]]: + """ + ID for the deployed solution which allows the creator of the solution to gain a percentage of the rewards + """ return pulumi.get(self, "solution_provider") @solution_provider.setter @@ -104,6 +131,9 @@ def solution_provider(self, value: Optional[pulumi.Input[int]]): @property @pulumi.getter def solution_type(self) -> Optional[pulumi.Input[str]]: + """ + The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + """ return pulumi.get(self, "solution_type") @solution_type.setter @@ -113,6 +143,9 @@ def solution_type(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def vms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['VMInputArgs']]]]: + """ + The vms requested to be included in the deployment + """ return pulumi.get(self, "vms") @vms.setter @@ -122,6 +155,9 @@ def vms(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['VMInputArgs']] @property @pulumi.getter def zdbs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ZDBInputArgs']]]]: + """ + The zdbs requested to be included in the deployment + """ return pulumi.get(self, "zdbs") @zdbs.setter @@ -148,6 +184,15 @@ def __init__(__self__, Create a Deployment resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DiskArgs']]]] disks: The disks requested to be included in the deployment + :param pulumi.Input[str] name: The name of the deployment, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param pulumi.Input[str] network_name: The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + :param Any node_id: The node ID to deploy on, required and should match the requested resources + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['QSFSInputArgs']]]] qsfs: The qsfs instances requested to be included in the deployment + :param pulumi.Input[int] solution_provider: ID for the deployed solution which allows the creator of the solution to gain a percentage of the rewards + :param pulumi.Input[str] solution_type: The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['VMInputArgs']]]] vms: The vms requested to be included in the deployment + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ZDBInputArgs']]]] zdbs: The zdbs requested to be included in the deployment """ ... @overload @@ -253,41 +298,65 @@ def get(resource_name: str, @property @pulumi.getter def contract_id(self) -> pulumi.Output[int]: + """ + The deployment ID + """ return pulumi.get(self, "contract_id") @property @pulumi.getter def disks(self) -> pulumi.Output[Optional[Sequence['outputs.Disk']]]: + """ + The disks requested to be included in the deployment + """ return pulumi.get(self, "disks") @property @pulumi.getter def ip_range(self) -> pulumi.Output[str]: + """ + IP range of the node for the wireguard network (e.g. 10.1.2.0/24). Has to have a subnet mask of 24 + """ return pulumi.get(self, "ip_range") @property @pulumi.getter def name(self) -> pulumi.Output[str]: + """ + The name of the deployment, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @property @pulumi.getter def network_name(self) -> pulumi.Output[Optional[str]]: + """ + The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + """ return pulumi.get(self, "network_name") @property @pulumi.getter def node_deployment_id(self) -> pulumi.Output[Mapping[str, int]]: + """ + Mapping from each node to its deployment ID + """ return pulumi.get(self, "node_deployment_id") @property @pulumi.getter def node_id(self) -> pulumi.Output[Any]: + """ + The node ID to deploy on, required and should match the requested resources + """ return pulumi.get(self, "node_id") @property @pulumi.getter def qsfs(self) -> pulumi.Output[Optional[Sequence['outputs.QSFSInput']]]: + """ + The qsfs output instances requested to be included in the deployment + """ return pulumi.get(self, "qsfs") @property @@ -298,16 +367,25 @@ def qsfs_computed(self) -> pulumi.Output[Sequence['outputs.QSFSComputed']]: @property @pulumi.getter def solution_provider(self) -> pulumi.Output[Optional[int]]: + """ + ID for the deployed solution which allows the creator of the solution to gain a percentage of the rewards + """ return pulumi.get(self, "solution_provider") @property @pulumi.getter def solution_type(self) -> pulumi.Output[Optional[str]]: + """ + The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + """ return pulumi.get(self, "solution_type") @property @pulumi.getter def vms(self) -> pulumi.Output[Optional[Sequence['outputs.VMInput']]]: + """ + The vms output requested to be included in the deployment + """ return pulumi.get(self, "vms") @property @@ -318,6 +396,9 @@ def vms_computed(self) -> pulumi.Output[Sequence['outputs.VMComputed']]: @property @pulumi.getter def zdbs(self) -> pulumi.Output[Optional[Sequence['outputs.ZDBInput']]]: + """ + The zdbs output requested to be included in the deployment + """ return pulumi.get(self, "zdbs") @property diff --git a/sdk/python/pulumi_threefold/gateway_fqdn.py b/sdk/python/pulumi_threefold/gateway_fqdn.py index 77d3223d..574f5e43 100644 --- a/sdk/python/pulumi_threefold/gateway_fqdn.py +++ b/sdk/python/pulumi_threefold/gateway_fqdn.py @@ -24,6 +24,14 @@ def __init__(__self__, *, tls_pass_through: Optional[pulumi.Input[bool]] = None): """ The set of arguments for constructing a GatewayFQDN resource. + :param pulumi.Input[Sequence[pulumi.Input[str]]] backends: The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + :param pulumi.Input[str] fqdn: The fully qualified domain name of the deployed workload + :param pulumi.Input[str] name: Gateway workload name. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + :param Any node_id: The gateway's node ID + :param pulumi.Input[str] description: The description of the virtual machine workload, optional with no restrictions + :param pulumi.Input[str] network_name: Network name to join, if backend IP is private + :param pulumi.Input[str] solution_type: The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + :param pulumi.Input[bool] tls_pass_through: TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service """ pulumi.set(__self__, "backends", backends) pulumi.set(__self__, "fqdn", fqdn) @@ -43,6 +51,9 @@ def __init__(__self__, *, @property @pulumi.getter def backends(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: + """ + The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + """ return pulumi.get(self, "backends") @backends.setter @@ -52,6 +63,9 @@ def backends(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): @property @pulumi.getter def fqdn(self) -> pulumi.Input[str]: + """ + The fully qualified domain name of the deployed workload + """ return pulumi.get(self, "fqdn") @fqdn.setter @@ -61,6 +75,9 @@ def fqdn(self, value: pulumi.Input[str]): @property @pulumi.getter def name(self) -> pulumi.Input[str]: + """ + Gateway workload name. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + """ return pulumi.get(self, "name") @name.setter @@ -70,6 +87,9 @@ def name(self, value: pulumi.Input[str]): @property @pulumi.getter def node_id(self) -> Any: + """ + The gateway's node ID + """ return pulumi.get(self, "node_id") @node_id.setter @@ -79,6 +99,9 @@ def node_id(self, value: Any): @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: + """ + The description of the virtual machine workload, optional with no restrictions + """ return pulumi.get(self, "description") @description.setter @@ -88,6 +111,9 @@ def description(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def network_name(self) -> Optional[pulumi.Input[str]]: + """ + Network name to join, if backend IP is private + """ return pulumi.get(self, "network_name") @network_name.setter @@ -97,6 +123,9 @@ def network_name(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def solution_type(self) -> Optional[pulumi.Input[str]]: + """ + The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + """ return pulumi.get(self, "solution_type") @solution_type.setter @@ -106,6 +135,9 @@ def solution_type(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def tls_pass_through(self) -> Optional[pulumi.Input[bool]]: + """ + TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service + """ return pulumi.get(self, "tls_pass_through") @tls_pass_through.setter @@ -131,6 +163,14 @@ def __init__(__self__, Create a GatewayFQDN resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[str]]] backends: The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + :param pulumi.Input[str] description: The description of the virtual machine workload, optional with no restrictions + :param pulumi.Input[str] fqdn: The fully qualified domain name of the deployed workload + :param pulumi.Input[str] name: Gateway workload name. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + :param pulumi.Input[str] network_name: Network name to join, if backend IP is private + :param Any node_id: The gateway's node ID + :param pulumi.Input[str] solution_type: The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + :param pulumi.Input[bool] tls_pass_through: TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service """ ... @overload @@ -229,50 +269,80 @@ def get(resource_name: str, @property @pulumi.getter def backends(self) -> pulumi.Output[Sequence[str]]: + """ + The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + """ return pulumi.get(self, "backends") @property @pulumi.getter def contract_id(self) -> pulumi.Output[int]: + """ + The deployment ID + """ return pulumi.get(self, "contract_id") @property @pulumi.getter def description(self) -> pulumi.Output[Optional[str]]: + """ + The description of the virtual machine workload, optional with no restrictions + """ return pulumi.get(self, "description") @property @pulumi.getter def fqdn(self) -> pulumi.Output[str]: + """ + The fully qualified domain name of the deployed workload + """ return pulumi.get(self, "fqdn") @property @pulumi.getter def name(self) -> pulumi.Output[str]: + """ + Gateway workload name. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + """ return pulumi.get(self, "name") @property @pulumi.getter def network_name(self) -> pulumi.Output[Optional[str]]: + """ + Network name to join, if backend IP is private + """ return pulumi.get(self, "network_name") @property @pulumi.getter def node_deployment_id(self) -> pulumi.Output[Mapping[str, int]]: + """ + Mapping from each node to its deployment ID + """ return pulumi.get(self, "node_deployment_id") @property @pulumi.getter def node_id(self) -> pulumi.Output[Any]: + """ + The gateway's node ID + """ return pulumi.get(self, "node_id") @property @pulumi.getter def solution_type(self) -> pulumi.Output[Optional[str]]: + """ + The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + """ return pulumi.get(self, "solution_type") @property @pulumi.getter def tls_pass_through(self) -> pulumi.Output[Optional[bool]]: + """ + TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service + """ return pulumi.get(self, "tls_pass_through") diff --git a/sdk/python/pulumi_threefold/gateway_name.py b/sdk/python/pulumi_threefold/gateway_name.py index 27244840..2708b0ef 100644 --- a/sdk/python/pulumi_threefold/gateway_name.py +++ b/sdk/python/pulumi_threefold/gateway_name.py @@ -18,19 +18,26 @@ def __init__(__self__, *, name: pulumi.Input[str], node_id: Any, description: Optional[pulumi.Input[str]] = None, - network: Optional[pulumi.Input[str]] = None, + network_name: Optional[pulumi.Input[str]] = None, solution_type: Optional[pulumi.Input[str]] = None, tls_passthrough: Optional[pulumi.Input[bool]] = None): """ The set of arguments for constructing a GatewayName resource. + :param pulumi.Input[Sequence[pulumi.Input[str]]] backends: The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + :param pulumi.Input[str] name: Domain prefix. The fqdn will be .. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + :param Any node_id: The gateway's node ID + :param pulumi.Input[str] description: The description of the virtual machine workload, optional with no restrictions + :param pulumi.Input[str] network_name: Network name to join, if backend IP is private + :param pulumi.Input[str] solution_type: The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + :param pulumi.Input[bool] tls_passthrough: TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service """ pulumi.set(__self__, "backends", backends) pulumi.set(__self__, "name", name) pulumi.set(__self__, "node_id", node_id) if description is not None: pulumi.set(__self__, "description", description) - if network is not None: - pulumi.set(__self__, "network", network) + if network_name is not None: + pulumi.set(__self__, "network_name", network_name) if solution_type is None: solution_type = '' if solution_type is not None: @@ -41,6 +48,9 @@ def __init__(__self__, *, @property @pulumi.getter def backends(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: + """ + The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + """ return pulumi.get(self, "backends") @backends.setter @@ -50,6 +60,9 @@ def backends(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): @property @pulumi.getter def name(self) -> pulumi.Input[str]: + """ + Domain prefix. The fqdn will be .. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + """ return pulumi.get(self, "name") @name.setter @@ -59,6 +72,9 @@ def name(self, value: pulumi.Input[str]): @property @pulumi.getter def node_id(self) -> Any: + """ + The gateway's node ID + """ return pulumi.get(self, "node_id") @node_id.setter @@ -68,6 +84,9 @@ def node_id(self, value: Any): @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: + """ + The description of the virtual machine workload, optional with no restrictions + """ return pulumi.get(self, "description") @description.setter @@ -76,16 +95,22 @@ def description(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter - def network(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "network") + def network_name(self) -> Optional[pulumi.Input[str]]: + """ + Network name to join, if backend IP is private + """ + return pulumi.get(self, "network_name") - @network.setter - def network(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "network", value) + @network_name.setter + def network_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "network_name", value) @property @pulumi.getter def solution_type(self) -> Optional[pulumi.Input[str]]: + """ + The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + """ return pulumi.get(self, "solution_type") @solution_type.setter @@ -95,6 +120,9 @@ def solution_type(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def tls_passthrough(self) -> Optional[pulumi.Input[bool]]: + """ + TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service + """ return pulumi.get(self, "tls_passthrough") @tls_passthrough.setter @@ -110,7 +138,7 @@ def __init__(__self__, backends: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, description: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, - network: Optional[pulumi.Input[str]] = None, + network_name: Optional[pulumi.Input[str]] = None, node_id: Optional[Any] = None, solution_type: Optional[pulumi.Input[str]] = None, tls_passthrough: Optional[pulumi.Input[bool]] = None, @@ -119,6 +147,13 @@ def __init__(__self__, Create a GatewayName resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[str]]] backends: The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + :param pulumi.Input[str] description: The description of the virtual machine workload, optional with no restrictions + :param pulumi.Input[str] name: Domain prefix. The fqdn will be .. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + :param pulumi.Input[str] network_name: Network name to join, if backend IP is private + :param Any node_id: The gateway's node ID + :param pulumi.Input[str] solution_type: The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + :param pulumi.Input[bool] tls_passthrough: TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service """ ... @overload @@ -146,7 +181,7 @@ def _internal_init(__self__, backends: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, description: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, - network: Optional[pulumi.Input[str]] = None, + network_name: Optional[pulumi.Input[str]] = None, node_id: Optional[Any] = None, solution_type: Optional[pulumi.Input[str]] = None, tls_passthrough: Optional[pulumi.Input[bool]] = None, @@ -166,7 +201,7 @@ def _internal_init(__self__, if name is None and not opts.urn: raise TypeError("Missing required property 'name'") __props__.__dict__["name"] = name - __props__.__dict__["network"] = network + __props__.__dict__["network_name"] = network_name if node_id is None and not opts.urn: raise TypeError("Missing required property 'node_id'") __props__.__dict__["node_id"] = node_id @@ -206,7 +241,7 @@ def get(resource_name: str, __props__.__dict__["fqdn"] = None __props__.__dict__["name"] = None __props__.__dict__["name_contract_id"] = None - __props__.__dict__["network"] = None + __props__.__dict__["network_name"] = None __props__.__dict__["node_deployment_id"] = None __props__.__dict__["node_id"] = None __props__.__dict__["solution_type"] = None @@ -216,55 +251,88 @@ def get(resource_name: str, @property @pulumi.getter def backends(self) -> pulumi.Output[Sequence[str]]: + """ + The backends of the gateway proxy. must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port] + """ return pulumi.get(self, "backends") @property @pulumi.getter def contract_id(self) -> pulumi.Output[int]: + """ + The deployment ID + """ return pulumi.get(self, "contract_id") @property @pulumi.getter def description(self) -> pulumi.Output[Optional[str]]: + """ + The description of the virtual machine workload, optional with no restrictions + """ return pulumi.get(self, "description") @property @pulumi.getter def fqdn(self) -> pulumi.Output[str]: + """ + The computed fully qualified domain name of the deployed workload + """ return pulumi.get(self, "fqdn") @property @pulumi.getter def name(self) -> pulumi.Output[str]: + """ + Domain prefix. The fqdn will be .. This has to be unique within the deployment. It's required and cannot exceed 50 characters. Must contain only alphanumeric and underscore characters + """ return pulumi.get(self, "name") @property @pulumi.getter def name_contract_id(self) -> pulumi.Output[int]: + """ + The reserved name contract ID + """ return pulumi.get(self, "name_contract_id") @property @pulumi.getter - def network(self) -> pulumi.Output[Optional[str]]: - return pulumi.get(self, "network") + def network_name(self) -> pulumi.Output[Optional[str]]: + """ + Network name to join, if backend IP is private + """ + return pulumi.get(self, "network_name") @property @pulumi.getter def node_deployment_id(self) -> pulumi.Output[Mapping[str, int]]: + """ + Mapping from each node to its deployment ID + """ return pulumi.get(self, "node_deployment_id") @property @pulumi.getter def node_id(self) -> pulumi.Output[Any]: + """ + The gateway's node ID + """ return pulumi.get(self, "node_id") @property @pulumi.getter def solution_type(self) -> pulumi.Output[Optional[str]]: + """ + The name of the solution for created contract to be consistent across threefold tooling (project name in deployment metadata) + """ return pulumi.get(self, "solution_type") @property @pulumi.getter def tls_passthrough(self) -> pulumi.Output[Optional[bool]]: + """ + TLS passthrough controls the TLS termination, if false, the gateway will terminate the TLS, if True, it will only be terminated by the backend service + """ return pulumi.get(self, "tls_passthrough") diff --git a/sdk/python/pulumi_threefold/kubernetes.py b/sdk/python/pulumi_threefold/kubernetes.py index d5858200..05371d41 100644 --- a/sdk/python/pulumi_threefold/kubernetes.py +++ b/sdk/python/pulumi_threefold/kubernetes.py @@ -24,6 +24,12 @@ def __init__(__self__, *, ssh_key: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a Kubernetes resource. + :param pulumi.Input['K8sNodeInputArgs'] master: Master holds the configuration of master node in the kubernetes cluster + :param pulumi.Input[str] network_name: The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + :param pulumi.Input[str] token: The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string + :param pulumi.Input[Sequence[pulumi.Input['K8sNodeInputArgs']]] workers: Workers is a list holding the workers configuration for the kubernetes cluster + :param pulumi.Input[str] solution_type: The solution type of the cluster, displayed as project name in contract metadata + :param pulumi.Input[str] ssh_key: SSH key to access the cluster nodes """ pulumi.set(__self__, "master", master) pulumi.set(__self__, "network_name", network_name) @@ -39,6 +45,9 @@ def __init__(__self__, *, @property @pulumi.getter def master(self) -> pulumi.Input['K8sNodeInputArgs']: + """ + Master holds the configuration of master node in the kubernetes cluster + """ return pulumi.get(self, "master") @master.setter @@ -48,6 +57,9 @@ def master(self, value: pulumi.Input['K8sNodeInputArgs']): @property @pulumi.getter def network_name(self) -> pulumi.Input[str]: + """ + The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + """ return pulumi.get(self, "network_name") @network_name.setter @@ -57,6 +69,9 @@ def network_name(self, value: pulumi.Input[str]): @property @pulumi.getter def token(self) -> pulumi.Input[str]: + """ + The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string + """ return pulumi.get(self, "token") @token.setter @@ -66,6 +81,9 @@ def token(self, value: pulumi.Input[str]): @property @pulumi.getter def workers(self) -> pulumi.Input[Sequence[pulumi.Input['K8sNodeInputArgs']]]: + """ + Workers is a list holding the workers configuration for the kubernetes cluster + """ return pulumi.get(self, "workers") @workers.setter @@ -75,6 +93,9 @@ def workers(self, value: pulumi.Input[Sequence[pulumi.Input['K8sNodeInputArgs']] @property @pulumi.getter def solution_type(self) -> Optional[pulumi.Input[str]]: + """ + The solution type of the cluster, displayed as project name in contract metadata + """ return pulumi.get(self, "solution_type") @solution_type.setter @@ -84,6 +105,9 @@ def solution_type(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def ssh_key(self) -> Optional[pulumi.Input[str]]: + """ + SSH key to access the cluster nodes + """ return pulumi.get(self, "ssh_key") @ssh_key.setter @@ -107,6 +131,12 @@ def __init__(__self__, Create a Kubernetes resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[pulumi.InputType['K8sNodeInputArgs']] master: Master holds the configuration of master node in the kubernetes cluster + :param pulumi.Input[str] network_name: The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + :param pulumi.Input[str] solution_type: The solution type of the cluster, displayed as project name in contract metadata + :param pulumi.Input[str] ssh_key: SSH key to access the cluster nodes + :param pulumi.Input[str] token: The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['K8sNodeInputArgs']]]] workers: Workers is a list holding the workers configuration for the kubernetes cluster """ ... @overload @@ -203,50 +233,80 @@ def get(resource_name: str, @property @pulumi.getter def master(self) -> pulumi.Output['outputs.K8sNodeInput']: + """ + Master holds the configuration of master node in the kubernetes cluster + """ return pulumi.get(self, "master") @property @pulumi.getter - def master_computed(self) -> pulumi.Output['outputs.K8sNodeComputed']: + def master_computed(self) -> pulumi.Output['outputs.VMComputed']: + """ + The computed fields of the master node + """ return pulumi.get(self, "master_computed") @property @pulumi.getter def network_name(self) -> pulumi.Output[str]: + """ + The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + """ return pulumi.get(self, "network_name") @property @pulumi.getter def node_deployment_id(self) -> pulumi.Output[Mapping[str, int]]: + """ + Mapping from each node to its deployment ID + """ return pulumi.get(self, "node_deployment_id") @property @pulumi.getter def nodes_ip_range(self) -> pulumi.Output[Mapping[str, str]]: + """ + Computed values of nodes' IP ranges after deployment + """ return pulumi.get(self, "nodes_ip_range") @property @pulumi.getter def solution_type(self) -> pulumi.Output[Optional[str]]: + """ + The solution type of the cluster, displayed as project name in contract metadata + """ return pulumi.get(self, "solution_type") @property @pulumi.getter def ssh_key(self) -> pulumi.Output[Optional[str]]: + """ + SSH key to access the cluster nodes + """ return pulumi.get(self, "ssh_key") @property @pulumi.getter def token(self) -> pulumi.Output[str]: + """ + The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string + """ return pulumi.get(self, "token") @property @pulumi.getter def workers(self) -> pulumi.Output[Sequence['outputs.K8sNodeInput']]: + """ + Workers is a list holding the workers configuration for the kubernetes cluster + """ return pulumi.get(self, "workers") @property @pulumi.getter - def workers_computed(self) -> pulumi.Output[Mapping[str, 'outputs.K8sNodeComputed']]: + def workers_computed(self) -> pulumi.Output[Mapping[str, 'outputs.VMComputed']]: + """ + List of the computed fields of the worker nodes + """ return pulumi.get(self, "workers_computed") diff --git a/sdk/python/pulumi_threefold/network.py b/sdk/python/pulumi_threefold/network.py index 512f4750..1b80fe47 100644 --- a/sdk/python/pulumi_threefold/network.py +++ b/sdk/python/pulumi_threefold/network.py @@ -24,6 +24,14 @@ def __init__(__self__, *, solution_type: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a Network resource. + :param pulumi.Input[str] description: The description of the network workload, optional with no restrictions + :param pulumi.Input[str] ip_range: The IP range for the network, subnet should be 16 + :param pulumi.Input[str] name: The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param pulumi.Input[Sequence[Any]] nodes: The nodes used to deploy the network on, shouldn't be empty + :param pulumi.Input[bool] add_wg_access: A flag to support wireguard in the network + :param pulumi.Input[bool] mycelium: A flag to generate a random mycelium key to support mycelium in the network + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mycelium_keys: A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes + :param pulumi.Input[str] solution_type: The solution type of the network, displayed as project name in contract metadata """ pulumi.set(__self__, "description", description) pulumi.set(__self__, "ip_range", ip_range) @@ -43,6 +51,9 @@ def __init__(__self__, *, @property @pulumi.getter def description(self) -> pulumi.Input[str]: + """ + The description of the network workload, optional with no restrictions + """ return pulumi.get(self, "description") @description.setter @@ -52,6 +63,9 @@ def description(self, value: pulumi.Input[str]): @property @pulumi.getter def ip_range(self) -> pulumi.Input[str]: + """ + The IP range for the network, subnet should be 16 + """ return pulumi.get(self, "ip_range") @ip_range.setter @@ -61,6 +75,9 @@ def ip_range(self, value: pulumi.Input[str]): @property @pulumi.getter def name(self) -> pulumi.Input[str]: + """ + The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @name.setter @@ -70,6 +87,9 @@ def name(self, value: pulumi.Input[str]): @property @pulumi.getter def nodes(self) -> pulumi.Input[Sequence[Any]]: + """ + The nodes used to deploy the network on, shouldn't be empty + """ return pulumi.get(self, "nodes") @nodes.setter @@ -79,6 +99,9 @@ def nodes(self, value: pulumi.Input[Sequence[Any]]): @property @pulumi.getter def add_wg_access(self) -> Optional[pulumi.Input[bool]]: + """ + A flag to support wireguard in the network + """ return pulumi.get(self, "add_wg_access") @add_wg_access.setter @@ -88,6 +111,9 @@ def add_wg_access(self, value: Optional[pulumi.Input[bool]]): @property @pulumi.getter def mycelium(self) -> Optional[pulumi.Input[bool]]: + """ + A flag to generate a random mycelium key to support mycelium in the network + """ return pulumi.get(self, "mycelium") @mycelium.setter @@ -97,6 +123,9 @@ def mycelium(self, value: Optional[pulumi.Input[bool]]): @property @pulumi.getter def mycelium_keys(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes + """ return pulumi.get(self, "mycelium_keys") @mycelium_keys.setter @@ -106,6 +135,9 @@ def mycelium_keys(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[s @property @pulumi.getter def solution_type(self) -> Optional[pulumi.Input[str]]: + """ + The solution type of the network, displayed as project name in contract metadata + """ return pulumi.get(self, "solution_type") @solution_type.setter @@ -131,6 +163,14 @@ def __init__(__self__, Create a Network resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[bool] add_wg_access: A flag to support wireguard in the network + :param pulumi.Input[str] description: The description of the network workload, optional with no restrictions + :param pulumi.Input[str] ip_range: The IP range for the network, subnet should be 16 + :param pulumi.Input[bool] mycelium: A flag to generate a random mycelium key to support mycelium in the network + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mycelium_keys: A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes + :param pulumi.Input[str] name: The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param pulumi.Input[Sequence[Any]] nodes: The nodes used to deploy the network on, shouldn't be empty + :param pulumi.Input[str] solution_type: The solution type of the network, displayed as project name in contract metadata """ ... @overload @@ -237,70 +277,112 @@ def get(resource_name: str, @property @pulumi.getter def access_wg_config(self) -> pulumi.Output[str]: + """ + Generated wireguard configuration for external user access to the network + """ return pulumi.get(self, "access_wg_config") @property @pulumi.getter def add_wg_access(self) -> pulumi.Output[Optional[bool]]: + """ + A flag to support wireguard in the network + """ return pulumi.get(self, "add_wg_access") @property @pulumi.getter def description(self) -> pulumi.Output[str]: + """ + The description of the network workload, optional with no restrictions + """ return pulumi.get(self, "description") @property @pulumi.getter def external_ip(self) -> pulumi.Output[str]: + """ + Wireguard IP assigned for external user access + """ return pulumi.get(self, "external_ip") @property @pulumi.getter def external_sk(self) -> pulumi.Output[str]: + """ + External user private key used in encryption while communicating through Wireguard network + """ return pulumi.get(self, "external_sk") @property @pulumi.getter def ip_range(self) -> pulumi.Output[str]: + """ + The IP range for the network, subnet should be 16 + """ return pulumi.get(self, "ip_range") @property @pulumi.getter def mycelium(self) -> pulumi.Output[Optional[bool]]: + """ + A flag to generate a random mycelium key to support mycelium in the network + """ return pulumi.get(self, "mycelium") @property @pulumi.getter def mycelium_keys(self) -> pulumi.Output[Optional[Mapping[str, str]]]: + """ + A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes + """ return pulumi.get(self, "mycelium_keys") @property @pulumi.getter def name(self) -> pulumi.Output[str]: + """ + The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @property @pulumi.getter def node_deployment_id(self) -> pulumi.Output[Mapping[str, int]]: + """ + Mapping from each node to its deployment id + """ return pulumi.get(self, "node_deployment_id") @property @pulumi.getter def nodes(self) -> pulumi.Output[Sequence[Any]]: + """ + The nodes used to deploy the network on, shouldn't be empty + """ return pulumi.get(self, "nodes") @property @pulumi.getter def nodes_ip_range(self) -> pulumi.Output[Mapping[str, str]]: + """ + Computed values of nodes' IP ranges after deployment + """ return pulumi.get(self, "nodes_ip_range") @property @pulumi.getter def public_node_id(self) -> pulumi.Output[int]: + """ + Public node id (in case it's added). Used for wireguard access and supporting hidden nodes + """ return pulumi.get(self, "public_node_id") @property @pulumi.getter def solution_type(self) -> pulumi.Output[Optional[str]]: + """ + The solution type of the network, displayed as project name in contract metadata + """ return pulumi.get(self, "solution_type") diff --git a/sdk/python/pulumi_threefold/outputs.py b/sdk/python/pulumi_threefold/outputs.py index 694ef20b..4374a664 100644 --- a/sdk/python/pulumi_threefold/outputs.py +++ b/sdk/python/pulumi_threefold/outputs.py @@ -14,7 +14,6 @@ 'Backend', 'Disk', 'Group', - 'K8sNodeComputed', 'K8sNodeInput', 'Metadata', 'Mount', @@ -33,6 +32,11 @@ def __init__(__self__, *, address: str, namespace: str, password: str): + """ + :param str address: Address of backend ZDB (e.g. [300:a582:c60c:df75:f6da:8a92:d5ed:71ad]:9900 or 60.60.60.60:9900) + :param str namespace: ZDB namespace + :param str password: Namespace password + """ pulumi.set(__self__, "address", address) pulumi.set(__self__, "namespace", namespace) pulumi.set(__self__, "password", password) @@ -40,16 +44,25 @@ def __init__(__self__, *, @property @pulumi.getter def address(self) -> str: + """ + Address of backend ZDB (e.g. [300:a582:c60c:df75:f6da:8a92:d5ed:71ad]:9900 or 60.60.60.60:9900) + """ return pulumi.get(self, "address") @property @pulumi.getter def namespace(self) -> str: + """ + ZDB namespace + """ return pulumi.get(self, "namespace") @property @pulumi.getter def password(self) -> str: + """ + Namespace password + """ return pulumi.get(self, "password") @@ -59,6 +72,11 @@ def __init__(__self__, *, name: str, size: int, description: Optional[str] = None): + """ + :param str name: The name of the disk workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param int size: The disk size in GB (type SSD) + :param str description: The description of the disk workload, optional with no restrictions + """ pulumi.set(__self__, "name", name) pulumi.set(__self__, "size", size) if description is not None: @@ -67,16 +85,25 @@ def __init__(__self__, *, @property @pulumi.getter def name(self) -> str: + """ + The name of the disk workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @property @pulumi.getter def size(self) -> int: + """ + The disk size in GB (type SSD) + """ return pulumi.get(self, "size") @property @pulumi.getter def description(self) -> Optional[str]: + """ + The description of the disk workload, optional with no restrictions + """ return pulumi.get(self, "description") @@ -84,95 +111,85 @@ def description(self) -> Optional[str]: class Group(dict): def __init__(__self__, *, backends: Optional[Sequence['outputs.Backend']] = None): + """ + :param Sequence['Backend'] backends: List of ZDB backends configurations + """ if backends is not None: pulumi.set(__self__, "backends", backends) @property @pulumi.getter def backends(self) -> Optional[Sequence['outputs.Backend']]: + """ + List of ZDB backends configurations + """ return pulumi.get(self, "backends") -@pulumi.output_type -class K8sNodeComputed(dict): - def __init__(__self__, *, - computed_ip: str, - computed_ip6: str, - console_url: str, - ip: str, - mycelium_ip: str, - mycelium_ip_seed: str, - planetary_ip: str): - pulumi.set(__self__, "computed_ip", computed_ip) - pulumi.set(__self__, "computed_ip6", computed_ip6) - pulumi.set(__self__, "console_url", console_url) - pulumi.set(__self__, "ip", ip) - pulumi.set(__self__, "mycelium_ip", mycelium_ip) - pulumi.set(__self__, "mycelium_ip_seed", mycelium_ip_seed) - pulumi.set(__self__, "planetary_ip", planetary_ip) - - @property - @pulumi.getter - def computed_ip(self) -> str: - return pulumi.get(self, "computed_ip") - - @property - @pulumi.getter - def computed_ip6(self) -> str: - return pulumi.get(self, "computed_ip6") - - @property - @pulumi.getter - def console_url(self) -> str: - return pulumi.get(self, "console_url") - - @property - @pulumi.getter - def ip(self) -> str: - return pulumi.get(self, "ip") - - @property - @pulumi.getter - def mycelium_ip(self) -> str: - return pulumi.get(self, "mycelium_ip") - - @property - @pulumi.getter - def mycelium_ip_seed(self) -> str: - return pulumi.get(self, "mycelium_ip_seed") - - @property - @pulumi.getter - def planetary_ip(self) -> str: - return pulumi.get(self, "planetary_ip") - - @pulumi.output_type class K8sNodeInput(dict): def __init__(__self__, *, cpu: int, disk_size: int, + flist: str, memory: int, name: str, network_name: str, - node: Any, - flist: Optional[str] = None, + node_id: Any, + description: Optional[str] = None, + entrypoint: Optional[str] = None, + env_vars: Optional[Mapping[str, str]] = None, flist_checksum: Optional[str] = None, + gpus: Optional[Sequence[str]] = None, + mounts: Optional[Sequence['outputs.Mount']] = None, mycelium: Optional[bool] = None, mycelium_ip_seed: Optional[str] = None, planetary: Optional[bool] = None, public_ip: Optional[bool] = None, - public_ip6: Optional[bool] = None): + public_ip6: Optional[bool] = None, + rootfs_size: Optional[int] = None, + zlogs: Optional[Sequence['outputs.Zlog']] = None): + """ + :param int cpu: The cpu units needed for the virtual machine. Range in [1: 32] + :param int disk_size: Data disk size in GBs. Must be between 1GB and 10240GBs (10TBs) + :param str flist: The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + :param int memory: The memory capacity for the virtual machine in MB. Min is 250 MB + :param str name: The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param str network_name: The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + :param Any node_id: The node ID to deploy the virtual machine on, required and should match the requested resources + :param str description: The description of the virtual machine workload, optional with no restrictions + :param str entrypoint: The entry point for the flist. Example: /sbin/zinit init + :param Mapping[str, str] env_vars: The environment variables to be passed to the virtual machine. Example: SSH_KEY + :param str flist_checksum: The checksum of the flist which should match the checksum of the given flist, optional + :param Sequence[str] gpus: A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + :param Sequence['Mount'] mounts: A list of mounted disks or volumes + :param bool mycelium: A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + :param str mycelium_ip_seed: The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + :param bool planetary: A flag to enable generating a yggdrasil IP for the virtual machine + :param bool public_ip: A flag to enable generating a public IP for the virtual machine, public node is required for it + :param bool public_ip6: A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + :param int rootfs_size: The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + :param Sequence['Zlog'] zlogs: A list of virtual machine loggers + """ pulumi.set(__self__, "cpu", cpu) pulumi.set(__self__, "disk_size", disk_size) + pulumi.set(__self__, "flist", flist) pulumi.set(__self__, "memory", memory) pulumi.set(__self__, "name", name) pulumi.set(__self__, "network_name", network_name) - pulumi.set(__self__, "node", node) - if flist is not None: - pulumi.set(__self__, "flist", flist) + pulumi.set(__self__, "node_id", node_id) + if description is not None: + pulumi.set(__self__, "description", description) + if entrypoint is not None: + pulumi.set(__self__, "entrypoint", entrypoint) + if env_vars is not None: + pulumi.set(__self__, "env_vars", env_vars) if flist_checksum is not None: pulumi.set(__self__, "flist_checksum", flist_checksum) + if gpus is not None: + pulumi.set(__self__, "gpus", gpus) + if mounts is not None: + pulumi.set(__self__, "mounts", mounts) if mycelium is not None: pulumi.set(__self__, "mycelium", mycelium) if mycelium_ip_seed is not None: @@ -183,72 +200,171 @@ def __init__(__self__, *, pulumi.set(__self__, "public_ip", public_ip) if public_ip6 is not None: pulumi.set(__self__, "public_ip6", public_ip6) + if rootfs_size is not None: + pulumi.set(__self__, "rootfs_size", rootfs_size) + if zlogs is not None: + pulumi.set(__self__, "zlogs", zlogs) @property @pulumi.getter def cpu(self) -> int: + """ + The cpu units needed for the virtual machine. Range in [1: 32] + """ return pulumi.get(self, "cpu") @property @pulumi.getter def disk_size(self) -> int: + """ + Data disk size in GBs. Must be between 1GB and 10240GBs (10TBs) + """ return pulumi.get(self, "disk_size") + @property + @pulumi.getter + def flist(self) -> str: + """ + The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + """ + return pulumi.get(self, "flist") + @property @pulumi.getter def memory(self) -> int: + """ + The memory capacity for the virtual machine in MB. Min is 250 MB + """ return pulumi.get(self, "memory") @property @pulumi.getter def name(self) -> str: + """ + The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @property @pulumi.getter def network_name(self) -> str: + """ + The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + """ return pulumi.get(self, "network_name") @property @pulumi.getter - def node(self) -> Any: - return pulumi.get(self, "node") + def node_id(self) -> Any: + """ + The node ID to deploy the virtual machine on, required and should match the requested resources + """ + return pulumi.get(self, "node_id") @property @pulumi.getter - def flist(self) -> Optional[str]: - return pulumi.get(self, "flist") + def description(self) -> Optional[str]: + """ + The description of the virtual machine workload, optional with no restrictions + """ + return pulumi.get(self, "description") + + @property + @pulumi.getter + def entrypoint(self) -> Optional[str]: + """ + The entry point for the flist. Example: /sbin/zinit init + """ + return pulumi.get(self, "entrypoint") + + @property + @pulumi.getter + def env_vars(self) -> Optional[Mapping[str, str]]: + """ + The environment variables to be passed to the virtual machine. Example: SSH_KEY + """ + return pulumi.get(self, "env_vars") @property @pulumi.getter def flist_checksum(self) -> Optional[str]: + """ + The checksum of the flist which should match the checksum of the given flist, optional + """ return pulumi.get(self, "flist_checksum") + @property + @pulumi.getter + def gpus(self) -> Optional[Sequence[str]]: + """ + A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + """ + return pulumi.get(self, "gpus") + + @property + @pulumi.getter + def mounts(self) -> Optional[Sequence['outputs.Mount']]: + """ + A list of mounted disks or volumes + """ + return pulumi.get(self, "mounts") + @property @pulumi.getter def mycelium(self) -> Optional[bool]: + """ + A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + """ return pulumi.get(self, "mycelium") @property @pulumi.getter def mycelium_ip_seed(self) -> Optional[str]: + """ + The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + """ return pulumi.get(self, "mycelium_ip_seed") @property @pulumi.getter def planetary(self) -> Optional[bool]: + """ + A flag to enable generating a yggdrasil IP for the virtual machine + """ return pulumi.get(self, "planetary") @property @pulumi.getter def public_ip(self) -> Optional[bool]: + """ + A flag to enable generating a public IP for the virtual machine, public node is required for it + """ return pulumi.get(self, "public_ip") @property @pulumi.getter def public_ip6(self) -> Optional[bool]: + """ + A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + """ return pulumi.get(self, "public_ip6") + @property + @pulumi.getter + def rootfs_size(self) -> Optional[int]: + """ + The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + """ + return pulumi.get(self, "rootfs_size") + + @property + @pulumi.getter + def zlogs(self) -> Optional[Sequence['outputs.Zlog']]: + """ + A list of virtual machine loggers + """ + return pulumi.get(self, "zlogs") + @pulumi.output_type class Metadata(dict): @@ -258,6 +374,13 @@ def __init__(__self__, *, backends: Optional[Sequence['outputs.Backend']] = None, encryption_algorithm: Optional[str] = None, type: Optional[str] = None): + """ + :param str encryption_key: 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + :param str prefix: Data stored on the remote metadata is prefixed with + :param Sequence['Backend'] backends: List of ZDB backends configurations + :param str encryption_algorithm: configuration to use for the encryption stage. Currently only AES is supported + :param str type: configuration for the metadata store to use, currently only ZDB is supported + """ pulumi.set(__self__, "encryption_key", encryption_key) pulumi.set(__self__, "prefix", prefix) if backends is not None: @@ -270,57 +393,88 @@ def __init__(__self__, *, @property @pulumi.getter def encryption_key(self) -> str: + """ + 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + """ return pulumi.get(self, "encryption_key") @property @pulumi.getter def prefix(self) -> str: + """ + Data stored on the remote metadata is prefixed with + """ return pulumi.get(self, "prefix") @property @pulumi.getter def backends(self) -> Optional[Sequence['outputs.Backend']]: + """ + List of ZDB backends configurations + """ return pulumi.get(self, "backends") @property @pulumi.getter def encryption_algorithm(self) -> Optional[str]: + """ + configuration to use for the encryption stage. Currently only AES is supported + """ return pulumi.get(self, "encryption_algorithm") @property @pulumi.getter def type(self) -> Optional[str]: + """ + configuration for the metadata store to use, currently only ZDB is supported + """ return pulumi.get(self, "type") @pulumi.output_type class Mount(dict): def __init__(__self__, *, - disk_name: str, - mount_point: str): - pulumi.set(__self__, "disk_name", disk_name) + mount_point: str, + name: str): + """ + :param str mount_point: The mount point of the disk/volume + :param str name: The name of the mounted disk/volume, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ pulumi.set(__self__, "mount_point", mount_point) + pulumi.set(__self__, "name", name) @property @pulumi.getter - def disk_name(self) -> str: - return pulumi.get(self, "disk_name") + def mount_point(self) -> str: + """ + The mount point of the disk/volume + """ + return pulumi.get(self, "mount_point") @property @pulumi.getter - def mount_point(self) -> str: - return pulumi.get(self, "mount_point") + def name(self) -> str: + """ + The name of the mounted disk/volume, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ + return pulumi.get(self, "name") @pulumi.output_type class QSFSComputed(dict): def __init__(__self__, *, metrics_endpoint: str): + """ + :param str metrics_endpoint: Exposed metrics endpoint + """ pulumi.set(__self__, "metrics_endpoint", metrics_endpoint) @property @pulumi.getter def metrics_endpoint(self) -> str: + """ + Exposed metrics endpoint + """ return pulumi.get(self, "metrics_endpoint") @@ -340,6 +494,21 @@ def __init__(__self__, *, compression_algorithm: Optional[str] = None, description: Optional[str] = None, encryption_algorithm: Optional[str] = None): + """ + :param int cache: The size of the fuse mountpoint on the node in MBs (holds qsfs local data before pushing) + :param str encryption_key: 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + :param int expected_shards: The amount of shards which are generated when the data is encoded. Essentially, this is the amount of shards which is needed to be able to recover the data, and some disposable shards which could be lost. The amount of disposable shards can be calculated as expected_shards - minimal_shards + :param Sequence['Group'] groups: The backend groups to write the data to + :param int max_zdb_data_dir_size: Maximum size of the data dir in MiB, if this is set and the sum of the file sizes in the data dir gets higher than this value, the least used, already encoded file will be removed + :param 'Metadata' metadata: List of ZDB backends configurations + :param int minimal_shards: The minimum amount of shards which are needed to recover the original data + :param str name: The name of the qsfs workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param int redundant_groups: The amount of groups which one should be able to loose while still being able to recover the original data + :param int redundant_nodes: The amount of nodes that can be lost in every group while still being able to recover the original data + :param str compression_algorithm: configuration to use for the compression stage. Currently only snappy is supported + :param str description: The description of the qsfs workload, optional with no restrictions + :param str encryption_algorithm: configuration to use for the encryption stage. Currently only AES is supported + """ pulumi.set(__self__, "cache", cache) pulumi.set(__self__, "encryption_key", encryption_key) pulumi.set(__self__, "expected_shards", expected_shards) @@ -360,66 +529,105 @@ def __init__(__self__, *, @property @pulumi.getter def cache(self) -> int: + """ + The size of the fuse mountpoint on the node in MBs (holds qsfs local data before pushing) + """ return pulumi.get(self, "cache") @property @pulumi.getter def encryption_key(self) -> str: + """ + 64 long hex encoded encryption key (e.g. 0000000000000000000000000000000000000000000000000000000000000000) + """ return pulumi.get(self, "encryption_key") @property @pulumi.getter def expected_shards(self) -> int: + """ + The amount of shards which are generated when the data is encoded. Essentially, this is the amount of shards which is needed to be able to recover the data, and some disposable shards which could be lost. The amount of disposable shards can be calculated as expected_shards - minimal_shards + """ return pulumi.get(self, "expected_shards") @property @pulumi.getter def groups(self) -> Sequence['outputs.Group']: + """ + The backend groups to write the data to + """ return pulumi.get(self, "groups") @property @pulumi.getter def max_zdb_data_dir_size(self) -> int: + """ + Maximum size of the data dir in MiB, if this is set and the sum of the file sizes in the data dir gets higher than this value, the least used, already encoded file will be removed + """ return pulumi.get(self, "max_zdb_data_dir_size") @property @pulumi.getter def metadata(self) -> 'outputs.Metadata': + """ + List of ZDB backends configurations + """ return pulumi.get(self, "metadata") @property @pulumi.getter def minimal_shards(self) -> int: + """ + The minimum amount of shards which are needed to recover the original data + """ return pulumi.get(self, "minimal_shards") @property @pulumi.getter def name(self) -> str: + """ + The name of the qsfs workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @property @pulumi.getter def redundant_groups(self) -> int: + """ + The amount of groups which one should be able to loose while still being able to recover the original data + """ return pulumi.get(self, "redundant_groups") @property @pulumi.getter def redundant_nodes(self) -> int: + """ + The amount of nodes that can be lost in every group while still being able to recover the original data + """ return pulumi.get(self, "redundant_nodes") @property @pulumi.getter def compression_algorithm(self) -> Optional[str]: + """ + configuration to use for the compression stage. Currently only snappy is supported + """ return pulumi.get(self, "compression_algorithm") @property @pulumi.getter def description(self) -> Optional[str]: + """ + The description of the qsfs workload, optional with no restrictions + """ return pulumi.get(self, "description") @property @pulumi.getter def encryption_algorithm(self) -> Optional[str]: + """ + configuration to use for the encryption stage. Currently only AES is supported + """ return pulumi.get(self, "encryption_algorithm") @@ -433,6 +641,15 @@ def __init__(__self__, *, mycelium_ip_seed: str, planetary_ip: str, ip: Optional[str] = None): + """ + :param str computed_ip: The reserved public ipv4 if any + :param str computed_ip6: The reserved public ipv6 if any + :param str console_url: The url to access the vm via cloud console on private interface using wireguard + :param str mycelium_ip: The allocated mycelium IP + :param str mycelium_ip_seed: The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + :param str planetary_ip: The allocated Yggdrasil IP + :param str ip: The private wireguard IP of the vm + """ pulumi.set(__self__, "computed_ip", computed_ip) pulumi.set(__self__, "computed_ip6", computed_ip6) pulumi.set(__self__, "console_url", console_url) @@ -445,36 +662,57 @@ def __init__(__self__, *, @property @pulumi.getter def computed_ip(self) -> str: + """ + The reserved public ipv4 if any + """ return pulumi.get(self, "computed_ip") @property @pulumi.getter def computed_ip6(self) -> str: + """ + The reserved public ipv6 if any + """ return pulumi.get(self, "computed_ip6") @property @pulumi.getter def console_url(self) -> str: + """ + The url to access the vm via cloud console on private interface using wireguard + """ return pulumi.get(self, "console_url") @property @pulumi.getter def mycelium_ip(self) -> str: + """ + The allocated mycelium IP + """ return pulumi.get(self, "mycelium_ip") @property @pulumi.getter def mycelium_ip_seed(self) -> str: + """ + The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + """ return pulumi.get(self, "mycelium_ip_seed") @property @pulumi.getter def planetary_ip(self) -> str: + """ + The allocated Yggdrasil IP + """ return pulumi.get(self, "planetary_ip") @property @pulumi.getter def ip(self) -> Optional[str]: + """ + The private wireguard IP of the vm + """ return pulumi.get(self, "ip") @@ -500,6 +738,27 @@ def __init__(__self__, *, public_ip6: Optional[bool] = None, rootfs_size: Optional[int] = None, zlogs: Optional[Sequence['outputs.Zlog']] = None): + """ + :param int cpu: The cpu units needed for the virtual machine. Range in [1: 32] + :param str flist: The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + :param int memory: The memory capacity for the virtual machine in MB. Min is 250 MB + :param str name: The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param str network_name: The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + :param Any node_id: The node ID to deploy the virtual machine on, required and should match the requested resources + :param str description: The description of the virtual machine workload, optional with no restrictions + :param str entrypoint: The entry point for the flist. Example: /sbin/zinit init + :param Mapping[str, str] env_vars: The environment variables to be passed to the virtual machine. Example: SSH_KEY + :param str flist_checksum: The checksum of the flist which should match the checksum of the given flist, optional + :param Sequence[str] gpus: A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + :param Sequence['Mount'] mounts: A list of mounted disks or volumes + :param bool mycelium: A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + :param str mycelium_ip_seed: The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + :param bool planetary: A flag to enable generating a yggdrasil IP for the virtual machine + :param bool public_ip: A flag to enable generating a public IP for the virtual machine, public node is required for it + :param bool public_ip6: A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + :param int rootfs_size: The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + :param Sequence['Zlog'] zlogs: A list of virtual machine loggers + """ pulumi.set(__self__, "cpu", cpu) pulumi.set(__self__, "flist", flist) pulumi.set(__self__, "memory", memory) @@ -536,96 +795,153 @@ def __init__(__self__, *, @property @pulumi.getter def cpu(self) -> int: + """ + The cpu units needed for the virtual machine. Range in [1: 32] + """ return pulumi.get(self, "cpu") @property @pulumi.getter def flist(self) -> str: + """ + The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist + """ return pulumi.get(self, "flist") @property @pulumi.getter def memory(self) -> int: + """ + The memory capacity for the virtual machine in MB. Min is 250 MB + """ return pulumi.get(self, "memory") @property @pulumi.getter def name(self) -> str: + """ + The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @property @pulumi.getter def network_name(self) -> str: + """ + The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist + """ return pulumi.get(self, "network_name") @property @pulumi.getter def node_id(self) -> Any: + """ + The node ID to deploy the virtual machine on, required and should match the requested resources + """ return pulumi.get(self, "node_id") @property @pulumi.getter def description(self) -> Optional[str]: + """ + The description of the virtual machine workload, optional with no restrictions + """ return pulumi.get(self, "description") @property @pulumi.getter def entrypoint(self) -> Optional[str]: + """ + The entry point for the flist. Example: /sbin/zinit init + """ return pulumi.get(self, "entrypoint") @property @pulumi.getter def env_vars(self) -> Optional[Mapping[str, str]]: + """ + The environment variables to be passed to the virtual machine. Example: SSH_KEY + """ return pulumi.get(self, "env_vars") @property @pulumi.getter def flist_checksum(self) -> Optional[str]: + """ + The checksum of the flist which should match the checksum of the given flist, optional + """ return pulumi.get(self, "flist_checksum") @property @pulumi.getter def gpus(self) -> Optional[Sequence[str]]: + """ + A list of gpu IDs to be used in the virtual machine. GPU ID format: //. Example: 0000:28:00.0/1002/731f + """ return pulumi.get(self, "gpus") @property @pulumi.getter def mounts(self) -> Optional[Sequence['outputs.Mount']]: + """ + A list of mounted disks or volumes + """ return pulumi.get(self, "mounts") @property @pulumi.getter def mycelium(self) -> Optional[bool]: + """ + A flag to generate a random mycelium IP seed to support mycelium in the virtual machine + """ return pulumi.get(self, "mycelium") @property @pulumi.getter def mycelium_ip_seed(self) -> Optional[str]: + """ + The seed used for mycelium IP generated for the virtual machine. It's length should be 6 + """ return pulumi.get(self, "mycelium_ip_seed") @property @pulumi.getter def planetary(self) -> Optional[bool]: + """ + A flag to enable generating a yggdrasil IP for the virtual machine + """ return pulumi.get(self, "planetary") @property @pulumi.getter def public_ip(self) -> Optional[bool]: + """ + A flag to enable generating a public IP for the virtual machine, public node is required for it + """ return pulumi.get(self, "public_ip") @property @pulumi.getter def public_ip6(self) -> Optional[bool]: + """ + A flag to enable generating a public IPv6 for the virtual machine, public node is required for it + """ return pulumi.get(self, "public_ip6") @property @pulumi.getter def rootfs_size(self) -> Optional[int]: + """ + The root fs size in GB (type SSD). Can be set as 0 to get the default minimum + """ return pulumi.get(self, "rootfs_size") @property @pulumi.getter def zlogs(self) -> Optional[Sequence['outputs.Zlog']]: + """ + A list of virtual machine loggers + """ return pulumi.get(self, "zlogs") @@ -635,6 +951,11 @@ def __init__(__self__, *, ips: Sequence[str], namespace: str, port: int): + """ + :param Sequence[str] ips: Computed IPs of the ZDB. Two IPs are returned: a public IPv6, and a YggIP, in this order + :param str namespace: Namespace of the ZDB + :param int port: Port of the ZDB + """ pulumi.set(__self__, "ips", ips) pulumi.set(__self__, "namespace", namespace) pulumi.set(__self__, "port", port) @@ -642,16 +963,25 @@ def __init__(__self__, *, @property @pulumi.getter def ips(self) -> Sequence[str]: + """ + Computed IPs of the ZDB. Two IPs are returned: a public IPv6, and a YggIP, in this order + """ return pulumi.get(self, "ips") @property @pulumi.getter def namespace(self) -> str: + """ + Namespace of the ZDB + """ return pulumi.get(self, "namespace") @property @pulumi.getter def port(self) -> int: + """ + Port of the ZDB + """ return pulumi.get(self, "port") @@ -664,6 +994,14 @@ def __init__(__self__, *, description: Optional[str] = None, mode: Optional[str] = None, public: Optional[bool] = None): + """ + :param str name: The name of the 0-db workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + :param str password: The 0-db password + :param int size: The 0-db size in GB (type HDD) + :param str description: The description of the 0-db workload, optional with no restrictions + :param str mode: the enumeration of the modes 0-db can operate in (default user) + :param bool public: A flag to make 0-db namespace public - readable by anyone + """ pulumi.set(__self__, "name", name) pulumi.set(__self__, "password", password) pulumi.set(__self__, "size", size) @@ -679,31 +1017,49 @@ def __init__(__self__, *, @property @pulumi.getter def name(self) -> str: + """ + The name of the 0-db workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "name") @property @pulumi.getter def password(self) -> str: + """ + The 0-db password + """ return pulumi.get(self, "password") @property @pulumi.getter def size(self) -> int: + """ + The 0-db size in GB (type HDD) + """ return pulumi.get(self, "size") @property @pulumi.getter def description(self) -> Optional[str]: + """ + The description of the 0-db workload, optional with no restrictions + """ return pulumi.get(self, "description") @property @pulumi.getter def mode(self) -> Optional[str]: + """ + the enumeration of the modes 0-db can operate in (default user) + """ return pulumi.get(self, "mode") @property @pulumi.getter def public(self) -> Optional[bool]: + """ + A flag to make 0-db namespace public - readable by anyone + """ return pulumi.get(self, "public") @@ -712,17 +1068,27 @@ class Zlog(dict): def __init__(__self__, *, output: str, zmachine: str): + """ + :param str output: The output logs URL, should be a valid url + :param str zmachine: The name of virtual machine, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ pulumi.set(__self__, "output", output) pulumi.set(__self__, "zmachine", zmachine) @property @pulumi.getter def output(self) -> str: + """ + The output logs URL, should be a valid url + """ return pulumi.get(self, "output") @property @pulumi.getter def zmachine(self) -> str: + """ + The name of virtual machine, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported + """ return pulumi.get(self, "zmachine") diff --git a/sdk/python/pulumi_threefold/provider.py b/sdk/python/pulumi_threefold/provider.py index e5b19cfb..23a956f4 100644 --- a/sdk/python/pulumi_threefold/provider.py +++ b/sdk/python/pulumi_threefold/provider.py @@ -14,21 +14,27 @@ @pulumi.input_type class ProviderArgs: def __init__(__self__, *, + graphql_url: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, key_type: Optional[pulumi.Input[str]] = None, mnemonic: Optional[pulumi.Input[str]] = None, network: Optional[pulumi.Input[str]] = None, + proxy_url: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, relay_url: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, rmb_timeout: Optional[pulumi.Input[str]] = None, - substrate_url: Optional[pulumi.Input[str]] = None): + substrate_url: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): """ The set of arguments for constructing a Provider resource. + :param pulumi.Input[Sequence[pulumi.Input[str]]] graphql_url: The graphql urls, example: https://graphql.grid.tf/graphql :param pulumi.Input[str] key_type: The key type registered on substrate (ed25519 or sr25519). :param pulumi.Input[str] mnemonic: The mnemonic of the user. It is very secret. :param pulumi.Input[str] network: The network to deploy on. - :param pulumi.Input[Sequence[pulumi.Input[str]]] relay_url: The relay urls, example: wss://relay.dev.grid.tf + :param pulumi.Input[Sequence[pulumi.Input[str]]] proxy_url: The proxy urls, example: https://gridproxy.grid.tf/ + :param pulumi.Input[Sequence[pulumi.Input[str]]] relay_url: The relay urls, example: wss://relay.grid.tf :param pulumi.Input[str] rmb_timeout: The timeout duration in seconds for rmb calls - :param pulumi.Input[str] substrate_url: The substrate url, example: wss://tfchain.dev.grid.tf/ws + :param pulumi.Input[Sequence[pulumi.Input[str]]] substrate_url: The substrate url, example: wss://tfchain.grid.tf/ws """ + if graphql_url is not None: + pulumi.set(__self__, "graphql_url", graphql_url) if key_type is None: key_type = (_utilities.get_env('') or 'sr25519') if key_type is not None: @@ -41,6 +47,8 @@ def __init__(__self__, *, network = (_utilities.get_env('') or '') if network is not None: pulumi.set(__self__, "network", network) + if proxy_url is not None: + pulumi.set(__self__, "proxy_url", proxy_url) if relay_url is not None: pulumi.set(__self__, "relay_url", relay_url) if rmb_timeout is not None: @@ -48,6 +56,18 @@ def __init__(__self__, *, if substrate_url is not None: pulumi.set(__self__, "substrate_url", substrate_url) + @property + @pulumi.getter + def graphql_url(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The graphql urls, example: https://graphql.grid.tf/graphql + """ + return pulumi.get(self, "graphql_url") + + @graphql_url.setter + def graphql_url(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "graphql_url", value) + @property @pulumi.getter def key_type(self) -> Optional[pulumi.Input[str]]: @@ -84,11 +104,23 @@ def network(self) -> Optional[pulumi.Input[str]]: def network(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "network", value) + @property + @pulumi.getter + def proxy_url(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The proxy urls, example: https://gridproxy.grid.tf/ + """ + return pulumi.get(self, "proxy_url") + + @proxy_url.setter + def proxy_url(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "proxy_url", value) + @property @pulumi.getter def relay_url(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ - The relay urls, example: wss://relay.dev.grid.tf + The relay urls, example: wss://relay.grid.tf """ return pulumi.get(self, "relay_url") @@ -110,14 +142,14 @@ def rmb_timeout(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter - def substrate_url(self) -> Optional[pulumi.Input[str]]: + def substrate_url(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ - The substrate url, example: wss://tfchain.dev.grid.tf/ws + The substrate url, example: wss://tfchain.grid.tf/ws """ return pulumi.get(self, "substrate_url") @substrate_url.setter - def substrate_url(self, value: Optional[pulumi.Input[str]]): + def substrate_url(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "substrate_url", value) @@ -126,23 +158,27 @@ class Provider(pulumi.ProviderResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + graphql_url: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, key_type: Optional[pulumi.Input[str]] = None, mnemonic: Optional[pulumi.Input[str]] = None, network: Optional[pulumi.Input[str]] = None, + proxy_url: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, relay_url: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, rmb_timeout: Optional[pulumi.Input[str]] = None, - substrate_url: Optional[pulumi.Input[str]] = None, + substrate_url: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, __props__=None): """ Create a Threefold resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[str]]] graphql_url: The graphql urls, example: https://graphql.grid.tf/graphql :param pulumi.Input[str] key_type: The key type registered on substrate (ed25519 or sr25519). :param pulumi.Input[str] mnemonic: The mnemonic of the user. It is very secret. :param pulumi.Input[str] network: The network to deploy on. - :param pulumi.Input[Sequence[pulumi.Input[str]]] relay_url: The relay urls, example: wss://relay.dev.grid.tf + :param pulumi.Input[Sequence[pulumi.Input[str]]] proxy_url: The proxy urls, example: https://gridproxy.grid.tf/ + :param pulumi.Input[Sequence[pulumi.Input[str]]] relay_url: The relay urls, example: wss://relay.grid.tf :param pulumi.Input[str] rmb_timeout: The timeout duration in seconds for rmb calls - :param pulumi.Input[str] substrate_url: The substrate url, example: wss://tfchain.dev.grid.tf/ws + :param pulumi.Input[Sequence[pulumi.Input[str]]] substrate_url: The substrate url, example: wss://tfchain.grid.tf/ws """ ... @overload @@ -167,12 +203,14 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + graphql_url: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, key_type: Optional[pulumi.Input[str]] = None, mnemonic: Optional[pulumi.Input[str]] = None, network: Optional[pulumi.Input[str]] = None, + proxy_url: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, relay_url: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, rmb_timeout: Optional[pulumi.Input[str]] = None, - substrate_url: Optional[pulumi.Input[str]] = None, + substrate_url: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, __props__=None): opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) if not isinstance(opts, pulumi.ResourceOptions): @@ -182,6 +220,7 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ProviderArgs.__new__(ProviderArgs) + __props__.__dict__["graphql_url"] = pulumi.Output.from_input(graphql_url).apply(pulumi.runtime.to_json) if graphql_url is not None else None if key_type is None: key_type = (_utilities.get_env('') or 'sr25519') __props__.__dict__["key_type"] = key_type @@ -191,9 +230,10 @@ def _internal_init(__self__, if network is None: network = (_utilities.get_env('') or '') __props__.__dict__["network"] = network + __props__.__dict__["proxy_url"] = pulumi.Output.from_input(proxy_url).apply(pulumi.runtime.to_json) if proxy_url is not None else None __props__.__dict__["relay_url"] = pulumi.Output.from_input(relay_url).apply(pulumi.runtime.to_json) if relay_url is not None else None __props__.__dict__["rmb_timeout"] = rmb_timeout - __props__.__dict__["substrate_url"] = substrate_url + __props__.__dict__["substrate_url"] = pulumi.Output.from_input(substrate_url).apply(pulumi.runtime.to_json) if substrate_url is not None else None secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["mnemonic"]) opts = pulumi.ResourceOptions.merge(opts, secret_opts) super(Provider, __self__).__init__( @@ -234,11 +274,3 @@ def rmb_timeout(self) -> pulumi.Output[Optional[str]]: """ return pulumi.get(self, "rmb_timeout") - @property - @pulumi.getter - def substrate_url(self) -> pulumi.Output[Optional[str]]: - """ - The substrate url, example: wss://tfchain.dev.grid.tf/ws - """ - return pulumi.get(self, "substrate_url") - diff --git a/tests/examples/kubernetes/Pulumi.yaml b/tests/examples/kubernetes/Pulumi.yaml index e36b826f..a593b480 100644 --- a/tests/examples/kubernetes/Pulumi.yaml +++ b/tests/examples/kubernetes/Pulumi.yaml @@ -45,7 +45,7 @@ resources: master: name: kubernetes network_name: test - node: ${scheduler.nodes[0]} + node_id: ${scheduler.nodes[0]} disk_size: 2 planetary: true mycelium: true @@ -55,14 +55,14 @@ resources: workers: - name: worker1 network_name: test - node: ${scheduler.nodes[0]} + node_id: ${scheduler.nodes[0]} disk_size: 2 cpu: 2 memory: 2048 mycelium: true - name: worker2 network_name: test - node: ${scheduler.nodes[0]} + node_id: ${scheduler.nodes[0]} disk_size: 2 cpu: 2 memory: 2048 diff --git a/tests/examples/virtual_machine/Pulumi.yaml b/tests/examples/virtual_machine/Pulumi.yaml index 04ff33a3..3bd421da 100644 --- a/tests/examples/virtual_machine/Pulumi.yaml +++ b/tests/examples/virtual_machine/Pulumi.yaml @@ -56,7 +56,7 @@ resources: planetary: true mycelium: true mounts: - - disk_name: data + - name: data mount_point: /app env_vars: SSH_KEY: