From b348133412f8f196dd2063b2eb9c09ef593231d2 Mon Sep 17 00:00:00 2001 From: Brandon Kalinowski Date: Thu, 24 Apr 2025 21:09:04 -0400 Subject: [PATCH] build nodejs --- examples/basic-ts/index.ts | 1 + .../bridge-metadata.json | 19 +- .../cmd/pulumi-resource-incus/schema.json | 394 +++++++++++++--- sdk/nodejs/Pulumi.yaml | 0 sdk/nodejs/README.md | 4 + sdk/nodejs/certificate.ts | 189 ++++++++ sdk/nodejs/clusterGroup.ts | 120 +++++ sdk/nodejs/clusterGroupAssignment.ts | 118 +++++ sdk/nodejs/config/index.ts | 5 + sdk/nodejs/config/vars.ts | 67 +++ sdk/nodejs/getImage.ts | 158 +++++++ sdk/nodejs/getProfile.ts | 142 ++++++ sdk/nodejs/getProject.ts | 137 ++++++ sdk/nodejs/go.mod | 3 + sdk/nodejs/image.ts | 221 +++++++++ sdk/nodejs/index.ts | 223 +++++++++ sdk/nodejs/instance.ts | 357 +++++++++++++++ sdk/nodejs/instanceSnapshot.ts | 183 ++++++++ sdk/nodejs/network.ts | 190 ++++++++ sdk/nodejs/networkAcl.ts | 179 ++++++++ sdk/nodejs/networkForward.ts | 185 ++++++++ sdk/nodejs/networkIntegration.ts | 208 +++++++++ sdk/nodejs/networkLb.ts | 140 ++++++ sdk/nodejs/networkLoadBalancer.ts | 135 ++++++ sdk/nodejs/networkPeer.ts | 251 +++++++++++ sdk/nodejs/networkZone.ts | 143 ++++++ sdk/nodejs/networkZoneRecord.ts | 176 ++++++++ sdk/nodejs/package.json | 29 ++ sdk/nodejs/profile.ts | 159 +++++++ sdk/nodejs/project.ts | 126 ++++++ sdk/nodejs/provider.ts | 87 ++++ sdk/nodejs/storageBucket.ts | 201 +++++++++ sdk/nodejs/storageBucketKey.ts | 199 ++++++++ sdk/nodejs/storagePool.ts | 177 ++++++++ sdk/nodejs/storageVolume.ts | 248 ++++++++++ sdk/nodejs/tsconfig.json | 49 ++ sdk/nodejs/types/index.ts | 13 + sdk/nodejs/types/input.ts | 426 ++++++++++++++++++ sdk/nodejs/types/output.ts | 410 +++++++++++++++++ sdk/nodejs/utilities.ts | 95 ++++ 40 files changed, 6093 insertions(+), 74 deletions(-) create mode 100644 sdk/nodejs/Pulumi.yaml create mode 100644 sdk/nodejs/README.md create mode 100644 sdk/nodejs/certificate.ts create mode 100644 sdk/nodejs/clusterGroup.ts create mode 100644 sdk/nodejs/clusterGroupAssignment.ts create mode 100644 sdk/nodejs/config/index.ts create mode 100644 sdk/nodejs/config/vars.ts create mode 100644 sdk/nodejs/getImage.ts create mode 100644 sdk/nodejs/getProfile.ts create mode 100644 sdk/nodejs/getProject.ts create mode 100644 sdk/nodejs/go.mod create mode 100644 sdk/nodejs/image.ts create mode 100644 sdk/nodejs/index.ts create mode 100644 sdk/nodejs/instance.ts create mode 100644 sdk/nodejs/instanceSnapshot.ts create mode 100644 sdk/nodejs/network.ts create mode 100644 sdk/nodejs/networkAcl.ts create mode 100644 sdk/nodejs/networkForward.ts create mode 100644 sdk/nodejs/networkIntegration.ts create mode 100644 sdk/nodejs/networkLb.ts create mode 100644 sdk/nodejs/networkLoadBalancer.ts create mode 100644 sdk/nodejs/networkPeer.ts create mode 100644 sdk/nodejs/networkZone.ts create mode 100644 sdk/nodejs/networkZoneRecord.ts create mode 100644 sdk/nodejs/package.json create mode 100644 sdk/nodejs/profile.ts create mode 100644 sdk/nodejs/project.ts create mode 100644 sdk/nodejs/provider.ts create mode 100644 sdk/nodejs/storageBucket.ts create mode 100644 sdk/nodejs/storageBucketKey.ts create mode 100644 sdk/nodejs/storagePool.ts create mode 100644 sdk/nodejs/storageVolume.ts create mode 100644 sdk/nodejs/tsconfig.json create mode 100644 sdk/nodejs/types/index.ts create mode 100644 sdk/nodejs/types/input.ts create mode 100644 sdk/nodejs/types/output.ts create mode 100644 sdk/nodejs/utilities.ts diff --git a/examples/basic-ts/index.ts b/examples/basic-ts/index.ts index 779c60c..9e01f9d 100644 --- a/examples/basic-ts/index.ts +++ b/examples/basic-ts/index.ts @@ -1,6 +1,7 @@ import * as incus from "@kiterun/incus"; const resource = new incus.Instance("instance1", { + name: "instance1", image: "images:ubuntu/22.04", project: "default", config: { diff --git a/provider/cmd/pulumi-resource-incus/bridge-metadata.json b/provider/cmd/pulumi-resource-incus/bridge-metadata.json index 31059eb..11e7d4c 100644 --- a/provider/cmd/pulumi-resource-incus/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-incus/bridge-metadata.json @@ -82,7 +82,14 @@ "majorVersion": 1 }, "incus_network_lb": { - "current": "incus:index/networkLb:NetworkLb", + "current": "incus:index/networkLoadBalancer:NetworkLoadBalancer", + "past": [ + { + "name": "incus:index/networkLb:NetworkLb", + "inCodegen": true, + "majorVersion": 1 + } + ], "majorVersion": 1, "fields": { "backend": { @@ -172,5 +179,13 @@ } } }, - "auto-settings": {} + "auto-settings": { + "resources": { + "incus_network_lb": { + "aliases": [ + "incus:index/networkLb:NetworkLb" + ] + } + } + } } \ No newline at end of file diff --git a/provider/cmd/pulumi-resource-incus/schema.json b/provider/cmd/pulumi-resource-incus/schema.json index 822ea8a..c9d9207 100644 --- a/provider/cmd/pulumi-resource-incus/schema.json +++ b/provider/cmd/pulumi-resource-incus/schema.json @@ -4,12 +4,14 @@ "description": "A Pulumi package for creating and managing incus cloud resources.", "keywords": [ "incus", - "category/cloud" + "category/cloud", + "containers", + "nimbus" ], "homepage": "https://linuxcontainers.org", "license": "Apache-2.0", "attribution": "This Pulumi package is based on the [`incus` Terraform Provider](https://github.com/lxc/terraform-provider-incus).", - "repository": "https://github.com/brandonkal/pulumi-incus", + "repository": "https://git.kalinow.ski/nimbus/pulumi-incus", "logoUrl": "https://linuxcontainers.org/static/img/containers.png", "publisher": "Kite.run", "meta": { @@ -30,14 +32,17 @@ "respectSchemaVersion": true }, "nodejs": { + "packageName": "@kiterun/incus", "packageDescription": "A Pulumi package for creating and managing incus cloud resources.", - "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/lxc/terraform-provider-incus)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-incus` repo](https://github.com/brandonkal/pulumi-incus/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-incus` repo](https://github.com/lxc/terraform-provider-incus/issues).", + "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/lxc/terraform-provider-incus)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-incus` repo](https://git.kalinow.ski/nimbus/pulumi-incus/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-incus` repo](https://github.com/lxc/terraform-provider-incus/issues).", + "typescriptVersion": "^5.8.3", "compatibility": "tfbridge20", "disableUnionOutputTypes": true, - "respectSchemaVersion": true + "respectSchemaVersion": true, + "useTypeOnlyReferences": true }, "python": { - "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/lxc/terraform-provider-incus)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-incus` repo](https://github.com/brandonkal/pulumi-incus/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-incus` repo](https://github.com/lxc/terraform-provider-incus/issues).", + "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/lxc/terraform-provider-incus)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-incus` repo](https://git.kalinow.ski/nimbus/pulumi-incus/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-incus` repo](https://github.com/lxc/terraform-provider-incus/issues).", "compatibility": "tfbridge20", "respectSchemaVersion": true, "pyproject": { @@ -529,6 +534,79 @@ } } }, + "incus:index/NetworkLoadBalancerBackend:NetworkLoadBalancerBackend": { + "properties": { + "description": { + "type": "string", + "description": "LB backend description\n" + }, + "name": { + "type": "string", + "description": "LB backend name\n" + }, + "targetAddress": { + "type": "string", + "description": "LB backend target address\n" + }, + "targetPort": { + "type": "string", + "description": "LB backend target port\n" + } + }, + "type": "object", + "required": [ + "name", + "targetAddress" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "description", + "name", + "targetAddress", + "targetPort" + ] + } + } + }, + "incus:index/NetworkLoadBalancerPort:NetworkLoadBalancerPort": { + "properties": { + "description": { + "type": "string", + "description": "Port description\n" + }, + "listenPort": { + "type": "string", + "description": "Port to listen to\n" + }, + "protocol": { + "type": "string", + "description": "Port protocol\n" + }, + "targetBackends": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of target LB backends\n" + } + }, + "type": "object", + "required": [ + "listenPort", + "targetBackends" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "description", + "listenPort", + "protocol", + "targetBackends" + ] + } + } + }, "incus:index/NetworkZoneRecordEntry:NetworkZoneRecordEntry": { "properties": { "ttl": { @@ -672,19 +750,6 @@ "requiredInputs": [] } } - }, - "incus:region/region:Region": { - "type": "string", - "enum": [ - { - "name": "here", - "value": "HERE" - }, - { - "name": "overThere", - "value": "OVER_THERE" - } - ] } }, "provider": { @@ -995,7 +1060,7 @@ } }, "incus:index/image:Image": { - "description": "## # incus.Image\n\nManages a locally-stored Incus image.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@pulumi/incus\";\n\nconst alpine = new incus.Image(\"alpine\", {sourceImage: {\n remote: \"images\",\n name: \"alpine/edge\",\n}});\nconst test1 = new incus.Instance(\"test1\", {\n name: \"test1\",\n image: alpine.fingerprint,\n ephemeral: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\nalpine = incus.Image(\"alpine\", source_image={\n \"remote\": \"images\",\n \"name\": \"alpine/edge\",\n})\ntest1 = incus.Instance(\"test1\",\n name=\"test1\",\n image=alpine.fingerprint,\n ephemeral=False)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var alpine = new Incus.Image(\"alpine\", new()\n {\n SourceImage = new Incus.Inputs.ImageSourceImageArgs\n {\n Remote = \"images\",\n Name = \"alpine/edge\",\n },\n });\n\n var test1 = new Incus.Instance(\"test1\", new()\n {\n Name = \"test1\",\n Image = alpine.Fingerprint,\n Ephemeral = false,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\talpine, err := incus.NewImage(ctx, \"alpine\", \u0026incus.ImageArgs{\n\t\t\tSourceImage: \u0026incus.ImageSourceImageArgs{\n\t\t\t\tRemote: pulumi.String(\"images\"),\n\t\t\t\tName: pulumi.String(\"alpine/edge\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewInstance(ctx, \"test1\", \u0026incus.InstanceArgs{\n\t\t\tName: pulumi.String(\"test1\"),\n\t\t\tImage: alpine.Fingerprint,\n\t\t\tEphemeral: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.Image;\nimport com.pulumi.incus.ImageArgs;\nimport com.pulumi.incus.inputs.ImageSourceImageArgs;\nimport com.pulumi.incus.Instance;\nimport com.pulumi.incus.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var alpine = new Image(\"alpine\", ImageArgs.builder()\n .sourceImage(ImageSourceImageArgs.builder()\n .remote(\"images\")\n .name(\"alpine/edge\")\n .build())\n .build());\n\n var test1 = new Instance(\"test1\", InstanceArgs.builder()\n .name(\"test1\")\n .image(alpine.fingerprint())\n .ephemeral(false)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n alpine:\n type: incus:Image\n properties:\n sourceImage:\n remote: images\n name: alpine/edge\n test1:\n type: incus:Instance\n properties:\n name: test1\n image: ${alpine.fingerprint}\n ephemeral: false\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Notes\n\n* See the Incus [documentation](https://linuxcontainers.org/incus/docs/main/howto/images_remote) for more info on default image remotes.\n", + "description": "## # incus.Image\n\nManages a locally-stored Incus image.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@kiterun/incus\";\n\nconst alpine = new incus.Image(\"alpine\", {sourceImage: {\n remote: \"images\",\n name: \"alpine/edge\",\n}});\nconst test1 = new incus.Instance(\"test1\", {\n name: \"test1\",\n image: alpine.fingerprint,\n ephemeral: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\nalpine = incus.Image(\"alpine\", source_image={\n \"remote\": \"images\",\n \"name\": \"alpine/edge\",\n})\ntest1 = incus.Instance(\"test1\",\n name=\"test1\",\n image=alpine.fingerprint,\n ephemeral=False)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var alpine = new Incus.Image(\"alpine\", new()\n {\n SourceImage = new Incus.Inputs.ImageSourceImageArgs\n {\n Remote = \"images\",\n Name = \"alpine/edge\",\n },\n });\n\n var test1 = new Incus.Instance(\"test1\", new()\n {\n Name = \"test1\",\n Image = alpine.Fingerprint,\n Ephemeral = false,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\talpine, err := incus.NewImage(ctx, \"alpine\", \u0026incus.ImageArgs{\n\t\t\tSourceImage: \u0026incus.ImageSourceImageArgs{\n\t\t\t\tRemote: pulumi.String(\"images\"),\n\t\t\t\tName: pulumi.String(\"alpine/edge\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewInstance(ctx, \"test1\", \u0026incus.InstanceArgs{\n\t\t\tName: pulumi.String(\"test1\"),\n\t\t\tImage: alpine.Fingerprint,\n\t\t\tEphemeral: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.Image;\nimport com.pulumi.incus.ImageArgs;\nimport com.pulumi.incus.inputs.ImageSourceImageArgs;\nimport com.pulumi.incus.Instance;\nimport com.pulumi.incus.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var alpine = new Image(\"alpine\", ImageArgs.builder()\n .sourceImage(ImageSourceImageArgs.builder()\n .remote(\"images\")\n .name(\"alpine/edge\")\n .build())\n .build());\n\n var test1 = new Instance(\"test1\", InstanceArgs.builder()\n .name(\"test1\")\n .image(alpine.fingerprint())\n .ephemeral(false)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n alpine:\n type: incus:Image\n properties:\n sourceImage:\n remote: images\n name: alpine/edge\n test1:\n type: incus:Instance\n properties:\n name: test1\n image: ${alpine.fingerprint}\n ephemeral: false\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Notes\n\n* See the Incus [documentation](https://linuxcontainers.org/incus/docs/main/howto/images_remote) for more info on default image remotes.\n", "properties": { "aliases": { "type": "array", @@ -1190,7 +1255,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the instance will be spawned.\n" + "description": "*Optional* - Name of the project where the instance will be spawned.\n", + "default": "default" }, "remote": { "type": "string", @@ -1202,7 +1268,7 @@ }, "sourceFile": { "type": "string", - "description": "*Optional* - The souce backup file from which the instance should be restored. For handling of storage pool, see examples.\n" + "description": "*Optional* - The source backup file from which the instance should be restored. For handling of storage pool, see examples.\n" }, "sourceInstance": { "$ref": "#/types/incus:index/InstanceSourceInstance:InstanceSourceInstance", @@ -1237,6 +1303,7 @@ "macAddress", "name", "profiles", + "project", "running", "status", "target", @@ -1289,7 +1356,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the instance will be spawned.\n" + "description": "*Optional* - Name of the project where the instance will be spawned.\n", + "default": "default" }, "remote": { "type": "string", @@ -1301,7 +1369,7 @@ }, "sourceFile": { "type": "string", - "description": "*Optional* - The souce backup file from which the instance should be restored. For handling of storage pool, see examples.\n" + "description": "*Optional* - The source backup file from which the instance should be restored. For handling of storage pool, see examples.\n" }, "sourceInstance": { "$ref": "#/types/incus:index/InstanceSourceInstance:InstanceSourceInstance", @@ -1384,7 +1452,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the instance will be spawned.\n" + "description": "*Optional* - Name of the project where the instance will be spawned.\n", + "default": "default" }, "remote": { "type": "string", @@ -1396,7 +1465,7 @@ }, "sourceFile": { "type": "string", - "description": "*Optional* - The souce backup file from which the instance should be restored. For handling of storage pool, see examples.\n" + "description": "*Optional* - The source backup file from which the instance should be restored. For handling of storage pool, see examples.\n" }, "sourceInstance": { "$ref": "#/types/incus:index/InstanceSourceInstance:InstanceSourceInstance", @@ -1426,7 +1495,7 @@ } }, "incus:index/instanceSnapshot:InstanceSnapshot": { - "description": "## # incus.InstanceSnapshot\n\nManages a snapshot of an Incus instance.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@pulumi/incus\";\n\nconst instance = new incus.Instance(\"instance\", {\n name: \"my-instance\",\n image: \"ubuntu\",\n ephemeral: false,\n});\nconst snap1 = new incus.InstanceSnapshot(\"snap1\", {\n name: \"my-snapshot-1\",\n instance: instance.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\ninstance = incus.Instance(\"instance\",\n name=\"my-instance\",\n image=\"ubuntu\",\n ephemeral=False)\nsnap1 = incus.InstanceSnapshot(\"snap1\",\n name=\"my-snapshot-1\",\n instance=instance.name)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var instance = new Incus.Instance(\"instance\", new()\n {\n Name = \"my-instance\",\n Image = \"ubuntu\",\n Ephemeral = false,\n });\n\n var snap1 = new Incus.InstanceSnapshot(\"snap1\", new()\n {\n Name = \"my-snapshot-1\",\n Instance = instance.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinstance, err := incus.NewInstance(ctx, \"instance\", \u0026incus.InstanceArgs{\n\t\t\tName: pulumi.String(\"my-instance\"),\n\t\t\tImage: pulumi.String(\"ubuntu\"),\n\t\t\tEphemeral: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewInstanceSnapshot(ctx, \"snap1\", \u0026incus.InstanceSnapshotArgs{\n\t\t\tName: pulumi.String(\"my-snapshot-1\"),\n\t\t\tInstance: instance.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.Instance;\nimport com.pulumi.incus.InstanceArgs;\nimport com.pulumi.incus.InstanceSnapshot;\nimport com.pulumi.incus.InstanceSnapshotArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var instance = new Instance(\"instance\", InstanceArgs.builder()\n .name(\"my-instance\")\n .image(\"ubuntu\")\n .ephemeral(false)\n .build());\n\n var snap1 = new InstanceSnapshot(\"snap1\", InstanceSnapshotArgs.builder()\n .name(\"my-snapshot-1\")\n .instance(instance.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n instance:\n type: incus:Instance\n properties:\n name: my-instance\n image: ubuntu\n ephemeral: false\n snap1:\n type: incus:InstanceSnapshot\n properties:\n name: my-snapshot-1\n instance: ${instance.name}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "## # incus.InstanceSnapshot\n\nManages a snapshot of an Incus instance.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@kiterun/incus\";\n\nconst instance = new incus.Instance(\"instance\", {\n name: \"my-instance\",\n image: \"ubuntu\",\n ephemeral: false,\n});\nconst snap1 = new incus.InstanceSnapshot(\"snap1\", {\n name: \"my-snapshot-1\",\n instance: instance.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\ninstance = incus.Instance(\"instance\",\n name=\"my-instance\",\n image=\"ubuntu\",\n ephemeral=False)\nsnap1 = incus.InstanceSnapshot(\"snap1\",\n name=\"my-snapshot-1\",\n instance=instance.name)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var instance = new Incus.Instance(\"instance\", new()\n {\n Name = \"my-instance\",\n Image = \"ubuntu\",\n Ephemeral = false,\n });\n\n var snap1 = new Incus.InstanceSnapshot(\"snap1\", new()\n {\n Name = \"my-snapshot-1\",\n Instance = instance.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinstance, err := incus.NewInstance(ctx, \"instance\", \u0026incus.InstanceArgs{\n\t\t\tName: pulumi.String(\"my-instance\"),\n\t\t\tImage: pulumi.String(\"ubuntu\"),\n\t\t\tEphemeral: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewInstanceSnapshot(ctx, \"snap1\", \u0026incus.InstanceSnapshotArgs{\n\t\t\tName: pulumi.String(\"my-snapshot-1\"),\n\t\t\tInstance: instance.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.Instance;\nimport com.pulumi.incus.InstanceArgs;\nimport com.pulumi.incus.InstanceSnapshot;\nimport com.pulumi.incus.InstanceSnapshotArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var instance = new Instance(\"instance\", InstanceArgs.builder()\n .name(\"my-instance\")\n .image(\"ubuntu\")\n .ephemeral(false)\n .build());\n\n var snap1 = new InstanceSnapshot(\"snap1\", InstanceSnapshotArgs.builder()\n .name(\"my-snapshot-1\")\n .instance(instance.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n instance:\n type: incus:Instance\n properties:\n name: my-instance\n image: ubuntu\n ephemeral: false\n snap1:\n type: incus:InstanceSnapshot\n properties:\n name: my-snapshot-1\n instance: ${instance.name}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "createdAt": { "type": "integer", @@ -1442,7 +1511,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the snapshot will be stored.\n" + "description": "*Optional* - Name of the project where the snapshot will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -1457,6 +1527,7 @@ "createdAt", "instance", "name", + "project", "stateful" ], "inputProperties": { @@ -1470,7 +1541,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the snapshot will be stored.\n" + "description": "*Optional* - Name of the project where the snapshot will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -1501,7 +1573,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the snapshot will be stored.\n" + "description": "*Optional* - Name of the project where the snapshot will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -1538,7 +1611,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network will be created.\n" + "description": "*Optional* - Name of the project where the network will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -1558,6 +1632,7 @@ "description", "managed", "name", + "project", "type" ], "inputProperties": { @@ -1578,7 +1653,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network will be created.\n" + "description": "*Optional* - Name of the project where the network will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -1617,7 +1693,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network will be created.\n" + "description": "*Optional* - Name of the project where the network will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -1668,7 +1745,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network ACL will be created.\n" + "description": "*Optional* - Name of the project where the network ACL will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -1680,7 +1758,8 @@ "description", "egresses", "ingresses", - "name" + "name", + "project" ], "inputProperties": { "config": { @@ -1714,7 +1793,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network ACL will be created.\n" + "description": "*Optional* - Name of the project where the network ACL will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -1755,7 +1835,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network ACL will be created.\n" + "description": "*Optional* - Name of the project where the network ACL will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -1891,7 +1972,7 @@ } }, "incus:index/networkIntegration:NetworkIntegration": { - "description": "## # incus.NetworkIntegration\n\nManage integrations between the local Incus deployment and remote networks hosted on Incus or other platforms. Currently available only for [OVN networks](https://linuxcontainers.org/incus/docs/main/reference/network_ovn/#network-ovn).\n\n## Basic Example\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@pulumi/incus\";\n\nconst _this = new incus.NetworkIntegration(\"this\", {\n name: \"ovn-region\",\n type: \"ovn\",\n config: {\n \"ovn.northbound_connection\": \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\",\n \"ovn.southbound_connection\": \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\nthis = incus.NetworkIntegration(\"this\",\n name=\"ovn-region\",\n type=\"ovn\",\n config={\n \"ovn.northbound_connection\": \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\",\n \"ovn.southbound_connection\": \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @this = new Incus.NetworkIntegration(\"this\", new()\n {\n Name = \"ovn-region\",\n Type = \"ovn\",\n Config = \n {\n { \"ovn.northbound_connection\", \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\" },\n { \"ovn.southbound_connection\", \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := incus.NewNetworkIntegration(ctx, \"this\", \u0026incus.NetworkIntegrationArgs{\n\t\t\tName: pulumi.String(\"ovn-region\"),\n\t\t\tType: pulumi.String(\"ovn\"),\n\t\t\tConfig: pulumi.StringMap{\n\t\t\t\t\"ovn.northbound_connection\": pulumi.String(\"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\"),\n\t\t\t\t\"ovn.southbound_connection\": pulumi.String(\"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.NetworkIntegration;\nimport com.pulumi.incus.NetworkIntegrationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var this_ = new NetworkIntegration(\"this\", NetworkIntegrationArgs.builder()\n .name(\"ovn-region\")\n .type(\"ovn\")\n .config(Map.ofEntries(\n Map.entry(\"ovn.northbound_connection\", \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\"),\n Map.entry(\"ovn.southbound_connection\", \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n this:\n type: incus:NetworkIntegration\n properties:\n name: ovn-region\n type: ovn\n config:\n ovn.northbound_connection: tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\n ovn.southbound_connection: tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Peer Example\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@pulumi/incus\";\n\nconst _default = new incus.Network(\"default\", {\n name: \"default\",\n type: \"ovn\",\n config: {\n \"ipv4.address\": \"192.168.2.0/24\",\n \"ipv4.nat\": \"true\",\n },\n});\nconst _this = new incus.NetworkIntegration(\"this\", {\n name: \"ovn-region\",\n type: \"ovn\",\n config: {\n \"ovn.northbound_connection\": \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\",\n \"ovn.southbound_connection\": \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\",\n },\n});\nconst thisNetworkPeer = new incus.NetworkPeer(\"this\", {\n name: \"ovn-peer\",\n network: _default.name,\n targetIntegration: _this.name,\n type: \"remote\",\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\ndefault = incus.Network(\"default\",\n name=\"default\",\n type=\"ovn\",\n config={\n \"ipv4.address\": \"192.168.2.0/24\",\n \"ipv4.nat\": \"true\",\n })\nthis = incus.NetworkIntegration(\"this\",\n name=\"ovn-region\",\n type=\"ovn\",\n config={\n \"ovn.northbound_connection\": \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\",\n \"ovn.southbound_connection\": \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\",\n })\nthis_network_peer = incus.NetworkPeer(\"this\",\n name=\"ovn-peer\",\n network=default.name,\n target_integration=this.name,\n type=\"remote\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @default = new Incus.Network(\"default\", new()\n {\n Name = \"default\",\n Type = \"ovn\",\n Config = \n {\n { \"ipv4.address\", \"192.168.2.0/24\" },\n { \"ipv4.nat\", \"true\" },\n },\n });\n\n var @this = new Incus.NetworkIntegration(\"this\", new()\n {\n Name = \"ovn-region\",\n Type = \"ovn\",\n Config = \n {\n { \"ovn.northbound_connection\", \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\" },\n { \"ovn.southbound_connection\", \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\" },\n },\n });\n\n var thisNetworkPeer = new Incus.NetworkPeer(\"this\", new()\n {\n Name = \"ovn-peer\",\n Network = @default.Name,\n TargetIntegration = @this.Name,\n Type = \"remote\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_default, err := incus.NewNetwork(ctx, \"default\", \u0026incus.NetworkArgs{\n\t\t\tName: pulumi.String(\"default\"),\n\t\t\tType: pulumi.String(\"ovn\"),\n\t\t\tConfig: pulumi.StringMap{\n\t\t\t\t\"ipv4.address\": pulumi.String(\"192.168.2.0/24\"),\n\t\t\t\t\"ipv4.nat\": pulumi.String(\"true\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tthis, err := incus.NewNetworkIntegration(ctx, \"this\", \u0026incus.NetworkIntegrationArgs{\n\t\t\tName: pulumi.String(\"ovn-region\"),\n\t\t\tType: pulumi.String(\"ovn\"),\n\t\t\tConfig: pulumi.StringMap{\n\t\t\t\t\"ovn.northbound_connection\": pulumi.String(\"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\"),\n\t\t\t\t\"ovn.southbound_connection\": pulumi.String(\"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewNetworkPeer(ctx, \"this\", \u0026incus.NetworkPeerArgs{\n\t\t\tName: pulumi.String(\"ovn-peer\"),\n\t\t\tNetwork: _default.Name,\n\t\t\tTargetIntegration: this.Name,\n\t\t\tType: pulumi.String(\"remote\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.Network;\nimport com.pulumi.incus.NetworkArgs;\nimport com.pulumi.incus.NetworkIntegration;\nimport com.pulumi.incus.NetworkIntegrationArgs;\nimport com.pulumi.incus.NetworkPeer;\nimport com.pulumi.incus.NetworkPeerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var default_ = new Network(\"default\", NetworkArgs.builder()\n .name(\"default\")\n .type(\"ovn\")\n .config(Map.ofEntries(\n Map.entry(\"ipv4.address\", \"192.168.2.0/24\"),\n Map.entry(\"ipv4.nat\", \"true\")\n ))\n .build());\n\n var this_ = new NetworkIntegration(\"this\", NetworkIntegrationArgs.builder()\n .name(\"ovn-region\")\n .type(\"ovn\")\n .config(Map.ofEntries(\n Map.entry(\"ovn.northbound_connection\", \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\"),\n Map.entry(\"ovn.southbound_connection\", \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\")\n ))\n .build());\n\n var thisNetworkPeer = new NetworkPeer(\"thisNetworkPeer\", NetworkPeerArgs.builder()\n .name(\"ovn-peer\")\n .network(default_.name())\n .targetIntegration(this_.name())\n .type(\"remote\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n default:\n type: incus:Network\n properties:\n name: default\n type: ovn\n config:\n ipv4.address: 192.168.2.0/24\n ipv4.nat: 'true'\n this:\n type: incus:NetworkIntegration\n properties:\n name: ovn-region\n type: ovn\n config:\n ovn.northbound_connection: tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\n ovn.southbound_connection: tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\n thisNetworkPeer:\n type: incus:NetworkPeer\n name: this\n properties:\n name: ovn-peer\n network: ${default.name}\n targetIntegration: ${this.name}\n type: remote\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "## # incus.NetworkIntegration\n\nManage integrations between the local Incus deployment and remote networks hosted on Incus or other platforms. Currently available only for [OVN networks](https://linuxcontainers.org/incus/docs/main/reference/network_ovn/#network-ovn).\n\n## Basic Example\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@kiterun/incus\";\n\nconst _this = new incus.NetworkIntegration(\"this\", {\n name: \"ovn-region\",\n type: \"ovn\",\n config: {\n \"ovn.northbound_connection\": \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\",\n \"ovn.southbound_connection\": \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\nthis = incus.NetworkIntegration(\"this\",\n name=\"ovn-region\",\n type=\"ovn\",\n config={\n \"ovn.northbound_connection\": \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\",\n \"ovn.southbound_connection\": \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @this = new Incus.NetworkIntegration(\"this\", new()\n {\n Name = \"ovn-region\",\n Type = \"ovn\",\n Config = \n {\n { \"ovn.northbound_connection\", \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\" },\n { \"ovn.southbound_connection\", \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := incus.NewNetworkIntegration(ctx, \"this\", \u0026incus.NetworkIntegrationArgs{\n\t\t\tName: pulumi.String(\"ovn-region\"),\n\t\t\tType: pulumi.String(\"ovn\"),\n\t\t\tConfig: pulumi.StringMap{\n\t\t\t\t\"ovn.northbound_connection\": pulumi.String(\"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\"),\n\t\t\t\t\"ovn.southbound_connection\": pulumi.String(\"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.NetworkIntegration;\nimport com.pulumi.incus.NetworkIntegrationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var this_ = new NetworkIntegration(\"this\", NetworkIntegrationArgs.builder()\n .name(\"ovn-region\")\n .type(\"ovn\")\n .config(Map.ofEntries(\n Map.entry(\"ovn.northbound_connection\", \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\"),\n Map.entry(\"ovn.southbound_connection\", \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n this:\n type: incus:NetworkIntegration\n properties:\n name: ovn-region\n type: ovn\n config:\n ovn.northbound_connection: tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\n ovn.southbound_connection: tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Peer Example\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@kiterun/incus\";\n\nconst _default = new incus.Network(\"default\", {\n name: \"default\",\n type: \"ovn\",\n config: {\n \"ipv4.address\": \"192.168.2.0/24\",\n \"ipv4.nat\": \"true\",\n },\n});\nconst _this = new incus.NetworkIntegration(\"this\", {\n name: \"ovn-region\",\n type: \"ovn\",\n config: {\n \"ovn.northbound_connection\": \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\",\n \"ovn.southbound_connection\": \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\",\n },\n});\nconst thisNetworkPeer = new incus.NetworkPeer(\"this\", {\n name: \"ovn-peer\",\n network: _default.name,\n targetIntegration: _this.name,\n type: \"remote\",\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\ndefault = incus.Network(\"default\",\n name=\"default\",\n type=\"ovn\",\n config={\n \"ipv4.address\": \"192.168.2.0/24\",\n \"ipv4.nat\": \"true\",\n })\nthis = incus.NetworkIntegration(\"this\",\n name=\"ovn-region\",\n type=\"ovn\",\n config={\n \"ovn.northbound_connection\": \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\",\n \"ovn.southbound_connection\": \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\",\n })\nthis_network_peer = incus.NetworkPeer(\"this\",\n name=\"ovn-peer\",\n network=default.name,\n target_integration=this.name,\n type=\"remote\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @default = new Incus.Network(\"default\", new()\n {\n Name = \"default\",\n Type = \"ovn\",\n Config = \n {\n { \"ipv4.address\", \"192.168.2.0/24\" },\n { \"ipv4.nat\", \"true\" },\n },\n });\n\n var @this = new Incus.NetworkIntegration(\"this\", new()\n {\n Name = \"ovn-region\",\n Type = \"ovn\",\n Config = \n {\n { \"ovn.northbound_connection\", \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\" },\n { \"ovn.southbound_connection\", \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\" },\n },\n });\n\n var thisNetworkPeer = new Incus.NetworkPeer(\"this\", new()\n {\n Name = \"ovn-peer\",\n Network = @default.Name,\n TargetIntegration = @this.Name,\n Type = \"remote\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_default, err := incus.NewNetwork(ctx, \"default\", \u0026incus.NetworkArgs{\n\t\t\tName: pulumi.String(\"default\"),\n\t\t\tType: pulumi.String(\"ovn\"),\n\t\t\tConfig: pulumi.StringMap{\n\t\t\t\t\"ipv4.address\": pulumi.String(\"192.168.2.0/24\"),\n\t\t\t\t\"ipv4.nat\": pulumi.String(\"true\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tthis, err := incus.NewNetworkIntegration(ctx, \"this\", \u0026incus.NetworkIntegrationArgs{\n\t\t\tName: pulumi.String(\"ovn-region\"),\n\t\t\tType: pulumi.String(\"ovn\"),\n\t\t\tConfig: pulumi.StringMap{\n\t\t\t\t\"ovn.northbound_connection\": pulumi.String(\"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\"),\n\t\t\t\t\"ovn.southbound_connection\": pulumi.String(\"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewNetworkPeer(ctx, \"this\", \u0026incus.NetworkPeerArgs{\n\t\t\tName: pulumi.String(\"ovn-peer\"),\n\t\t\tNetwork: _default.Name,\n\t\t\tTargetIntegration: this.Name,\n\t\t\tType: pulumi.String(\"remote\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.Network;\nimport com.pulumi.incus.NetworkArgs;\nimport com.pulumi.incus.NetworkIntegration;\nimport com.pulumi.incus.NetworkIntegrationArgs;\nimport com.pulumi.incus.NetworkPeer;\nimport com.pulumi.incus.NetworkPeerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var default_ = new Network(\"default\", NetworkArgs.builder()\n .name(\"default\")\n .type(\"ovn\")\n .config(Map.ofEntries(\n Map.entry(\"ipv4.address\", \"192.168.2.0/24\"),\n Map.entry(\"ipv4.nat\", \"true\")\n ))\n .build());\n\n var this_ = new NetworkIntegration(\"this\", NetworkIntegrationArgs.builder()\n .name(\"ovn-region\")\n .type(\"ovn\")\n .config(Map.ofEntries(\n Map.entry(\"ovn.northbound_connection\", \"tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\"),\n Map.entry(\"ovn.southbound_connection\", \"tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\")\n ))\n .build());\n\n var thisNetworkPeer = new NetworkPeer(\"thisNetworkPeer\", NetworkPeerArgs.builder()\n .name(\"ovn-peer\")\n .network(default_.name())\n .targetIntegration(this_.name())\n .type(\"remote\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n default:\n type: incus:Network\n properties:\n name: default\n type: ovn\n config:\n ipv4.address: 192.168.2.0/24\n ipv4.nat: 'true'\n this:\n type: incus:NetworkIntegration\n properties:\n name: ovn-region\n type: ovn\n config:\n ovn.northbound_connection: tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645\n ovn.southbound_connection: tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646\n thisNetworkPeer:\n type: incus:NetworkPeer\n name: this\n properties:\n name: ovn-peer\n network: ${default.name}\n targetIntegration: ${this.name}\n type: remote\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "config": { "type": "object", @@ -1910,7 +1991,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network will be created.\n" + "description": "*Optional* - Name of the project where the network will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -1925,6 +2007,7 @@ "config", "description", "name", + "project", "type" ], "inputProperties": { @@ -1945,7 +2028,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network will be created.\n" + "description": "*Optional* - Name of the project where the network will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -1979,7 +2063,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network will be created.\n" + "description": "*Optional* - Name of the project where the network will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -2118,10 +2203,143 @@ } }, "type": "object" - } + }, + "deprecationMessage": "incus.index/networklb.NetworkLb has been deprecated in favor of incus.index/networkloadbalancer.NetworkLoadBalancer" + }, + "incus:index/networkLoadBalancer:NetworkLoadBalancer": { + "properties": { + "backends": { + "type": "array", + "items": { + "$ref": "#/types/incus:index/NetworkLoadBalancerBackend:NetworkLoadBalancerBackend" + }, + "description": "Network load balancer backend\n" + }, + "config": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "listenAddress": { + "type": "string" + }, + "network": { + "type": "string" + }, + "ports": { + "type": "array", + "items": { + "$ref": "#/types/incus:index/NetworkLoadBalancerPort:NetworkLoadBalancerPort" + }, + "description": "Network load balancer port\n" + }, + "project": { + "type": "string" + }, + "remote": { + "type": "string" + } + }, + "required": [ + "config", + "description", + "listenAddress", + "network" + ], + "inputProperties": { + "backends": { + "type": "array", + "items": { + "$ref": "#/types/incus:index/NetworkLoadBalancerBackend:NetworkLoadBalancerBackend" + }, + "description": "Network load balancer backend\n" + }, + "config": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "listenAddress": { + "type": "string" + }, + "network": { + "type": "string" + }, + "ports": { + "type": "array", + "items": { + "$ref": "#/types/incus:index/NetworkLoadBalancerPort:NetworkLoadBalancerPort" + }, + "description": "Network load balancer port\n" + }, + "project": { + "type": "string" + }, + "remote": { + "type": "string" + } + }, + "requiredInputs": [ + "listenAddress", + "network" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering NetworkLoadBalancer resources.\n", + "properties": { + "backends": { + "type": "array", + "items": { + "$ref": "#/types/incus:index/NetworkLoadBalancerBackend:NetworkLoadBalancerBackend" + }, + "description": "Network load balancer backend\n" + }, + "config": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "listenAddress": { + "type": "string" + }, + "network": { + "type": "string" + }, + "ports": { + "type": "array", + "items": { + "$ref": "#/types/incus:index/NetworkLoadBalancerPort:NetworkLoadBalancerPort" + }, + "description": "Network load balancer port\n" + }, + "project": { + "type": "string" + }, + "remote": { + "type": "string" + } + }, + "type": "object" + }, + "aliases": [ + { + "type": "incus:index/networkLb:NetworkLb" + } + ] }, "incus:index/networkPeer:NetworkPeer": { - "description": "## # incus.NetworkPeer\n\nIncus allows creating peer routing relationships between two OVN networks. Using this method, traffic between the two\nnetworks can go directly from one OVN network to the other and thus stays within the OVN subsystem, rather than transiting\nthrough the uplink network.\n\n\u003e The peer resource is exclusively compatible with OVN (Open Virtual Network).\n\nFor more information, please refer to [How to create peer routing relationships](https://linuxcontainers.org/incus/docs/main/howto/network_ovn_peers/)\nin the official Incus documentation.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@pulumi/incus\";\n\nconst lan0 = new incus.Network(\"lan0\", {\n name: \"lan0\",\n type: \"ovn\",\n config: {},\n});\nconst lan1 = new incus.Network(\"lan1\", {\n name: \"lan1\",\n type: \"ovn\",\n config: {},\n});\nconst lan0Lan1 = new incus.NetworkPeer(\"lan0_lan1\", {\n name: \"lab0-lan1\",\n description: \"A meaningful description\",\n network: lan0.name,\n project: \"default\",\n targetNetwork: lan1.name,\n targetProject: \"default\",\n});\nconst lan1Lan0 = new incus.NetworkPeer(\"lan1_lan0\", {\n name: \"lab1-lan0\",\n description: \"A meaningful description\",\n network: lan1.name,\n project: \"default\",\n targetNetwork: lan0.name,\n targetProject: \"default\",\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\nlan0 = incus.Network(\"lan0\",\n name=\"lan0\",\n type=\"ovn\",\n config={})\nlan1 = incus.Network(\"lan1\",\n name=\"lan1\",\n type=\"ovn\",\n config={})\nlan0_lan1 = incus.NetworkPeer(\"lan0_lan1\",\n name=\"lab0-lan1\",\n description=\"A meaningful description\",\n network=lan0.name,\n project=\"default\",\n target_network=lan1.name,\n target_project=\"default\")\nlan1_lan0 = incus.NetworkPeer(\"lan1_lan0\",\n name=\"lab1-lan0\",\n description=\"A meaningful description\",\n network=lan1.name,\n project=\"default\",\n target_network=lan0.name,\n target_project=\"default\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var lan0 = new Incus.Network(\"lan0\", new()\n {\n Name = \"lan0\",\n Type = \"ovn\",\n Config = null,\n });\n\n var lan1 = new Incus.Network(\"lan1\", new()\n {\n Name = \"lan1\",\n Type = \"ovn\",\n Config = null,\n });\n\n var lan0Lan1 = new Incus.NetworkPeer(\"lan0_lan1\", new()\n {\n Name = \"lab0-lan1\",\n Description = \"A meaningful description\",\n Network = lan0.Name,\n Project = \"default\",\n TargetNetwork = lan1.Name,\n TargetProject = \"default\",\n });\n\n var lan1Lan0 = new Incus.NetworkPeer(\"lan1_lan0\", new()\n {\n Name = \"lab1-lan0\",\n Description = \"A meaningful description\",\n Network = lan1.Name,\n Project = \"default\",\n TargetNetwork = lan0.Name,\n TargetProject = \"default\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tlan0, err := incus.NewNetwork(ctx, \"lan0\", \u0026incus.NetworkArgs{\n\t\t\tName: pulumi.String(\"lan0\"),\n\t\t\tType: pulumi.String(\"ovn\"),\n\t\t\tConfig: pulumi.StringMap{},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tlan1, err := incus.NewNetwork(ctx, \"lan1\", \u0026incus.NetworkArgs{\n\t\t\tName: pulumi.String(\"lan1\"),\n\t\t\tType: pulumi.String(\"ovn\"),\n\t\t\tConfig: pulumi.StringMap{},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewNetworkPeer(ctx, \"lan0_lan1\", \u0026incus.NetworkPeerArgs{\n\t\t\tName: pulumi.String(\"lab0-lan1\"),\n\t\t\tDescription: pulumi.String(\"A meaningful description\"),\n\t\t\tNetwork: lan0.Name,\n\t\t\tProject: pulumi.String(\"default\"),\n\t\t\tTargetNetwork: lan1.Name,\n\t\t\tTargetProject: pulumi.String(\"default\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewNetworkPeer(ctx, \"lan1_lan0\", \u0026incus.NetworkPeerArgs{\n\t\t\tName: pulumi.String(\"lab1-lan0\"),\n\t\t\tDescription: pulumi.String(\"A meaningful description\"),\n\t\t\tNetwork: lan1.Name,\n\t\t\tProject: pulumi.String(\"default\"),\n\t\t\tTargetNetwork: lan0.Name,\n\t\t\tTargetProject: pulumi.String(\"default\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.Network;\nimport com.pulumi.incus.NetworkArgs;\nimport com.pulumi.incus.NetworkPeer;\nimport com.pulumi.incus.NetworkPeerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var lan0 = new Network(\"lan0\", NetworkArgs.builder()\n .name(\"lan0\")\n .type(\"ovn\")\n .config(Map.ofEntries(\n ))\n .build());\n\n var lan1 = new Network(\"lan1\", NetworkArgs.builder()\n .name(\"lan1\")\n .type(\"ovn\")\n .config(Map.ofEntries(\n ))\n .build());\n\n var lan0Lan1 = new NetworkPeer(\"lan0Lan1\", NetworkPeerArgs.builder()\n .name(\"lab0-lan1\")\n .description(\"A meaningful description\")\n .network(lan0.name())\n .project(\"default\")\n .targetNetwork(lan1.name())\n .targetProject(\"default\")\n .build());\n\n var lan1Lan0 = new NetworkPeer(\"lan1Lan0\", NetworkPeerArgs.builder()\n .name(\"lab1-lan0\")\n .description(\"A meaningful description\")\n .network(lan1.name())\n .project(\"default\")\n .targetNetwork(lan0.name())\n .targetProject(\"default\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n lan0:\n type: incus:Network\n properties:\n name: lan0\n type: ovn\n config: {}\n lan1:\n type: incus:Network\n properties:\n name: lan1\n type: ovn\n config: {}\n lan0Lan1:\n type: incus:NetworkPeer\n name: lan0_lan1\n properties:\n name: lab0-lan1\n description: A meaningful description\n network: ${lan0.name}\n project: default\n targetNetwork: ${lan1.name}\n targetProject: default\n lan1Lan0:\n type: incus:NetworkPeer\n name: lan1_lan0\n properties:\n name: lab1-lan0\n description: A meaningful description\n network: ${lan1.name}\n project: default\n targetNetwork: ${lan0.name}\n targetProject: default\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "## # incus.NetworkPeer\n\nIncus allows creating peer routing relationships between two OVN networks. Using this method, traffic between the two\nnetworks can go directly from one OVN network to the other and thus stays within the OVN subsystem, rather than transiting\nthrough the uplink network.\n\n\u003e The peer resource is exclusively compatible with OVN (Open Virtual Network).\n\nFor more information, please refer to [How to create peer routing relationships](https://linuxcontainers.org/incus/docs/main/howto/network_ovn_peers/)\nin the official Incus documentation.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@kiterun/incus\";\n\nconst lan0 = new incus.Network(\"lan0\", {\n name: \"lan0\",\n type: \"ovn\",\n config: {},\n});\nconst lan1 = new incus.Network(\"lan1\", {\n name: \"lan1\",\n type: \"ovn\",\n config: {},\n});\nconst lan0Lan1 = new incus.NetworkPeer(\"lan0_lan1\", {\n name: \"lab0-lan1\",\n description: \"A meaningful description\",\n network: lan0.name,\n project: \"default\",\n targetNetwork: lan1.name,\n targetProject: \"default\",\n});\nconst lan1Lan0 = new incus.NetworkPeer(\"lan1_lan0\", {\n name: \"lab1-lan0\",\n description: \"A meaningful description\",\n network: lan1.name,\n project: \"default\",\n targetNetwork: lan0.name,\n targetProject: \"default\",\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\nlan0 = incus.Network(\"lan0\",\n name=\"lan0\",\n type=\"ovn\",\n config={})\nlan1 = incus.Network(\"lan1\",\n name=\"lan1\",\n type=\"ovn\",\n config={})\nlan0_lan1 = incus.NetworkPeer(\"lan0_lan1\",\n name=\"lab0-lan1\",\n description=\"A meaningful description\",\n network=lan0.name,\n project=\"default\",\n target_network=lan1.name,\n target_project=\"default\")\nlan1_lan0 = incus.NetworkPeer(\"lan1_lan0\",\n name=\"lab1-lan0\",\n description=\"A meaningful description\",\n network=lan1.name,\n project=\"default\",\n target_network=lan0.name,\n target_project=\"default\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var lan0 = new Incus.Network(\"lan0\", new()\n {\n Name = \"lan0\",\n Type = \"ovn\",\n Config = null,\n });\n\n var lan1 = new Incus.Network(\"lan1\", new()\n {\n Name = \"lan1\",\n Type = \"ovn\",\n Config = null,\n });\n\n var lan0Lan1 = new Incus.NetworkPeer(\"lan0_lan1\", new()\n {\n Name = \"lab0-lan1\",\n Description = \"A meaningful description\",\n Network = lan0.Name,\n Project = \"default\",\n TargetNetwork = lan1.Name,\n TargetProject = \"default\",\n });\n\n var lan1Lan0 = new Incus.NetworkPeer(\"lan1_lan0\", new()\n {\n Name = \"lab1-lan0\",\n Description = \"A meaningful description\",\n Network = lan1.Name,\n Project = \"default\",\n TargetNetwork = lan0.Name,\n TargetProject = \"default\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tlan0, err := incus.NewNetwork(ctx, \"lan0\", \u0026incus.NetworkArgs{\n\t\t\tName: pulumi.String(\"lan0\"),\n\t\t\tType: pulumi.String(\"ovn\"),\n\t\t\tConfig: pulumi.StringMap{},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tlan1, err := incus.NewNetwork(ctx, \"lan1\", \u0026incus.NetworkArgs{\n\t\t\tName: pulumi.String(\"lan1\"),\n\t\t\tType: pulumi.String(\"ovn\"),\n\t\t\tConfig: pulumi.StringMap{},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewNetworkPeer(ctx, \"lan0_lan1\", \u0026incus.NetworkPeerArgs{\n\t\t\tName: pulumi.String(\"lab0-lan1\"),\n\t\t\tDescription: pulumi.String(\"A meaningful description\"),\n\t\t\tNetwork: lan0.Name,\n\t\t\tProject: pulumi.String(\"default\"),\n\t\t\tTargetNetwork: lan1.Name,\n\t\t\tTargetProject: pulumi.String(\"default\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewNetworkPeer(ctx, \"lan1_lan0\", \u0026incus.NetworkPeerArgs{\n\t\t\tName: pulumi.String(\"lab1-lan0\"),\n\t\t\tDescription: pulumi.String(\"A meaningful description\"),\n\t\t\tNetwork: lan1.Name,\n\t\t\tProject: pulumi.String(\"default\"),\n\t\t\tTargetNetwork: lan0.Name,\n\t\t\tTargetProject: pulumi.String(\"default\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.Network;\nimport com.pulumi.incus.NetworkArgs;\nimport com.pulumi.incus.NetworkPeer;\nimport com.pulumi.incus.NetworkPeerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var lan0 = new Network(\"lan0\", NetworkArgs.builder()\n .name(\"lan0\")\n .type(\"ovn\")\n .config(Map.ofEntries(\n ))\n .build());\n\n var lan1 = new Network(\"lan1\", NetworkArgs.builder()\n .name(\"lan1\")\n .type(\"ovn\")\n .config(Map.ofEntries(\n ))\n .build());\n\n var lan0Lan1 = new NetworkPeer(\"lan0Lan1\", NetworkPeerArgs.builder()\n .name(\"lab0-lan1\")\n .description(\"A meaningful description\")\n .network(lan0.name())\n .project(\"default\")\n .targetNetwork(lan1.name())\n .targetProject(\"default\")\n .build());\n\n var lan1Lan0 = new NetworkPeer(\"lan1Lan0\", NetworkPeerArgs.builder()\n .name(\"lab1-lan0\")\n .description(\"A meaningful description\")\n .network(lan1.name())\n .project(\"default\")\n .targetNetwork(lan0.name())\n .targetProject(\"default\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n lan0:\n type: incus:Network\n properties:\n name: lan0\n type: ovn\n config: {}\n lan1:\n type: incus:Network\n properties:\n name: lan1\n type: ovn\n config: {}\n lan0Lan1:\n type: incus:NetworkPeer\n name: lan0_lan1\n properties:\n name: lab0-lan1\n description: A meaningful description\n network: ${lan0.name}\n project: default\n targetNetwork: ${lan1.name}\n targetProject: default\n lan1Lan0:\n type: incus:NetworkPeer\n name: lan1_lan0\n properties:\n name: lab1-lan0\n description: A meaningful description\n network: ${lan1.name}\n project: default\n targetNetwork: ${lan0.name}\n targetProject: default\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "config": { "type": "object", @@ -2144,7 +2362,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network is located.\n" + "description": "*Optional* - Name of the project where the network is located.\n", + "default": "default" }, "remote": { "type": "string", @@ -2173,6 +2392,7 @@ "config", "description", "name", + "project", "status", "targetIntegration", "targetNetwork", @@ -2201,7 +2421,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network is located.\n" + "description": "*Optional* - Name of the project where the network is located.\n", + "default": "default" }, "remote": { "type": "string", @@ -2247,7 +2468,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network is located.\n" + "description": "*Optional* - Name of the project where the network is located.\n", + "default": "default" }, "remote": { "type": "string", @@ -2294,7 +2516,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network zone will be created.\n" + "description": "*Optional* - Name of the project where the network zone will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -2304,7 +2527,8 @@ "required": [ "config", "description", - "name" + "name", + "project" ], "inputProperties": { "config": { @@ -2324,7 +2548,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network zone will be created.\n" + "description": "*Optional* - Name of the project where the network zone will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -2351,7 +2576,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network zone will be created.\n" + "description": "*Optional* - Name of the project where the network zone will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -2387,7 +2613,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network zone record will be created.\n" + "description": "*Optional* - Name of the project where the network zone record will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -2402,6 +2629,7 @@ "config", "description", "name", + "project", "zone" ], "inputProperties": { @@ -2429,7 +2657,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network zone record will be created.\n" + "description": "*Optional* - Name of the project where the network zone record will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -2470,7 +2699,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the network zone record will be created.\n" + "description": "*Optional* - Name of the project where the network zone record will be created.\n", + "default": "default" }, "remote": { "type": "string", @@ -2510,7 +2740,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the profile will be stored.\n" + "description": "*Optional* - Name of the project where the profile will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -2520,7 +2751,8 @@ "required": [ "config", "description", - "name" + "name", + "project" ], "inputProperties": { "config": { @@ -2547,7 +2779,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the profile will be stored.\n" + "description": "*Optional* - Name of the project where the profile will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -2581,7 +2814,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the profile will be stored.\n" + "description": "*Optional* - Name of the project where the profile will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -2692,7 +2926,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the storage bucket will be stored.\n" + "description": "*Optional* - Name of the project where the storage bucket will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -2713,6 +2948,7 @@ "location", "name", "pool", + "project", "target" ], "inputProperties": { @@ -2737,7 +2973,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the storage bucket will be stored.\n" + "description": "*Optional* - Name of the project where the storage bucket will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -2783,7 +3020,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the storage bucket will be stored.\n" + "description": "*Optional* - Name of the project where the storage bucket will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -2822,7 +3060,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the storage bucket key will be stored.\n" + "description": "*Optional* - Name of the project where the storage bucket key will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -2847,6 +3086,7 @@ "description", "name", "pool", + "project", "role", "secretKey", "storageBucket" @@ -2866,7 +3106,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the storage bucket key will be stored.\n" + "description": "*Optional* - Name of the project where the storage bucket key will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -2907,7 +3148,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the storage bucket key will be stored.\n" + "description": "*Optional* - Name of the project where the storage bucket key will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -2953,7 +3195,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the storage pool will be stored.\n" + "description": "*Optional* - Name of the project where the storage pool will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -2968,7 +3211,8 @@ "config", "description", "driver", - "name" + "name", + "project" ], "inputProperties": { "config": { @@ -2992,7 +3236,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the storage pool will be stored.\n" + "description": "*Optional* - Name of the project where the storage pool will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -3030,7 +3275,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the storage pool will be stored.\n" + "description": "*Optional* - Name of the project where the storage pool will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -3075,7 +3321,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the volume will be stored.\n" + "description": "*Optional* - Name of the project where the volume will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -3105,6 +3352,7 @@ "location", "name", "pool", + "project", "target", "type" ], @@ -3134,7 +3382,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the volume will be stored.\n" + "description": "*Optional* - Name of the project where the volume will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -3192,7 +3441,8 @@ }, "project": { "type": "string", - "description": "*Optional* - Name of the project where the volume will be stored.\n" + "description": "*Optional* - Name of the project where the volume will be stored.\n", + "default": "default" }, "remote": { "type": "string", @@ -3221,7 +3471,7 @@ }, "functions": { "incus:index/getImage:getImage": { - "description": "## # incus.Image\n\nProvides information about an Incus image.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@pulumi/incus\";\n\nconst debianCustom = incus.getImage({\n name: \"debian_custom\",\n});\nconst d1 = new incus.Instance(\"d1\", {\n image: debianCustom.then(debianCustom =\u003e debianCustom.fingerprint),\n name: \"d1\",\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\ndebian_custom = incus.get_image(name=\"debian_custom\")\nd1 = incus.Instance(\"d1\",\n image=debian_custom.fingerprint,\n name=\"d1\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var debianCustom = Incus.GetImage.Invoke(new()\n {\n Name = \"debian_custom\",\n });\n\n var d1 = new Incus.Instance(\"d1\", new()\n {\n Image = debianCustom.Apply(getImageResult =\u003e getImageResult.Fingerprint),\n Name = \"d1\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdebianCustom, err := incus.LookupImage(ctx, \u0026incus.LookupImageArgs{\n\t\t\tName: pulumi.StringRef(\"debian_custom\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewInstance(ctx, \"d1\", \u0026incus.InstanceArgs{\n\t\t\tImage: pulumi.String(debianCustom.Fingerprint),\n\t\t\tName: pulumi.String(\"d1\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.IncusFunctions;\nimport com.pulumi.incus.inputs.GetImageArgs;\nimport com.pulumi.incus.Instance;\nimport com.pulumi.incus.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var debianCustom = IncusFunctions.getImage(GetImageArgs.builder()\n .name(\"debian_custom\")\n .build());\n\n var d1 = new Instance(\"d1\", InstanceArgs.builder()\n .image(debianCustom.fingerprint())\n .name(\"d1\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n d1:\n type: incus:Instance\n properties:\n image: ${debianCustom.fingerprint}\n name: d1\nvariables:\n debianCustom:\n fn::invoke:\n function: incus:getImage\n arguments:\n name: debian_custom\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "## # incus.Image\n\nProvides information about an Incus image.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@kiterun/incus\";\nimport * as incus from \"@pulumi/incus\";\n\nconst debianCustom = incus.getImage({\n name: \"debian_custom\",\n});\nconst d1 = new incus.Instance(\"d1\", {\n image: debianCustom.then(debianCustom =\u003e debianCustom.fingerprint),\n name: \"d1\",\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\ndebian_custom = incus.get_image(name=\"debian_custom\")\nd1 = incus.Instance(\"d1\",\n image=debian_custom.fingerprint,\n name=\"d1\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var debianCustom = Incus.GetImage.Invoke(new()\n {\n Name = \"debian_custom\",\n });\n\n var d1 = new Incus.Instance(\"d1\", new()\n {\n Image = debianCustom.Apply(getImageResult =\u003e getImageResult.Fingerprint),\n Name = \"d1\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdebianCustom, err := incus.LookupImage(ctx, \u0026incus.LookupImageArgs{\n\t\t\tName: pulumi.StringRef(\"debian_custom\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewInstance(ctx, \"d1\", \u0026incus.InstanceArgs{\n\t\t\tImage: pulumi.String(debianCustom.Fingerprint),\n\t\t\tName: pulumi.String(\"d1\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.IncusFunctions;\nimport com.pulumi.incus.inputs.GetImageArgs;\nimport com.pulumi.incus.Instance;\nimport com.pulumi.incus.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var debianCustom = IncusFunctions.getImage(GetImageArgs.builder()\n .name(\"debian_custom\")\n .build());\n\n var d1 = new Instance(\"d1\", InstanceArgs.builder()\n .image(debianCustom.fingerprint())\n .name(\"d1\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n d1:\n type: incus:Instance\n properties:\n image: ${debianCustom.fingerprint}\n name: d1\nvariables:\n debianCustom:\n fn::invoke:\n function: incus:getImage\n arguments:\n name: debian_custom\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getImage.\n", "properties": { @@ -3301,7 +3551,7 @@ } }, "incus:index/getProfile:getProfile": { - "description": "## # incus.Profile\n\nProvides information about an Incus profile.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@pulumi/incus\";\n\nconst _default = incus.getProfile({\n name: \"default\",\n});\nconst d1 = new incus.Instance(\"d1\", {\n profiles: [_default.then(_default =\u003e _default.name)],\n image: \"images:debian/12\",\n name: \"d1\",\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\ndefault = incus.get_profile(name=\"default\")\nd1 = incus.Instance(\"d1\",\n profiles=[default.name],\n image=\"images:debian/12\",\n name=\"d1\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @default = Incus.GetProfile.Invoke(new()\n {\n Name = \"default\",\n });\n\n var d1 = new Incus.Instance(\"d1\", new()\n {\n Profiles = new[]\n {\n @default.Apply(@default =\u003e @default.Apply(getProfileResult =\u003e getProfileResult.Name)),\n },\n Image = \"images:debian/12\",\n Name = \"d1\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_default, err := incus.LookupProfile(ctx, \u0026incus.LookupProfileArgs{\n\t\t\tName: \"default\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewInstance(ctx, \"d1\", \u0026incus.InstanceArgs{\n\t\t\tProfiles: pulumi.StringArray{\n\t\t\t\tpulumi.String(_default.Name),\n\t\t\t},\n\t\t\tImage: pulumi.String(\"images:debian/12\"),\n\t\t\tName: pulumi.String(\"d1\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.IncusFunctions;\nimport com.pulumi.incus.inputs.GetProfileArgs;\nimport com.pulumi.incus.Instance;\nimport com.pulumi.incus.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var default = IncusFunctions.getProfile(GetProfileArgs.builder()\n .name(\"default\")\n .build());\n\n var d1 = new Instance(\"d1\", InstanceArgs.builder()\n .profiles(default_.name())\n .image(\"images:debian/12\")\n .name(\"d1\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n d1:\n type: incus:Instance\n properties:\n profiles:\n - ${default.name}\n image: images:debian/12\n name: d1\nvariables:\n default:\n fn::invoke:\n function: incus:getProfile\n arguments:\n name: default\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "## # incus.Profile\n\nProvides information about an Incus profile.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@kiterun/incus\";\nimport * as incus from \"@pulumi/incus\";\n\nconst _default = incus.getProfile({\n name: \"default\",\n});\nconst d1 = new incus.Instance(\"d1\", {\n profiles: [_default.then(_default =\u003e _default.name)],\n image: \"images:debian/12\",\n name: \"d1\",\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\ndefault = incus.get_profile(name=\"default\")\nd1 = incus.Instance(\"d1\",\n profiles=[default.name],\n image=\"images:debian/12\",\n name=\"d1\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @default = Incus.GetProfile.Invoke(new()\n {\n Name = \"default\",\n });\n\n var d1 = new Incus.Instance(\"d1\", new()\n {\n Profiles = new[]\n {\n @default.Apply(@default =\u003e @default.Apply(getProfileResult =\u003e getProfileResult.Name)),\n },\n Image = \"images:debian/12\",\n Name = \"d1\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_default, err := incus.LookupProfile(ctx, \u0026incus.LookupProfileArgs{\n\t\t\tName: \"default\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewInstance(ctx, \"d1\", \u0026incus.InstanceArgs{\n\t\t\tProfiles: pulumi.StringArray{\n\t\t\t\tpulumi.String(_default.Name),\n\t\t\t},\n\t\t\tImage: pulumi.String(\"images:debian/12\"),\n\t\t\tName: pulumi.String(\"d1\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.IncusFunctions;\nimport com.pulumi.incus.inputs.GetProfileArgs;\nimport com.pulumi.incus.Instance;\nimport com.pulumi.incus.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var default = IncusFunctions.getProfile(GetProfileArgs.builder()\n .name(\"default\")\n .build());\n\n var d1 = new Instance(\"d1\", InstanceArgs.builder()\n .profiles(default_.name())\n .image(\"images:debian/12\")\n .name(\"d1\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n d1:\n type: incus:Instance\n properties:\n profiles:\n - ${default.name}\n image: images:debian/12\n name: d1\nvariables:\n default:\n fn::invoke:\n function: incus:getProfile\n arguments:\n name: default\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getProfile.\n", "properties": { @@ -3375,7 +3625,7 @@ } }, "incus:index/getProject:getProject": { - "description": "## # incus.Project\n\nProvides information about an Incus project.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@pulumi/incus\";\n\nconst _default = incus.getProject({\n name: \"default\",\n});\nconst d1 = new incus.Instance(\"d1\", {\n project: _default.then(_default =\u003e _default.name),\n image: \"images:debian/12\",\n name: \"d1\",\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\ndefault = incus.get_project(name=\"default\")\nd1 = incus.Instance(\"d1\",\n project=default.name,\n image=\"images:debian/12\",\n name=\"d1\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @default = Incus.GetProject.Invoke(new()\n {\n Name = \"default\",\n });\n\n var d1 = new Incus.Instance(\"d1\", new()\n {\n Project = @default.Apply(@default =\u003e @default.Apply(getProjectResult =\u003e getProjectResult.Name)),\n Image = \"images:debian/12\",\n Name = \"d1\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_default, err := incus.LookupProject(ctx, \u0026incus.LookupProjectArgs{\n\t\t\tName: \"default\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewInstance(ctx, \"d1\", \u0026incus.InstanceArgs{\n\t\t\tProject: pulumi.String(_default.Name),\n\t\t\tImage: pulumi.String(\"images:debian/12\"),\n\t\t\tName: pulumi.String(\"d1\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.IncusFunctions;\nimport com.pulumi.incus.inputs.GetProjectArgs;\nimport com.pulumi.incus.Instance;\nimport com.pulumi.incus.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var default = IncusFunctions.getProject(GetProjectArgs.builder()\n .name(\"default\")\n .build());\n\n var d1 = new Instance(\"d1\", InstanceArgs.builder()\n .project(default_.name())\n .image(\"images:debian/12\")\n .name(\"d1\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n d1:\n type: incus:Instance\n properties:\n project: ${default.name}\n image: images:debian/12\n name: d1\nvariables:\n default:\n fn::invoke:\n function: incus:getProject\n arguments:\n name: default\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "## # incus.Project\n\nProvides information about an Incus project.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as incus from \"@kiterun/incus\";\nimport * as incus from \"@pulumi/incus\";\n\nconst _default = incus.getProject({\n name: \"default\",\n});\nconst d1 = new incus.Instance(\"d1\", {\n project: _default.then(_default =\u003e _default.name),\n image: \"images:debian/12\",\n name: \"d1\",\n});\n```\n```python\nimport pulumi\nimport pulumi_incus as incus\n\ndefault = incus.get_project(name=\"default\")\nd1 = incus.Instance(\"d1\",\n project=default.name,\n image=\"images:debian/12\",\n name=\"d1\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Incus = Pulumi.Incus;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @default = Incus.GetProject.Invoke(new()\n {\n Name = \"default\",\n });\n\n var d1 = new Incus.Instance(\"d1\", new()\n {\n Project = @default.Apply(@default =\u003e @default.Apply(getProjectResult =\u003e getProjectResult.Name)),\n Image = \"images:debian/12\",\n Name = \"d1\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/brandonkal/pulumi-incus/sdk/go/incus\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_default, err := incus.LookupProject(ctx, \u0026incus.LookupProjectArgs{\n\t\t\tName: \"default\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = incus.NewInstance(ctx, \"d1\", \u0026incus.InstanceArgs{\n\t\t\tProject: pulumi.String(_default.Name),\n\t\t\tImage: pulumi.String(\"images:debian/12\"),\n\t\t\tName: pulumi.String(\"d1\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.incus.IncusFunctions;\nimport com.pulumi.incus.inputs.GetProjectArgs;\nimport com.pulumi.incus.Instance;\nimport com.pulumi.incus.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var default = IncusFunctions.getProject(GetProjectArgs.builder()\n .name(\"default\")\n .build());\n\n var d1 = new Instance(\"d1\", InstanceArgs.builder()\n .project(default_.name())\n .image(\"images:debian/12\")\n .name(\"d1\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n d1:\n type: incus:Instance\n properties:\n project: ${default.name}\n image: images:debian/12\n name: d1\nvariables:\n default:\n fn::invoke:\n function: incus:getProject\n arguments:\n name: default\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getProject.\n", "properties": { diff --git a/sdk/nodejs/Pulumi.yaml b/sdk/nodejs/Pulumi.yaml new file mode 100644 index 0000000..e69de29 diff --git a/sdk/nodejs/README.md b/sdk/nodejs/README.md new file mode 100644 index 0000000..e2489af --- /dev/null +++ b/sdk/nodejs/README.md @@ -0,0 +1,4 @@ +> This provider is a derived work of the [Terraform Provider](https://github.com/lxc/terraform-provider-incus) +> distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature, +> first check the [`pulumi-incus` repo](https://git.kalinow.ski/nimbus/pulumi-incus/issues); however, if that doesn't turn up anything, +> please consult the source [`terraform-provider-incus` repo](https://github.com/lxc/terraform-provider-incus/issues). diff --git a/sdk/nodejs/certificate.ts b/sdk/nodejs/certificate.ts new file mode 100644 index 0000000..14ecc81 --- /dev/null +++ b/sdk/nodejs/certificate.ts @@ -0,0 +1,189 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * ## # incus.Certificate + * + * Manages an Incus certificate. + */ +export class Certificate extends pulumi.CustomResource { + /** + * Get an existing Certificate resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: CertificateState, opts?: pulumi.CustomResourceOptions): Certificate { + return new Certificate(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/certificate:Certificate'; + + /** + * Returns true if the given object is an instance of Certificate. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is Certificate { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === Certificate.__pulumiType; + } + + /** + * **Required** - The certificate. + */ + public readonly certificate!: pulumi.Output; + /** + * *Optional* - Description of the certificate. + */ + public readonly description!: pulumi.Output; + /** + * The fingerprint of the certificate. + */ + public /*out*/ readonly fingerprint!: pulumi.Output; + /** + * **Required** - Name of the certificate. + */ + public readonly name!: pulumi.Output; + /** + * *Optional* - List of projects to restrict the certificate to. + */ + public readonly projects!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + /** + * *Optional* - Restrict the certificate to one or more projects. + */ + public readonly restricted!: pulumi.Output; + /** + * *Optional* - The type of certificate to create. Can be one of: client, + * or metrics. If no type is specified, a client certificate is created. + */ + public readonly type!: pulumi.Output; + + /** + * Create a Certificate resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: CertificateArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: CertificateArgs | CertificateState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as CertificateState | undefined; + resourceInputs["certificate"] = state ? state.certificate : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["fingerprint"] = state ? state.fingerprint : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["projects"] = state ? state.projects : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + resourceInputs["restricted"] = state ? state.restricted : undefined; + resourceInputs["type"] = state ? state.type : undefined; + } else { + const args = argsOrState as CertificateArgs | undefined; + if ((!args || args.certificate === undefined) && !opts.urn) { + throw new Error("Missing required property 'certificate'"); + } + resourceInputs["certificate"] = args ? args.certificate : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["projects"] = args ? args.projects : undefined; + resourceInputs["remote"] = args ? args.remote : undefined; + resourceInputs["restricted"] = args ? args.restricted : undefined; + resourceInputs["type"] = args ? args.type : undefined; + resourceInputs["fingerprint"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(Certificate.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering Certificate resources. + */ +export interface CertificateState { + /** + * **Required** - The certificate. + */ + certificate?: pulumi.Input; + /** + * *Optional* - Description of the certificate. + */ + description?: pulumi.Input; + /** + * The fingerprint of the certificate. + */ + fingerprint?: pulumi.Input; + /** + * **Required** - Name of the certificate. + */ + name?: pulumi.Input; + /** + * *Optional* - List of projects to restrict the certificate to. + */ + projects?: pulumi.Input[]>; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Restrict the certificate to one or more projects. + */ + restricted?: pulumi.Input; + /** + * *Optional* - The type of certificate to create. Can be one of: client, + * or metrics. If no type is specified, a client certificate is created. + */ + type?: pulumi.Input; +} + +/** + * The set of arguments for constructing a Certificate resource. + */ +export interface CertificateArgs { + /** + * **Required** - The certificate. + */ + certificate: pulumi.Input; + /** + * *Optional* - Description of the certificate. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the certificate. + */ + name?: pulumi.Input; + /** + * *Optional* - List of projects to restrict the certificate to. + */ + projects?: pulumi.Input[]>; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Restrict the certificate to one or more projects. + */ + restricted?: pulumi.Input; + /** + * *Optional* - The type of certificate to create. Can be one of: client, + * or metrics. If no type is specified, a client certificate is created. + */ + type?: pulumi.Input; +} diff --git a/sdk/nodejs/clusterGroup.ts b/sdk/nodejs/clusterGroup.ts new file mode 100644 index 0000000..3063e7e --- /dev/null +++ b/sdk/nodejs/clusterGroup.ts @@ -0,0 +1,120 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +export class ClusterGroup extends pulumi.CustomResource { + /** + * Get an existing ClusterGroup resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: ClusterGroupState, opts?: pulumi.CustomResourceOptions): ClusterGroup { + return new ClusterGroup(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/clusterGroup:ClusterGroup'; + + /** + * Returns true if the given object is an instance of ClusterGroup. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is ClusterGroup { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === ClusterGroup.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of + * [cluster group config settings](https://linuxcontainers.org/incus/docs/main/howto/cluster_groups/#configuration-options). + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + public readonly description!: pulumi.Output; + /** + * **Required** - Name of the cluster group. + */ + public readonly name!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + + /** + * Create a ClusterGroup resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: ClusterGroupArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: ClusterGroupArgs | ClusterGroupState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as ClusterGroupState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + } else { + const args = argsOrState as ClusterGroupArgs | undefined; + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["remote"] = args ? args.remote : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(ClusterGroup.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering ClusterGroup resources. + */ +export interface ClusterGroupState { + /** + * *Optional* - Map of key/value pairs of + * [cluster group config settings](https://linuxcontainers.org/incus/docs/main/howto/cluster_groups/#configuration-options). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + description?: pulumi.Input; + /** + * **Required** - Name of the cluster group. + */ + name?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} + +/** + * The set of arguments for constructing a ClusterGroup resource. + */ +export interface ClusterGroupArgs { + /** + * *Optional* - Map of key/value pairs of + * [cluster group config settings](https://linuxcontainers.org/incus/docs/main/howto/cluster_groups/#configuration-options). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + description?: pulumi.Input; + /** + * **Required** - Name of the cluster group. + */ + name?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} diff --git a/sdk/nodejs/clusterGroupAssignment.ts b/sdk/nodejs/clusterGroupAssignment.ts new file mode 100644 index 0000000..5a3158c --- /dev/null +++ b/sdk/nodejs/clusterGroupAssignment.ts @@ -0,0 +1,118 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +export class ClusterGroupAssignment extends pulumi.CustomResource { + /** + * Get an existing ClusterGroupAssignment resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: ClusterGroupAssignmentState, opts?: pulumi.CustomResourceOptions): ClusterGroupAssignment { + return new ClusterGroupAssignment(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/clusterGroupAssignment:ClusterGroupAssignment'; + + /** + * Returns true if the given object is an instance of ClusterGroupAssignment. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is ClusterGroupAssignment { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === ClusterGroupAssignment.__pulumiType; + } + + /** + * **Required** - Name of the cluster group. + */ + public readonly clusterGroup!: pulumi.Output; + /** + * **Required** - Name of the cluster group member. + */ + public readonly member!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + + /** + * Create a ClusterGroupAssignment resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: ClusterGroupAssignmentArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: ClusterGroupAssignmentArgs | ClusterGroupAssignmentState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as ClusterGroupAssignmentState | undefined; + resourceInputs["clusterGroup"] = state ? state.clusterGroup : undefined; + resourceInputs["member"] = state ? state.member : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + } else { + const args = argsOrState as ClusterGroupAssignmentArgs | undefined; + if ((!args || args.clusterGroup === undefined) && !opts.urn) { + throw new Error("Missing required property 'clusterGroup'"); + } + if ((!args || args.member === undefined) && !opts.urn) { + throw new Error("Missing required property 'member'"); + } + resourceInputs["clusterGroup"] = args ? args.clusterGroup : undefined; + resourceInputs["member"] = args ? args.member : undefined; + resourceInputs["remote"] = args ? args.remote : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(ClusterGroupAssignment.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering ClusterGroupAssignment resources. + */ +export interface ClusterGroupAssignmentState { + /** + * **Required** - Name of the cluster group. + */ + clusterGroup?: pulumi.Input; + /** + * **Required** - Name of the cluster group member. + */ + member?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} + +/** + * The set of arguments for constructing a ClusterGroupAssignment resource. + */ +export interface ClusterGroupAssignmentArgs { + /** + * **Required** - Name of the cluster group. + */ + clusterGroup: pulumi.Input; + /** + * **Required** - Name of the cluster group member. + */ + member: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} diff --git a/sdk/nodejs/config/index.ts b/sdk/nodejs/config/index.ts new file mode 100644 index 0000000..ed497ed --- /dev/null +++ b/sdk/nodejs/config/index.ts @@ -0,0 +1,5 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +// Export members: +export * from "./vars"; diff --git a/sdk/nodejs/config/vars.ts b/sdk/nodejs/config/vars.ts new file mode 100644 index 0000000..33132e8 --- /dev/null +++ b/sdk/nodejs/config/vars.ts @@ -0,0 +1,67 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "../types/input"; +import * as outputs from "../types/output"; +import * as utilities from "../utilities"; + +declare var exports: any; +const __config = new pulumi.Config("incus"); + +/** + * Accept the server certificate. + */ +export declare const acceptRemoteCertificate: boolean | undefined; +Object.defineProperty(exports, "acceptRemoteCertificate", { + get() { + return __config.getObject("acceptRemoteCertificate"); + }, + enumerable: true, +}); + +/** + * The directory to look for existing Incus configuration. (default = $HOME/.config/incus) + */ +export declare const configDir: string | undefined; +Object.defineProperty(exports, "configDir", { + get() { + return __config.get("configDir"); + }, + enumerable: true, +}); + +/** + * Automatically generate the Incus client certificates if they don't exist. + */ +export declare const generateClientCertificates: boolean | undefined; +Object.defineProperty(exports, "generateClientCertificates", { + get() { + return __config.getObject("generateClientCertificates"); + }, + enumerable: true, +}); + +/** + * The project where project-scoped resources will be created. Can be overridden in individual resources. (default = + * default) + */ +export declare const project: string | undefined; +Object.defineProperty(exports, "project", { + get() { + return __config.get("project"); + }, + enumerable: true, +}); + +/** + * Incus Remote + */ +export declare const remotes: outputs.config.Remotes[] | undefined; +Object.defineProperty(exports, "remotes", { + get() { + return __config.getObject("remotes"); + }, + enumerable: true, +}); + diff --git a/sdk/nodejs/getImage.ts b/sdk/nodejs/getImage.ts new file mode 100644 index 0000000..d906e7c --- /dev/null +++ b/sdk/nodejs/getImage.ts @@ -0,0 +1,158 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * ## # incus.Image + * + * Provides information about an Incus image. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * import * as incus from "@pulumi/incus"; + * + * const debianCustom = incus.getImage({ + * name: "debian_custom", + * }); + * const d1 = new incus.Instance("d1", { + * image: debianCustom.then(debianCustom => debianCustom.fingerprint), + * name: "d1", + * }); + * ``` + */ +export function getImage(args?: GetImageArgs, opts?: pulumi.InvokeOptions): Promise { + args = args || {}; + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getImage:getImage", { + "architecture": args.architecture, + "fingerprint": args.fingerprint, + "name": args.name, + "project": args.project, + "remote": args.remote, + "type": args.type, + }, opts); +} + +/** + * A collection of arguments for invoking getImage. + */ +export interface GetImageArgs { + /** + * *Optional* - The image architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. + */ + architecture?: string; + /** + * *Optional* - Fingerprint of the image. + */ + fingerprint?: string; + /** + * *Optional* - Name of the image. + */ + name?: string; + /** + * *Optional* - Name of the project where the image is stored. + */ + project?: string; + /** + * *Optional* - The remote in which the resource was created. If + * not provided, the provider's default remote will be used. + */ + remote?: string; + /** + * *Optional* - Type of image. Must be one of `container` or `virtual-machine`. + */ + type?: string; +} + +/** + * A collection of values returned by getImage. + */ +export interface GetImageResult { + /** + * The list of aliases for the image. + */ + readonly aliases: string[]; + readonly architecture: string; + /** + * The datetime of image creation, in Unix time. + */ + readonly createdAt: number; + readonly fingerprint: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + readonly name?: string; + readonly project?: string; + readonly remote?: string; + readonly type: string; +} +/** + * ## # incus.Image + * + * Provides information about an Incus image. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * import * as incus from "@pulumi/incus"; + * + * const debianCustom = incus.getImage({ + * name: "debian_custom", + * }); + * const d1 = new incus.Instance("d1", { + * image: debianCustom.then(debianCustom => debianCustom.fingerprint), + * name: "d1", + * }); + * ``` + */ +export function getImageOutput(args?: GetImageOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + args = args || {}; + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getImage:getImage", { + "architecture": args.architecture, + "fingerprint": args.fingerprint, + "name": args.name, + "project": args.project, + "remote": args.remote, + "type": args.type, + }, opts); +} + +/** + * A collection of arguments for invoking getImage. + */ +export interface GetImageOutputArgs { + /** + * *Optional* - The image architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. + */ + architecture?: pulumi.Input; + /** + * *Optional* - Fingerprint of the image. + */ + fingerprint?: pulumi.Input; + /** + * *Optional* - Name of the image. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the image is stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource was created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Type of image. Must be one of `container` or `virtual-machine`. + */ + type?: pulumi.Input; +} diff --git a/sdk/nodejs/getProfile.ts b/sdk/nodejs/getProfile.ts new file mode 100644 index 0000000..93f2bee --- /dev/null +++ b/sdk/nodejs/getProfile.ts @@ -0,0 +1,142 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +/** + * ## # incus.Profile + * + * Provides information about an Incus profile. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * import * as incus from "@pulumi/incus"; + * + * const _default = incus.getProfile({ + * name: "default", + * }); + * const d1 = new incus.Instance("d1", { + * profiles: [_default.then(_default => _default.name)], + * image: "images:debian/12", + * name: "d1", + * }); + * ``` + */ +export function getProfile(args: GetProfileArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getProfile:getProfile", { + "devices": args.devices, + "name": args.name, + "project": args.project, + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getProfile. + */ +export interface GetProfileArgs { + /** + * Device definition. See reference below. + */ + devices?: inputs.GetProfileDevice[]; + /** + * **Required** - Name of the profile. + */ + name: string; + /** + * *Optional* - Name of the project where the profile will be stored. + */ + project?: string; + /** + * *Optional* - The remote in which the resource was created. If + * not provided, the provider's default remote will be used. + */ + remote?: string; +} + +/** + * A collection of values returned by getProfile. + */ +export interface GetProfileResult { + /** + * Map of key/value pairs of + * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). + */ + readonly config: {[key: string]: string}; + readonly description: string; + /** + * Device definition. See reference below. + */ + readonly devices?: outputs.GetProfileDevice[]; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + /** + * Name of the device. + */ + readonly name: string; + readonly project?: string; + readonly remote?: string; +} +/** + * ## # incus.Profile + * + * Provides information about an Incus profile. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * import * as incus from "@pulumi/incus"; + * + * const _default = incus.getProfile({ + * name: "default", + * }); + * const d1 = new incus.Instance("d1", { + * profiles: [_default.then(_default => _default.name)], + * image: "images:debian/12", + * name: "d1", + * }); + * ``` + */ +export function getProfileOutput(args: GetProfileOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getProfile:getProfile", { + "devices": args.devices, + "name": args.name, + "project": args.project, + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getProfile. + */ +export interface GetProfileOutputArgs { + /** + * Device definition. See reference below. + */ + devices?: pulumi.Input[]>; + /** + * **Required** - Name of the profile. + */ + name: pulumi.Input; + /** + * *Optional* - Name of the project where the profile will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource was created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} diff --git a/sdk/nodejs/getProject.ts b/sdk/nodejs/getProject.ts new file mode 100644 index 0000000..c2c6e08 --- /dev/null +++ b/sdk/nodejs/getProject.ts @@ -0,0 +1,137 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * ## # incus.Project + * + * Provides information about an Incus project. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * import * as incus from "@pulumi/incus"; + * + * const _default = incus.getProject({ + * name: "default", + * }); + * const d1 = new incus.Instance("d1", { + * project: _default.then(_default => _default.name), + * image: "images:debian/12", + * name: "d1", + * }); + * ``` + */ +export function getProject(args: GetProjectArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getProject:getProject", { + "config": args.config, + "description": args.description, + "name": args.name, + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getProject. + */ +export interface GetProjectArgs { + /** + * Map of key/value pairs of + * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). + */ + config?: {[key: string]: string}; + /** + * Description of the project. + */ + description?: string; + /** + * **Required** - Name of the project. + */ + name: string; + /** + * *Optional* - The remote in which the resource was created. If + * not provided, the provider's default remote will be used. + */ + remote?: string; +} + +/** + * A collection of values returned by getProject. + */ +export interface GetProjectResult { + /** + * Map of key/value pairs of + * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). + */ + readonly config: {[key: string]: string}; + /** + * Description of the project. + */ + readonly description: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + readonly name: string; + readonly remote?: string; +} +/** + * ## # incus.Project + * + * Provides information about an Incus project. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * import * as incus from "@pulumi/incus"; + * + * const _default = incus.getProject({ + * name: "default", + * }); + * const d1 = new incus.Instance("d1", { + * project: _default.then(_default => _default.name), + * image: "images:debian/12", + * name: "d1", + * }); + * ``` + */ +export function getProjectOutput(args: GetProjectOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getProject:getProject", { + "config": args.config, + "description": args.description, + "name": args.name, + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getProject. + */ +export interface GetProjectOutputArgs { + /** + * Map of key/value pairs of + * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * Description of the project. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the project. + */ + name: pulumi.Input; + /** + * *Optional* - The remote in which the resource was created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} diff --git a/sdk/nodejs/go.mod b/sdk/nodejs/go.mod new file mode 100644 index 0000000..104eb1a --- /dev/null +++ b/sdk/nodejs/go.mod @@ -0,0 +1,3 @@ +module fake_nodejs_module // Exclude this directory from Go tools + +go 1.17 diff --git a/sdk/nodejs/image.ts b/sdk/nodejs/image.ts new file mode 100644 index 0000000..b8ca81a --- /dev/null +++ b/sdk/nodejs/image.ts @@ -0,0 +1,221 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +/** + * ## # incus.Image + * + * Manages a locally-stored Incus image. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const alpine = new incus.Image("alpine", {sourceImage: { + * remote: "images", + * name: "alpine/edge", + * }}); + * const test1 = new incus.Instance("test1", { + * name: "test1", + * image: alpine.fingerprint, + * ephemeral: false, + * }); + * ``` + * + * ## Notes + * + * * See the Incus [documentation](https://linuxcontainers.org/incus/docs/main/howto/images_remote) for more info on default image remotes. + */ +export class Image extends pulumi.CustomResource { + /** + * Get an existing Image resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: ImageState, opts?: pulumi.CustomResourceOptions): Image { + return new Image(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/image:Image'; + + /** + * Returns true if the given object is an instance of Image. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is Image { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === Image.__pulumiType; + } + + /** + * *Optional* - A list of aliases to assign to the image after + * pulling. + */ + public readonly aliases!: pulumi.Output; + /** + * The list of aliases that were copied from the + * `sourceImage`. + */ + public /*out*/ readonly copiedAliases!: pulumi.Output; + /** + * The datetime of image creation, in Unix time. + */ + public /*out*/ readonly createdAt!: pulumi.Output; + /** + * The unique hash fingperint of the image. + */ + public /*out*/ readonly fingerprint!: pulumi.Output; + /** + * *Optional* - Name of the project where the image will be stored. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + public /*out*/ readonly resourceId!: pulumi.Output; + /** + * *Optional* - The image file from the local file system from which the image will be created. See reference below. + */ + public readonly sourceFile!: pulumi.Output; + /** + * *Optional* - The source image from which the image will be created. See reference below. + */ + public readonly sourceImage!: pulumi.Output; + /** + * *Optional* - The source instance from which the image will be created. See reference below. + */ + public readonly sourceInstance!: pulumi.Output; + + /** + * Create a Image resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: ImageArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: ImageArgs | ImageState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as ImageState | undefined; + resourceInputs["aliases"] = state ? state.aliases : undefined; + resourceInputs["copiedAliases"] = state ? state.copiedAliases : undefined; + resourceInputs["createdAt"] = state ? state.createdAt : undefined; + resourceInputs["fingerprint"] = state ? state.fingerprint : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + resourceInputs["resourceId"] = state ? state.resourceId : undefined; + resourceInputs["sourceFile"] = state ? state.sourceFile : undefined; + resourceInputs["sourceImage"] = state ? state.sourceImage : undefined; + resourceInputs["sourceInstance"] = state ? state.sourceInstance : undefined; + } else { + const args = argsOrState as ImageArgs | undefined; + resourceInputs["aliases"] = args ? args.aliases : undefined; + resourceInputs["project"] = args ? args.project : undefined; + resourceInputs["remote"] = args ? args.remote : undefined; + resourceInputs["sourceFile"] = args ? args.sourceFile : undefined; + resourceInputs["sourceImage"] = args ? args.sourceImage : undefined; + resourceInputs["sourceInstance"] = args ? args.sourceInstance : undefined; + resourceInputs["copiedAliases"] = undefined /*out*/; + resourceInputs["createdAt"] = undefined /*out*/; + resourceInputs["fingerprint"] = undefined /*out*/; + resourceInputs["resourceId"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(Image.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering Image resources. + */ +export interface ImageState { + /** + * *Optional* - A list of aliases to assign to the image after + * pulling. + */ + aliases?: pulumi.Input[]>; + /** + * The list of aliases that were copied from the + * `sourceImage`. + */ + copiedAliases?: pulumi.Input[]>; + /** + * The datetime of image creation, in Unix time. + */ + createdAt?: pulumi.Input; + /** + * The unique hash fingperint of the image. + */ + fingerprint?: pulumi.Input; + /** + * *Optional* - Name of the project where the image will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + resourceId?: pulumi.Input; + /** + * *Optional* - The image file from the local file system from which the image will be created. See reference below. + */ + sourceFile?: pulumi.Input; + /** + * *Optional* - The source image from which the image will be created. See reference below. + */ + sourceImage?: pulumi.Input; + /** + * *Optional* - The source instance from which the image will be created. See reference below. + */ + sourceInstance?: pulumi.Input; +} + +/** + * The set of arguments for constructing a Image resource. + */ +export interface ImageArgs { + /** + * *Optional* - A list of aliases to assign to the image after + * pulling. + */ + aliases?: pulumi.Input[]>; + /** + * *Optional* - Name of the project where the image will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - The image file from the local file system from which the image will be created. See reference below. + */ + sourceFile?: pulumi.Input; + /** + * *Optional* - The source image from which the image will be created. See reference below. + */ + sourceImage?: pulumi.Input; + /** + * *Optional* - The source instance from which the image will be created. See reference below. + */ + sourceInstance?: pulumi.Input; +} diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts new file mode 100644 index 0000000..1c7b2a6 --- /dev/null +++ b/sdk/nodejs/index.ts @@ -0,0 +1,223 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +// Export members: +export { CertificateArgs, CertificateState } from "./certificate"; +export type Certificate = import("./certificate").Certificate; +export const Certificate: typeof import("./certificate").Certificate = null as any; +utilities.lazyLoad(exports, ["Certificate"], () => require("./certificate")); + +export { ClusterGroupArgs, ClusterGroupState } from "./clusterGroup"; +export type ClusterGroup = import("./clusterGroup").ClusterGroup; +export const ClusterGroup: typeof import("./clusterGroup").ClusterGroup = null as any; +utilities.lazyLoad(exports, ["ClusterGroup"], () => require("./clusterGroup")); + +export { ClusterGroupAssignmentArgs, ClusterGroupAssignmentState } from "./clusterGroupAssignment"; +export type ClusterGroupAssignment = import("./clusterGroupAssignment").ClusterGroupAssignment; +export const ClusterGroupAssignment: typeof import("./clusterGroupAssignment").ClusterGroupAssignment = null as any; +utilities.lazyLoad(exports, ["ClusterGroupAssignment"], () => require("./clusterGroupAssignment")); + +export { GetImageArgs, GetImageResult, GetImageOutputArgs } from "./getImage"; +export const getImage: typeof import("./getImage").getImage = null as any; +export const getImageOutput: typeof import("./getImage").getImageOutput = null as any; +utilities.lazyLoad(exports, ["getImage","getImageOutput"], () => require("./getImage")); + +export { GetProfileArgs, GetProfileResult, GetProfileOutputArgs } from "./getProfile"; +export const getProfile: typeof import("./getProfile").getProfile = null as any; +export const getProfileOutput: typeof import("./getProfile").getProfileOutput = null as any; +utilities.lazyLoad(exports, ["getProfile","getProfileOutput"], () => require("./getProfile")); + +export { GetProjectArgs, GetProjectResult, GetProjectOutputArgs } from "./getProject"; +export const getProject: typeof import("./getProject").getProject = null as any; +export const getProjectOutput: typeof import("./getProject").getProjectOutput = null as any; +utilities.lazyLoad(exports, ["getProject","getProjectOutput"], () => require("./getProject")); + +export { ImageArgs, ImageState } from "./image"; +export type Image = import("./image").Image; +export const Image: typeof import("./image").Image = null as any; +utilities.lazyLoad(exports, ["Image"], () => require("./image")); + +export { InstanceArgs, InstanceState } from "./instance"; +export type Instance = import("./instance").Instance; +export const Instance: typeof import("./instance").Instance = null as any; +utilities.lazyLoad(exports, ["Instance"], () => require("./instance")); + +export { InstanceSnapshotArgs, InstanceSnapshotState } from "./instanceSnapshot"; +export type InstanceSnapshot = import("./instanceSnapshot").InstanceSnapshot; +export const InstanceSnapshot: typeof import("./instanceSnapshot").InstanceSnapshot = null as any; +utilities.lazyLoad(exports, ["InstanceSnapshot"], () => require("./instanceSnapshot")); + +export { NetworkArgs, NetworkState } from "./network"; +export type Network = import("./network").Network; +export const Network: typeof import("./network").Network = null as any; +utilities.lazyLoad(exports, ["Network"], () => require("./network")); + +export { NetworkAclArgs, NetworkAclState } from "./networkAcl"; +export type NetworkAcl = import("./networkAcl").NetworkAcl; +export const NetworkAcl: typeof import("./networkAcl").NetworkAcl = null as any; +utilities.lazyLoad(exports, ["NetworkAcl"], () => require("./networkAcl")); + +export { NetworkForwardArgs, NetworkForwardState } from "./networkForward"; +export type NetworkForward = import("./networkForward").NetworkForward; +export const NetworkForward: typeof import("./networkForward").NetworkForward = null as any; +utilities.lazyLoad(exports, ["NetworkForward"], () => require("./networkForward")); + +export { NetworkIntegrationArgs, NetworkIntegrationState } from "./networkIntegration"; +export type NetworkIntegration = import("./networkIntegration").NetworkIntegration; +export const NetworkIntegration: typeof import("./networkIntegration").NetworkIntegration = null as any; +utilities.lazyLoad(exports, ["NetworkIntegration"], () => require("./networkIntegration")); + +export { NetworkLbArgs, NetworkLbState } from "./networkLb"; +export type NetworkLb = import("./networkLb").NetworkLb; +export const NetworkLb: typeof import("./networkLb").NetworkLb = null as any; +utilities.lazyLoad(exports, ["NetworkLb"], () => require("./networkLb")); + +export { NetworkLoadBalancerArgs, NetworkLoadBalancerState } from "./networkLoadBalancer"; +export type NetworkLoadBalancer = import("./networkLoadBalancer").NetworkLoadBalancer; +export const NetworkLoadBalancer: typeof import("./networkLoadBalancer").NetworkLoadBalancer = null as any; +utilities.lazyLoad(exports, ["NetworkLoadBalancer"], () => require("./networkLoadBalancer")); + +export { NetworkPeerArgs, NetworkPeerState } from "./networkPeer"; +export type NetworkPeer = import("./networkPeer").NetworkPeer; +export const NetworkPeer: typeof import("./networkPeer").NetworkPeer = null as any; +utilities.lazyLoad(exports, ["NetworkPeer"], () => require("./networkPeer")); + +export { NetworkZoneArgs, NetworkZoneState } from "./networkZone"; +export type NetworkZone = import("./networkZone").NetworkZone; +export const NetworkZone: typeof import("./networkZone").NetworkZone = null as any; +utilities.lazyLoad(exports, ["NetworkZone"], () => require("./networkZone")); + +export { NetworkZoneRecordArgs, NetworkZoneRecordState } from "./networkZoneRecord"; +export type NetworkZoneRecord = import("./networkZoneRecord").NetworkZoneRecord; +export const NetworkZoneRecord: typeof import("./networkZoneRecord").NetworkZoneRecord = null as any; +utilities.lazyLoad(exports, ["NetworkZoneRecord"], () => require("./networkZoneRecord")); + +export { ProfileArgs, ProfileState } from "./profile"; +export type Profile = import("./profile").Profile; +export const Profile: typeof import("./profile").Profile = null as any; +utilities.lazyLoad(exports, ["Profile"], () => require("./profile")); + +export { ProjectArgs, ProjectState } from "./project"; +export type Project = import("./project").Project; +export const Project: typeof import("./project").Project = null as any; +utilities.lazyLoad(exports, ["Project"], () => require("./project")); + +export { ProviderArgs } from "./provider"; +export type Provider = import("./provider").Provider; +export const Provider: typeof import("./provider").Provider = null as any; +utilities.lazyLoad(exports, ["Provider"], () => require("./provider")); + +export { StorageBucketArgs, StorageBucketState } from "./storageBucket"; +export type StorageBucket = import("./storageBucket").StorageBucket; +export const StorageBucket: typeof import("./storageBucket").StorageBucket = null as any; +utilities.lazyLoad(exports, ["StorageBucket"], () => require("./storageBucket")); + +export { StorageBucketKeyArgs, StorageBucketKeyState } from "./storageBucketKey"; +export type StorageBucketKey = import("./storageBucketKey").StorageBucketKey; +export const StorageBucketKey: typeof import("./storageBucketKey").StorageBucketKey = null as any; +utilities.lazyLoad(exports, ["StorageBucketKey"], () => require("./storageBucketKey")); + +export { StoragePoolArgs, StoragePoolState } from "./storagePool"; +export type StoragePool = import("./storagePool").StoragePool; +export const StoragePool: typeof import("./storagePool").StoragePool = null as any; +utilities.lazyLoad(exports, ["StoragePool"], () => require("./storagePool")); + +export { StorageVolumeArgs, StorageVolumeState } from "./storageVolume"; +export type StorageVolume = import("./storageVolume").StorageVolume; +export const StorageVolume: typeof import("./storageVolume").StorageVolume = null as any; +utilities.lazyLoad(exports, ["StorageVolume"], () => require("./storageVolume")); + + +// Export sub-modules: +import * as config from "./config"; +import * as types from "./types"; + +export { + config, + types, +}; + +const _module = { + version: utilities.getVersion(), + construct: (name: string, type: string, urn: string): pulumi.Resource => { + switch (type) { + case "incus:index/certificate:Certificate": + return new Certificate(name, undefined, { urn }) + case "incus:index/clusterGroup:ClusterGroup": + return new ClusterGroup(name, undefined, { urn }) + case "incus:index/clusterGroupAssignment:ClusterGroupAssignment": + return new ClusterGroupAssignment(name, undefined, { urn }) + case "incus:index/image:Image": + return new Image(name, undefined, { urn }) + case "incus:index/instance:Instance": + return new Instance(name, undefined, { urn }) + case "incus:index/instanceSnapshot:InstanceSnapshot": + return new InstanceSnapshot(name, undefined, { urn }) + case "incus:index/network:Network": + return new Network(name, undefined, { urn }) + case "incus:index/networkAcl:NetworkAcl": + return new NetworkAcl(name, undefined, { urn }) + case "incus:index/networkForward:NetworkForward": + return new NetworkForward(name, undefined, { urn }) + case "incus:index/networkIntegration:NetworkIntegration": + return new NetworkIntegration(name, undefined, { urn }) + case "incus:index/networkLb:NetworkLb": + return new NetworkLb(name, undefined, { urn }) + case "incus:index/networkLoadBalancer:NetworkLoadBalancer": + return new NetworkLoadBalancer(name, undefined, { urn }) + case "incus:index/networkPeer:NetworkPeer": + return new NetworkPeer(name, undefined, { urn }) + case "incus:index/networkZone:NetworkZone": + return new NetworkZone(name, undefined, { urn }) + case "incus:index/networkZoneRecord:NetworkZoneRecord": + return new NetworkZoneRecord(name, undefined, { urn }) + case "incus:index/profile:Profile": + return new Profile(name, undefined, { urn }) + case "incus:index/project:Project": + return new Project(name, undefined, { urn }) + case "incus:index/storageBucket:StorageBucket": + return new StorageBucket(name, undefined, { urn }) + case "incus:index/storageBucketKey:StorageBucketKey": + return new StorageBucketKey(name, undefined, { urn }) + case "incus:index/storagePool:StoragePool": + return new StoragePool(name, undefined, { urn }) + case "incus:index/storageVolume:StorageVolume": + return new StorageVolume(name, undefined, { urn }) + default: + throw new Error(`unknown resource type ${type}`); + } + }, +}; +pulumi.runtime.registerResourceModule("incus", "index/certificate", _module) +pulumi.runtime.registerResourceModule("incus", "index/clusterGroup", _module) +pulumi.runtime.registerResourceModule("incus", "index/clusterGroupAssignment", _module) +pulumi.runtime.registerResourceModule("incus", "index/image", _module) +pulumi.runtime.registerResourceModule("incus", "index/instance", _module) +pulumi.runtime.registerResourceModule("incus", "index/instanceSnapshot", _module) +pulumi.runtime.registerResourceModule("incus", "index/network", _module) +pulumi.runtime.registerResourceModule("incus", "index/networkAcl", _module) +pulumi.runtime.registerResourceModule("incus", "index/networkForward", _module) +pulumi.runtime.registerResourceModule("incus", "index/networkIntegration", _module) +pulumi.runtime.registerResourceModule("incus", "index/networkLb", _module) +pulumi.runtime.registerResourceModule("incus", "index/networkLoadBalancer", _module) +pulumi.runtime.registerResourceModule("incus", "index/networkPeer", _module) +pulumi.runtime.registerResourceModule("incus", "index/networkZone", _module) +pulumi.runtime.registerResourceModule("incus", "index/networkZoneRecord", _module) +pulumi.runtime.registerResourceModule("incus", "index/profile", _module) +pulumi.runtime.registerResourceModule("incus", "index/project", _module) +pulumi.runtime.registerResourceModule("incus", "index/storageBucket", _module) +pulumi.runtime.registerResourceModule("incus", "index/storageBucketKey", _module) +pulumi.runtime.registerResourceModule("incus", "index/storagePool", _module) +pulumi.runtime.registerResourceModule("incus", "index/storageVolume", _module) +pulumi.runtime.registerResourcePackage("incus", { + version: utilities.getVersion(), + constructProvider: (name: string, type: string, urn: string): pulumi.ProviderResource => { + if (type !== "pulumi:providers:incus") { + throw new Error(`unknown provider type ${type}`); + } + return new Provider(name, undefined, { urn }); + }, +}); diff --git a/sdk/nodejs/instance.ts b/sdk/nodejs/instance.ts new file mode 100644 index 0000000..6b539d0 --- /dev/null +++ b/sdk/nodejs/instance.ts @@ -0,0 +1,357 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +export class Instance extends pulumi.CustomResource { + /** + * Get an existing Instance resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: InstanceState, opts?: pulumi.CustomResourceOptions): Instance { + return new Instance(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/instance:Instance'; + + /** + * Returns true if the given object is an instance of Instance. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is Instance { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === Instance.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of + * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of the instance. + */ + public readonly description!: pulumi.Output; + /** + * *Optional* - Device definition. See reference below. + */ + public readonly devices!: pulumi.Output; + /** + * *Optional* - Boolean indicating if this instance is ephemeral. Defaults to `false`. + */ + public readonly ephemeral!: pulumi.Output; + /** + * *Optional* - File to upload to the instance. See reference below. + */ + public readonly files!: pulumi.Output; + /** + * *Optional* - Base image from which the instance will be created. Must + * specify [an image accessible from the provider remote](https://linuxcontainers.org/incus/docs/main/reference/image_servers/). + */ + public readonly image!: pulumi.Output; + /** + * The IPv4 Address of the instance. See Instance Network + * Access for more details. + */ + public /*out*/ readonly ipv4Address!: pulumi.Output; + /** + * The IPv6 Address of the instance. See Instance Network + * Access for more details. + */ + public /*out*/ readonly ipv6Address!: pulumi.Output; + /** + * The MAC address of the detected NIC. See Instance Network + * Access for more details. + */ + public /*out*/ readonly macAddress!: pulumi.Output; + /** + * **Required** - Name of the instance. + */ + public readonly name!: pulumi.Output; + /** + * *Optional* - List of Incus config profiles to apply to the new + * instance. Profile `default` will be applied if profiles are not set (are `null`). + * However, if an empty array (`[]`) is set as a value, no profiles will be applied. + */ + public readonly profiles!: pulumi.Output; + /** + * *Optional* - Name of the project where the instance will be spawned. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + /** + * *Optional* - Boolean indicating whether the instance should be started (running). Defaults to `true`. + */ + public readonly running!: pulumi.Output; + /** + * *Optional* - The souce backup file from which the instance should be restored. For handling of storage pool, see examples. + */ + public readonly sourceFile!: pulumi.Output; + /** + * *Optional* - The source instance from which the instance will be created. See reference below. + */ + public readonly sourceInstance!: pulumi.Output; + /** + * The status of the instance. + */ + public /*out*/ readonly status!: pulumi.Output; + /** + * *Optional* - Specify a target node in a cluster. + */ + public readonly target!: pulumi.Output; + /** + * *Optional* - Instance type. Can be `container`, or `virtual-machine`. Defaults to `container`. + */ + public readonly type!: pulumi.Output; + /** + * *Optional* - WaitFor definition. See reference below. + * If `running` is set to false or instance is already running (on update), this value has no effect. + */ + public readonly waitFors!: pulumi.Output; + + /** + * Create a Instance resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: InstanceArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: InstanceArgs | InstanceState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as InstanceState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["devices"] = state ? state.devices : undefined; + resourceInputs["ephemeral"] = state ? state.ephemeral : undefined; + resourceInputs["files"] = state ? state.files : undefined; + resourceInputs["image"] = state ? state.image : undefined; + resourceInputs["ipv4Address"] = state ? state.ipv4Address : undefined; + resourceInputs["ipv6Address"] = state ? state.ipv6Address : undefined; + resourceInputs["macAddress"] = state ? state.macAddress : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["profiles"] = state ? state.profiles : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + resourceInputs["running"] = state ? state.running : undefined; + resourceInputs["sourceFile"] = state ? state.sourceFile : undefined; + resourceInputs["sourceInstance"] = state ? state.sourceInstance : undefined; + resourceInputs["status"] = state ? state.status : undefined; + resourceInputs["target"] = state ? state.target : undefined; + resourceInputs["type"] = state ? state.type : undefined; + resourceInputs["waitFors"] = state ? state.waitFors : undefined; + } else { + const args = argsOrState as InstanceArgs | undefined; + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["devices"] = args ? args.devices : undefined; + resourceInputs["ephemeral"] = args ? args.ephemeral : undefined; + resourceInputs["files"] = args ? args.files : undefined; + resourceInputs["image"] = args ? args.image : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["profiles"] = args ? args.profiles : undefined; + resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; + resourceInputs["remote"] = args ? args.remote : undefined; + resourceInputs["running"] = args ? args.running : undefined; + resourceInputs["sourceFile"] = args ? args.sourceFile : undefined; + resourceInputs["sourceInstance"] = args ? args.sourceInstance : undefined; + resourceInputs["target"] = args ? args.target : undefined; + resourceInputs["type"] = args ? args.type : undefined; + resourceInputs["waitFors"] = args ? args.waitFors : undefined; + resourceInputs["ipv4Address"] = undefined /*out*/; + resourceInputs["ipv6Address"] = undefined /*out*/; + resourceInputs["macAddress"] = undefined /*out*/; + resourceInputs["status"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(Instance.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering Instance resources. + */ +export interface InstanceState { + /** + * *Optional* - Map of key/value pairs of + * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the instance. + */ + description?: pulumi.Input; + /** + * *Optional* - Device definition. See reference below. + */ + devices?: pulumi.Input[]>; + /** + * *Optional* - Boolean indicating if this instance is ephemeral. Defaults to `false`. + */ + ephemeral?: pulumi.Input; + /** + * *Optional* - File to upload to the instance. See reference below. + */ + files?: pulumi.Input[]>; + /** + * *Optional* - Base image from which the instance will be created. Must + * specify [an image accessible from the provider remote](https://linuxcontainers.org/incus/docs/main/reference/image_servers/). + */ + image?: pulumi.Input; + /** + * The IPv4 Address of the instance. See Instance Network + * Access for more details. + */ + ipv4Address?: pulumi.Input; + /** + * The IPv6 Address of the instance. See Instance Network + * Access for more details. + */ + ipv6Address?: pulumi.Input; + /** + * The MAC address of the detected NIC. See Instance Network + * Access for more details. + */ + macAddress?: pulumi.Input; + /** + * **Required** - Name of the instance. + */ + name?: pulumi.Input; + /** + * *Optional* - List of Incus config profiles to apply to the new + * instance. Profile `default` will be applied if profiles are not set (are `null`). + * However, if an empty array (`[]`) is set as a value, no profiles will be applied. + */ + profiles?: pulumi.Input[]>; + /** + * *Optional* - Name of the project where the instance will be spawned. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Boolean indicating whether the instance should be started (running). Defaults to `true`. + */ + running?: pulumi.Input; + /** + * *Optional* - The souce backup file from which the instance should be restored. For handling of storage pool, see examples. + */ + sourceFile?: pulumi.Input; + /** + * *Optional* - The source instance from which the instance will be created. See reference below. + */ + sourceInstance?: pulumi.Input; + /** + * The status of the instance. + */ + status?: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; + /** + * *Optional* - Instance type. Can be `container`, or `virtual-machine`. Defaults to `container`. + */ + type?: pulumi.Input; + /** + * *Optional* - WaitFor definition. See reference below. + * If `running` is set to false or instance is already running (on update), this value has no effect. + */ + waitFors?: pulumi.Input[]>; +} + +/** + * The set of arguments for constructing a Instance resource. + */ +export interface InstanceArgs { + /** + * *Optional* - Map of key/value pairs of + * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the instance. + */ + description?: pulumi.Input; + /** + * *Optional* - Device definition. See reference below. + */ + devices?: pulumi.Input[]>; + /** + * *Optional* - Boolean indicating if this instance is ephemeral. Defaults to `false`. + */ + ephemeral?: pulumi.Input; + /** + * *Optional* - File to upload to the instance. See reference below. + */ + files?: pulumi.Input[]>; + /** + * *Optional* - Base image from which the instance will be created. Must + * specify [an image accessible from the provider remote](https://linuxcontainers.org/incus/docs/main/reference/image_servers/). + */ + image?: pulumi.Input; + /** + * **Required** - Name of the instance. + */ + name?: pulumi.Input; + /** + * *Optional* - List of Incus config profiles to apply to the new + * instance. Profile `default` will be applied if profiles are not set (are `null`). + * However, if an empty array (`[]`) is set as a value, no profiles will be applied. + */ + profiles?: pulumi.Input[]>; + /** + * *Optional* - Name of the project where the instance will be spawned. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Boolean indicating whether the instance should be started (running). Defaults to `true`. + */ + running?: pulumi.Input; + /** + * *Optional* - The souce backup file from which the instance should be restored. For handling of storage pool, see examples. + */ + sourceFile?: pulumi.Input; + /** + * *Optional* - The source instance from which the instance will be created. See reference below. + */ + sourceInstance?: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; + /** + * *Optional* - Instance type. Can be `container`, or `virtual-machine`. Defaults to `container`. + */ + type?: pulumi.Input; + /** + * *Optional* - WaitFor definition. See reference below. + * If `running` is set to false or instance is already running (on update), this value has no effect. + */ + waitFors?: pulumi.Input[]>; +} diff --git a/sdk/nodejs/instanceSnapshot.ts b/sdk/nodejs/instanceSnapshot.ts new file mode 100644 index 0000000..eaa7b1b --- /dev/null +++ b/sdk/nodejs/instanceSnapshot.ts @@ -0,0 +1,183 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * ## # incus.InstanceSnapshot + * + * Manages a snapshot of an Incus instance. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const instance = new incus.Instance("instance", { + * name: "my-instance", + * image: "ubuntu", + * ephemeral: false, + * }); + * const snap1 = new incus.InstanceSnapshot("snap1", { + * name: "my-snapshot-1", + * instance: instance.name, + * }); + * ``` + */ +export class InstanceSnapshot extends pulumi.CustomResource { + /** + * Get an existing InstanceSnapshot resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: InstanceSnapshotState, opts?: pulumi.CustomResourceOptions): InstanceSnapshot { + return new InstanceSnapshot(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/instanceSnapshot:InstanceSnapshot'; + + /** + * Returns true if the given object is an instance of InstanceSnapshot. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is InstanceSnapshot { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === InstanceSnapshot.__pulumiType; + } + + /** + * The time Incus reported the snapshot was successfully created, + * in UTC. + */ + public /*out*/ readonly createdAt!: pulumi.Output; + /** + * **Required** - The name of the instance to snapshot. + */ + public readonly instance!: pulumi.Output; + /** + * **Required** - Name of the snapshot. + */ + public readonly name!: pulumi.Output; + /** + * *Optional* - Name of the project where the snapshot will be stored. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + /** + * *Optional* - Set to `true` to create a stateful snapshot, + * `false` for stateless. Stateful snapshots include runtime state. Defaults to + * `false`. + */ + public readonly stateful!: pulumi.Output; + + /** + * Create a InstanceSnapshot resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: InstanceSnapshotArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: InstanceSnapshotArgs | InstanceSnapshotState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as InstanceSnapshotState | undefined; + resourceInputs["createdAt"] = state ? state.createdAt : undefined; + resourceInputs["instance"] = state ? state.instance : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + resourceInputs["stateful"] = state ? state.stateful : undefined; + } else { + const args = argsOrState as InstanceSnapshotArgs | undefined; + if ((!args || args.instance === undefined) && !opts.urn) { + throw new Error("Missing required property 'instance'"); + } + resourceInputs["instance"] = args ? args.instance : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; + resourceInputs["remote"] = args ? args.remote : undefined; + resourceInputs["stateful"] = args ? args.stateful : undefined; + resourceInputs["createdAt"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(InstanceSnapshot.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering InstanceSnapshot resources. + */ +export interface InstanceSnapshotState { + /** + * The time Incus reported the snapshot was successfully created, + * in UTC. + */ + createdAt?: pulumi.Input; + /** + * **Required** - The name of the instance to snapshot. + */ + instance?: pulumi.Input; + /** + * **Required** - Name of the snapshot. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the snapshot will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Set to `true` to create a stateful snapshot, + * `false` for stateless. Stateful snapshots include runtime state. Defaults to + * `false`. + */ + stateful?: pulumi.Input; +} + +/** + * The set of arguments for constructing a InstanceSnapshot resource. + */ +export interface InstanceSnapshotArgs { + /** + * **Required** - The name of the instance to snapshot. + */ + instance: pulumi.Input; + /** + * **Required** - Name of the snapshot. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the snapshot will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Set to `true` to create a stateful snapshot, + * `false` for stateless. Stateful snapshots include runtime state. Defaults to + * `false`. + */ + stateful?: pulumi.Input; +} diff --git a/sdk/nodejs/network.ts b/sdk/nodejs/network.ts new file mode 100644 index 0000000..607610e --- /dev/null +++ b/sdk/nodejs/network.ts @@ -0,0 +1,190 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +export class Network extends pulumi.CustomResource { + /** + * Get an existing Network resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: NetworkState, opts?: pulumi.CustomResourceOptions): Network { + return new Network(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/network:Network'; + + /** + * Returns true if the given object is an instance of Network. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is Network { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === Network.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of + * [network config settings](https://linuxcontainers.org/incus/docs/main/networks/). + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of the network. + */ + public readonly description!: pulumi.Output; + /** + * Whether or not the network is managed. + */ + public /*out*/ readonly managed!: pulumi.Output; + /** + * **Required** - Name of the network. This is usually the device the + * network will appear as to instances. + */ + public readonly name!: pulumi.Output; + /** + * *Optional* - Name of the project where the network will be created. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + /** + * *Optional* - Specify a target node in a cluster. + */ + public readonly target!: pulumi.Output; + /** + * *Optional* - The type of network to create. Can be one of: bridge, + * macvlan, sriov, ovn, or physical. If no type is specified, a bridge network + * is created. + */ + public readonly type!: pulumi.Output; + + /** + * Create a Network resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: NetworkArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: NetworkArgs | NetworkState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as NetworkState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["managed"] = state ? state.managed : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + resourceInputs["target"] = state ? state.target : undefined; + resourceInputs["type"] = state ? state.type : undefined; + } else { + const args = argsOrState as NetworkArgs | undefined; + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; + resourceInputs["remote"] = args ? args.remote : undefined; + resourceInputs["target"] = args ? args.target : undefined; + resourceInputs["type"] = args ? args.type : undefined; + resourceInputs["managed"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(Network.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering Network resources. + */ +export interface NetworkState { + /** + * *Optional* - Map of key/value pairs of + * [network config settings](https://linuxcontainers.org/incus/docs/main/networks/). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network. + */ + description?: pulumi.Input; + /** + * Whether or not the network is managed. + */ + managed?: pulumi.Input; + /** + * **Required** - Name of the network. This is usually the device the + * network will appear as to instances. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the network will be created. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; + /** + * *Optional* - The type of network to create. Can be one of: bridge, + * macvlan, sriov, ovn, or physical. If no type is specified, a bridge network + * is created. + */ + type?: pulumi.Input; +} + +/** + * The set of arguments for constructing a Network resource. + */ +export interface NetworkArgs { + /** + * *Optional* - Map of key/value pairs of + * [network config settings](https://linuxcontainers.org/incus/docs/main/networks/). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the network. This is usually the device the + * network will appear as to instances. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the network will be created. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; + /** + * *Optional* - The type of network to create. Can be one of: bridge, + * macvlan, sriov, ovn, or physical. If no type is specified, a bridge network + * is created. + */ + type?: pulumi.Input; +} diff --git a/sdk/nodejs/networkAcl.ts b/sdk/nodejs/networkAcl.ts new file mode 100644 index 0000000..1e3787c --- /dev/null +++ b/sdk/nodejs/networkAcl.ts @@ -0,0 +1,179 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +export class NetworkAcl extends pulumi.CustomResource { + /** + * Get an existing NetworkAcl resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: NetworkAclState, opts?: pulumi.CustomResourceOptions): NetworkAcl { + return new NetworkAcl(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/networkAcl:NetworkAcl'; + + /** + * Returns true if the given object is an instance of NetworkAcl. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is NetworkAcl { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === NetworkAcl.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of + * network ACL config settings. + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of the network ACL rule. + */ + public readonly description!: pulumi.Output; + /** + * *Optional* - List of network ACL rules for egress traffic. See reference below. + */ + public readonly egresses!: pulumi.Output; + /** + * *Optional* - List of network ACL rules for ingress traffic. See reference below. + * + * The network ACL rule supports: + */ + public readonly ingresses!: pulumi.Output; + /** + * **Required** - Name of the network ACL. + */ + public readonly name!: pulumi.Output; + /** + * *Optional* - Name of the project where the network ACL will be created. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + + /** + * Create a NetworkAcl resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: NetworkAclArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: NetworkAclArgs | NetworkAclState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as NetworkAclState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["egresses"] = state ? state.egresses : undefined; + resourceInputs["ingresses"] = state ? state.ingresses : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + } else { + const args = argsOrState as NetworkAclArgs | undefined; + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["egresses"] = args ? args.egresses : undefined; + resourceInputs["ingresses"] = args ? args.ingresses : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; + resourceInputs["remote"] = args ? args.remote : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(NetworkAcl.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering NetworkAcl resources. + */ +export interface NetworkAclState { + /** + * *Optional* - Map of key/value pairs of + * network ACL config settings. + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network ACL rule. + */ + description?: pulumi.Input; + /** + * *Optional* - List of network ACL rules for egress traffic. See reference below. + */ + egresses?: pulumi.Input[]>; + /** + * *Optional* - List of network ACL rules for ingress traffic. See reference below. + * + * The network ACL rule supports: + */ + ingresses?: pulumi.Input[]>; + /** + * **Required** - Name of the network ACL. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the network ACL will be created. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} + +/** + * The set of arguments for constructing a NetworkAcl resource. + */ +export interface NetworkAclArgs { + /** + * *Optional* - Map of key/value pairs of + * network ACL config settings. + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network ACL rule. + */ + description?: pulumi.Input; + /** + * *Optional* - List of network ACL rules for egress traffic. See reference below. + */ + egresses?: pulumi.Input[]>; + /** + * *Optional* - List of network ACL rules for ingress traffic. See reference below. + * + * The network ACL rule supports: + */ + ingresses?: pulumi.Input[]>; + /** + * **Required** - Name of the network ACL. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the network ACL will be created. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} diff --git a/sdk/nodejs/networkForward.ts b/sdk/nodejs/networkForward.ts new file mode 100644 index 0000000..1503a4d --- /dev/null +++ b/sdk/nodejs/networkForward.ts @@ -0,0 +1,185 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +export class NetworkForward extends pulumi.CustomResource { + /** + * Get an existing NetworkForward resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: NetworkForwardState, opts?: pulumi.CustomResourceOptions): NetworkForward { + return new NetworkForward(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/networkForward:NetworkForward'; + + /** + * Returns true if the given object is an instance of NetworkForward. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is NetworkForward { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === NetworkForward.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of + * network forward config settings. + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of port(s) + */ + public readonly description!: pulumi.Output; + /** + * **Required** - IP address to listen on. + */ + public readonly listenAddress!: pulumi.Output; + /** + * **Required** - Name of the network. + */ + public readonly network!: pulumi.Output; + /** + * *Optional* - List of port specifications. See reference below. + * + * The network forward port supports: + */ + public readonly ports!: pulumi.Output; + /** + * *Optional* - Name of the project where the network forward will be created. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + + /** + * Create a NetworkForward resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: NetworkForwardArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: NetworkForwardArgs | NetworkForwardState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as NetworkForwardState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["listenAddress"] = state ? state.listenAddress : undefined; + resourceInputs["network"] = state ? state.network : undefined; + resourceInputs["ports"] = state ? state.ports : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + } else { + const args = argsOrState as NetworkForwardArgs | undefined; + if ((!args || args.listenAddress === undefined) && !opts.urn) { + throw new Error("Missing required property 'listenAddress'"); + } + if ((!args || args.network === undefined) && !opts.urn) { + throw new Error("Missing required property 'network'"); + } + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["listenAddress"] = args ? args.listenAddress : undefined; + resourceInputs["network"] = args ? args.network : undefined; + resourceInputs["ports"] = args ? args.ports : undefined; + resourceInputs["project"] = args ? args.project : undefined; + resourceInputs["remote"] = args ? args.remote : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(NetworkForward.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering NetworkForward resources. + */ +export interface NetworkForwardState { + /** + * *Optional* - Map of key/value pairs of + * network forward config settings. + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of port(s) + */ + description?: pulumi.Input; + /** + * **Required** - IP address to listen on. + */ + listenAddress?: pulumi.Input; + /** + * **Required** - Name of the network. + */ + network?: pulumi.Input; + /** + * *Optional* - List of port specifications. See reference below. + * + * The network forward port supports: + */ + ports?: pulumi.Input[]>; + /** + * *Optional* - Name of the project where the network forward will be created. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} + +/** + * The set of arguments for constructing a NetworkForward resource. + */ +export interface NetworkForwardArgs { + /** + * *Optional* - Map of key/value pairs of + * network forward config settings. + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of port(s) + */ + description?: pulumi.Input; + /** + * **Required** - IP address to listen on. + */ + listenAddress: pulumi.Input; + /** + * **Required** - Name of the network. + */ + network: pulumi.Input; + /** + * *Optional* - List of port specifications. See reference below. + * + * The network forward port supports: + */ + ports?: pulumi.Input[]>; + /** + * *Optional* - Name of the project where the network forward will be created. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} diff --git a/sdk/nodejs/networkIntegration.ts b/sdk/nodejs/networkIntegration.ts new file mode 100644 index 0000000..6efadbf --- /dev/null +++ b/sdk/nodejs/networkIntegration.ts @@ -0,0 +1,208 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * ## # incus.NetworkIntegration + * + * Manage integrations between the local Incus deployment and remote networks hosted on Incus or other platforms. Currently available only for [OVN networks](https://linuxcontainers.org/incus/docs/main/reference/network_ovn/#network-ovn). + * + * ## Basic Example + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = new incus.NetworkIntegration("this", { + * name: "ovn-region", + * type: "ovn", + * config: { + * "ovn.northbound_connection": "tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645", + * "ovn.southbound_connection": "tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646", + * }, + * }); + * ``` + * + * ## Peer Example + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _default = new incus.Network("default", { + * name: "default", + * type: "ovn", + * config: { + * "ipv4.address": "192.168.2.0/24", + * "ipv4.nat": "true", + * }, + * }); + * const _this = new incus.NetworkIntegration("this", { + * name: "ovn-region", + * type: "ovn", + * config: { + * "ovn.northbound_connection": "tcp:[192.0.2.12]:6645,tcp:[192.0.3.13]:6645,tcp:[192.0.3.14]:6645", + * "ovn.southbound_connection": "tcp:[192.0.2.12]:6646,tcp:[192.0.3.13]:6646,tcp:[192.0.3.14]:6646", + * }, + * }); + * const thisNetworkPeer = new incus.NetworkPeer("this", { + * name: "ovn-peer", + * network: _default.name, + * targetIntegration: _this.name, + * type: "remote", + * }); + * ``` + */ +export class NetworkIntegration extends pulumi.CustomResource { + /** + * Get an existing NetworkIntegration resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: NetworkIntegrationState, opts?: pulumi.CustomResourceOptions): NetworkIntegration { + return new NetworkIntegration(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/networkIntegration:NetworkIntegration'; + + /** + * Returns true if the given object is an instance of NetworkIntegration. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is NetworkIntegration { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === NetworkIntegration.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of [network integration config settings](https://linuxcontainers.org/incus/docs/main/howto/network_integrations/) + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of the network integration. + */ + public readonly description!: pulumi.Output; + /** + * **Required** - Name of the network integration. + */ + public readonly name!: pulumi.Output; + /** + * *Optional* - Name of the project where the network will be created. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + /** + * **Required** - The type of the network integration. Currently, only supports `ovn` type. + */ + public readonly type!: pulumi.Output; + + /** + * Create a NetworkIntegration resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: NetworkIntegrationArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: NetworkIntegrationArgs | NetworkIntegrationState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as NetworkIntegrationState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + resourceInputs["type"] = state ? state.type : undefined; + } else { + const args = argsOrState as NetworkIntegrationArgs | undefined; + if ((!args || args.type === undefined) && !opts.urn) { + throw new Error("Missing required property 'type'"); + } + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; + resourceInputs["remote"] = args ? args.remote : undefined; + resourceInputs["type"] = args ? args.type : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(NetworkIntegration.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering NetworkIntegration resources. + */ +export interface NetworkIntegrationState { + /** + * *Optional* - Map of key/value pairs of [network integration config settings](https://linuxcontainers.org/incus/docs/main/howto/network_integrations/) + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network integration. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the network integration. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the network will be created. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * **Required** - The type of the network integration. Currently, only supports `ovn` type. + */ + type?: pulumi.Input; +} + +/** + * The set of arguments for constructing a NetworkIntegration resource. + */ +export interface NetworkIntegrationArgs { + /** + * *Optional* - Map of key/value pairs of [network integration config settings](https://linuxcontainers.org/incus/docs/main/howto/network_integrations/) + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network integration. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the network integration. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the network will be created. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * **Required** - The type of the network integration. Currently, only supports `ovn` type. + */ + type: pulumi.Input; +} diff --git a/sdk/nodejs/networkLb.ts b/sdk/nodejs/networkLb.ts new file mode 100644 index 0000000..fd8c8b6 --- /dev/null +++ b/sdk/nodejs/networkLb.ts @@ -0,0 +1,140 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +/** + * @deprecated incus.index/networklb.NetworkLb has been deprecated in favor of incus.index/networkloadbalancer.NetworkLoadBalancer + */ +export class NetworkLb extends pulumi.CustomResource { + /** + * Get an existing NetworkLb resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: NetworkLbState, opts?: pulumi.CustomResourceOptions): NetworkLb { + pulumi.log.warn("NetworkLb is deprecated: incus.index/networklb.NetworkLb has been deprecated in favor of incus.index/networkloadbalancer.NetworkLoadBalancer") + return new NetworkLb(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/networkLb:NetworkLb'; + + /** + * Returns true if the given object is an instance of NetworkLb. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is NetworkLb { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === NetworkLb.__pulumiType; + } + + /** + * Network load balancer backend + */ + public readonly backends!: pulumi.Output; + public readonly config!: pulumi.Output<{[key: string]: string}>; + public readonly description!: pulumi.Output; + public readonly listenAddress!: pulumi.Output; + public readonly network!: pulumi.Output; + /** + * Network load balancer port + */ + public readonly ports!: pulumi.Output; + public readonly project!: pulumi.Output; + public readonly remote!: pulumi.Output; + + /** + * Create a NetworkLb resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + /** @deprecated incus.index/networklb.NetworkLb has been deprecated in favor of incus.index/networkloadbalancer.NetworkLoadBalancer */ + constructor(name: string, args: NetworkLbArgs, opts?: pulumi.CustomResourceOptions) + /** @deprecated incus.index/networklb.NetworkLb has been deprecated in favor of incus.index/networkloadbalancer.NetworkLoadBalancer */ + constructor(name: string, argsOrState?: NetworkLbArgs | NetworkLbState, opts?: pulumi.CustomResourceOptions) { + pulumi.log.warn("NetworkLb is deprecated: incus.index/networklb.NetworkLb has been deprecated in favor of incus.index/networkloadbalancer.NetworkLoadBalancer") + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as NetworkLbState | undefined; + resourceInputs["backends"] = state ? state.backends : undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["listenAddress"] = state ? state.listenAddress : undefined; + resourceInputs["network"] = state ? state.network : undefined; + resourceInputs["ports"] = state ? state.ports : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + } else { + const args = argsOrState as NetworkLbArgs | undefined; + if ((!args || args.listenAddress === undefined) && !opts.urn) { + throw new Error("Missing required property 'listenAddress'"); + } + if ((!args || args.network === undefined) && !opts.urn) { + throw new Error("Missing required property 'network'"); + } + resourceInputs["backends"] = args ? args.backends : undefined; + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["listenAddress"] = args ? args.listenAddress : undefined; + resourceInputs["network"] = args ? args.network : undefined; + resourceInputs["ports"] = args ? args.ports : undefined; + resourceInputs["project"] = args ? args.project : undefined; + resourceInputs["remote"] = args ? args.remote : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(NetworkLb.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering NetworkLb resources. + */ +export interface NetworkLbState { + /** + * Network load balancer backend + */ + backends?: pulumi.Input[]>; + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + description?: pulumi.Input; + listenAddress?: pulumi.Input; + network?: pulumi.Input; + /** + * Network load balancer port + */ + ports?: pulumi.Input[]>; + project?: pulumi.Input; + remote?: pulumi.Input; +} + +/** + * The set of arguments for constructing a NetworkLb resource. + */ +export interface NetworkLbArgs { + /** + * Network load balancer backend + */ + backends?: pulumi.Input[]>; + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + description?: pulumi.Input; + listenAddress: pulumi.Input; + network: pulumi.Input; + /** + * Network load balancer port + */ + ports?: pulumi.Input[]>; + project?: pulumi.Input; + remote?: pulumi.Input; +} diff --git a/sdk/nodejs/networkLoadBalancer.ts b/sdk/nodejs/networkLoadBalancer.ts new file mode 100644 index 0000000..7b43fd4 --- /dev/null +++ b/sdk/nodejs/networkLoadBalancer.ts @@ -0,0 +1,135 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +export class NetworkLoadBalancer extends pulumi.CustomResource { + /** + * Get an existing NetworkLoadBalancer resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: NetworkLoadBalancerState, opts?: pulumi.CustomResourceOptions): NetworkLoadBalancer { + return new NetworkLoadBalancer(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/networkLoadBalancer:NetworkLoadBalancer'; + + /** + * Returns true if the given object is an instance of NetworkLoadBalancer. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is NetworkLoadBalancer { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === NetworkLoadBalancer.__pulumiType; + } + + /** + * Network load balancer backend + */ + public readonly backends!: pulumi.Output; + public readonly config!: pulumi.Output<{[key: string]: string}>; + public readonly description!: pulumi.Output; + public readonly listenAddress!: pulumi.Output; + public readonly network!: pulumi.Output; + /** + * Network load balancer port + */ + public readonly ports!: pulumi.Output; + public readonly project!: pulumi.Output; + public readonly remote!: pulumi.Output; + + /** + * Create a NetworkLoadBalancer resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: NetworkLoadBalancerArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: NetworkLoadBalancerArgs | NetworkLoadBalancerState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as NetworkLoadBalancerState | undefined; + resourceInputs["backends"] = state ? state.backends : undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["listenAddress"] = state ? state.listenAddress : undefined; + resourceInputs["network"] = state ? state.network : undefined; + resourceInputs["ports"] = state ? state.ports : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + } else { + const args = argsOrState as NetworkLoadBalancerArgs | undefined; + if ((!args || args.listenAddress === undefined) && !opts.urn) { + throw new Error("Missing required property 'listenAddress'"); + } + if ((!args || args.network === undefined) && !opts.urn) { + throw new Error("Missing required property 'network'"); + } + resourceInputs["backends"] = args ? args.backends : undefined; + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["listenAddress"] = args ? args.listenAddress : undefined; + resourceInputs["network"] = args ? args.network : undefined; + resourceInputs["ports"] = args ? args.ports : undefined; + resourceInputs["project"] = args ? args.project : undefined; + resourceInputs["remote"] = args ? args.remote : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + const aliasOpts = { aliases: [{ type: "incus:index/networkLb:NetworkLb" }] }; + opts = pulumi.mergeOptions(opts, aliasOpts); + super(NetworkLoadBalancer.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering NetworkLoadBalancer resources. + */ +export interface NetworkLoadBalancerState { + /** + * Network load balancer backend + */ + backends?: pulumi.Input[]>; + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + description?: pulumi.Input; + listenAddress?: pulumi.Input; + network?: pulumi.Input; + /** + * Network load balancer port + */ + ports?: pulumi.Input[]>; + project?: pulumi.Input; + remote?: pulumi.Input; +} + +/** + * The set of arguments for constructing a NetworkLoadBalancer resource. + */ +export interface NetworkLoadBalancerArgs { + /** + * Network load balancer backend + */ + backends?: pulumi.Input[]>; + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + description?: pulumi.Input; + listenAddress: pulumi.Input; + network: pulumi.Input; + /** + * Network load balancer port + */ + ports?: pulumi.Input[]>; + project?: pulumi.Input; + remote?: pulumi.Input; +} diff --git a/sdk/nodejs/networkPeer.ts b/sdk/nodejs/networkPeer.ts new file mode 100644 index 0000000..8287493 --- /dev/null +++ b/sdk/nodejs/networkPeer.ts @@ -0,0 +1,251 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * ## # incus.NetworkPeer + * + * Incus allows creating peer routing relationships between two OVN networks. Using this method, traffic between the two + * networks can go directly from one OVN network to the other and thus stays within the OVN subsystem, rather than transiting + * through the uplink network. + * + * > The peer resource is exclusively compatible with OVN (Open Virtual Network). + * + * For more information, please refer to [How to create peer routing relationships](https://linuxcontainers.org/incus/docs/main/howto/network_ovn_peers/) + * in the official Incus documentation. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const lan0 = new incus.Network("lan0", { + * name: "lan0", + * type: "ovn", + * config: {}, + * }); + * const lan1 = new incus.Network("lan1", { + * name: "lan1", + * type: "ovn", + * config: {}, + * }); + * const lan0Lan1 = new incus.NetworkPeer("lan0_lan1", { + * name: "lab0-lan1", + * description: "A meaningful description", + * network: lan0.name, + * project: "default", + * targetNetwork: lan1.name, + * targetProject: "default", + * }); + * const lan1Lan0 = new incus.NetworkPeer("lan1_lan0", { + * name: "lab1-lan0", + * description: "A meaningful description", + * network: lan1.name, + * project: "default", + * targetNetwork: lan0.name, + * targetProject: "default", + * }); + * ``` + */ +export class NetworkPeer extends pulumi.CustomResource { + /** + * Get an existing NetworkPeer resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: NetworkPeerState, opts?: pulumi.CustomResourceOptions): NetworkPeer { + return new NetworkPeer(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/networkPeer:NetworkPeer'; + + /** + * Returns true if the given object is an instance of NetworkPeer. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is NetworkPeer { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === NetworkPeer.__pulumiType; + } + + /** + * *Optional* - Configuration options as key/value pairs (only user.* custom keys supported) + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of the network peering + */ + public readonly description!: pulumi.Output; + /** + * **required** - Name of the network peering on the local network + */ + public readonly name!: pulumi.Output; + /** + * **Required** - Name of the local network. + */ + public readonly network!: pulumi.Output; + /** + * *Optional* - Name of the project where the network is located. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + public /*out*/ readonly status!: pulumi.Output; + public readonly targetIntegration!: pulumi.Output; + /** + * **required** - Which network to create a peering with (required at create time for local peers) + */ + public readonly targetNetwork!: pulumi.Output; + /** + * *Optional* - Which project the target network exists in (required at create time for local peers) + */ + public readonly targetProject!: pulumi.Output; + /** + * *Optional* - Type of network peering + */ + public readonly type!: pulumi.Output; + + /** + * Create a NetworkPeer resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: NetworkPeerArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: NetworkPeerArgs | NetworkPeerState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as NetworkPeerState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["network"] = state ? state.network : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + resourceInputs["status"] = state ? state.status : undefined; + resourceInputs["targetIntegration"] = state ? state.targetIntegration : undefined; + resourceInputs["targetNetwork"] = state ? state.targetNetwork : undefined; + resourceInputs["targetProject"] = state ? state.targetProject : undefined; + resourceInputs["type"] = state ? state.type : undefined; + } else { + const args = argsOrState as NetworkPeerArgs | undefined; + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["network"] = args ? args.network : undefined; + resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; + resourceInputs["remote"] = args ? args.remote : undefined; + resourceInputs["targetIntegration"] = args ? args.targetIntegration : undefined; + resourceInputs["targetNetwork"] = args ? args.targetNetwork : undefined; + resourceInputs["targetProject"] = args ? args.targetProject : undefined; + resourceInputs["type"] = args ? args.type : undefined; + resourceInputs["status"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(NetworkPeer.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering NetworkPeer resources. + */ +export interface NetworkPeerState { + /** + * *Optional* - Configuration options as key/value pairs (only user.* custom keys supported) + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network peering + */ + description?: pulumi.Input; + /** + * **required** - Name of the network peering on the local network + */ + name?: pulumi.Input; + /** + * **Required** - Name of the local network. + */ + network?: pulumi.Input; + /** + * *Optional* - Name of the project where the network is located. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + status?: pulumi.Input; + targetIntegration?: pulumi.Input; + /** + * **required** - Which network to create a peering with (required at create time for local peers) + */ + targetNetwork?: pulumi.Input; + /** + * *Optional* - Which project the target network exists in (required at create time for local peers) + */ + targetProject?: pulumi.Input; + /** + * *Optional* - Type of network peering + */ + type?: pulumi.Input; +} + +/** + * The set of arguments for constructing a NetworkPeer resource. + */ +export interface NetworkPeerArgs { + /** + * *Optional* - Configuration options as key/value pairs (only user.* custom keys supported) + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network peering + */ + description?: pulumi.Input; + /** + * **required** - Name of the network peering on the local network + */ + name?: pulumi.Input; + /** + * **Required** - Name of the local network. + */ + network?: pulumi.Input; + /** + * *Optional* - Name of the project where the network is located. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + targetIntegration?: pulumi.Input; + /** + * **required** - Which network to create a peering with (required at create time for local peers) + */ + targetNetwork?: pulumi.Input; + /** + * *Optional* - Which project the target network exists in (required at create time for local peers) + */ + targetProject?: pulumi.Input; + /** + * *Optional* - Type of network peering + */ + type?: pulumi.Input; +} diff --git a/sdk/nodejs/networkZone.ts b/sdk/nodejs/networkZone.ts new file mode 100644 index 0000000..d3aed9d --- /dev/null +++ b/sdk/nodejs/networkZone.ts @@ -0,0 +1,143 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +export class NetworkZone extends pulumi.CustomResource { + /** + * Get an existing NetworkZone resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: NetworkZoneState, opts?: pulumi.CustomResourceOptions): NetworkZone { + return new NetworkZone(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/networkZone:NetworkZone'; + + /** + * Returns true if the given object is an instance of NetworkZone. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is NetworkZone { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === NetworkZone.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of + * [network zoneConfig settings](https://linuxcontainers.org/incus/docs/main/howto/network_zones/#configuration-options). + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of the network zone. + */ + public readonly description!: pulumi.Output; + /** + * **Required** - Name of the network zone. + */ + public readonly name!: pulumi.Output; + /** + * *Optional* - Name of the project where the network zone will be created. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + + /** + * Create a NetworkZone resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: NetworkZoneArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: NetworkZoneArgs | NetworkZoneState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as NetworkZoneState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + } else { + const args = argsOrState as NetworkZoneArgs | undefined; + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; + resourceInputs["remote"] = args ? args.remote : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(NetworkZone.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering NetworkZone resources. + */ +export interface NetworkZoneState { + /** + * *Optional* - Map of key/value pairs of + * [network zoneConfig settings](https://linuxcontainers.org/incus/docs/main/howto/network_zones/#configuration-options). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network zone. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the network zone. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the network zone will be created. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} + +/** + * The set of arguments for constructing a NetworkZone resource. + */ +export interface NetworkZoneArgs { + /** + * *Optional* - Map of key/value pairs of + * [network zoneConfig settings](https://linuxcontainers.org/incus/docs/main/howto/network_zones/#configuration-options). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network zone. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the network zone. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the network zone will be created. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} diff --git a/sdk/nodejs/networkZoneRecord.ts b/sdk/nodejs/networkZoneRecord.ts new file mode 100644 index 0000000..cb52757 --- /dev/null +++ b/sdk/nodejs/networkZoneRecord.ts @@ -0,0 +1,176 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +export class NetworkZoneRecord extends pulumi.CustomResource { + /** + * Get an existing NetworkZoneRecord resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: NetworkZoneRecordState, opts?: pulumi.CustomResourceOptions): NetworkZoneRecord { + return new NetworkZoneRecord(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/networkZoneRecord:NetworkZoneRecord'; + + /** + * Returns true if the given object is an instance of NetworkZoneRecord. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is NetworkZoneRecord { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === NetworkZoneRecord.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of + * [network zoneConfig settings](https://linuxcontainers.org/incus/docs/main/howto/network_zones/#configuration-options). + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of the network zone. + */ + public readonly description!: pulumi.Output; + /** + * *Optional* - Entry in network zone record - see below. + */ + public readonly entries!: pulumi.Output; + /** + * **Required** - Name of the network zone record. + */ + public readonly name!: pulumi.Output; + /** + * *Optional* - Name of the project where the network zone record will be created. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + /** + * **Required** - Name of the zone to add the entries of this record. + */ + public readonly zone!: pulumi.Output; + + /** + * Create a NetworkZoneRecord resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: NetworkZoneRecordArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: NetworkZoneRecordArgs | NetworkZoneRecordState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as NetworkZoneRecordState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["entries"] = state ? state.entries : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + resourceInputs["zone"] = state ? state.zone : undefined; + } else { + const args = argsOrState as NetworkZoneRecordArgs | undefined; + if ((!args || args.zone === undefined) && !opts.urn) { + throw new Error("Missing required property 'zone'"); + } + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["entries"] = args ? args.entries : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; + resourceInputs["remote"] = args ? args.remote : undefined; + resourceInputs["zone"] = args ? args.zone : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(NetworkZoneRecord.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering NetworkZoneRecord resources. + */ +export interface NetworkZoneRecordState { + /** + * *Optional* - Map of key/value pairs of + * [network zoneConfig settings](https://linuxcontainers.org/incus/docs/main/howto/network_zones/#configuration-options). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network zone. + */ + description?: pulumi.Input; + /** + * *Optional* - Entry in network zone record - see below. + */ + entries?: pulumi.Input[]>; + /** + * **Required** - Name of the network zone record. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the network zone record will be created. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * **Required** - Name of the zone to add the entries of this record. + */ + zone?: pulumi.Input; +} + +/** + * The set of arguments for constructing a NetworkZoneRecord resource. + */ +export interface NetworkZoneRecordArgs { + /** + * *Optional* - Map of key/value pairs of + * [network zoneConfig settings](https://linuxcontainers.org/incus/docs/main/howto/network_zones/#configuration-options). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network zone. + */ + description?: pulumi.Input; + /** + * *Optional* - Entry in network zone record - see below. + */ + entries?: pulumi.Input[]>; + /** + * **Required** - Name of the network zone record. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the network zone record will be created. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * **Required** - Name of the zone to add the entries of this record. + */ + zone: pulumi.Input; +} diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json new file mode 100644 index 0000000..72fd088 --- /dev/null +++ b/sdk/nodejs/package.json @@ -0,0 +1,29 @@ +{ + "name": "@kiterun/incus", + "version": "1.0.0-alpha.0+dev", + "description": "A Pulumi package for creating and managing incus cloud resources.", + "keywords": [ + "incus", + "category/cloud", + "containers", + "nimbus" + ], + "homepage": "https://linuxcontainers.org", + "repository": "https://git.kalinow.ski/nimbus/pulumi-incus", + "license": "Apache-2.0", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "@pulumi/pulumi": "^3.142.0" + }, + "devDependencies": { + "@types/node": "^18", + "typescript": "^5.8.3" + }, + "pulumi": { + "resource": true, + "name": "incus", + "version": "1.0.0-alpha.0+dev" + } +} diff --git a/sdk/nodejs/profile.ts b/sdk/nodejs/profile.ts new file mode 100644 index 0000000..e06ee40 --- /dev/null +++ b/sdk/nodejs/profile.ts @@ -0,0 +1,159 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +export class Profile extends pulumi.CustomResource { + /** + * Get an existing Profile resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: ProfileState, opts?: pulumi.CustomResourceOptions): Profile { + return new Profile(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/profile:Profile'; + + /** + * Returns true if the given object is an instance of Profile. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is Profile { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === Profile.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of + * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of the profile. + */ + public readonly description!: pulumi.Output; + /** + * *Optional* - Device definition. See reference below. + */ + public readonly devices!: pulumi.Output; + /** + * **Required** - Name of the profile. + */ + public readonly name!: pulumi.Output; + /** + * *Optional* - Name of the project where the profile will be stored. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + + /** + * Create a Profile resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: ProfileArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: ProfileArgs | ProfileState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as ProfileState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["devices"] = state ? state.devices : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + } else { + const args = argsOrState as ProfileArgs | undefined; + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["devices"] = args ? args.devices : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; + resourceInputs["remote"] = args ? args.remote : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(Profile.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering Profile resources. + */ +export interface ProfileState { + /** + * *Optional* - Map of key/value pairs of + * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the profile. + */ + description?: pulumi.Input; + /** + * *Optional* - Device definition. See reference below. + */ + devices?: pulumi.Input[]>; + /** + * **Required** - Name of the profile. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the profile will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} + +/** + * The set of arguments for constructing a Profile resource. + */ +export interface ProfileArgs { + /** + * *Optional* - Map of key/value pairs of + * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the profile. + */ + description?: pulumi.Input; + /** + * *Optional* - Device definition. See reference below. + */ + devices?: pulumi.Input[]>; + /** + * **Required** - Name of the profile. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the profile will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} diff --git a/sdk/nodejs/project.ts b/sdk/nodejs/project.ts new file mode 100644 index 0000000..1174bf7 --- /dev/null +++ b/sdk/nodejs/project.ts @@ -0,0 +1,126 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +export class Project extends pulumi.CustomResource { + /** + * Get an existing Project resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: ProjectState, opts?: pulumi.CustomResourceOptions): Project { + return new Project(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/project:Project'; + + /** + * Returns true if the given object is an instance of Project. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is Project { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === Project.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of [project config settings](https://linuxcontainers.org/incus/docs/main/reference/projects/). + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of the project. + */ + public readonly description!: pulumi.Output; + /** + * **Required** - Name of the project. + */ + public readonly name!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + + /** + * Create a Project resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: ProjectArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: ProjectArgs | ProjectState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as ProjectState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + } else { + const args = argsOrState as ProjectArgs | undefined; + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["remote"] = args ? args.remote : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(Project.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering Project resources. + */ +export interface ProjectState { + /** + * *Optional* - Map of key/value pairs of [project config settings](https://linuxcontainers.org/incus/docs/main/reference/projects/). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the project. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the project. + */ + name?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} + +/** + * The set of arguments for constructing a Project resource. + */ +export interface ProjectArgs { + /** + * *Optional* - Map of key/value pairs of [project config settings](https://linuxcontainers.org/incus/docs/main/reference/projects/). + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the project. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the project. + */ + name?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} diff --git a/sdk/nodejs/provider.ts b/sdk/nodejs/provider.ts new file mode 100644 index 0000000..e0faf38 --- /dev/null +++ b/sdk/nodejs/provider.ts @@ -0,0 +1,87 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +/** + * The provider type for the incus package. By default, resources use package-wide configuration + * settings, however an explicit `Provider` instance may be created and passed during resource + * construction to achieve fine-grained programmatic control over provider settings. See the + * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information. + */ +export class Provider extends pulumi.ProviderResource { + /** @internal */ + public static readonly __pulumiType = 'incus'; + + /** + * Returns true if the given object is an instance of Provider. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is Provider { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType; + } + + /** + * The directory to look for existing Incus configuration. (default = $HOME/.config/incus) + */ + public readonly configDir!: pulumi.Output; + /** + * The project where project-scoped resources will be created. Can be overridden in individual resources. (default = + * default) + */ + public readonly project!: pulumi.Output; + + /** + * Create a Provider resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + { + resourceInputs["acceptRemoteCertificate"] = pulumi.output(args ? args.acceptRemoteCertificate : undefined).apply(JSON.stringify); + resourceInputs["configDir"] = args ? args.configDir : undefined; + resourceInputs["generateClientCertificates"] = pulumi.output(args ? args.generateClientCertificates : undefined).apply(JSON.stringify); + resourceInputs["project"] = args ? args.project : undefined; + resourceInputs["remotes"] = pulumi.output(args ? args.remotes : undefined).apply(JSON.stringify); + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(Provider.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * The set of arguments for constructing a Provider resource. + */ +export interface ProviderArgs { + /** + * Accept the server certificate. + */ + acceptRemoteCertificate?: pulumi.Input; + /** + * The directory to look for existing Incus configuration. (default = $HOME/.config/incus) + */ + configDir?: pulumi.Input; + /** + * Automatically generate the Incus client certificates if they don't exist. + */ + generateClientCertificates?: pulumi.Input; + /** + * The project where project-scoped resources will be created. Can be overridden in individual resources. (default = + * default) + */ + project?: pulumi.Input; + /** + * Incus Remote + */ + remotes?: pulumi.Input[]>; +} diff --git a/sdk/nodejs/storageBucket.ts b/sdk/nodejs/storageBucket.ts new file mode 100644 index 0000000..8d86e10 --- /dev/null +++ b/sdk/nodejs/storageBucket.ts @@ -0,0 +1,201 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +export class StorageBucket extends pulumi.CustomResource { + /** + * Get an existing StorageBucket resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: StorageBucketState, opts?: pulumi.CustomResourceOptions): StorageBucket { + return new StorageBucket(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/storageBucket:StorageBucket'; + + /** + * Returns true if the given object is an instance of StorageBucket. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is StorageBucket { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === StorageBucket.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of + * [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#configure-storage-bucket-settings). + * Config settings vary depending on the Storage Pool used. + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of the storage bucket. + */ + public readonly description!: pulumi.Output; + /** + * Name of the node where storage bucket was created. It could be useful with Incus in cluster mode. + */ + public /*out*/ readonly location!: pulumi.Output; + /** + * **Required** - Name of the storage bucket. + */ + public readonly name!: pulumi.Output; + /** + * **Required** - Name of storage pool to host the storage bucket. + */ + public readonly pool!: pulumi.Output; + /** + * *Optional* - Name of the project where the storage bucket will be stored. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + /** + * *Optional* - Path to a backup file from which the bucket will be created. + */ + public readonly sourceFile!: pulumi.Output; + /** + * *Optional* - Specify a target node in a cluster. + */ + public readonly target!: pulumi.Output; + + /** + * Create a StorageBucket resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: StorageBucketArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: StorageBucketArgs | StorageBucketState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as StorageBucketState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["location"] = state ? state.location : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["pool"] = state ? state.pool : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + resourceInputs["sourceFile"] = state ? state.sourceFile : undefined; + resourceInputs["target"] = state ? state.target : undefined; + } else { + const args = argsOrState as StorageBucketArgs | undefined; + if ((!args || args.pool === undefined) && !opts.urn) { + throw new Error("Missing required property 'pool'"); + } + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["pool"] = args ? args.pool : undefined; + resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; + resourceInputs["remote"] = args ? args.remote : undefined; + resourceInputs["sourceFile"] = args ? args.sourceFile : undefined; + resourceInputs["target"] = args ? args.target : undefined; + resourceInputs["location"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(StorageBucket.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering StorageBucket resources. + */ +export interface StorageBucketState { + /** + * *Optional* - Map of key/value pairs of + * [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#configure-storage-bucket-settings). + * Config settings vary depending on the Storage Pool used. + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the storage bucket. + */ + description?: pulumi.Input; + /** + * Name of the node where storage bucket was created. It could be useful with Incus in cluster mode. + */ + location?: pulumi.Input; + /** + * **Required** - Name of the storage bucket. + */ + name?: pulumi.Input; + /** + * **Required** - Name of storage pool to host the storage bucket. + */ + pool?: pulumi.Input; + /** + * *Optional* - Name of the project where the storage bucket will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Path to a backup file from which the bucket will be created. + */ + sourceFile?: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; +} + +/** + * The set of arguments for constructing a StorageBucket resource. + */ +export interface StorageBucketArgs { + /** + * *Optional* - Map of key/value pairs of + * [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#configure-storage-bucket-settings). + * Config settings vary depending on the Storage Pool used. + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the storage bucket. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the storage bucket. + */ + name?: pulumi.Input; + /** + * **Required** - Name of storage pool to host the storage bucket. + */ + pool: pulumi.Input; + /** + * *Optional* - Name of the project where the storage bucket will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Path to a backup file from which the bucket will be created. + */ + sourceFile?: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; +} diff --git a/sdk/nodejs/storageBucketKey.ts b/sdk/nodejs/storageBucketKey.ts new file mode 100644 index 0000000..35be4fd --- /dev/null +++ b/sdk/nodejs/storageBucketKey.ts @@ -0,0 +1,199 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +export class StorageBucketKey extends pulumi.CustomResource { + /** + * Get an existing StorageBucketKey resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: StorageBucketKeyState, opts?: pulumi.CustomResourceOptions): StorageBucketKey { + return new StorageBucketKey(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/storageBucketKey:StorageBucketKey'; + + /** + * Returns true if the given object is an instance of StorageBucketKey. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is StorageBucketKey { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === StorageBucketKey.__pulumiType; + } + + /** + * Access key of the storage bucket key. + */ + public /*out*/ readonly accessKey!: pulumi.Output; + /** + * *Optional* - Description of the storage bucket key. + */ + public readonly description!: pulumi.Output; + /** + * **Required** - Name of the storage bucket key. + */ + public readonly name!: pulumi.Output; + /** + * **Required** - Name of storage pool to host the storage bucket key. + */ + public readonly pool!: pulumi.Output; + /** + * *Optional* - Name of the project where the storage bucket key will be stored. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + /** + * *Optional* - Name of the role that controls the access rights for the + * key. If not specified, the default role is used, as described in the [official documentation](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#manage-storage-bucket-keys). + */ + public readonly role!: pulumi.Output; + /** + * Secret key of the storage bucket key. + */ + public /*out*/ readonly secretKey!: pulumi.Output; + /** + * **Required** - Name of the storage bucket. + */ + public readonly storageBucket!: pulumi.Output; + + /** + * Create a StorageBucketKey resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: StorageBucketKeyArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: StorageBucketKeyArgs | StorageBucketKeyState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as StorageBucketKeyState | undefined; + resourceInputs["accessKey"] = state ? state.accessKey : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["pool"] = state ? state.pool : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + resourceInputs["role"] = state ? state.role : undefined; + resourceInputs["secretKey"] = state ? state.secretKey : undefined; + resourceInputs["storageBucket"] = state ? state.storageBucket : undefined; + } else { + const args = argsOrState as StorageBucketKeyArgs | undefined; + if ((!args || args.pool === undefined) && !opts.urn) { + throw new Error("Missing required property 'pool'"); + } + if ((!args || args.storageBucket === undefined) && !opts.urn) { + throw new Error("Missing required property 'storageBucket'"); + } + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["pool"] = args ? args.pool : undefined; + resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; + resourceInputs["remote"] = args ? args.remote : undefined; + resourceInputs["role"] = args ? args.role : undefined; + resourceInputs["storageBucket"] = args ? args.storageBucket : undefined; + resourceInputs["accessKey"] = undefined /*out*/; + resourceInputs["secretKey"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + const secretOpts = { additionalSecretOutputs: ["accessKey", "secretKey"] }; + opts = pulumi.mergeOptions(opts, secretOpts); + super(StorageBucketKey.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering StorageBucketKey resources. + */ +export interface StorageBucketKeyState { + /** + * Access key of the storage bucket key. + */ + accessKey?: pulumi.Input; + /** + * *Optional* - Description of the storage bucket key. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the storage bucket key. + */ + name?: pulumi.Input; + /** + * **Required** - Name of storage pool to host the storage bucket key. + */ + pool?: pulumi.Input; + /** + * *Optional* - Name of the project where the storage bucket key will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Name of the role that controls the access rights for the + * key. If not specified, the default role is used, as described in the [official documentation](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#manage-storage-bucket-keys). + */ + role?: pulumi.Input; + /** + * Secret key of the storage bucket key. + */ + secretKey?: pulumi.Input; + /** + * **Required** - Name of the storage bucket. + */ + storageBucket?: pulumi.Input; +} + +/** + * The set of arguments for constructing a StorageBucketKey resource. + */ +export interface StorageBucketKeyArgs { + /** + * *Optional* - Description of the storage bucket key. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the storage bucket key. + */ + name?: pulumi.Input; + /** + * **Required** - Name of storage pool to host the storage bucket key. + */ + pool: pulumi.Input; + /** + * *Optional* - Name of the project where the storage bucket key will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Name of the role that controls the access rights for the + * key. If not specified, the default role is used, as described in the [official documentation](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#manage-storage-bucket-keys). + */ + role?: pulumi.Input; + /** + * **Required** - Name of the storage bucket. + */ + storageBucket: pulumi.Input; +} diff --git a/sdk/nodejs/storagePool.ts b/sdk/nodejs/storagePool.ts new file mode 100644 index 0000000..e4a2169 --- /dev/null +++ b/sdk/nodejs/storagePool.ts @@ -0,0 +1,177 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +export class StoragePool extends pulumi.CustomResource { + /** + * Get an existing StoragePool resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: StoragePoolState, opts?: pulumi.CustomResourceOptions): StoragePool { + return new StoragePool(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/storagePool:StoragePool'; + + /** + * Returns true if the given object is an instance of StoragePool. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is StoragePool { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === StoragePool.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of + * [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). + * Config settings vary from driver to driver. + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of the storage pool. + */ + public readonly description!: pulumi.Output; + /** + * **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `btrfs`, `ceph`, `cephfs`, or `cephobject`. + */ + public readonly driver!: pulumi.Output; + /** + * **Required** - Name of the storage pool. + */ + public readonly name!: pulumi.Output; + /** + * *Optional* - Name of the project where the storage pool will be stored. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + /** + * *Optional* - Specify a target node in a cluster. + */ + public readonly target!: pulumi.Output; + + /** + * Create a StoragePool resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: StoragePoolArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: StoragePoolArgs | StoragePoolState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as StoragePoolState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["driver"] = state ? state.driver : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + resourceInputs["target"] = state ? state.target : undefined; + } else { + const args = argsOrState as StoragePoolArgs | undefined; + if ((!args || args.driver === undefined) && !opts.urn) { + throw new Error("Missing required property 'driver'"); + } + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["driver"] = args ? args.driver : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; + resourceInputs["remote"] = args ? args.remote : undefined; + resourceInputs["target"] = args ? args.target : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(StoragePool.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering StoragePool resources. + */ +export interface StoragePoolState { + /** + * *Optional* - Map of key/value pairs of + * [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). + * Config settings vary from driver to driver. + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the storage pool. + */ + description?: pulumi.Input; + /** + * **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `btrfs`, `ceph`, `cephfs`, or `cephobject`. + */ + driver?: pulumi.Input; + /** + * **Required** - Name of the storage pool. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the storage pool will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; +} + +/** + * The set of arguments for constructing a StoragePool resource. + */ +export interface StoragePoolArgs { + /** + * *Optional* - Map of key/value pairs of + * [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). + * Config settings vary from driver to driver. + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the storage pool. + */ + description?: pulumi.Input; + /** + * **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `btrfs`, `ceph`, `cephfs`, or `cephobject`. + */ + driver: pulumi.Input; + /** + * **Required** - Name of the storage pool. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the storage pool will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; +} diff --git a/sdk/nodejs/storageVolume.ts b/sdk/nodejs/storageVolume.ts new file mode 100644 index 0000000..60c87be --- /dev/null +++ b/sdk/nodejs/storageVolume.ts @@ -0,0 +1,248 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +export class StorageVolume extends pulumi.CustomResource { + /** + * Get an existing StorageVolume resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: StorageVolumeState, opts?: pulumi.CustomResourceOptions): StorageVolume { + return new StorageVolume(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/storageVolume:StorageVolume'; + + /** + * Returns true if the given object is an instance of StorageVolume. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is StorageVolume { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === StorageVolume.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of + * [volume config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). + * Config settings vary depending on the Storage Pool used. + */ + public readonly config!: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Volume content type (`filesystem` or `block`) + */ + public readonly contentType!: pulumi.Output; + /** + * *Optional* - Description of the volume. + */ + public readonly description!: pulumi.Output; + /** + * Name of the node where volume was created. It could be useful with Incus in cluster mode. + */ + public /*out*/ readonly location!: pulumi.Output; + /** + * **Required** - Name of the storage volume. + */ + public readonly name!: pulumi.Output; + /** + * **Required** - Name of storage pool to host the volume. + */ + public readonly pool!: pulumi.Output; + /** + * *Optional* - Name of the project where the volume will be stored. + */ + public readonly project!: pulumi.Output; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + public readonly remote!: pulumi.Output; + /** + * *Optional* - Path to a backup file from which the volume will be created. + */ + public readonly sourceFile!: pulumi.Output; + /** + * *Optional* - The source volume from which the volume will be created. See reference below. + */ + public readonly sourceVolume!: pulumi.Output; + /** + * *Optional* - Specify a target node in a cluster. + */ + public readonly target!: pulumi.Output; + /** + * *Optional* - The "type" of volume. The default value is `custom`, + * which is the type to use for storage volumes attached to instances. + */ + public readonly type!: pulumi.Output; + + /** + * Create a StorageVolume resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: StorageVolumeArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: StorageVolumeArgs | StorageVolumeState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as StorageVolumeState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["contentType"] = state ? state.contentType : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["location"] = state ? state.location : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["pool"] = state ? state.pool : undefined; + resourceInputs["project"] = state ? state.project : undefined; + resourceInputs["remote"] = state ? state.remote : undefined; + resourceInputs["sourceFile"] = state ? state.sourceFile : undefined; + resourceInputs["sourceVolume"] = state ? state.sourceVolume : undefined; + resourceInputs["target"] = state ? state.target : undefined; + resourceInputs["type"] = state ? state.type : undefined; + } else { + const args = argsOrState as StorageVolumeArgs | undefined; + if ((!args || args.pool === undefined) && !opts.urn) { + throw new Error("Missing required property 'pool'"); + } + resourceInputs["config"] = args ? args.config : undefined; + resourceInputs["contentType"] = args ? args.contentType : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["pool"] = args ? args.pool : undefined; + resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; + resourceInputs["remote"] = args ? args.remote : undefined; + resourceInputs["sourceFile"] = args ? args.sourceFile : undefined; + resourceInputs["sourceVolume"] = args ? args.sourceVolume : undefined; + resourceInputs["target"] = args ? args.target : undefined; + resourceInputs["type"] = args ? args.type : undefined; + resourceInputs["location"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(StorageVolume.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering StorageVolume resources. + */ +export interface StorageVolumeState { + /** + * *Optional* - Map of key/value pairs of + * [volume config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). + * Config settings vary depending on the Storage Pool used. + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Volume content type (`filesystem` or `block`) + */ + contentType?: pulumi.Input; + /** + * *Optional* - Description of the volume. + */ + description?: pulumi.Input; + /** + * Name of the node where volume was created. It could be useful with Incus in cluster mode. + */ + location?: pulumi.Input; + /** + * **Required** - Name of the storage volume. + */ + name?: pulumi.Input; + /** + * **Required** - Name of storage pool to host the volume. + */ + pool?: pulumi.Input; + /** + * *Optional* - Name of the project where the volume will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Path to a backup file from which the volume will be created. + */ + sourceFile?: pulumi.Input; + /** + * *Optional* - The source volume from which the volume will be created. See reference below. + */ + sourceVolume?: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; + /** + * *Optional* - The "type" of volume. The default value is `custom`, + * which is the type to use for storage volumes attached to instances. + */ + type?: pulumi.Input; +} + +/** + * The set of arguments for constructing a StorageVolume resource. + */ +export interface StorageVolumeArgs { + /** + * *Optional* - Map of key/value pairs of + * [volume config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). + * Config settings vary depending on the Storage Pool used. + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Volume content type (`filesystem` or `block`) + */ + contentType?: pulumi.Input; + /** + * *Optional* - Description of the volume. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the storage volume. + */ + name?: pulumi.Input; + /** + * **Required** - Name of storage pool to host the volume. + */ + pool: pulumi.Input; + /** + * *Optional* - Name of the project where the volume will be stored. + */ + project?: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; + /** + * *Optional* - Path to a backup file from which the volume will be created. + */ + sourceFile?: pulumi.Input; + /** + * *Optional* - The source volume from which the volume will be created. See reference below. + */ + sourceVolume?: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; + /** + * *Optional* - The "type" of volume. The default value is `custom`, + * which is the type to use for storage volumes attached to instances. + */ + type?: pulumi.Input; +} diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json new file mode 100644 index 0000000..747bbdc --- /dev/null +++ b/sdk/nodejs/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + "outDir": "bin", + "target": "es2016", + "module": "commonjs", + "moduleResolution": "node", + "declaration": true, + "sourceMap": true, + "stripInternal": true, + "experimentalDecorators": true, + "noFallthroughCasesInSwitch": true, + "forceConsistentCasingInFileNames": true, + "strict": true + }, + "files": [ + "certificate.ts", + "clusterGroup.ts", + "clusterGroupAssignment.ts", + "config/index.ts", + "config/vars.ts", + "getImage.ts", + "getProfile.ts", + "getProject.ts", + "image.ts", + "index.ts", + "instance.ts", + "instanceSnapshot.ts", + "network.ts", + "networkAcl.ts", + "networkForward.ts", + "networkIntegration.ts", + "networkLb.ts", + "networkLoadBalancer.ts", + "networkPeer.ts", + "networkZone.ts", + "networkZoneRecord.ts", + "profile.ts", + "project.ts", + "provider.ts", + "storageBucket.ts", + "storageBucketKey.ts", + "storagePool.ts", + "storageVolume.ts", + "types/index.ts", + "types/input.ts", + "types/output.ts", + "utilities.ts" + ] +} diff --git a/sdk/nodejs/types/index.ts b/sdk/nodejs/types/index.ts new file mode 100644 index 0000000..c7b9909 --- /dev/null +++ b/sdk/nodejs/types/index.ts @@ -0,0 +1,13 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as utilities from "../utilities"; + +// Export sub-modules: +import * as input from "./input"; +import * as output from "./output"; + +export { + input, + output, +}; diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts new file mode 100644 index 0000000..edc98b1 --- /dev/null +++ b/sdk/nodejs/types/input.ts @@ -0,0 +1,426 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "../types/input"; +import * as outputs from "../types/output"; + +export interface GetProfileDevice { + /** + * **Required** - Name of the profile. + */ + name?: string; + /** + * Map of key/value pairs of + * [device properties](https://linuxcontainers.org/incus/docs/main/reference/devices/). + */ + properties?: {[key: string]: string}; + /** + * Type of the device Must be one of none, disk, nic, + * unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci. + */ + type?: string; +} + +export interface GetProfileDeviceArgs { + /** + * **Required** - Name of the profile. + */ + name?: pulumi.Input; + /** + * Map of key/value pairs of + * [device properties](https://linuxcontainers.org/incus/docs/main/reference/devices/). + */ + properties?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * Type of the device Must be one of none, disk, nic, + * unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci. + */ + type?: pulumi.Input; +} + +export interface ImageSourceFile { + /** + * **Required** - Either the path of an [unified image](https://linuxcontainers.org/incus/docs/main/reference/image_format/#image-format-unified) + * or the rootfs tarball of a [split image](https://linuxcontainers.org/incus/docs/main/reference/image_format/#image-format-split), depending on + * `metadataPath` being provided or not. + */ + dataPath: pulumi.Input; + /** + * *Optional* - Path to the metadata tarball of a [split image](https://linuxcontainers.org/incus/docs/main/reference/image_format/#image-format-split). + */ + metadataPath?: pulumi.Input; +} + +export interface ImageSourceImage { + /** + * *Optional* - The image architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. + */ + architecture?: pulumi.Input; + /** + * *Optional* - Whether to copy the aliases of the image from + * the remote. Valid values are `true` and `false`. + */ + copyAliases?: pulumi.Input; + /** + * **Required** - Name of the image. + */ + name: pulumi.Input; + /** + * **Required** - The remote where the image will be pulled from. + */ + remote: pulumi.Input; + /** + * *Optional* - Type of image to cache. Must be one of `container` or + * `virtual-machine`. Defaults to `container`. + */ + type?: pulumi.Input; +} + +export interface ImageSourceInstance { + /** + * **Required** - Name of the source instance. + */ + name: pulumi.Input; + /** + * *Optional* - Name of the snapshot of the source instance + */ + snapshot?: pulumi.Input; +} + +export interface InstanceDevice { + /** + * **Required** - Name of the device. + */ + name: pulumi.Input; + /** + * **Required** - Map of key/value pairs of + * [device properties](https://linuxcontainers.org/incus/docs/main/reference/devices/). + */ + properties: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * **Required** - Type of the device Must be one of none, disk, nic, + * unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci. + */ + type: pulumi.Input; +} + +export interface InstanceFile { + append?: pulumi.Input; + /** + * **Required** unless sourcePath is used* - The *contents* of the file. + * Use the `file()` function to read in the content of a file from disk. + */ + content?: pulumi.Input; + /** + * *Optional* - Whether to create the directories leading + * to the target if they do not exist. + */ + createDirectories?: pulumi.Input; + /** + * *Optional* - The GID of the file. Must be an unquoted integer. + */ + gid?: pulumi.Input; + /** + * *Optional* - The octal permissions of the file, must be quoted. Defaults to `0755`. + */ + mode?: pulumi.Input; + /** + * **Required** unless content is used* - The source path to a file to + * copy to the instance. + */ + sourcePath?: pulumi.Input; + /** + * **Required** - The absolute path of the file on the instance, + * including the filename. + */ + targetPath: pulumi.Input; + /** + * *Optional* - The UID of the file. Must be an unquoted integer. + */ + uid?: pulumi.Input; +} + +export interface InstanceSourceInstance { + /** + * **Required** - Name of the source instance. + */ + name: pulumi.Input; + /** + * **Required** - Name of the project in which the source instance exists. + */ + project: pulumi.Input; + /** + * *Optional* - Name of the snapshot of the source instance + */ + snapshot?: pulumi.Input; +} + +export interface InstanceWaitFor { + /** + * *Optional* - Delay time that should be waited for when type is `delay`, e.g. `30s`. + */ + delay?: pulumi.Input; + /** + * *Optional* - Network interface that should be waited for when type is `ipv4` or `ipv6`. + */ + nic?: pulumi.Input; + /** + * **Required** - Type for what should be waited for. Can be `agent`, `delay`, `ipv4`, `ipv6` or `ready`. + */ + type: pulumi.Input; +} + +export interface NetworkAclEgress { + /** + * **Required** - Action to take for matching traffic , must be one of allow, allow-stateless, drop, reject + */ + action: pulumi.Input; + /** + * *Optional* - Description of the network ACL rule. + */ + description?: pulumi.Input; + /** + * *Optional* - Comma-separated list of CIDR or IP ranges, destination subject name selectors (for egress rules), or empty for any + */ + destination?: pulumi.Input; + /** + * *Optional* - If protocol is `udp` or tcp, then a comma-separated list of ports or port ranges (start-end inclusive), or empty for any + */ + destinationPort?: pulumi.Input; + /** + * *Optional* - If protocol is `icmp4` or `icmp6`, then ICMP code number, or empty for any + */ + icmpCode?: pulumi.Input; + /** + * *Optional* - If protocol is `icmp4` or `icmp6`, then ICMP type number, or empty for any + */ + icmpType?: pulumi.Input; + /** + * *Optional* - If protocol is `udp` or `tcp`, then a comma-separated list of ports or port ranges (start-end inclusive), or empty for any + */ + protocol?: pulumi.Input; + /** + * *Optional* - Comma-separated list of CIDR or IP ranges, source subject name selectors (for ingress rules), or empty for any + */ + source?: pulumi.Input; + /** + * *Optional* - State of the rule (enabled, disabled or logged), defaulting to enabled if not specified + */ + state: pulumi.Input; +} + +export interface NetworkAclIngress { + /** + * **Required** - Action to take for matching traffic , must be one of allow, allow-stateless, drop, reject + */ + action: pulumi.Input; + /** + * *Optional* - Description of the network ACL rule. + */ + description?: pulumi.Input; + /** + * *Optional* - Comma-separated list of CIDR or IP ranges, destination subject name selectors (for egress rules), or empty for any + */ + destination?: pulumi.Input; + /** + * *Optional* - If protocol is `udp` or tcp, then a comma-separated list of ports or port ranges (start-end inclusive), or empty for any + */ + destinationPort?: pulumi.Input; + /** + * *Optional* - If protocol is `icmp4` or `icmp6`, then ICMP code number, or empty for any + */ + icmpCode?: pulumi.Input; + /** + * *Optional* - If protocol is `icmp4` or `icmp6`, then ICMP type number, or empty for any + */ + icmpType?: pulumi.Input; + /** + * *Optional* - If protocol is `udp` or `tcp`, then a comma-separated list of ports or port ranges (start-end inclusive), or empty for any + */ + protocol?: pulumi.Input; + /** + * *Optional* - Comma-separated list of CIDR or IP ranges, source subject name selectors (for ingress rules), or empty for any + */ + source?: pulumi.Input; + /** + * *Optional* - State of the rule (enabled, disabled or logged), defaulting to enabled if not specified + */ + state: pulumi.Input; +} + +export interface NetworkForwardPort { + /** + * *Optional* - Description of port(s) + */ + description?: pulumi.Input; + /** + * **Required** - Listen port(s) (e.g. `80,90-100`) + */ + listenPort: pulumi.Input; + /** + * **Required** - Protocol for the port(s) (`tcp` or `udp`). If not set then `tcp` will be used. + */ + protocol?: pulumi.Input; + /** + * **Required** - IP address to forward to + */ + targetAddress: pulumi.Input; + /** + * *Optional* - T arget port(s) (e.g. `70,80-90` or `90`), same as listenPort if empty + */ + targetPort: pulumi.Input; +} + +export interface NetworkLbBackend { + /** + * LB backend description + */ + description?: pulumi.Input; + /** + * LB backend name + */ + name: pulumi.Input; + /** + * LB backend target address + */ + targetAddress: pulumi.Input; + /** + * LB backend target port + */ + targetPort?: pulumi.Input; +} + +export interface NetworkLbPort { + /** + * Port description + */ + description?: pulumi.Input; + /** + * Port to listen to + */ + listenPort: pulumi.Input; + /** + * Port protocol + */ + protocol?: pulumi.Input; + /** + * List of target LB backends + */ + targetBackends: pulumi.Input[]>; +} + +export interface NetworkLoadBalancerBackend { + /** + * LB backend description + */ + description?: pulumi.Input; + /** + * LB backend name + */ + name: pulumi.Input; + /** + * LB backend target address + */ + targetAddress: pulumi.Input; + /** + * LB backend target port + */ + targetPort?: pulumi.Input; +} + +export interface NetworkLoadBalancerPort { + /** + * Port description + */ + description?: pulumi.Input; + /** + * Port to listen to + */ + listenPort: pulumi.Input; + /** + * Port protocol + */ + protocol?: pulumi.Input; + /** + * List of target LB backends + */ + targetBackends: pulumi.Input[]>; +} + +export interface NetworkZoneRecordEntry { + /** + * *Optional* - Entry time to live (TTL). + */ + ttl?: pulumi.Input; + /** + * **Required** - Entry type. Valid values are DNS record type, e.g. `A`, `AAAA`, `CNAME`, `TXT`, etc. + */ + type: pulumi.Input; + /** + * **Required** - Entry value. + */ + value: pulumi.Input; +} + +export interface ProfileDevice { + /** + * **Required** - Name of the device. + */ + name: pulumi.Input; + /** + * **Required** - Map of key/value pairs of + * [device properties](https://linuxcontainers.org/incus/docs/main/reference/devices/). + */ + properties: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * **Required** - Type of the device Must be one of none, disk, nic, + * unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci. + */ + type: pulumi.Input; +} + +export interface ProviderRemote { + /** + * The FQDN or IP where the Incus daemon can be contacted. (default = "" (read from lxc config)) + */ + address?: pulumi.Input; + /** + * Set this remote as default. + */ + default?: pulumi.Input; + /** + * Name of the Incus remote. Required when incusScheme set to https, to enable locating server certificate. + */ + name: pulumi.Input; + /** + * Port Incus Daemon API is listening on. (default = 8443) + */ + port?: pulumi.Input; + /** + * Unix (unix) or HTTPs (https). (default = unix) + */ + scheme?: pulumi.Input; + /** + * The trust token for the remote. + */ + token?: pulumi.Input; +} + +export interface StorageVolumeSourceVolume { + /** + * **Required** - Name of the storage volume. + */ + name: pulumi.Input; + /** + * **Required** - The storage pool that will receive the copy of the volume copy. + */ + pool: pulumi.Input; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} +export namespace config { +} diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts new file mode 100644 index 0000000..c1a32bd --- /dev/null +++ b/sdk/nodejs/types/output.ts @@ -0,0 +1,410 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "../types/input"; +import * as outputs from "../types/output"; + +export interface GetProfileDevice { + /** + * **Required** - Name of the profile. + */ + name: string; + /** + * Map of key/value pairs of + * [device properties](https://linuxcontainers.org/incus/docs/main/reference/devices/). + */ + properties: {[key: string]: string}; + /** + * Type of the device Must be one of none, disk, nic, + * unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci. + */ + type: string; +} + +export interface ImageSourceFile { + /** + * **Required** - Either the path of an [unified image](https://linuxcontainers.org/incus/docs/main/reference/image_format/#image-format-unified) + * or the rootfs tarball of a [split image](https://linuxcontainers.org/incus/docs/main/reference/image_format/#image-format-split), depending on + * `metadataPath` being provided or not. + */ + dataPath: string; + /** + * *Optional* - Path to the metadata tarball of a [split image](https://linuxcontainers.org/incus/docs/main/reference/image_format/#image-format-split). + */ + metadataPath?: string; +} + +export interface ImageSourceImage { + /** + * *Optional* - The image architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. + */ + architecture: string; + /** + * *Optional* - Whether to copy the aliases of the image from + * the remote. Valid values are `true` and `false`. + */ + copyAliases?: boolean; + /** + * **Required** - Name of the image. + */ + name: string; + /** + * **Required** - The remote where the image will be pulled from. + */ + remote: string; + /** + * *Optional* - Type of image to cache. Must be one of `container` or + * `virtual-machine`. Defaults to `container`. + */ + type: string; +} + +export interface ImageSourceInstance { + /** + * **Required** - Name of the source instance. + */ + name: string; + /** + * *Optional* - Name of the snapshot of the source instance + */ + snapshot?: string; +} + +export interface InstanceDevice { + /** + * **Required** - Name of the device. + */ + name: string; + /** + * **Required** - Map of key/value pairs of + * [device properties](https://linuxcontainers.org/incus/docs/main/reference/devices/). + */ + properties: {[key: string]: string}; + /** + * **Required** - Type of the device Must be one of none, disk, nic, + * unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci. + */ + type: string; +} + +export interface InstanceFile { + append: boolean; + /** + * **Required** unless sourcePath is used* - The *contents* of the file. + * Use the `file()` function to read in the content of a file from disk. + */ + content?: string; + /** + * *Optional* - Whether to create the directories leading + * to the target if they do not exist. + */ + createDirectories?: boolean; + /** + * *Optional* - The GID of the file. Must be an unquoted integer. + */ + gid?: number; + /** + * *Optional* - The octal permissions of the file, must be quoted. Defaults to `0755`. + */ + mode: string; + /** + * **Required** unless content is used* - The source path to a file to + * copy to the instance. + */ + sourcePath?: string; + /** + * **Required** - The absolute path of the file on the instance, + * including the filename. + */ + targetPath: string; + /** + * *Optional* - The UID of the file. Must be an unquoted integer. + */ + uid?: number; +} + +export interface InstanceSourceInstance { + /** + * **Required** - Name of the source instance. + */ + name: string; + /** + * **Required** - Name of the project in which the source instance exists. + */ + project: string; + /** + * *Optional* - Name of the snapshot of the source instance + */ + snapshot?: string; +} + +export interface InstanceWaitFor { + /** + * *Optional* - Delay time that should be waited for when type is `delay`, e.g. `30s`. + */ + delay?: string; + /** + * *Optional* - Network interface that should be waited for when type is `ipv4` or `ipv6`. + */ + nic?: string; + /** + * **Required** - Type for what should be waited for. Can be `agent`, `delay`, `ipv4`, `ipv6` or `ready`. + */ + type: string; +} + +export interface NetworkAclEgress { + /** + * **Required** - Action to take for matching traffic , must be one of allow, allow-stateless, drop, reject + */ + action: string; + /** + * *Optional* - Description of the network ACL rule. + */ + description: string; + /** + * *Optional* - Comma-separated list of CIDR or IP ranges, destination subject name selectors (for egress rules), or empty for any + */ + destination: string; + /** + * *Optional* - If protocol is `udp` or tcp, then a comma-separated list of ports or port ranges (start-end inclusive), or empty for any + */ + destinationPort: string; + /** + * *Optional* - If protocol is `icmp4` or `icmp6`, then ICMP code number, or empty for any + */ + icmpCode: string; + /** + * *Optional* - If protocol is `icmp4` or `icmp6`, then ICMP type number, or empty for any + */ + icmpType: string; + /** + * *Optional* - If protocol is `udp` or `tcp`, then a comma-separated list of ports or port ranges (start-end inclusive), or empty for any + */ + protocol: string; + /** + * *Optional* - Comma-separated list of CIDR or IP ranges, source subject name selectors (for ingress rules), or empty for any + */ + source: string; + /** + * *Optional* - State of the rule (enabled, disabled or logged), defaulting to enabled if not specified + */ + state: string; +} + +export interface NetworkAclIngress { + /** + * **Required** - Action to take for matching traffic , must be one of allow, allow-stateless, drop, reject + */ + action: string; + /** + * *Optional* - Description of the network ACL rule. + */ + description: string; + /** + * *Optional* - Comma-separated list of CIDR or IP ranges, destination subject name selectors (for egress rules), or empty for any + */ + destination: string; + /** + * *Optional* - If protocol is `udp` or tcp, then a comma-separated list of ports or port ranges (start-end inclusive), or empty for any + */ + destinationPort: string; + /** + * *Optional* - If protocol is `icmp4` or `icmp6`, then ICMP code number, or empty for any + */ + icmpCode: string; + /** + * *Optional* - If protocol is `icmp4` or `icmp6`, then ICMP type number, or empty for any + */ + icmpType: string; + /** + * *Optional* - If protocol is `udp` or `tcp`, then a comma-separated list of ports or port ranges (start-end inclusive), or empty for any + */ + protocol: string; + /** + * *Optional* - Comma-separated list of CIDR or IP ranges, source subject name selectors (for ingress rules), or empty for any + */ + source: string; + /** + * *Optional* - State of the rule (enabled, disabled or logged), defaulting to enabled if not specified + */ + state: string; +} + +export interface NetworkForwardPort { + /** + * *Optional* - Description of port(s) + */ + description?: string; + /** + * **Required** - Listen port(s) (e.g. `80,90-100`) + */ + listenPort: string; + /** + * **Required** - Protocol for the port(s) (`tcp` or `udp`). If not set then `tcp` will be used. + */ + protocol: string; + /** + * **Required** - IP address to forward to + */ + targetAddress: string; + /** + * *Optional* - T arget port(s) (e.g. `70,80-90` or `90`), same as listenPort if empty + */ + targetPort: string; +} + +export interface NetworkLbBackend { + /** + * LB backend description + */ + description: string; + /** + * LB backend name + */ + name: string; + /** + * LB backend target address + */ + targetAddress: string; + /** + * LB backend target port + */ + targetPort: string; +} + +export interface NetworkLbPort { + /** + * Port description + */ + description: string; + /** + * Port to listen to + */ + listenPort: string; + /** + * Port protocol + */ + protocol: string; + /** + * List of target LB backends + */ + targetBackends: string[]; +} + +export interface NetworkLoadBalancerBackend { + /** + * LB backend description + */ + description: string; + /** + * LB backend name + */ + name: string; + /** + * LB backend target address + */ + targetAddress: string; + /** + * LB backend target port + */ + targetPort: string; +} + +export interface NetworkLoadBalancerPort { + /** + * Port description + */ + description: string; + /** + * Port to listen to + */ + listenPort: string; + /** + * Port protocol + */ + protocol: string; + /** + * List of target LB backends + */ + targetBackends: string[]; +} + +export interface NetworkZoneRecordEntry { + /** + * *Optional* - Entry time to live (TTL). + */ + ttl: number; + /** + * **Required** - Entry type. Valid values are DNS record type, e.g. `A`, `AAAA`, `CNAME`, `TXT`, etc. + */ + type: string; + /** + * **Required** - Entry value. + */ + value: string; +} + +export interface ProfileDevice { + /** + * **Required** - Name of the device. + */ + name: string; + /** + * **Required** - Map of key/value pairs of + * [device properties](https://linuxcontainers.org/incus/docs/main/reference/devices/). + */ + properties: {[key: string]: string}; + /** + * **Required** - Type of the device Must be one of none, disk, nic, + * unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci. + */ + type: string; +} + +export interface StorageVolumeSourceVolume { + /** + * **Required** - Name of the storage volume. + */ + name: string; + /** + * **Required** - The storage pool that will receive the copy of the volume copy. + */ + pool: string; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + remote?: string; +} + +export namespace config { + export interface Remotes { + /** + * The FQDN or IP where the Incus daemon can be contacted. (default = "" (read from lxc config)) + */ + address?: string; + /** + * Set this remote as default. + */ + default?: boolean; + /** + * Name of the Incus remote. Required when incusScheme set to https, to enable locating server certificate. + */ + name: string; + /** + * Port Incus Daemon API is listening on. (default = 8443) + */ + port?: string; + /** + * Unix (unix) or HTTPs (https). (default = unix) + */ + scheme?: string; + /** + * The trust token for the remote. + */ + token?: string; + } + +} diff --git a/sdk/nodejs/utilities.ts b/sdk/nodejs/utilities.ts new file mode 100644 index 0000000..080cc82 --- /dev/null +++ b/sdk/nodejs/utilities.ts @@ -0,0 +1,95 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + + +import * as runtime from "@pulumi/pulumi/runtime"; +import * as pulumi from "@pulumi/pulumi"; + +export function getEnv(...vars: string[]): string | undefined { + for (const v of vars) { + const value = process.env[v]; + if (value) { + return value; + } + } + return undefined; +} + +export function getEnvBoolean(...vars: string[]): boolean | undefined { + const s = getEnv(...vars); + if (s !== undefined) { + // NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what + // Terraform uses internally when parsing boolean values. + if (["1", "t", "T", "true", "TRUE", "True"].find(v => v === s) !== undefined) { + return true; + } + if (["0", "f", "F", "false", "FALSE", "False"].find(v => v === s) !== undefined) { + return false; + } + } + return undefined; +} + +export function getEnvNumber(...vars: string[]): number | undefined { + const s = getEnv(...vars); + if (s !== undefined) { + const f = parseFloat(s); + if (!isNaN(f)) { + return f; + } + } + return undefined; +} + +export function getVersion(): string { + let version = require('./package.json').version; + // Node allows for the version to be prefixed by a "v", while semver doesn't. + // If there is a v, strip it off. + if (version.indexOf('v') === 0) { + version = version.slice(1); + } + return version; +} + +/** @internal */ +export function resourceOptsDefaults(): any { + return { version: getVersion() }; +} + +/** @internal */ +export function lazyLoad(exports: any, props: string[], loadModule: any) { + for (let property of props) { + Object.defineProperty(exports, property, { + enumerable: true, + get: function() { + return loadModule()[property]; + }, + }); + } +} + +export async function callAsync( + tok: string, + props: pulumi.Inputs, + res?: pulumi.Resource, + opts?: {property?: string}, +): Promise { + const o: any = runtime.call(tok, props, res); + const value = await o.promise(true /*withUnknowns*/); + const isKnown = await o.isKnown; + const isSecret = await o.isSecret; + const problem: string|undefined = + !isKnown ? "an unknown value" + : isSecret ? "a secret value" + : undefined; + // Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency. + if (problem) { + throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` + + "This is an error in the provider, please report this to the provider developer."); + } + // Extract a single property if requested. + if (opts && opts.property) { + return value[opts.property]; + } + return value; +}