diff --git a/examples/go.mod b/examples/go.mod index 15b918a5..9c707868 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,7 +2,7 @@ module github.com/pulumi/pulumi-libvirt/examples go 1.21 -require github.com/pulumi/pulumi/pkg/v3 v3.114.0 +require github.com/pulumi/pulumi/pkg/v3 v3.116.1 require ( cloud.google.com/go v0.112.1 // indirect @@ -138,7 +138,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.6.2 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.114.0 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.116.1 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect diff --git a/examples/go.sum b/examples/go.sum index ebb5c6db..4cc148f5 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -1477,10 +1477,10 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= -github.com/pulumi/pulumi/pkg/v3 v3.114.0 h1:+Ru1DfQKKmZcTYF7i+IWTaxvHX+vIWmVPyUXXksM3Uk= -github.com/pulumi/pulumi/pkg/v3 v3.114.0/go.mod h1:kNu4WL3BkF8zZ+1BTIWnEetNN1JtR4oRHWlxH2NZ6s0= -github.com/pulumi/pulumi/sdk/v3 v3.114.0 h1:KPBSvm04wE2/AdS8PlABxZAW4o7pSAnar0QOooH13no= -github.com/pulumi/pulumi/sdk/v3 v3.114.0/go.mod h1:d6LZJHqEfpgXUd8rFSSsbaPJcocZObXeaUr87jbA5MY= +github.com/pulumi/pulumi/pkg/v3 v3.116.1 h1:yeXAc7Pk5fUa9fvHhvsiO2ydEEZaqV+xwR+D1j6m3Bg= +github.com/pulumi/pulumi/pkg/v3 v3.116.1/go.mod h1:EvZSqsOyNPpqpPXr4td8Y454swkuD/nsyHTLoWm6qDQ= +github.com/pulumi/pulumi/sdk/v3 v3.116.1 h1:P/bIDPQYy1UJogLeV/zY+bG4iTZgEEJLlwyUYEW3NPc= +github.com/pulumi/pulumi/sdk/v3 v3.116.1/go.mod h1:d6LZJHqEfpgXUd8rFSSsbaPJcocZObXeaUr87jbA5MY= github.com/rakyll/embedmd v0.0.0-20171029212350-c8060a0752a2/go.mod h1:7jOTMgqac46PZcF54q6l2hkLEG8op93fZu61KmxWDV4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= diff --git a/provider/cmd/pulumi-resource-libvirt/schema.json b/provider/cmd/pulumi-resource-libvirt/schema.json index 0dce154b..10aea762 100644 --- a/provider/cmd/pulumi-resource-libvirt/schema.json +++ b/provider/cmd/pulumi-resource-libvirt/schema.json @@ -159,7 +159,7 @@ }, "wwn": { "type": "string", - "description": "Specify a WWN to use for the disk if the disk is using\na scsi controller, if not specified then a random wwn is generated for the disk\n\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as libvirt from \"@pulumi/libvirt\";\n\nconst leap = new libvirt.Volume(\"leap\", {\n name: \"leap\",\n source: \"http://someurl/openSUSE_Leap-42.1.qcow2\",\n});\nconst mydisk = new libvirt.Volume(\"mydisk\", {\n name: \"mydisk\",\n baseVolumeId: leap.id,\n});\nconst domain1 = new libvirt.Domain(\"domain1\", {\n name: \"domain1\",\n disks: [\n {\n volumeId: mydisk.id,\n scsi: true,\n },\n {\n url: \"http://foo.com/install.iso\",\n },\n {\n file: \"/absolute/path/to/disk.iso\",\n },\n {\n blockDevice: \"/dev/mapper/36005076802810e55400000000000145f\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_libvirt as libvirt\n\nleap = libvirt.Volume(\"leap\",\n name=\"leap\",\n source=\"http://someurl/openSUSE_Leap-42.1.qcow2\")\nmydisk = libvirt.Volume(\"mydisk\",\n name=\"mydisk\",\n base_volume_id=leap.id)\ndomain1 = libvirt.Domain(\"domain1\",\n name=\"domain1\",\n disks=[\n libvirt.DomainDiskArgs(\n volume_id=mydisk.id,\n scsi=True,\n ),\n libvirt.DomainDiskArgs(\n url=\"http://foo.com/install.iso\",\n ),\n libvirt.DomainDiskArgs(\n file=\"/absolute/path/to/disk.iso\",\n ),\n libvirt.DomainDiskArgs(\n block_device=\"/dev/mapper/36005076802810e55400000000000145f\",\n ),\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Libvirt = Pulumi.Libvirt;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var leap = new Libvirt.Volume(\"leap\", new()\n {\n Name = \"leap\",\n Source = \"http://someurl/openSUSE_Leap-42.1.qcow2\",\n });\n\n var mydisk = new Libvirt.Volume(\"mydisk\", new()\n {\n Name = \"mydisk\",\n BaseVolumeId = leap.Id,\n });\n\n var domain1 = new Libvirt.Domain(\"domain1\", new()\n {\n Name = \"domain1\",\n Disks = new[]\n {\n new Libvirt.Inputs.DomainDiskArgs\n {\n VolumeId = mydisk.Id,\n Scsi = true,\n },\n new Libvirt.Inputs.DomainDiskArgs\n {\n Url = \"http://foo.com/install.iso\",\n },\n new Libvirt.Inputs.DomainDiskArgs\n {\n File = \"/absolute/path/to/disk.iso\",\n },\n new Libvirt.Inputs.DomainDiskArgs\n {\n BlockDevice = \"/dev/mapper/36005076802810e55400000000000145f\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-libvirt/sdk/go/libvirt\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tleap, err := libvirt.NewVolume(ctx, \"leap\", \u0026libvirt.VolumeArgs{\n\t\t\tName: pulumi.String(\"leap\"),\n\t\t\tSource: pulumi.String(\"http://someurl/openSUSE_Leap-42.1.qcow2\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tmydisk, err := libvirt.NewVolume(ctx, \"mydisk\", \u0026libvirt.VolumeArgs{\n\t\t\tName: pulumi.String(\"mydisk\"),\n\t\t\tBaseVolumeId: leap.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = libvirt.NewDomain(ctx, \"domain1\", \u0026libvirt.DomainArgs{\n\t\t\tName: pulumi.String(\"domain1\"),\n\t\t\tDisks: libvirt.DomainDiskArray{\n\t\t\t\t\u0026libvirt.DomainDiskArgs{\n\t\t\t\t\tVolumeId: mydisk.ID(),\n\t\t\t\t\tScsi: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t\t\u0026libvirt.DomainDiskArgs{\n\t\t\t\t\tUrl: pulumi.String(\"http://foo.com/install.iso\"),\n\t\t\t\t},\n\t\t\t\t\u0026libvirt.DomainDiskArgs{\n\t\t\t\t\tFile: pulumi.String(\"/absolute/path/to/disk.iso\"),\n\t\t\t\t},\n\t\t\t\t\u0026libvirt.DomainDiskArgs{\n\t\t\t\t\tBlockDevice: pulumi.String(\"/dev/mapper/36005076802810e55400000000000145f\"),\n\t\t\t\t},\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.libvirt.Volume;\nimport com.pulumi.libvirt.VolumeArgs;\nimport com.pulumi.libvirt.Domain;\nimport com.pulumi.libvirt.DomainArgs;\nimport com.pulumi.libvirt.inputs.DomainDiskArgs;\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 leap = new Volume(\"leap\", VolumeArgs.builder() \n .name(\"leap\")\n .source(\"http://someurl/openSUSE_Leap-42.1.qcow2\")\n .build());\n\n var mydisk = new Volume(\"mydisk\", VolumeArgs.builder() \n .name(\"mydisk\")\n .baseVolumeId(leap.id())\n .build());\n\n var domain1 = new Domain(\"domain1\", DomainArgs.builder() \n .name(\"domain1\")\n .disks( \n DomainDiskArgs.builder()\n .volumeId(mydisk.id())\n .scsi(\"true\")\n .build(),\n DomainDiskArgs.builder()\n .url(\"http://foo.com/install.iso\")\n .build(),\n DomainDiskArgs.builder()\n .file(\"/absolute/path/to/disk.iso\")\n .build(),\n DomainDiskArgs.builder()\n .blockDevice(\"/dev/mapper/36005076802810e55400000000000145f\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n leap:\n type: libvirt:Volume\n properties:\n name: leap\n source: http://someurl/openSUSE_Leap-42.1.qcow2\n mydisk:\n type: libvirt:Volume\n properties:\n name: mydisk\n baseVolumeId: ${leap.id}\n domain1:\n type: libvirt:Domain\n properties:\n name: domain1\n disks:\n - volumeId: ${mydisk.id}\n scsi: 'true'\n - url: http://foo.com/install.iso\n - file: /absolute/path/to/disk.iso\n - blockDevice: /dev/mapper/36005076802810e55400000000000145f\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nAlso note that the `disk` block is actually a list of maps, so it is possible to\ndeclare several of them by using either the literal list and map syntax as in\nthe following examples:\n\n" + "description": "Specify a WWN to use for the disk if the disk is using\na scsi controller, if not specified then a random wwn is generated for the disk\n\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as libvirt from \"@pulumi/libvirt\";\n\nconst leap = new libvirt.Volume(\"leap\", {\n name: \"leap\",\n source: \"http://someurl/openSUSE_Leap-42.1.qcow2\",\n});\nconst mydisk = new libvirt.Volume(\"mydisk\", {\n name: \"mydisk\",\n baseVolumeId: leap.id,\n});\nconst domain1 = new libvirt.Domain(\"domain1\", {\n name: \"domain1\",\n disks: [\n {\n volumeId: mydisk.id,\n scsi: true,\n },\n {\n url: \"http://foo.com/install.iso\",\n },\n {\n file: \"/absolute/path/to/disk.iso\",\n },\n {\n blockDevice: \"/dev/mapper/36005076802810e55400000000000145f\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_libvirt as libvirt\n\nleap = libvirt.Volume(\"leap\",\n name=\"leap\",\n source=\"http://someurl/openSUSE_Leap-42.1.qcow2\")\nmydisk = libvirt.Volume(\"mydisk\",\n name=\"mydisk\",\n base_volume_id=leap.id)\ndomain1 = libvirt.Domain(\"domain1\",\n name=\"domain1\",\n disks=[\n libvirt.DomainDiskArgs(\n volume_id=mydisk.id,\n scsi=True,\n ),\n libvirt.DomainDiskArgs(\n url=\"http://foo.com/install.iso\",\n ),\n libvirt.DomainDiskArgs(\n file=\"/absolute/path/to/disk.iso\",\n ),\n libvirt.DomainDiskArgs(\n block_device=\"/dev/mapper/36005076802810e55400000000000145f\",\n ),\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Libvirt = Pulumi.Libvirt;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var leap = new Libvirt.Volume(\"leap\", new()\n {\n Name = \"leap\",\n Source = \"http://someurl/openSUSE_Leap-42.1.qcow2\",\n });\n\n var mydisk = new Libvirt.Volume(\"mydisk\", new()\n {\n Name = \"mydisk\",\n BaseVolumeId = leap.Id,\n });\n\n var domain1 = new Libvirt.Domain(\"domain1\", new()\n {\n Name = \"domain1\",\n Disks = new[]\n {\n new Libvirt.Inputs.DomainDiskArgs\n {\n VolumeId = mydisk.Id,\n Scsi = true,\n },\n new Libvirt.Inputs.DomainDiskArgs\n {\n Url = \"http://foo.com/install.iso\",\n },\n new Libvirt.Inputs.DomainDiskArgs\n {\n File = \"/absolute/path/to/disk.iso\",\n },\n new Libvirt.Inputs.DomainDiskArgs\n {\n BlockDevice = \"/dev/mapper/36005076802810e55400000000000145f\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-libvirt/sdk/go/libvirt\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tleap, err := libvirt.NewVolume(ctx, \"leap\", \u0026libvirt.VolumeArgs{\n\t\t\tName: pulumi.String(\"leap\"),\n\t\t\tSource: pulumi.String(\"http://someurl/openSUSE_Leap-42.1.qcow2\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tmydisk, err := libvirt.NewVolume(ctx, \"mydisk\", \u0026libvirt.VolumeArgs{\n\t\t\tName: pulumi.String(\"mydisk\"),\n\t\t\tBaseVolumeId: leap.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = libvirt.NewDomain(ctx, \"domain1\", \u0026libvirt.DomainArgs{\n\t\t\tName: pulumi.String(\"domain1\"),\n\t\t\tDisks: libvirt.DomainDiskArray{\n\t\t\t\t\u0026libvirt.DomainDiskArgs{\n\t\t\t\t\tVolumeId: mydisk.ID(),\n\t\t\t\t\tScsi: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t\t\u0026libvirt.DomainDiskArgs{\n\t\t\t\t\tUrl: pulumi.String(\"http://foo.com/install.iso\"),\n\t\t\t\t},\n\t\t\t\t\u0026libvirt.DomainDiskArgs{\n\t\t\t\t\tFile: pulumi.String(\"/absolute/path/to/disk.iso\"),\n\t\t\t\t},\n\t\t\t\t\u0026libvirt.DomainDiskArgs{\n\t\t\t\t\tBlockDevice: pulumi.String(\"/dev/mapper/36005076802810e55400000000000145f\"),\n\t\t\t\t},\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.libvirt.Volume;\nimport com.pulumi.libvirt.VolumeArgs;\nimport com.pulumi.libvirt.Domain;\nimport com.pulumi.libvirt.DomainArgs;\nimport com.pulumi.libvirt.inputs.DomainDiskArgs;\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 leap = new Volume(\"leap\", VolumeArgs.builder()\n .name(\"leap\")\n .source(\"http://someurl/openSUSE_Leap-42.1.qcow2\")\n .build());\n\n var mydisk = new Volume(\"mydisk\", VolumeArgs.builder()\n .name(\"mydisk\")\n .baseVolumeId(leap.id())\n .build());\n\n var domain1 = new Domain(\"domain1\", DomainArgs.builder()\n .name(\"domain1\")\n .disks( \n DomainDiskArgs.builder()\n .volumeId(mydisk.id())\n .scsi(\"true\")\n .build(),\n DomainDiskArgs.builder()\n .url(\"http://foo.com/install.iso\")\n .build(),\n DomainDiskArgs.builder()\n .file(\"/absolute/path/to/disk.iso\")\n .build(),\n DomainDiskArgs.builder()\n .blockDevice(\"/dev/mapper/36005076802810e55400000000000145f\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n leap:\n type: libvirt:Volume\n properties:\n name: leap\n source: http://someurl/openSUSE_Leap-42.1.qcow2\n mydisk:\n type: libvirt:Volume\n properties:\n name: mydisk\n baseVolumeId: ${leap.id}\n domain1:\n type: libvirt:Domain\n properties:\n name: domain1\n disks:\n - volumeId: ${mydisk.id}\n scsi: 'true'\n - url: http://foo.com/install.iso\n - file: /absolute/path/to/disk.iso\n - blockDevice: /dev/mapper/36005076802810e55400000000000145f\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nAlso note that the `disk` block is actually a list of maps, so it is possible to\ndeclare several of them by using either the literal list and map syntax as in\nthe following examples:\n\n" } }, "type": "object" @@ -167,16 +167,20 @@ "libvirt:index/DomainFilesystem:DomainFilesystem": { "properties": { "accessmode": { - "type": "string" + "type": "string", + "description": "specifies the security mode for accessing the source. By default\nthe `mapped` mode is chosen.\n" }, "readonly": { - "type": "boolean" + "type": "boolean", + "description": "enables exporting filesystem as a readonly mount for guest, by\ndefault read-only access is given.\n\nExample:\n\n" }, "source": { - "type": "string" + "type": "string", + "description": "the directory of the host to be shared with the guest.\n" }, "target": { - "type": "string" + "type": "string", + "description": "an arbitrary string tag that is exported to the guest as a hint for\nwhere to mount the source.\n" } }, "type": "object", @@ -613,7 +617,7 @@ } }, "libvirt:index/domain:Domain": { - "description": "Manages a VM domain resource within libvirt. For more information see\n[the official documentation](https://libvirt.org/formatdomain.html).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as libvirt from \"@pulumi/libvirt\";\n\nconst _default = new libvirt.Domain(\"default\", {name: \"test\"});\n```\n```python\nimport pulumi\nimport pulumi_libvirt as libvirt\n\ndefault = libvirt.Domain(\"default\", name=\"test\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Libvirt = Pulumi.Libvirt;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @default = new Libvirt.Domain(\"default\", new()\n {\n Name = \"test\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-libvirt/sdk/go/libvirt\"\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 := libvirt.NewDomain(ctx, \"default\", \u0026libvirt.DomainArgs{\n\t\t\tName: pulumi.String(\"test\"),\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.libvirt.Domain;\nimport com.pulumi.libvirt.DomainArgs;\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 Domain(\"default\", DomainArgs.builder() \n .name(\"test\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n default:\n type: libvirt:Domain\n properties:\n name: test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Manages a VM domain resource within libvirt. For more information see\n[the official documentation](https://libvirt.org/formatdomain.html).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as libvirt from \"@pulumi/libvirt\";\n\nconst _default = new libvirt.Domain(\"default\", {name: \"test\"});\n```\n```python\nimport pulumi\nimport pulumi_libvirt as libvirt\n\ndefault = libvirt.Domain(\"default\", name=\"test\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Libvirt = Pulumi.Libvirt;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @default = new Libvirt.Domain(\"default\", new()\n {\n Name = \"test\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-libvirt/sdk/go/libvirt\"\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 := libvirt.NewDomain(ctx, \"default\", \u0026libvirt.DomainArgs{\n\t\t\tName: pulumi.String(\"test\"),\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.libvirt.Domain;\nimport com.pulumi.libvirt.DomainArgs;\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 Domain(\"default\", DomainArgs.builder()\n .name(\"test\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n default:\n type: libvirt:Domain\n properties:\n name: test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "arch": { "type": "string", @@ -1302,7 +1306,7 @@ } }, "libvirt:index/pool:Pool": { - "description": "Manages a storage pool in libvirt. Currently only directory-based storage pool are supported. For more information on\nstorage pools in libvirt, see [the official documentation](https://libvirt.org/formatstorage.html).\n\n**WARNING:** This is experimental API and may change in the future.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as libvirt from \"@pulumi/libvirt\";\n\n// A pool for all cluster volumes\nconst cluster = new libvirt.Pool(\"cluster\", {\n name: \"cluster\",\n type: \"dir\",\n path: \"/home/user/cluster_storage\",\n});\nconst opensuseLeap = new libvirt.Volume(\"opensuse_leap\", {\n name: \"opensuse_leap\",\n pool: cluster.name,\n source: \"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\",\n});\n```\n```python\nimport pulumi\nimport pulumi_libvirt as libvirt\n\n# A pool for all cluster volumes\ncluster = libvirt.Pool(\"cluster\",\n name=\"cluster\",\n type=\"dir\",\n path=\"/home/user/cluster_storage\")\nopensuse_leap = libvirt.Volume(\"opensuse_leap\",\n name=\"opensuse_leap\",\n pool=cluster.name,\n source=\"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Libvirt = Pulumi.Libvirt;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // A pool for all cluster volumes\n var cluster = new Libvirt.Pool(\"cluster\", new()\n {\n Name = \"cluster\",\n Type = \"dir\",\n Path = \"/home/user/cluster_storage\",\n });\n\n var opensuseLeap = new Libvirt.Volume(\"opensuse_leap\", new()\n {\n Name = \"opensuse_leap\",\n Pool = cluster.Name,\n Source = \"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-libvirt/sdk/go/libvirt\"\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// A pool for all cluster volumes\n\t\tcluster, err := libvirt.NewPool(ctx, \"cluster\", \u0026libvirt.PoolArgs{\n\t\t\tName: pulumi.String(\"cluster\"),\n\t\t\tType: pulumi.String(\"dir\"),\n\t\t\tPath: pulumi.String(\"/home/user/cluster_storage\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = libvirt.NewVolume(ctx, \"opensuse_leap\", \u0026libvirt.VolumeArgs{\n\t\t\tName: pulumi.String(\"opensuse_leap\"),\n\t\t\tPool: cluster.Name,\n\t\t\tSource: pulumi.String(\"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\"),\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.libvirt.Pool;\nimport com.pulumi.libvirt.PoolArgs;\nimport com.pulumi.libvirt.Volume;\nimport com.pulumi.libvirt.VolumeArgs;\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 // A pool for all cluster volumes\n var cluster = new Pool(\"cluster\", PoolArgs.builder() \n .name(\"cluster\")\n .type(\"dir\")\n .path(\"/home/user/cluster_storage\")\n .build());\n\n var opensuseLeap = new Volume(\"opensuseLeap\", VolumeArgs.builder() \n .name(\"opensuse_leap\")\n .pool(cluster.name())\n .source(\"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # A pool for all cluster volumes\n cluster:\n type: libvirt:Pool\n properties:\n name: cluster\n type: dir\n path: /home/user/cluster_storage\n opensuseLeap:\n type: libvirt:Volume\n name: opensuse_leap\n properties:\n name: opensuse_leap\n pool: ${cluster.name}\n source: http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Manages a storage pool in libvirt. Currently only directory-based storage pool are supported. For more information on\nstorage pools in libvirt, see [the official documentation](https://libvirt.org/formatstorage.html).\n\n**WARNING:** This is experimental API and may change in the future.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as libvirt from \"@pulumi/libvirt\";\n\n// A pool for all cluster volumes\nconst cluster = new libvirt.Pool(\"cluster\", {\n name: \"cluster\",\n type: \"dir\",\n path: \"/home/user/cluster_storage\",\n});\nconst opensuseLeap = new libvirt.Volume(\"opensuse_leap\", {\n name: \"opensuse_leap\",\n pool: cluster.name,\n source: \"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\",\n});\n```\n```python\nimport pulumi\nimport pulumi_libvirt as libvirt\n\n# A pool for all cluster volumes\ncluster = libvirt.Pool(\"cluster\",\n name=\"cluster\",\n type=\"dir\",\n path=\"/home/user/cluster_storage\")\nopensuse_leap = libvirt.Volume(\"opensuse_leap\",\n name=\"opensuse_leap\",\n pool=cluster.name,\n source=\"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Libvirt = Pulumi.Libvirt;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // A pool for all cluster volumes\n var cluster = new Libvirt.Pool(\"cluster\", new()\n {\n Name = \"cluster\",\n Type = \"dir\",\n Path = \"/home/user/cluster_storage\",\n });\n\n var opensuseLeap = new Libvirt.Volume(\"opensuse_leap\", new()\n {\n Name = \"opensuse_leap\",\n Pool = cluster.Name,\n Source = \"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-libvirt/sdk/go/libvirt\"\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// A pool for all cluster volumes\n\t\tcluster, err := libvirt.NewPool(ctx, \"cluster\", \u0026libvirt.PoolArgs{\n\t\t\tName: pulumi.String(\"cluster\"),\n\t\t\tType: pulumi.String(\"dir\"),\n\t\t\tPath: pulumi.String(\"/home/user/cluster_storage\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = libvirt.NewVolume(ctx, \"opensuse_leap\", \u0026libvirt.VolumeArgs{\n\t\t\tName: pulumi.String(\"opensuse_leap\"),\n\t\t\tPool: cluster.Name,\n\t\t\tSource: pulumi.String(\"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\"),\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.libvirt.Pool;\nimport com.pulumi.libvirt.PoolArgs;\nimport com.pulumi.libvirt.Volume;\nimport com.pulumi.libvirt.VolumeArgs;\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 // A pool for all cluster volumes\n var cluster = new Pool(\"cluster\", PoolArgs.builder()\n .name(\"cluster\")\n .type(\"dir\")\n .path(\"/home/user/cluster_storage\")\n .build());\n\n var opensuseLeap = new Volume(\"opensuseLeap\", VolumeArgs.builder()\n .name(\"opensuse_leap\")\n .pool(cluster.name())\n .source(\"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # A pool for all cluster volumes\n cluster:\n type: libvirt:Pool\n properties:\n name: cluster\n type: dir\n path: /home/user/cluster_storage\n opensuseLeap:\n type: libvirt:Volume\n name: opensuse_leap\n properties:\n name: opensuse_leap\n pool: ${cluster.name}\n source: http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "allocation": { "type": "integer" @@ -1411,7 +1415,7 @@ } }, "libvirt:index/volume:Volume": { - "description": "Manages a storage volume in libvirt. For more information see\n[the official documentation](https://libvirt.org/formatstorage.html).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as libvirt from \"@pulumi/libvirt\";\n\n// Base OS image to use to create a cluster of different\n// nodes\nconst opensuseLeap = new libvirt.Volume(\"opensuse_leap\", {\n name: \"opensuse_leap\",\n source: \"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\",\n});\n// volume to attach to the \"master\" domain as main disk\nconst master = new libvirt.Volume(\"master\", {\n name: \"master.qcow2\",\n baseVolumeId: opensuseLeap.id,\n});\n// volumes to attach to the \"workers\" domains as main disk\nconst worker: libvirt.Volume[] = [];\nfor (const range = {value: 0}; range.value \u003c workersCount; range.value++) {\n worker.push(new libvirt.Volume(`worker-${range.value}`, {\n name: `worker_${range.value}.qcow2`,\n baseVolumeId: opensuseLeap.id,\n }));\n}\n```\n```python\nimport pulumi\nimport pulumi_libvirt as libvirt\n\n# Base OS image to use to create a cluster of different\n# nodes\nopensuse_leap = libvirt.Volume(\"opensuse_leap\",\n name=\"opensuse_leap\",\n source=\"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\")\n# volume to attach to the \"master\" domain as main disk\nmaster = libvirt.Volume(\"master\",\n name=\"master.qcow2\",\n base_volume_id=opensuse_leap.id)\n# volumes to attach to the \"workers\" domains as main disk\nworker = []\nfor range in [{\"value\": i} for i in range(0, workers_count)]:\n worker.append(libvirt.Volume(f\"worker-{range['value']}\",\n name=f\"worker_{range['value']}.qcow2\",\n base_volume_id=opensuse_leap.id))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Libvirt = Pulumi.Libvirt;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // Base OS image to use to create a cluster of different\n // nodes\n var opensuseLeap = new Libvirt.Volume(\"opensuse_leap\", new()\n {\n Name = \"opensuse_leap\",\n Source = \"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\",\n });\n\n // volume to attach to the \"master\" domain as main disk\n var master = new Libvirt.Volume(\"master\", new()\n {\n Name = \"master.qcow2\",\n BaseVolumeId = opensuseLeap.Id,\n });\n\n // volumes to attach to the \"workers\" domains as main disk\n var worker = new List\u003cLibvirt.Volume\u003e();\n for (var rangeIndex = 0; rangeIndex \u003c workersCount; rangeIndex++)\n {\n var range = new { Value = rangeIndex };\n worker.Add(new Libvirt.Volume($\"worker-{range.Value}\", new()\n {\n Name = $\"worker_{range.Value}.qcow2\",\n BaseVolumeId = opensuseLeap.Id,\n }));\n }\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-libvirt/sdk/go/libvirt\"\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// Base OS image to use to create a cluster of different\n\t\t// nodes\n\t\topensuseLeap, err := libvirt.NewVolume(ctx, \"opensuse_leap\", \u0026libvirt.VolumeArgs{\n\t\t\tName: pulumi.String(\"opensuse_leap\"),\n\t\t\tSource: pulumi.String(\"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// volume to attach to the \"master\" domain as main disk\n\t\t_, err = libvirt.NewVolume(ctx, \"master\", \u0026libvirt.VolumeArgs{\n\t\t\tName: pulumi.String(\"master.qcow2\"),\n\t\t\tBaseVolumeId: opensuseLeap.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// volumes to attach to the \"workers\" domains as main disk\n\t\tvar worker []*libvirt.Volume\n\t\tfor index := 0; index \u003c workersCount; index++ {\n\t\t\tkey0 := index\n\t\t\tval0 := index\n\t\t\t__res, err := libvirt.NewVolume(ctx, fmt.Sprintf(\"worker-%v\", key0), \u0026libvirt.VolumeArgs{\n\t\t\t\tName: pulumi.String(fmt.Sprintf(\"worker_%v.qcow2\", val0)),\n\t\t\t\tBaseVolumeId: opensuseLeap.ID(),\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tworker = append(worker, __res)\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.libvirt.Volume;\nimport com.pulumi.libvirt.VolumeArgs;\nimport com.pulumi.codegen.internal.KeyedValue;\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 // Base OS image to use to create a cluster of different\n // nodes\n var opensuseLeap = new Volume(\"opensuseLeap\", VolumeArgs.builder() \n .name(\"opensuse_leap\")\n .source(\"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\")\n .build());\n\n // volume to attach to the \"master\" domain as main disk\n var master = new Volume(\"master\", VolumeArgs.builder() \n .name(\"master.qcow2\")\n .baseVolumeId(opensuseLeap.id())\n .build());\n\n // volumes to attach to the \"workers\" domains as main disk\n for (var i = 0; i \u003c workersCount; i++) {\n new Volume(\"worker-\" + i, VolumeArgs.builder() \n .name(String.format(\"worker_%s.qcow2\", range.value()))\n .baseVolumeId(opensuseLeap.id())\n .build());\n\n \n}\n }\n}\n```\n```yaml\nresources:\n # Base OS image to use to create a cluster of different\n # nodes\n opensuseLeap:\n type: libvirt:Volume\n name: opensuse_leap\n properties:\n name: opensuse_leap\n source: http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\n # volume to attach to the \"master\" domain as main disk\n master:\n type: libvirt:Volume\n properties:\n name: master.qcow2\n baseVolumeId: ${opensuseLeap.id}\n # volumes to attach to the \"workers\" domains as main disk\n worker:\n type: libvirt:Volume\n properties:\n name: worker_${range.value}.qcow2\n baseVolumeId: ${opensuseLeap.id}\n options: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e **Tip:** when provisioning multiple domains using the same base image, create\na `libvirt.Volume` for the base image and then define the domain specific ones\nas based on it. This way the image will not be modified and no extra disk space\nis going to be used for the base image.\n", + "description": "Manages a storage volume in libvirt. For more information see\n[the official documentation](https://libvirt.org/formatstorage.html).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as libvirt from \"@pulumi/libvirt\";\n\n// Base OS image to use to create a cluster of different\n// nodes\nconst opensuseLeap = new libvirt.Volume(\"opensuse_leap\", {\n name: \"opensuse_leap\",\n source: \"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\",\n});\n// volume to attach to the \"master\" domain as main disk\nconst master = new libvirt.Volume(\"master\", {\n name: \"master.qcow2\",\n baseVolumeId: opensuseLeap.id,\n});\n// volumes to attach to the \"workers\" domains as main disk\nconst worker: libvirt.Volume[] = [];\nfor (const range = {value: 0}; range.value \u003c workersCount; range.value++) {\n worker.push(new libvirt.Volume(`worker-${range.value}`, {\n name: `worker_${range.value}.qcow2`,\n baseVolumeId: opensuseLeap.id,\n }));\n}\n```\n```python\nimport pulumi\nimport pulumi_libvirt as libvirt\n\n# Base OS image to use to create a cluster of different\n# nodes\nopensuse_leap = libvirt.Volume(\"opensuse_leap\",\n name=\"opensuse_leap\",\n source=\"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\")\n# volume to attach to the \"master\" domain as main disk\nmaster = libvirt.Volume(\"master\",\n name=\"master.qcow2\",\n base_volume_id=opensuse_leap.id)\n# volumes to attach to the \"workers\" domains as main disk\nworker = []\nfor range in [{\"value\": i} for i in range(0, workers_count)]:\n worker.append(libvirt.Volume(f\"worker-{range['value']}\",\n name=f\"worker_{range['value']}.qcow2\",\n base_volume_id=opensuse_leap.id))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Libvirt = Pulumi.Libvirt;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // Base OS image to use to create a cluster of different\n // nodes\n var opensuseLeap = new Libvirt.Volume(\"opensuse_leap\", new()\n {\n Name = \"opensuse_leap\",\n Source = \"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\",\n });\n\n // volume to attach to the \"master\" domain as main disk\n var master = new Libvirt.Volume(\"master\", new()\n {\n Name = \"master.qcow2\",\n BaseVolumeId = opensuseLeap.Id,\n });\n\n // volumes to attach to the \"workers\" domains as main disk\n var worker = new List\u003cLibvirt.Volume\u003e();\n for (var rangeIndex = 0; rangeIndex \u003c workersCount; rangeIndex++)\n {\n var range = new { Value = rangeIndex };\n worker.Add(new Libvirt.Volume($\"worker-{range.Value}\", new()\n {\n Name = $\"worker_{range.Value}.qcow2\",\n BaseVolumeId = opensuseLeap.Id,\n }));\n }\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-libvirt/sdk/go/libvirt\"\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// Base OS image to use to create a cluster of different\n\t\t// nodes\n\t\topensuseLeap, err := libvirt.NewVolume(ctx, \"opensuse_leap\", \u0026libvirt.VolumeArgs{\n\t\t\tName: pulumi.String(\"opensuse_leap\"),\n\t\t\tSource: pulumi.String(\"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// volume to attach to the \"master\" domain as main disk\n\t\t_, err = libvirt.NewVolume(ctx, \"master\", \u0026libvirt.VolumeArgs{\n\t\t\tName: pulumi.String(\"master.qcow2\"),\n\t\t\tBaseVolumeId: opensuseLeap.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// volumes to attach to the \"workers\" domains as main disk\n\t\tvar worker []*libvirt.Volume\n\t\tfor index := 0; index \u003c workersCount; index++ {\n\t\t\tkey0 := index\n\t\t\tval0 := index\n\t\t\t__res, err := libvirt.NewVolume(ctx, fmt.Sprintf(\"worker-%v\", key0), \u0026libvirt.VolumeArgs{\n\t\t\t\tName: pulumi.String(fmt.Sprintf(\"worker_%v.qcow2\", val0)),\n\t\t\t\tBaseVolumeId: opensuseLeap.ID(),\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tworker = append(worker, __res)\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.libvirt.Volume;\nimport com.pulumi.libvirt.VolumeArgs;\nimport com.pulumi.codegen.internal.KeyedValue;\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 // Base OS image to use to create a cluster of different\n // nodes\n var opensuseLeap = new Volume(\"opensuseLeap\", VolumeArgs.builder()\n .name(\"opensuse_leap\")\n .source(\"http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\")\n .build());\n\n // volume to attach to the \"master\" domain as main disk\n var master = new Volume(\"master\", VolumeArgs.builder()\n .name(\"master.qcow2\")\n .baseVolumeId(opensuseLeap.id())\n .build());\n\n // volumes to attach to the \"workers\" domains as main disk\n for (var i = 0; i \u003c workersCount; i++) {\n new Volume(\"worker-\" + i, VolumeArgs.builder()\n .name(String.format(\"worker_%s.qcow2\", range.value()))\n .baseVolumeId(opensuseLeap.id())\n .build());\n\n \n}\n }\n}\n```\n```yaml\nresources:\n # Base OS image to use to create a cluster of different\n # nodes\n opensuseLeap:\n type: libvirt:Volume\n name: opensuse_leap\n properties:\n name: opensuse_leap\n source: http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2\n # volume to attach to the \"master\" domain as main disk\n master:\n type: libvirt:Volume\n properties:\n name: master.qcow2\n baseVolumeId: ${opensuseLeap.id}\n # volumes to attach to the \"workers\" domains as main disk\n worker:\n type: libvirt:Volume\n properties:\n name: worker_${range.value}.qcow2\n baseVolumeId: ${opensuseLeap.id}\n options: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e **Tip:** when provisioning multiple domains using the same base image, create\na `libvirt.Volume` for the base image and then define the domain specific ones\nas based on it. This way the image will not be modified and no extra disk space\nis going to be used for the base image.\n", "properties": { "baseVolumeId": { "type": "string", diff --git a/provider/go.mod b/provider/go.mod index d83a83f0..2dc19c94 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -4,14 +4,14 @@ go 1.21 replace ( github.com/hashicorp/go-getter => github.com/hashicorp/go-getter v1.4.0 - github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20240229143312-4f60ee4e2975 + github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20240520223432-0c0bf0d65f10 github.com/spf13/afero => github.com/spf13/afero v1.2.2 ) require ( github.com/dmacvicar/terraform-provider-libvirt v0.7.6 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.82.0 - github.com/pulumi/pulumi/sdk/v3 v3.114.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.83.0 + github.com/pulumi/pulumi/sdk/v3 v3.116.1 ) require ( @@ -184,10 +184,10 @@ require ( github.com/posener/complete v1.2.3 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.6.2 // indirect - github.com/pulumi/pulumi-java/pkg v0.10.0 // indirect + github.com/pulumi/pulumi-java/pkg v0.11.0 // indirect github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 // indirect - github.com/pulumi/pulumi-yaml v1.6.0 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.114.0 // indirect + github.com/pulumi/pulumi-yaml v1.7.0 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.116.1 // indirect github.com/pulumi/schema-tools v0.1.2 // indirect github.com/pulumi/terraform-diff-reader v0.0.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect diff --git a/provider/go.sum b/provider/go.sum index 7f2beee1..978df8d2 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -2812,24 +2812,24 @@ github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= github.com/pulumi/providertest v0.0.11 h1:mg8MQ7Cq7+9XlHIkBD+aCqQO4mwAJEISngZgVdnQUe8= github.com/pulumi/providertest v0.0.11/go.mod h1:HsxjVsytcMIuNj19w1lT2W0QXY0oReXl1+h6eD2JXP8= -github.com/pulumi/pulumi-java/pkg v0.10.0 h1:D1i5MiiNrxYr2uJ1szcj1aQwF9DYv7TTsPmajB9dKSw= -github.com/pulumi/pulumi-java/pkg v0.10.0/go.mod h1:xu6UgYtQm+xXOo1/DZNa2CWVPytu+RMkZVTtI7w7ffY= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.82.0 h1:qCZ7ALm4xVrSLJboi4ZwkS5FRQvyzmIZni85m1iFBIw= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.82.0/go.mod h1:jXjZLukQcYrfIWxSYwSWSzPBK9BTcYGv2DDkpNKHJJw= +github.com/pulumi/pulumi-java/pkg v0.11.0 h1:Jw9gBvyfmfOMq/EkYDm9+zGPxsDAA8jfeMpHmtZ+1oA= +github.com/pulumi/pulumi-java/pkg v0.11.0/go.mod h1:sXAk25P47AQVQL6ilAbFmRNgZykC7og/+87ihnqzFTc= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.83.0 h1:vNH8SgUudBo2JqmqQDQ8sf2FpzO0Rj3Q8fOuY5+g4Xg= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.83.0/go.mod h1:WJ24ugly49Q/69napI8RGAqjrDvohpoIS2/kAzW675M= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 h1:mav2tSitA9BPJPLLahKgepHyYsMzwaTm4cvp0dcTMYw= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8/go.mod h1:qUYk2c9i/yqMGNj9/bQyXpS39BxNDSXYjVN1njnq0zY= -github.com/pulumi/pulumi-yaml v1.6.0 h1:mb/QkebWXTa1fR+P3ZkCCHGXOYC6iTN8X8By9eNz8xM= -github.com/pulumi/pulumi-yaml v1.6.0/go.mod h1:RyEPo4MhL363sbAiFMVKRsQmXpQPDCY1S8pGv3E6Ij0= -github.com/pulumi/pulumi/pkg/v3 v3.114.0 h1:+Ru1DfQKKmZcTYF7i+IWTaxvHX+vIWmVPyUXXksM3Uk= -github.com/pulumi/pulumi/pkg/v3 v3.114.0/go.mod h1:kNu4WL3BkF8zZ+1BTIWnEetNN1JtR4oRHWlxH2NZ6s0= -github.com/pulumi/pulumi/sdk/v3 v3.114.0 h1:KPBSvm04wE2/AdS8PlABxZAW4o7pSAnar0QOooH13no= -github.com/pulumi/pulumi/sdk/v3 v3.114.0/go.mod h1:d6LZJHqEfpgXUd8rFSSsbaPJcocZObXeaUr87jbA5MY= +github.com/pulumi/pulumi-yaml v1.7.0 h1:SbFSaqkH8UiMEy0ZSH9sHLQlmV8so0iCLfvLbPtVP7s= +github.com/pulumi/pulumi-yaml v1.7.0/go.mod h1:pCfYHSRmdl+5dM/7eT2uDQS528YOhAhiqbn9pwRzW20= +github.com/pulumi/pulumi/pkg/v3 v3.116.1 h1:yeXAc7Pk5fUa9fvHhvsiO2ydEEZaqV+xwR+D1j6m3Bg= +github.com/pulumi/pulumi/pkg/v3 v3.116.1/go.mod h1:EvZSqsOyNPpqpPXr4td8Y454swkuD/nsyHTLoWm6qDQ= +github.com/pulumi/pulumi/sdk/v3 v3.116.1 h1:P/bIDPQYy1UJogLeV/zY+bG4iTZgEEJLlwyUYEW3NPc= +github.com/pulumi/pulumi/sdk/v3 v3.116.1/go.mod h1:d6LZJHqEfpgXUd8rFSSsbaPJcocZObXeaUr87jbA5MY= github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo= github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI= github.com/pulumi/terraform-diff-reader v0.0.2/go.mod h1:sZ9FUzGO+yM41hsQHs/yIcj/Y993qMdBxBU5mpDmAfQ= -github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20240229143312-4f60ee4e2975 h1:1WBy43K/lHEdS5Hliwf3ylVSfAu5s0KhhEs6wNeP11Y= -github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20240229143312-4f60ee4e2975/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= +github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20240520223432-0c0bf0d65f10 h1:M6Ceq1o6gGeEKxTZgJ2CKLye3p67ZZjnsAwxr5VC32A= +github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20240520223432-0c0bf0d65f10/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= github.com/rakyll/embedmd v0.0.0-20171029212350-c8060a0752a2/go.mod h1:7jOTMgqac46PZcF54q6l2hkLEG8op93fZu61KmxWDV4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= diff --git a/sdk/dotnet/Inputs/DomainFilesystemArgs.cs b/sdk/dotnet/Inputs/DomainFilesystemArgs.cs index a44ecd35..193380c3 100644 --- a/sdk/dotnet/Inputs/DomainFilesystemArgs.cs +++ b/sdk/dotnet/Inputs/DomainFilesystemArgs.cs @@ -12,15 +12,32 @@ namespace Pulumi.Libvirt.Inputs public sealed class DomainFilesystemArgs : global::Pulumi.ResourceArgs { + /// + /// specifies the security mode for accessing the source. By default + /// the `mapped` mode is chosen. + /// [Input("accessmode")] public Input? Accessmode { get; set; } + /// + /// enables exporting filesystem as a readonly mount for guest, by + /// default read-only access is given. + /// + /// Example: + /// [Input("readonly")] public Input? Readonly { get; set; } + /// + /// the directory of the host to be shared with the guest. + /// [Input("source", required: true)] public Input Source { get; set; } = null!; + /// + /// an arbitrary string tag that is exported to the guest as a hint for + /// where to mount the source. + /// [Input("target", required: true)] public Input Target { get; set; } = null!; diff --git a/sdk/dotnet/Inputs/DomainFilesystemGetArgs.cs b/sdk/dotnet/Inputs/DomainFilesystemGetArgs.cs index 26e4415c..7fab44f9 100644 --- a/sdk/dotnet/Inputs/DomainFilesystemGetArgs.cs +++ b/sdk/dotnet/Inputs/DomainFilesystemGetArgs.cs @@ -12,15 +12,32 @@ namespace Pulumi.Libvirt.Inputs public sealed class DomainFilesystemGetArgs : global::Pulumi.ResourceArgs { + /// + /// specifies the security mode for accessing the source. By default + /// the `mapped` mode is chosen. + /// [Input("accessmode")] public Input? Accessmode { get; set; } + /// + /// enables exporting filesystem as a readonly mount for guest, by + /// default read-only access is given. + /// + /// Example: + /// [Input("readonly")] public Input? Readonly { get; set; } + /// + /// the directory of the host to be shared with the guest. + /// [Input("source", required: true)] public Input Source { get; set; } = null!; + /// + /// an arbitrary string tag that is exported to the guest as a hint for + /// where to mount the source. + /// [Input("target", required: true)] public Input Target { get; set; } = null!; diff --git a/sdk/dotnet/Outputs/DomainFilesystem.cs b/sdk/dotnet/Outputs/DomainFilesystem.cs index a2f804ce..d9ac8dd2 100644 --- a/sdk/dotnet/Outputs/DomainFilesystem.cs +++ b/sdk/dotnet/Outputs/DomainFilesystem.cs @@ -13,9 +13,26 @@ namespace Pulumi.Libvirt.Outputs [OutputType] public sealed class DomainFilesystem { + /// + /// specifies the security mode for accessing the source. By default + /// the `mapped` mode is chosen. + /// public readonly string? Accessmode; + /// + /// enables exporting filesystem as a readonly mount for guest, by + /// default read-only access is given. + /// + /// Example: + /// public readonly bool? Readonly; + /// + /// the directory of the host to be shared with the guest. + /// public readonly string Source; + /// + /// an arbitrary string tag that is exported to the guest as a hint for + /// where to mount the source. + /// public readonly string Target; [OutputConstructor] diff --git a/sdk/go.mod b/sdk/go.mod index 3a8d5b52..de0390a8 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi/sdk/v3 v3.114.0 + github.com/pulumi/pulumi/sdk/v3 v3.116.1 ) require ( diff --git a/sdk/go.sum b/sdk/go.sum index 86e550ff..48dd472f 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -148,8 +148,8 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= -github.com/pulumi/pulumi/sdk/v3 v3.114.0 h1:KPBSvm04wE2/AdS8PlABxZAW4o7pSAnar0QOooH13no= -github.com/pulumi/pulumi/sdk/v3 v3.114.0/go.mod h1:d6LZJHqEfpgXUd8rFSSsbaPJcocZObXeaUr87jbA5MY= +github.com/pulumi/pulumi/sdk/v3 v3.116.1 h1:P/bIDPQYy1UJogLeV/zY+bG4iTZgEEJLlwyUYEW3NPc= +github.com/pulumi/pulumi/sdk/v3 v3.116.1/go.mod h1:d6LZJHqEfpgXUd8rFSSsbaPJcocZObXeaUr87jbA5MY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= diff --git a/sdk/go/libvirt/pulumiTypes.go b/sdk/go/libvirt/pulumiTypes.go index f62ff31d..ce83d888 100644 --- a/sdk/go/libvirt/pulumiTypes.go +++ b/sdk/go/libvirt/pulumiTypes.go @@ -738,10 +738,19 @@ func (o DomainDiskArrayOutput) Index(i pulumi.IntInput) DomainDiskOutput { } type DomainFilesystem struct { + // specifies the security mode for accessing the source. By default + // the `mapped` mode is chosen. Accessmode *string `pulumi:"accessmode"` - Readonly *bool `pulumi:"readonly"` - Source string `pulumi:"source"` - Target string `pulumi:"target"` + // enables exporting filesystem as a readonly mount for guest, by + // default read-only access is given. + // + // Example: + Readonly *bool `pulumi:"readonly"` + // the directory of the host to be shared with the guest. + Source string `pulumi:"source"` + // an arbitrary string tag that is exported to the guest as a hint for + // where to mount the source. + Target string `pulumi:"target"` } // DomainFilesystemInput is an input type that accepts DomainFilesystemArgs and DomainFilesystemOutput values. @@ -756,10 +765,19 @@ type DomainFilesystemInput interface { } type DomainFilesystemArgs struct { + // specifies the security mode for accessing the source. By default + // the `mapped` mode is chosen. Accessmode pulumi.StringPtrInput `pulumi:"accessmode"` - Readonly pulumi.BoolPtrInput `pulumi:"readonly"` - Source pulumi.StringInput `pulumi:"source"` - Target pulumi.StringInput `pulumi:"target"` + // enables exporting filesystem as a readonly mount for guest, by + // default read-only access is given. + // + // Example: + Readonly pulumi.BoolPtrInput `pulumi:"readonly"` + // the directory of the host to be shared with the guest. + Source pulumi.StringInput `pulumi:"source"` + // an arbitrary string tag that is exported to the guest as a hint for + // where to mount the source. + Target pulumi.StringInput `pulumi:"target"` } func (DomainFilesystemArgs) ElementType() reflect.Type { @@ -813,18 +831,27 @@ func (o DomainFilesystemOutput) ToDomainFilesystemOutputWithContext(ctx context. return o } +// specifies the security mode for accessing the source. By default +// the `mapped` mode is chosen. func (o DomainFilesystemOutput) Accessmode() pulumi.StringPtrOutput { return o.ApplyT(func(v DomainFilesystem) *string { return v.Accessmode }).(pulumi.StringPtrOutput) } +// enables exporting filesystem as a readonly mount for guest, by +// default read-only access is given. +// +// Example: func (o DomainFilesystemOutput) Readonly() pulumi.BoolPtrOutput { return o.ApplyT(func(v DomainFilesystem) *bool { return v.Readonly }).(pulumi.BoolPtrOutput) } +// the directory of the host to be shared with the guest. func (o DomainFilesystemOutput) Source() pulumi.StringOutput { return o.ApplyT(func(v DomainFilesystem) string { return v.Source }).(pulumi.StringOutput) } +// an arbitrary string tag that is exported to the guest as a hint for +// where to mount the source. func (o DomainFilesystemOutput) Target() pulumi.StringOutput { return o.ApplyT(func(v DomainFilesystem) string { return v.Target }).(pulumi.StringOutput) } diff --git a/sdk/java/src/main/java/com/pulumi/libvirt/Domain.java b/sdk/java/src/main/java/com/pulumi/libvirt/Domain.java index 92c3f3c8..1b60d0cf 100644 --- a/sdk/java/src/main/java/com/pulumi/libvirt/Domain.java +++ b/sdk/java/src/main/java/com/pulumi/libvirt/Domain.java @@ -59,7 +59,7 @@ * } * * public static void stack(Context ctx) { - * var default_ = new Domain("default", DomainArgs.builder() + * var default_ = new Domain("default", DomainArgs.builder() * .name("test") * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/libvirt/Pool.java b/sdk/java/src/main/java/com/pulumi/libvirt/Pool.java index ba25ccf4..56d3072c 100644 --- a/sdk/java/src/main/java/com/pulumi/libvirt/Pool.java +++ b/sdk/java/src/main/java/com/pulumi/libvirt/Pool.java @@ -50,13 +50,13 @@ * * public static void stack(Context ctx) { * // A pool for all cluster volumes - * var cluster = new Pool("cluster", PoolArgs.builder() + * var cluster = new Pool("cluster", PoolArgs.builder() * .name("cluster") * .type("dir") * .path("/home/user/cluster_storage") * .build()); * - * var opensuseLeap = new Volume("opensuseLeap", VolumeArgs.builder() + * var opensuseLeap = new Volume("opensuseLeap", VolumeArgs.builder() * .name("opensuse_leap") * .pool(cluster.name()) * .source("http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2") diff --git a/sdk/java/src/main/java/com/pulumi/libvirt/Volume.java b/sdk/java/src/main/java/com/pulumi/libvirt/Volume.java index 4940e02f..8849bb42 100644 --- a/sdk/java/src/main/java/com/pulumi/libvirt/Volume.java +++ b/sdk/java/src/main/java/com/pulumi/libvirt/Volume.java @@ -48,20 +48,20 @@ * public static void stack(Context ctx) { * // Base OS image to use to create a cluster of different * // nodes - * var opensuseLeap = new Volume("opensuseLeap", VolumeArgs.builder() + * var opensuseLeap = new Volume("opensuseLeap", VolumeArgs.builder() * .name("opensuse_leap") * .source("http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2") * .build()); * * // volume to attach to the "master" domain as main disk - * var master = new Volume("master", VolumeArgs.builder() + * var master = new Volume("master", VolumeArgs.builder() * .name("master.qcow2") * .baseVolumeId(opensuseLeap.id()) * .build()); * * // volumes to attach to the "workers" domains as main disk * for (var i = 0; i < workersCount; i++) { - * new Volume("worker-" + i, VolumeArgs.builder() + * new Volume("worker-" + i, VolumeArgs.builder() * .name(String.format("worker_%s.qcow2", range.value())) * .baseVolumeId(opensuseLeap.id()) * .build()); diff --git a/sdk/java/src/main/java/com/pulumi/libvirt/inputs/DomainDiskArgs.java b/sdk/java/src/main/java/com/pulumi/libvirt/inputs/DomainDiskArgs.java index 7ade2e5a..f14ebe92 100644 --- a/sdk/java/src/main/java/com/pulumi/libvirt/inputs/DomainDiskArgs.java +++ b/sdk/java/src/main/java/com/pulumi/libvirt/inputs/DomainDiskArgs.java @@ -127,17 +127,17 @@ public Optional> volumeId() { * } * * public static void stack(Context ctx) { - * var leap = new Volume("leap", VolumeArgs.builder() + * var leap = new Volume("leap", VolumeArgs.builder() * .name("leap") * .source("http://someurl/openSUSE_Leap-42.1.qcow2") * .build()); * - * var mydisk = new Volume("mydisk", VolumeArgs.builder() + * var mydisk = new Volume("mydisk", VolumeArgs.builder() * .name("mydisk") * .baseVolumeId(leap.id()) * .build()); * - * var domain1 = new Domain("domain1", DomainArgs.builder() + * var domain1 = new Domain("domain1", DomainArgs.builder() * .name("domain1") * .disks( * DomainDiskArgs.builder() @@ -199,17 +199,17 @@ public Optional> volumeId() { * } * * public static void stack(Context ctx) { - * var leap = new Volume("leap", VolumeArgs.builder() + * var leap = new Volume("leap", VolumeArgs.builder() * .name("leap") * .source("http://someurl/openSUSE_Leap-42.1.qcow2") * .build()); * - * var mydisk = new Volume("mydisk", VolumeArgs.builder() + * var mydisk = new Volume("mydisk", VolumeArgs.builder() * .name("mydisk") * .baseVolumeId(leap.id()) * .build()); * - * var domain1 = new Domain("domain1", DomainArgs.builder() + * var domain1 = new Domain("domain1", DomainArgs.builder() * .name("domain1") * .disks( * DomainDiskArgs.builder() @@ -412,17 +412,17 @@ public Builder volumeId(String volumeId) { * } * * public static void stack(Context ctx) { - * var leap = new Volume("leap", VolumeArgs.builder() + * var leap = new Volume("leap", VolumeArgs.builder() * .name("leap") * .source("http://someurl/openSUSE_Leap-42.1.qcow2") * .build()); * - * var mydisk = new Volume("mydisk", VolumeArgs.builder() + * var mydisk = new Volume("mydisk", VolumeArgs.builder() * .name("mydisk") * .baseVolumeId(leap.id()) * .build()); * - * var domain1 = new Domain("domain1", DomainArgs.builder() + * var domain1 = new Domain("domain1", DomainArgs.builder() * .name("domain1") * .disks( * DomainDiskArgs.builder() @@ -488,17 +488,17 @@ public Builder wwn(@Nullable Output wwn) { * } * * public static void stack(Context ctx) { - * var leap = new Volume("leap", VolumeArgs.builder() + * var leap = new Volume("leap", VolumeArgs.builder() * .name("leap") * .source("http://someurl/openSUSE_Leap-42.1.qcow2") * .build()); * - * var mydisk = new Volume("mydisk", VolumeArgs.builder() + * var mydisk = new Volume("mydisk", VolumeArgs.builder() * .name("mydisk") * .baseVolumeId(leap.id()) * .build()); * - * var domain1 = new Domain("domain1", DomainArgs.builder() + * var domain1 = new Domain("domain1", DomainArgs.builder() * .name("domain1") * .disks( * DomainDiskArgs.builder() diff --git a/sdk/java/src/main/java/com/pulumi/libvirt/inputs/DomainFilesystemArgs.java b/sdk/java/src/main/java/com/pulumi/libvirt/inputs/DomainFilesystemArgs.java index 7986681c..8babb561 100644 --- a/sdk/java/src/main/java/com/pulumi/libvirt/inputs/DomainFilesystemArgs.java +++ b/sdk/java/src/main/java/com/pulumi/libvirt/inputs/DomainFilesystemArgs.java @@ -17,30 +17,72 @@ public final class DomainFilesystemArgs extends com.pulumi.resources.ResourceArg public static final DomainFilesystemArgs Empty = new DomainFilesystemArgs(); + /** + * specifies the security mode for accessing the source. By default + * the `mapped` mode is chosen. + * + */ @Import(name="accessmode") private @Nullable Output accessmode; + /** + * @return specifies the security mode for accessing the source. By default + * the `mapped` mode is chosen. + * + */ public Optional> accessmode() { return Optional.ofNullable(this.accessmode); } + /** + * enables exporting filesystem as a readonly mount for guest, by + * default read-only access is given. + * + * Example: + * + */ @Import(name="readonly") private @Nullable Output readonly; + /** + * @return enables exporting filesystem as a readonly mount for guest, by + * default read-only access is given. + * + * Example: + * + */ public Optional> readonly() { return Optional.ofNullable(this.readonly); } + /** + * the directory of the host to be shared with the guest. + * + */ @Import(name="source", required=true) private Output source; + /** + * @return the directory of the host to be shared with the guest. + * + */ public Output source() { return this.source; } + /** + * an arbitrary string tag that is exported to the guest as a hint for + * where to mount the source. + * + */ @Import(name="target", required=true) private Output target; + /** + * @return an arbitrary string tag that is exported to the guest as a hint for + * where to mount the source. + * + */ public Output target() { return this.target; } @@ -72,38 +114,96 @@ public Builder(DomainFilesystemArgs defaults) { $ = new DomainFilesystemArgs(Objects.requireNonNull(defaults)); } + /** + * @param accessmode specifies the security mode for accessing the source. By default + * the `mapped` mode is chosen. + * + * @return builder + * + */ public Builder accessmode(@Nullable Output accessmode) { $.accessmode = accessmode; return this; } + /** + * @param accessmode specifies the security mode for accessing the source. By default + * the `mapped` mode is chosen. + * + * @return builder + * + */ public Builder accessmode(String accessmode) { return accessmode(Output.of(accessmode)); } + /** + * @param readonly enables exporting filesystem as a readonly mount for guest, by + * default read-only access is given. + * + * Example: + * + * @return builder + * + */ public Builder readonly(@Nullable Output readonly) { $.readonly = readonly; return this; } + /** + * @param readonly enables exporting filesystem as a readonly mount for guest, by + * default read-only access is given. + * + * Example: + * + * @return builder + * + */ public Builder readonly(Boolean readonly) { return readonly(Output.of(readonly)); } + /** + * @param source the directory of the host to be shared with the guest. + * + * @return builder + * + */ public Builder source(Output source) { $.source = source; return this; } + /** + * @param source the directory of the host to be shared with the guest. + * + * @return builder + * + */ public Builder source(String source) { return source(Output.of(source)); } + /** + * @param target an arbitrary string tag that is exported to the guest as a hint for + * where to mount the source. + * + * @return builder + * + */ public Builder target(Output target) { $.target = target; return this; } + /** + * @param target an arbitrary string tag that is exported to the guest as a hint for + * where to mount the source. + * + * @return builder + * + */ public Builder target(String target) { return target(Output.of(target)); } diff --git a/sdk/java/src/main/java/com/pulumi/libvirt/outputs/DomainDisk.java b/sdk/java/src/main/java/com/pulumi/libvirt/outputs/DomainDisk.java index dd510b40..7702b202 100644 --- a/sdk/java/src/main/java/com/pulumi/libvirt/outputs/DomainDisk.java +++ b/sdk/java/src/main/java/com/pulumi/libvirt/outputs/DomainDisk.java @@ -70,17 +70,17 @@ public final class DomainDisk { * } * * public static void stack(Context ctx) { - * var leap = new Volume("leap", VolumeArgs.builder() + * var leap = new Volume("leap", VolumeArgs.builder() * .name("leap") * .source("http://someurl/openSUSE_Leap-42.1.qcow2") * .build()); * - * var mydisk = new Volume("mydisk", VolumeArgs.builder() + * var mydisk = new Volume("mydisk", VolumeArgs.builder() * .name("mydisk") * .baseVolumeId(leap.id()) * .build()); * - * var domain1 = new Domain("domain1", DomainArgs.builder() + * var domain1 = new Domain("domain1", DomainArgs.builder() * .name("domain1") * .disks( * DomainDiskArgs.builder() @@ -180,17 +180,17 @@ public Optional volumeId() { * } * * public static void stack(Context ctx) { - * var leap = new Volume("leap", VolumeArgs.builder() + * var leap = new Volume("leap", VolumeArgs.builder() * .name("leap") * .source("http://someurl/openSUSE_Leap-42.1.qcow2") * .build()); * - * var mydisk = new Volume("mydisk", VolumeArgs.builder() + * var mydisk = new Volume("mydisk", VolumeArgs.builder() * .name("mydisk") * .baseVolumeId(leap.id()) * .build()); * - * var domain1 = new Domain("domain1", DomainArgs.builder() + * var domain1 = new Domain("domain1", DomainArgs.builder() * .name("domain1") * .disks( * DomainDiskArgs.builder() diff --git a/sdk/java/src/main/java/com/pulumi/libvirt/outputs/DomainFilesystem.java b/sdk/java/src/main/java/com/pulumi/libvirt/outputs/DomainFilesystem.java index b6d2f536..3c0ecfca 100644 --- a/sdk/java/src/main/java/com/pulumi/libvirt/outputs/DomainFilesystem.java +++ b/sdk/java/src/main/java/com/pulumi/libvirt/outputs/DomainFilesystem.java @@ -13,21 +13,63 @@ @CustomType public final class DomainFilesystem { + /** + * @return specifies the security mode for accessing the source. By default + * the `mapped` mode is chosen. + * + */ private @Nullable String accessmode; + /** + * @return enables exporting filesystem as a readonly mount for guest, by + * default read-only access is given. + * + * Example: + * + */ private @Nullable Boolean readonly; + /** + * @return the directory of the host to be shared with the guest. + * + */ private String source; + /** + * @return an arbitrary string tag that is exported to the guest as a hint for + * where to mount the source. + * + */ private String target; private DomainFilesystem() {} + /** + * @return specifies the security mode for accessing the source. By default + * the `mapped` mode is chosen. + * + */ public Optional accessmode() { return Optional.ofNullable(this.accessmode); } + /** + * @return enables exporting filesystem as a readonly mount for guest, by + * default read-only access is given. + * + * Example: + * + */ public Optional readonly() { return Optional.ofNullable(this.readonly); } + /** + * @return the directory of the host to be shared with the guest. + * + */ public String source() { return this.source; } + /** + * @return an arbitrary string tag that is exported to the guest as a hint for + * where to mount the source. + * + */ public String target() { return this.target; } diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 146d793b..3cd2876f 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -121,9 +121,26 @@ export interface DomainDisk { } export interface DomainFilesystem { + /** + * specifies the security mode for accessing the source. By default + * the `mapped` mode is chosen. + */ accessmode?: pulumi.Input; + /** + * enables exporting filesystem as a readonly mount for guest, by + * default read-only access is given. + * + * Example: + */ readonly?: pulumi.Input; + /** + * the directory of the host to be shared with the guest. + */ source: pulumi.Input; + /** + * an arbitrary string tag that is exported to the guest as a hint for + * where to mount the source. + */ target: pulumi.Input; } diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index 31f67e6d..6b83cc8b 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -121,9 +121,26 @@ export interface DomainDisk { } export interface DomainFilesystem { + /** + * specifies the security mode for accessing the source. By default + * the `mapped` mode is chosen. + */ accessmode?: string; + /** + * enables exporting filesystem as a readonly mount for guest, by + * default read-only access is given. + * + * Example: + */ readonly?: boolean; + /** + * the directory of the host to be shared with the guest. + */ source: string; + /** + * an arbitrary string tag that is exported to the guest as a hint for + * where to mount the source. + */ target: string; } diff --git a/sdk/python/pulumi_libvirt/_inputs.py b/sdk/python/pulumi_libvirt/_inputs.py index 378539f2..683a5213 100644 --- a/sdk/python/pulumi_libvirt/_inputs.py +++ b/sdk/python/pulumi_libvirt/_inputs.py @@ -379,6 +379,17 @@ def __init__(__self__, *, target: pulumi.Input[str], accessmode: Optional[pulumi.Input[str]] = None, readonly: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[str] source: the directory of the host to be shared with the guest. + :param pulumi.Input[str] target: an arbitrary string tag that is exported to the guest as a hint for + where to mount the source. + :param pulumi.Input[str] accessmode: specifies the security mode for accessing the source. By default + the `mapped` mode is chosen. + :param pulumi.Input[bool] readonly: enables exporting filesystem as a readonly mount for guest, by + default read-only access is given. + + Example: + """ pulumi.set(__self__, "source", source) pulumi.set(__self__, "target", target) if accessmode is not None: @@ -389,6 +400,9 @@ def __init__(__self__, *, @property @pulumi.getter def source(self) -> pulumi.Input[str]: + """ + the directory of the host to be shared with the guest. + """ return pulumi.get(self, "source") @source.setter @@ -398,6 +412,10 @@ def source(self, value: pulumi.Input[str]): @property @pulumi.getter def target(self) -> pulumi.Input[str]: + """ + an arbitrary string tag that is exported to the guest as a hint for + where to mount the source. + """ return pulumi.get(self, "target") @target.setter @@ -407,6 +425,10 @@ def target(self, value: pulumi.Input[str]): @property @pulumi.getter def accessmode(self) -> Optional[pulumi.Input[str]]: + """ + specifies the security mode for accessing the source. By default + the `mapped` mode is chosen. + """ return pulumi.get(self, "accessmode") @accessmode.setter @@ -416,6 +438,12 @@ def accessmode(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def readonly(self) -> Optional[pulumi.Input[bool]]: + """ + enables exporting filesystem as a readonly mount for guest, by + default read-only access is given. + + Example: + """ return pulumi.get(self, "readonly") @readonly.setter diff --git a/sdk/python/pulumi_libvirt/outputs.py b/sdk/python/pulumi_libvirt/outputs.py index 1238274b..aa348251 100644 --- a/sdk/python/pulumi_libvirt/outputs.py +++ b/sdk/python/pulumi_libvirt/outputs.py @@ -368,6 +368,17 @@ def __init__(__self__, *, target: str, accessmode: Optional[str] = None, readonly: Optional[bool] = None): + """ + :param str source: the directory of the host to be shared with the guest. + :param str target: an arbitrary string tag that is exported to the guest as a hint for + where to mount the source. + :param str accessmode: specifies the security mode for accessing the source. By default + the `mapped` mode is chosen. + :param bool readonly: enables exporting filesystem as a readonly mount for guest, by + default read-only access is given. + + Example: + """ pulumi.set(__self__, "source", source) pulumi.set(__self__, "target", target) if accessmode is not None: @@ -378,21 +389,38 @@ def __init__(__self__, *, @property @pulumi.getter def source(self) -> str: + """ + the directory of the host to be shared with the guest. + """ return pulumi.get(self, "source") @property @pulumi.getter def target(self) -> str: + """ + an arbitrary string tag that is exported to the guest as a hint for + where to mount the source. + """ return pulumi.get(self, "target") @property @pulumi.getter def accessmode(self) -> Optional[str]: + """ + specifies the security mode for accessing the source. By default + the `mapped` mode is chosen. + """ return pulumi.get(self, "accessmode") @property @pulumi.getter def readonly(self) -> Optional[bool]: + """ + enables exporting filesystem as a readonly mount for guest, by + default read-only access is given. + + Example: + """ return pulumi.get(self, "readonly")