From c4445aa92f98f6ca6b7652c602e50508a99805b8 Mon Sep 17 00:00:00 2001 From: Brandon Kalinowski Date: Mon, 8 Dec 2025 10:47:09 -0500 Subject: [PATCH] Update --- .github/actions/download-tfgen/action.yml | 9 +- .github/actions/upload-bin/action.yml | 4 +- .upgrade-config.yml | 2 +- COPYRIGHT | 4 +- Makefile | 2 +- examples/basic-py/Pulumi.yaml | 3 - examples/basic-py/__main__.py | 18 - examples/basic-py/requirements.txt | 2 - examples/basic-ts/index.ts | 17 +- examples/examples_dotnet_test.go | 5 - examples/examples_py_test.go | 23 - examples/examples_test.go | 2 +- sdk/go/.gitattributes | 1 + sdk/go/incus/certificate.go | 10 +- sdk/go/incus/clusterGroup.go | 34 +- sdk/go/incus/clusterGroupAssignment.go | 258 ---- sdk/go/incus/clusterGroupMember.go | 257 ++++ sdk/go/incus/config/config.go | 10 +- sdk/go/incus/config/pulumiTypes.go | 62 +- sdk/go/incus/getCluster.go | 204 +++ sdk/go/incus/getImage.go | 2 +- sdk/go/incus/getInstance.go | 247 ++++ sdk/go/incus/getNetwork.go | 210 +++ sdk/go/incus/getNetworkAcl.go | 173 +++ sdk/go/incus/getNetworkAddressSet.go | 162 +++ sdk/go/incus/getNetworkForward.go | 192 +++ sdk/go/incus/getNetworkIntegration.go | 153 ++ sdk/go/incus/getNetworkLoadBalancer.go | 194 +++ sdk/go/incus/getNetworkPeer.go | 216 +++ sdk/go/incus/getNetworkZone.go | 151 ++ sdk/go/incus/getProfile.go | 46 +- sdk/go/incus/getProject.go | 27 +- sdk/go/incus/getStorageBucket.go | 194 +++ sdk/go/incus/getStoragePool.go | 175 +++ sdk/go/incus/getStorageVolume.go | 204 +++ sdk/go/incus/image.go | 73 +- sdk/go/incus/init.go | 22 +- sdk/go/incus/instance.go | 27 +- sdk/go/incus/instanceSnapshot.go | 10 +- sdk/go/incus/internal/pulumiUtilities.go | 2 +- sdk/go/incus/internal/pulumiVersion.go | 2 +- sdk/go/incus/network.go | 24 +- sdk/go/incus/networkAcl.go | 12 +- sdk/go/incus/networkAddressSet.go | 387 ++++++ sdk/go/incus/networkForward.go | 3 +- sdk/go/incus/networkIntegration.go | 10 +- sdk/go/incus/networkLoadBalancer.go | 3 +- sdk/go/incus/networkPeer.go | 12 +- sdk/go/incus/networkZone.go | 12 +- sdk/go/incus/networkZoneRecord.go | 10 +- sdk/go/incus/profile.go | 12 +- sdk/go/incus/project.go | 27 +- sdk/go/incus/provider.go | 49 +- sdk/go/incus/pulumiTypes.go | 1227 ++++++++++++++++- sdk/go/incus/server.go | 268 ++++ sdk/go/incus/storageBucket.go | 10 +- sdk/go/incus/storageBucketKey.go | 10 +- sdk/go/incus/storagePool.go | 34 +- sdk/go/incus/storageVolume.go | 10 +- sdk/nodejs/.gitattributes | 1 + sdk/nodejs/.gitignore | 2 + sdk/nodejs/certificate.ts | 55 +- sdk/nodejs/clusterGroup.ts | 42 +- ...oupAssignment.ts => clusterGroupMember.ts} | 60 +- sdk/nodejs/config/index.ts | 2 +- sdk/nodejs/config/vars.ts | 16 +- sdk/nodejs/getCluster.ts | 168 +++ sdk/nodejs/getImage.ts | 4 +- sdk/nodejs/getInstance.ts | 248 ++++ sdk/nodejs/getNetwork.ts | 198 +++ sdk/nodejs/getNetworkAcl.ts | 157 +++ sdk/nodejs/getNetworkAddressSet.ts | 141 ++ sdk/nodejs/getNetworkForward.ts | 181 +++ sdk/nodejs/getNetworkIntegration.ts | 130 ++ sdk/nodejs/getNetworkLoadBalancer.ts | 184 +++ sdk/nodejs/getNetworkPeer.ts | 210 +++ sdk/nodejs/getNetworkZone.ts | 127 ++ sdk/nodejs/getProfile.ts | 49 +- sdk/nodejs/getProject.ts | 36 +- sdk/nodejs/getStorageBucket.ts | 180 +++ sdk/nodejs/getStoragePool.ts | 156 +++ sdk/nodejs/getStorageVolume.ts | 193 +++ sdk/nodejs/go.mod | 2 +- sdk/nodejs/image.ts | 91 +- sdk/nodejs/index.ts | 103 +- sdk/nodejs/instance.ts | 135 +- sdk/nodejs/instanceSnapshot.ts | 43 +- sdk/nodejs/network.ts | 61 +- sdk/nodejs/networkAcl.ts | 51 +- sdk/nodejs/networkAddressSet.ts | 208 +++ sdk/nodejs/networkForward.ts | 48 +- sdk/nodejs/networkIntegration.ts | 45 +- sdk/nodejs/networkLoadBalancer.ts | 54 +- sdk/nodejs/networkPeer.ts | 73 +- sdk/nodejs/networkZone.ts | 39 +- sdk/nodejs/networkZoneRecord.ts | 51 +- sdk/nodejs/profile.ts | 45 +- sdk/nodejs/project.ts | 47 +- sdk/nodejs/provider.ts | 50 +- sdk/nodejs/server.ts | 121 ++ sdk/nodejs/storageBucket.ts | 61 +- sdk/nodejs/storageBucketKey.ts | 61 +- sdk/nodejs/storagePool.ts | 63 +- sdk/nodejs/storageVolume.ts | 79 +- sdk/nodejs/tsconfig.json | 19 +- sdk/nodejs/types/index.ts | 2 +- sdk/nodejs/types/input.ts | 367 ++++- sdk/nodejs/types/output.ts | 235 +++- sdk/nodejs/utilities.ts | 3 +- 109 files changed, 9007 insertions(+), 1219 deletions(-) delete mode 100644 examples/basic-py/Pulumi.yaml delete mode 100644 examples/basic-py/__main__.py delete mode 100644 examples/basic-py/requirements.txt delete mode 100644 examples/examples_dotnet_test.go delete mode 100644 examples/examples_py_test.go create mode 100644 sdk/go/.gitattributes delete mode 100644 sdk/go/incus/clusterGroupAssignment.go create mode 100644 sdk/go/incus/clusterGroupMember.go create mode 100644 sdk/go/incus/getCluster.go create mode 100644 sdk/go/incus/getInstance.go create mode 100644 sdk/go/incus/getNetwork.go create mode 100644 sdk/go/incus/getNetworkAcl.go create mode 100644 sdk/go/incus/getNetworkAddressSet.go create mode 100644 sdk/go/incus/getNetworkForward.go create mode 100644 sdk/go/incus/getNetworkIntegration.go create mode 100644 sdk/go/incus/getNetworkLoadBalancer.go create mode 100644 sdk/go/incus/getNetworkPeer.go create mode 100644 sdk/go/incus/getNetworkZone.go create mode 100644 sdk/go/incus/getStorageBucket.go create mode 100644 sdk/go/incus/getStoragePool.go create mode 100644 sdk/go/incus/getStorageVolume.go create mode 100644 sdk/go/incus/networkAddressSet.go create mode 100644 sdk/go/incus/server.go create mode 100644 sdk/nodejs/.gitattributes create mode 100644 sdk/nodejs/.gitignore rename sdk/nodejs/{clusterGroupAssignment.ts => clusterGroupMember.ts} (54%) create mode 100644 sdk/nodejs/getCluster.ts create mode 100644 sdk/nodejs/getInstance.ts create mode 100644 sdk/nodejs/getNetwork.ts create mode 100644 sdk/nodejs/getNetworkAcl.ts create mode 100644 sdk/nodejs/getNetworkAddressSet.ts create mode 100644 sdk/nodejs/getNetworkForward.ts create mode 100644 sdk/nodejs/getNetworkIntegration.ts create mode 100644 sdk/nodejs/getNetworkLoadBalancer.ts create mode 100644 sdk/nodejs/getNetworkPeer.ts create mode 100644 sdk/nodejs/getNetworkZone.ts create mode 100644 sdk/nodejs/getStorageBucket.ts create mode 100644 sdk/nodejs/getStoragePool.ts create mode 100644 sdk/nodejs/getStorageVolume.ts create mode 100644 sdk/nodejs/networkAddressSet.ts create mode 100644 sdk/nodejs/server.ts diff --git a/.github/actions/download-tfgen/action.yml b/.github/actions/download-tfgen/action.yml index e417e28..1536b73 100644 --- a/.github/actions/download-tfgen/action.yml +++ b/.github/actions/download-tfgen/action.yml @@ -4,14 +4,13 @@ description: Downloads the tfgen binary to `bin/`. runs: using: "composite" steps: - - - name: Download pulumi-tfgen-xyz + - name: Download pulumi-tfgen-incus uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: pulumi-tfgen-xyz + name: pulumi-tfgen-incus path: ${{ github.workspace }}/bin - - name: Ensure pulumi-tfgen-xyz is executable + - name: Ensure pulumi-tfgen-incus is executable shell: bash run: | - find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; + find ${{ github.workspace }} -name "pulumi-*-incus" -print -exec chmod +x {} \; diff --git a/.github/actions/upload-bin/action.yml b/.github/actions/upload-bin/action.yml index 8e713fd..7a9467f 100644 --- a/.github/actions/upload-bin/action.yml +++ b/.github/actions/upload-bin/action.yml @@ -6,10 +6,10 @@ runs: steps: - name: Tar provider binaries shell: bash - run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-xyz pulumi-tfgen-xyz + run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-incus pulumi-tfgen-incus - name: Upload artifacts uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: - name: xyz-provider.tar.gz + name: incus-provider.tar.gz path: ${{ github.workspace }}/bin/provider.tar.gz retention-days: 30 diff --git a/.upgrade-config.yml b/.upgrade-config.yml index e748a56..a8ae6aa 100644 --- a/.upgrade-config.yml +++ b/.upgrade-config.yml @@ -1,6 +1,6 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt --- -upstream-provider-name: terraform-provider-xyz +upstream-provider-name: terraform-provider-incus pulumi-infer-version: true remove-plugins: true diff --git a/COPYRIGHT b/COPYRIGHT index 0747078..5c10a90 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -5,7 +5,7 @@ LICENSE or ). This project is a larger work that combines with software written by third parties, licensed under their own terms. -Notably, this larger work combines with the Terraform XYZ Provider, +Notably, this larger work combines with the Terraform Incus Provider, which is licensed under the Mozilla Public License 2.0 (see or the project itself at -). +). diff --git a/Makefile b/Makefile index 8c40d54..a6423c0 100644 --- a/Makefile +++ b/Makefile @@ -163,7 +163,7 @@ build_nodejs: .make/build_nodejs .make/build_nodejs: .make/generate_nodejs cd sdk/nodejs/ && \ pnpm install && \ - pnpm run tsc && \ + pnpm tsc && \ cp ../../README.md ../../LICENSE package.json pnpm-lock.yaml ./bin/ @touch $@ .PHONY: generate_nodejs build_nodejs diff --git a/examples/basic-py/Pulumi.yaml b/examples/basic-py/Pulumi.yaml deleted file mode 100644 index e52fc0d..0000000 --- a/examples/basic-py/Pulumi.yaml +++ /dev/null @@ -1,3 +0,0 @@ -name: basic-py -runtime: python -description: A basic python program for integration testing diff --git a/examples/basic-py/__main__.py b/examples/basic-py/__main__.py deleted file mode 100644 index a1aa3ec..0000000 --- a/examples/basic-py/__main__.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2024, Pulumi Corporation. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import pulumi -import pulumi_xyz - -resource = pulumi_xyz.Resource("Resource", sample_attribute = "attr") diff --git a/examples/basic-py/requirements.txt b/examples/basic-py/requirements.txt deleted file mode 100644 index cf79e78..0000000 --- a/examples/basic-py/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi-xyz>=1.0.0,<2.0.0 diff --git a/examples/basic-ts/index.ts b/examples/basic-ts/index.ts index 24acf4a..bd67060 100644 --- a/examples/basic-ts/index.ts +++ b/examples/basic-ts/index.ts @@ -1,12 +1,25 @@ import * as incus from "@kiterun/incus"; -const resource = new incus.Instance("instance1", { - name: "instance1", +const resource = new incus.Instance("instance2", { + name: "instance2", image: "images:ubuntu/24.04", project: "default", config: { "limits.cpu": "4", }, + remote: "pizazz", + devices: [ + { + name: "eth0", + type: "nic", + properties: { + network: "production", + } + } + ], + waitFors: [{ + type: "ipv4", + }] }) export const ip1 = resource.ipv4Address; diff --git a/examples/examples_dotnet_test.go b/examples/examples_dotnet_test.go deleted file mode 100644 index 6a6b141..0000000 --- a/examples/examples_dotnet_test.go +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2024, Pulumi Corporation. All rights reserved. -//go:build dotnet || all -// +build dotnet all - -package examples diff --git a/examples/examples_py_test.go b/examples/examples_py_test.go deleted file mode 100644 index 231ce9b..0000000 --- a/examples/examples_py_test.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2024, Pulumi Corporation. All rights reserved. -//go:build python || all -// +build python all - -package examples - -import ( - "path/filepath" - "testing" - - "github.com/pulumi/pulumi/pkg/v3/testing/integration" -) - -func TestBasicPy(t *testing.T) { - t.Skip("Skipping until the provider has been implemented") - - test := getPythonBaseOptions(t). - With(integration.ProgramTestOptions{ - Dir: filepath.Join(getCwd(t), "basic-py"), - }) - - integration.ProgramTest(t, &test) -} diff --git a/examples/examples_test.go b/examples/examples_test.go index 294ddcb..7b393cf 100644 --- a/examples/examples_test.go +++ b/examples/examples_test.go @@ -64,7 +64,7 @@ func getCSBaseOptions(t *testing.T) integration.ProgramTestOptions { base := getBaseOptions(t) baseJS := base.With(integration.ProgramTestOptions{ Dependencies: []string{ - "Pulumi.Xyz", + "Pulumi.Incus", }, }) diff --git a/sdk/go/.gitattributes b/sdk/go/.gitattributes new file mode 100644 index 0000000..aae64e2 --- /dev/null +++ b/sdk/go/.gitattributes @@ -0,0 +1 @@ +* linguist-generated diff --git a/sdk/go/incus/certificate.go b/sdk/go/incus/certificate.go index b00f57f..7c6a5a2 100644 --- a/sdk/go/incus/certificate.go +++ b/sdk/go/incus/certificate.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -8,7 +8,6 @@ import ( "reflect" "errors" - "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -49,6 +48,9 @@ func NewCertificate(ctx *pulumi.Context, if args.Certificate == nil { return nil, errors.New("invalid value for required argument 'Certificate'") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } opts = internal.PkgResourceDefaultOpts(opts) var resource Certificate err := ctx.RegisterResource("incus:index/certificate:Certificate", name, args, &resource, opts...) @@ -123,7 +125,7 @@ type certificateArgs struct { // *Optional* - Description of the certificate. Description *string `pulumi:"description"` // **Required** - Name of the certificate. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // *Optional* - List of projects to restrict the certificate to. Projects []string `pulumi:"projects"` // *Optional* - The remote in which the resource will be created. If @@ -143,7 +145,7 @@ type CertificateArgs struct { // *Optional* - Description of the certificate. Description pulumi.StringPtrInput // **Required** - Name of the certificate. - Name pulumi.StringPtrInput + Name pulumi.StringInput // *Optional* - List of projects to restrict the certificate to. Projects pulumi.StringArrayInput // *Optional* - The remote in which the resource will be created. If diff --git a/sdk/go/incus/clusterGroup.go b/sdk/go/incus/clusterGroup.go index 5cfb44b..6ffca10 100644 --- a/sdk/go/incus/clusterGroup.go +++ b/sdk/go/incus/clusterGroup.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -7,6 +7,7 @@ import ( "context" "reflect" + "errors" "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -16,8 +17,9 @@ type ClusterGroup struct { // *Optional* - Map of key/value pairs of // [cluster group config settings](https://linuxcontainers.org/incus/docs/main/howto/cluster_groups/#configuration-options). - Config pulumi.StringMapOutput `pulumi:"config"` - Description pulumi.StringOutput `pulumi:"description"` + Config pulumi.StringMapOutput `pulumi:"config"` + // *Optional* - Description of the cluster group. + Description pulumi.StringOutput `pulumi:"description"` // **Required** - Name of the cluster group. Name pulumi.StringOutput `pulumi:"name"` // *Optional* - The remote in which the resource will be created. If @@ -29,9 +31,12 @@ type ClusterGroup struct { func NewClusterGroup(ctx *pulumi.Context, name string, args *ClusterGroupArgs, opts ...pulumi.ResourceOption) (*ClusterGroup, error) { if args == nil { - args = &ClusterGroupArgs{} + return nil, errors.New("missing one or more required arguments") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } opts = internal.PkgResourceDefaultOpts(opts) var resource ClusterGroup err := ctx.RegisterResource("incus:index/clusterGroup:ClusterGroup", name, args, &resource, opts...) @@ -57,8 +62,9 @@ func GetClusterGroup(ctx *pulumi.Context, type clusterGroupState struct { // *Optional* - Map of key/value pairs of // [cluster group config settings](https://linuxcontainers.org/incus/docs/main/howto/cluster_groups/#configuration-options). - Config map[string]string `pulumi:"config"` - Description *string `pulumi:"description"` + Config map[string]string `pulumi:"config"` + // *Optional* - Description of the cluster group. + Description *string `pulumi:"description"` // **Required** - Name of the cluster group. Name *string `pulumi:"name"` // *Optional* - The remote in which the resource will be created. If @@ -69,7 +75,8 @@ type clusterGroupState struct { type ClusterGroupState struct { // *Optional* - Map of key/value pairs of // [cluster group config settings](https://linuxcontainers.org/incus/docs/main/howto/cluster_groups/#configuration-options). - Config pulumi.StringMapInput + Config pulumi.StringMapInput + // *Optional* - Description of the cluster group. Description pulumi.StringPtrInput // **Required** - Name of the cluster group. Name pulumi.StringPtrInput @@ -85,10 +92,11 @@ func (ClusterGroupState) ElementType() reflect.Type { type clusterGroupArgs struct { // *Optional* - Map of key/value pairs of // [cluster group config settings](https://linuxcontainers.org/incus/docs/main/howto/cluster_groups/#configuration-options). - Config map[string]string `pulumi:"config"` - Description *string `pulumi:"description"` + Config map[string]string `pulumi:"config"` + // *Optional* - Description of the cluster group. + Description *string `pulumi:"description"` // **Required** - Name of the cluster group. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // *Optional* - The remote in which the resource will be created. If // not provided, the provider's default remote will be used. Remote *string `pulumi:"remote"` @@ -98,10 +106,11 @@ type clusterGroupArgs struct { type ClusterGroupArgs struct { // *Optional* - Map of key/value pairs of // [cluster group config settings](https://linuxcontainers.org/incus/docs/main/howto/cluster_groups/#configuration-options). - Config pulumi.StringMapInput + Config pulumi.StringMapInput + // *Optional* - Description of the cluster group. Description pulumi.StringPtrInput // **Required** - Name of the cluster group. - Name pulumi.StringPtrInput + Name pulumi.StringInput // *Optional* - The remote in which the resource will be created. If // not provided, the provider's default remote will be used. Remote pulumi.StringPtrInput @@ -200,6 +209,7 @@ func (o ClusterGroupOutput) Config() pulumi.StringMapOutput { return o.ApplyT(func(v *ClusterGroup) pulumi.StringMapOutput { return v.Config }).(pulumi.StringMapOutput) } +// *Optional* - Description of the cluster group. func (o ClusterGroupOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v *ClusterGroup) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) } diff --git a/sdk/go/incus/clusterGroupAssignment.go b/sdk/go/incus/clusterGroupAssignment.go deleted file mode 100644 index 4c14370..0000000 --- a/sdk/go/incus/clusterGroupAssignment.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. -// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** - -package incus - -import ( - "context" - "reflect" - - "errors" - - "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -type ClusterGroupAssignment struct { - pulumi.CustomResourceState - - // **Required** - Name of the cluster group. - ClusterGroup pulumi.StringOutput `pulumi:"clusterGroup"` - // **Required** - Name of the cluster group member. - Member pulumi.StringOutput `pulumi:"member"` - // *Optional* - The remote in which the resource will be created. If - // not provided, the provider's default remote will be used. - Remote pulumi.StringPtrOutput `pulumi:"remote"` -} - -// NewClusterGroupAssignment registers a new resource with the given unique name, arguments, and options. -func NewClusterGroupAssignment(ctx *pulumi.Context, - name string, args *ClusterGroupAssignmentArgs, opts ...pulumi.ResourceOption) (*ClusterGroupAssignment, error) { - if args == nil { - return nil, errors.New("missing one or more required arguments") - } - - if args.ClusterGroup == nil { - return nil, errors.New("invalid value for required argument 'ClusterGroup'") - } - if args.Member == nil { - return nil, errors.New("invalid value for required argument 'Member'") - } - opts = internal.PkgResourceDefaultOpts(opts) - var resource ClusterGroupAssignment - err := ctx.RegisterResource("incus:index/clusterGroupAssignment:ClusterGroupAssignment", name, args, &resource, opts...) - if err != nil { - return nil, err - } - return &resource, nil -} - -// GetClusterGroupAssignment gets an existing ClusterGroupAssignment resource's state with the given name, ID, and optional -// state properties that are used to uniquely qualify the lookup (nil if not required). -func GetClusterGroupAssignment(ctx *pulumi.Context, - name string, id pulumi.IDInput, state *ClusterGroupAssignmentState, opts ...pulumi.ResourceOption) (*ClusterGroupAssignment, error) { - var resource ClusterGroupAssignment - err := ctx.ReadResource("incus:index/clusterGroupAssignment:ClusterGroupAssignment", name, id, state, &resource, opts...) - if err != nil { - return nil, err - } - return &resource, nil -} - -// Input properties used for looking up and filtering ClusterGroupAssignment resources. -type clusterGroupAssignmentState struct { - // **Required** - Name of the cluster group. - ClusterGroup *string `pulumi:"clusterGroup"` - // **Required** - Name of the cluster group member. - Member *string `pulumi:"member"` - // *Optional* - The remote in which the resource will be created. If - // not provided, the provider's default remote will be used. - Remote *string `pulumi:"remote"` -} - -type ClusterGroupAssignmentState struct { - // **Required** - Name of the cluster group. - ClusterGroup pulumi.StringPtrInput - // **Required** - Name of the cluster group member. - Member pulumi.StringPtrInput - // *Optional* - The remote in which the resource will be created. If - // not provided, the provider's default remote will be used. - Remote pulumi.StringPtrInput -} - -func (ClusterGroupAssignmentState) ElementType() reflect.Type { - return reflect.TypeOf((*clusterGroupAssignmentState)(nil)).Elem() -} - -type clusterGroupAssignmentArgs struct { - // **Required** - Name of the cluster group. - ClusterGroup string `pulumi:"clusterGroup"` - // **Required** - Name of the cluster group member. - Member string `pulumi:"member"` - // *Optional* - The remote in which the resource will be created. If - // not provided, the provider's default remote will be used. - Remote *string `pulumi:"remote"` -} - -// The set of arguments for constructing a ClusterGroupAssignment resource. -type ClusterGroupAssignmentArgs struct { - // **Required** - Name of the cluster group. - ClusterGroup pulumi.StringInput - // **Required** - Name of the cluster group member. - Member pulumi.StringInput - // *Optional* - The remote in which the resource will be created. If - // not provided, the provider's default remote will be used. - Remote pulumi.StringPtrInput -} - -func (ClusterGroupAssignmentArgs) ElementType() reflect.Type { - return reflect.TypeOf((*clusterGroupAssignmentArgs)(nil)).Elem() -} - -type ClusterGroupAssignmentInput interface { - pulumi.Input - - ToClusterGroupAssignmentOutput() ClusterGroupAssignmentOutput - ToClusterGroupAssignmentOutputWithContext(ctx context.Context) ClusterGroupAssignmentOutput -} - -func (*ClusterGroupAssignment) ElementType() reflect.Type { - return reflect.TypeOf((**ClusterGroupAssignment)(nil)).Elem() -} - -func (i *ClusterGroupAssignment) ToClusterGroupAssignmentOutput() ClusterGroupAssignmentOutput { - return i.ToClusterGroupAssignmentOutputWithContext(context.Background()) -} - -func (i *ClusterGroupAssignment) ToClusterGroupAssignmentOutputWithContext(ctx context.Context) ClusterGroupAssignmentOutput { - return pulumi.ToOutputWithContext(ctx, i).(ClusterGroupAssignmentOutput) -} - -// ClusterGroupAssignmentArrayInput is an input type that accepts ClusterGroupAssignmentArray and ClusterGroupAssignmentArrayOutput values. -// You can construct a concrete instance of `ClusterGroupAssignmentArrayInput` via: -// -// ClusterGroupAssignmentArray{ ClusterGroupAssignmentArgs{...} } -type ClusterGroupAssignmentArrayInput interface { - pulumi.Input - - ToClusterGroupAssignmentArrayOutput() ClusterGroupAssignmentArrayOutput - ToClusterGroupAssignmentArrayOutputWithContext(context.Context) ClusterGroupAssignmentArrayOutput -} - -type ClusterGroupAssignmentArray []ClusterGroupAssignmentInput - -func (ClusterGroupAssignmentArray) ElementType() reflect.Type { - return reflect.TypeOf((*[]*ClusterGroupAssignment)(nil)).Elem() -} - -func (i ClusterGroupAssignmentArray) ToClusterGroupAssignmentArrayOutput() ClusterGroupAssignmentArrayOutput { - return i.ToClusterGroupAssignmentArrayOutputWithContext(context.Background()) -} - -func (i ClusterGroupAssignmentArray) ToClusterGroupAssignmentArrayOutputWithContext(ctx context.Context) ClusterGroupAssignmentArrayOutput { - return pulumi.ToOutputWithContext(ctx, i).(ClusterGroupAssignmentArrayOutput) -} - -// ClusterGroupAssignmentMapInput is an input type that accepts ClusterGroupAssignmentMap and ClusterGroupAssignmentMapOutput values. -// You can construct a concrete instance of `ClusterGroupAssignmentMapInput` via: -// -// ClusterGroupAssignmentMap{ "key": ClusterGroupAssignmentArgs{...} } -type ClusterGroupAssignmentMapInput interface { - pulumi.Input - - ToClusterGroupAssignmentMapOutput() ClusterGroupAssignmentMapOutput - ToClusterGroupAssignmentMapOutputWithContext(context.Context) ClusterGroupAssignmentMapOutput -} - -type ClusterGroupAssignmentMap map[string]ClusterGroupAssignmentInput - -func (ClusterGroupAssignmentMap) ElementType() reflect.Type { - return reflect.TypeOf((*map[string]*ClusterGroupAssignment)(nil)).Elem() -} - -func (i ClusterGroupAssignmentMap) ToClusterGroupAssignmentMapOutput() ClusterGroupAssignmentMapOutput { - return i.ToClusterGroupAssignmentMapOutputWithContext(context.Background()) -} - -func (i ClusterGroupAssignmentMap) ToClusterGroupAssignmentMapOutputWithContext(ctx context.Context) ClusterGroupAssignmentMapOutput { - return pulumi.ToOutputWithContext(ctx, i).(ClusterGroupAssignmentMapOutput) -} - -type ClusterGroupAssignmentOutput struct{ *pulumi.OutputState } - -func (ClusterGroupAssignmentOutput) ElementType() reflect.Type { - return reflect.TypeOf((**ClusterGroupAssignment)(nil)).Elem() -} - -func (o ClusterGroupAssignmentOutput) ToClusterGroupAssignmentOutput() ClusterGroupAssignmentOutput { - return o -} - -func (o ClusterGroupAssignmentOutput) ToClusterGroupAssignmentOutputWithContext(ctx context.Context) ClusterGroupAssignmentOutput { - return o -} - -// **Required** - Name of the cluster group. -func (o ClusterGroupAssignmentOutput) ClusterGroup() pulumi.StringOutput { - return o.ApplyT(func(v *ClusterGroupAssignment) pulumi.StringOutput { return v.ClusterGroup }).(pulumi.StringOutput) -} - -// **Required** - Name of the cluster group member. -func (o ClusterGroupAssignmentOutput) Member() pulumi.StringOutput { - return o.ApplyT(func(v *ClusterGroupAssignment) pulumi.StringOutput { return v.Member }).(pulumi.StringOutput) -} - -// *Optional* - The remote in which the resource will be created. If -// not provided, the provider's default remote will be used. -func (o ClusterGroupAssignmentOutput) Remote() pulumi.StringPtrOutput { - return o.ApplyT(func(v *ClusterGroupAssignment) pulumi.StringPtrOutput { return v.Remote }).(pulumi.StringPtrOutput) -} - -type ClusterGroupAssignmentArrayOutput struct{ *pulumi.OutputState } - -func (ClusterGroupAssignmentArrayOutput) ElementType() reflect.Type { - return reflect.TypeOf((*[]*ClusterGroupAssignment)(nil)).Elem() -} - -func (o ClusterGroupAssignmentArrayOutput) ToClusterGroupAssignmentArrayOutput() ClusterGroupAssignmentArrayOutput { - return o -} - -func (o ClusterGroupAssignmentArrayOutput) ToClusterGroupAssignmentArrayOutputWithContext(ctx context.Context) ClusterGroupAssignmentArrayOutput { - return o -} - -func (o ClusterGroupAssignmentArrayOutput) Index(i pulumi.IntInput) ClusterGroupAssignmentOutput { - return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ClusterGroupAssignment { - return vs[0].([]*ClusterGroupAssignment)[vs[1].(int)] - }).(ClusterGroupAssignmentOutput) -} - -type ClusterGroupAssignmentMapOutput struct{ *pulumi.OutputState } - -func (ClusterGroupAssignmentMapOutput) ElementType() reflect.Type { - return reflect.TypeOf((*map[string]*ClusterGroupAssignment)(nil)).Elem() -} - -func (o ClusterGroupAssignmentMapOutput) ToClusterGroupAssignmentMapOutput() ClusterGroupAssignmentMapOutput { - return o -} - -func (o ClusterGroupAssignmentMapOutput) ToClusterGroupAssignmentMapOutputWithContext(ctx context.Context) ClusterGroupAssignmentMapOutput { - return o -} - -func (o ClusterGroupAssignmentMapOutput) MapIndex(k pulumi.StringInput) ClusterGroupAssignmentOutput { - return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ClusterGroupAssignment { - return vs[0].(map[string]*ClusterGroupAssignment)[vs[1].(string)] - }).(ClusterGroupAssignmentOutput) -} - -func init() { - pulumi.RegisterInputType(reflect.TypeOf((*ClusterGroupAssignmentInput)(nil)).Elem(), &ClusterGroupAssignment{}) - pulumi.RegisterInputType(reflect.TypeOf((*ClusterGroupAssignmentArrayInput)(nil)).Elem(), ClusterGroupAssignmentArray{}) - pulumi.RegisterInputType(reflect.TypeOf((*ClusterGroupAssignmentMapInput)(nil)).Elem(), ClusterGroupAssignmentMap{}) - pulumi.RegisterOutputType(ClusterGroupAssignmentOutput{}) - pulumi.RegisterOutputType(ClusterGroupAssignmentArrayOutput{}) - pulumi.RegisterOutputType(ClusterGroupAssignmentMapOutput{}) -} diff --git a/sdk/go/incus/clusterGroupMember.go b/sdk/go/incus/clusterGroupMember.go new file mode 100644 index 0000000..eae6220 --- /dev/null +++ b/sdk/go/incus/clusterGroupMember.go @@ -0,0 +1,257 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "errors" + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type ClusterGroupMember struct { + pulumi.CustomResourceState + + // **Required** - Name of the cluster group. + ClusterGroup pulumi.StringOutput `pulumi:"clusterGroup"` + // **Required** - Name of the cluster group member. + Member pulumi.StringOutput `pulumi:"member"` + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrOutput `pulumi:"remote"` +} + +// NewClusterGroupMember registers a new resource with the given unique name, arguments, and options. +func NewClusterGroupMember(ctx *pulumi.Context, + name string, args *ClusterGroupMemberArgs, opts ...pulumi.ResourceOption) (*ClusterGroupMember, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.ClusterGroup == nil { + return nil, errors.New("invalid value for required argument 'ClusterGroup'") + } + if args.Member == nil { + return nil, errors.New("invalid value for required argument 'Member'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource ClusterGroupMember + err := ctx.RegisterResource("incus:index/clusterGroupMember:ClusterGroupMember", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetClusterGroupMember gets an existing ClusterGroupMember resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetClusterGroupMember(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *ClusterGroupMemberState, opts ...pulumi.ResourceOption) (*ClusterGroupMember, error) { + var resource ClusterGroupMember + err := ctx.ReadResource("incus:index/clusterGroupMember:ClusterGroupMember", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering ClusterGroupMember resources. +type clusterGroupMemberState struct { + // **Required** - Name of the cluster group. + ClusterGroup *string `pulumi:"clusterGroup"` + // **Required** - Name of the cluster group member. + Member *string `pulumi:"member"` + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` +} + +type ClusterGroupMemberState struct { + // **Required** - Name of the cluster group. + ClusterGroup pulumi.StringPtrInput + // **Required** - Name of the cluster group member. + Member pulumi.StringPtrInput + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput +} + +func (ClusterGroupMemberState) ElementType() reflect.Type { + return reflect.TypeOf((*clusterGroupMemberState)(nil)).Elem() +} + +type clusterGroupMemberArgs struct { + // **Required** - Name of the cluster group. + ClusterGroup string `pulumi:"clusterGroup"` + // **Required** - Name of the cluster group member. + Member string `pulumi:"member"` + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` +} + +// The set of arguments for constructing a ClusterGroupMember resource. +type ClusterGroupMemberArgs struct { + // **Required** - Name of the cluster group. + ClusterGroup pulumi.StringInput + // **Required** - Name of the cluster group member. + Member pulumi.StringInput + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput +} + +func (ClusterGroupMemberArgs) ElementType() reflect.Type { + return reflect.TypeOf((*clusterGroupMemberArgs)(nil)).Elem() +} + +type ClusterGroupMemberInput interface { + pulumi.Input + + ToClusterGroupMemberOutput() ClusterGroupMemberOutput + ToClusterGroupMemberOutputWithContext(ctx context.Context) ClusterGroupMemberOutput +} + +func (*ClusterGroupMember) ElementType() reflect.Type { + return reflect.TypeOf((**ClusterGroupMember)(nil)).Elem() +} + +func (i *ClusterGroupMember) ToClusterGroupMemberOutput() ClusterGroupMemberOutput { + return i.ToClusterGroupMemberOutputWithContext(context.Background()) +} + +func (i *ClusterGroupMember) ToClusterGroupMemberOutputWithContext(ctx context.Context) ClusterGroupMemberOutput { + return pulumi.ToOutputWithContext(ctx, i).(ClusterGroupMemberOutput) +} + +// ClusterGroupMemberArrayInput is an input type that accepts ClusterGroupMemberArray and ClusterGroupMemberArrayOutput values. +// You can construct a concrete instance of `ClusterGroupMemberArrayInput` via: +// +// ClusterGroupMemberArray{ ClusterGroupMemberArgs{...} } +type ClusterGroupMemberArrayInput interface { + pulumi.Input + + ToClusterGroupMemberArrayOutput() ClusterGroupMemberArrayOutput + ToClusterGroupMemberArrayOutputWithContext(context.Context) ClusterGroupMemberArrayOutput +} + +type ClusterGroupMemberArray []ClusterGroupMemberInput + +func (ClusterGroupMemberArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*ClusterGroupMember)(nil)).Elem() +} + +func (i ClusterGroupMemberArray) ToClusterGroupMemberArrayOutput() ClusterGroupMemberArrayOutput { + return i.ToClusterGroupMemberArrayOutputWithContext(context.Background()) +} + +func (i ClusterGroupMemberArray) ToClusterGroupMemberArrayOutputWithContext(ctx context.Context) ClusterGroupMemberArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(ClusterGroupMemberArrayOutput) +} + +// ClusterGroupMemberMapInput is an input type that accepts ClusterGroupMemberMap and ClusterGroupMemberMapOutput values. +// You can construct a concrete instance of `ClusterGroupMemberMapInput` via: +// +// ClusterGroupMemberMap{ "key": ClusterGroupMemberArgs{...} } +type ClusterGroupMemberMapInput interface { + pulumi.Input + + ToClusterGroupMemberMapOutput() ClusterGroupMemberMapOutput + ToClusterGroupMemberMapOutputWithContext(context.Context) ClusterGroupMemberMapOutput +} + +type ClusterGroupMemberMap map[string]ClusterGroupMemberInput + +func (ClusterGroupMemberMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*ClusterGroupMember)(nil)).Elem() +} + +func (i ClusterGroupMemberMap) ToClusterGroupMemberMapOutput() ClusterGroupMemberMapOutput { + return i.ToClusterGroupMemberMapOutputWithContext(context.Background()) +} + +func (i ClusterGroupMemberMap) ToClusterGroupMemberMapOutputWithContext(ctx context.Context) ClusterGroupMemberMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(ClusterGroupMemberMapOutput) +} + +type ClusterGroupMemberOutput struct{ *pulumi.OutputState } + +func (ClusterGroupMemberOutput) ElementType() reflect.Type { + return reflect.TypeOf((**ClusterGroupMember)(nil)).Elem() +} + +func (o ClusterGroupMemberOutput) ToClusterGroupMemberOutput() ClusterGroupMemberOutput { + return o +} + +func (o ClusterGroupMemberOutput) ToClusterGroupMemberOutputWithContext(ctx context.Context) ClusterGroupMemberOutput { + return o +} + +// **Required** - Name of the cluster group. +func (o ClusterGroupMemberOutput) ClusterGroup() pulumi.StringOutput { + return o.ApplyT(func(v *ClusterGroupMember) pulumi.StringOutput { return v.ClusterGroup }).(pulumi.StringOutput) +} + +// **Required** - Name of the cluster group member. +func (o ClusterGroupMemberOutput) Member() pulumi.StringOutput { + return o.ApplyT(func(v *ClusterGroupMember) pulumi.StringOutput { return v.Member }).(pulumi.StringOutput) +} + +// *Optional* - The remote in which the resource will be created. If +// not provided, the provider's default remote will be used. +func (o ClusterGroupMemberOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ClusterGroupMember) pulumi.StringPtrOutput { return v.Remote }).(pulumi.StringPtrOutput) +} + +type ClusterGroupMemberArrayOutput struct{ *pulumi.OutputState } + +func (ClusterGroupMemberArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*ClusterGroupMember)(nil)).Elem() +} + +func (o ClusterGroupMemberArrayOutput) ToClusterGroupMemberArrayOutput() ClusterGroupMemberArrayOutput { + return o +} + +func (o ClusterGroupMemberArrayOutput) ToClusterGroupMemberArrayOutputWithContext(ctx context.Context) ClusterGroupMemberArrayOutput { + return o +} + +func (o ClusterGroupMemberArrayOutput) Index(i pulumi.IntInput) ClusterGroupMemberOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ClusterGroupMember { + return vs[0].([]*ClusterGroupMember)[vs[1].(int)] + }).(ClusterGroupMemberOutput) +} + +type ClusterGroupMemberMapOutput struct{ *pulumi.OutputState } + +func (ClusterGroupMemberMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*ClusterGroupMember)(nil)).Elem() +} + +func (o ClusterGroupMemberMapOutput) ToClusterGroupMemberMapOutput() ClusterGroupMemberMapOutput { + return o +} + +func (o ClusterGroupMemberMapOutput) ToClusterGroupMemberMapOutputWithContext(ctx context.Context) ClusterGroupMemberMapOutput { + return o +} + +func (o ClusterGroupMemberMapOutput) MapIndex(k pulumi.StringInput) ClusterGroupMemberOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ClusterGroupMember { + return vs[0].(map[string]*ClusterGroupMember)[vs[1].(string)] + }).(ClusterGroupMemberOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*ClusterGroupMemberInput)(nil)).Elem(), &ClusterGroupMember{}) + pulumi.RegisterInputType(reflect.TypeOf((*ClusterGroupMemberArrayInput)(nil)).Elem(), ClusterGroupMemberArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*ClusterGroupMemberMapInput)(nil)).Elem(), ClusterGroupMemberMap{}) + pulumi.RegisterOutputType(ClusterGroupMemberOutput{}) + pulumi.RegisterOutputType(ClusterGroupMemberArrayOutput{}) + pulumi.RegisterOutputType(ClusterGroupMemberMapOutput{}) +} diff --git a/sdk/go/incus/config/config.go b/sdk/go/incus/config/config.go index 86cdf8d..1ff52a2 100644 --- a/sdk/go/incus/config/config.go +++ b/sdk/go/incus/config/config.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package config @@ -21,13 +21,17 @@ func GetConfigDir(ctx *pulumi.Context) string { return config.Get(ctx, "incus:configDir") } +// The default remote to use when no other remote is defined in a resource. +func GetDefaultRemote(ctx *pulumi.Context) string { + return config.Get(ctx, "incus:defaultRemote") +} + // Automatically generate the Incus client certificates if they don't exist. func GetGenerateClientCertificates(ctx *pulumi.Context) bool { return config.GetBool(ctx, "incus:generateClientCertificates") } -// The project where project-scoped resources will be created. Can be overridden in individual resources. (default = -// default) +// The project where project-scoped resources will be created. Can be overridden in individual resources. (default = default) func GetProject(ctx *pulumi.Context) string { return config.Get(ctx, "incus:project") } diff --git a/sdk/go/incus/config/pulumiTypes.go b/sdk/go/incus/config/pulumiTypes.go index cf93710..977fbd9 100644 --- a/sdk/go/incus/config/pulumiTypes.go +++ b/sdk/go/incus/config/pulumiTypes.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package config @@ -14,17 +14,17 @@ import ( var _ = internal.GetEnvOrDefault type Remotes struct { - // The FQDN or IP where the Incus daemon can be contacted. (default = "" (read from lxc config)) + // The URL of the Incus host. The default will be the path to the local unix socket, or leaving it as an empty string will use the default socket path. Address *string `pulumi:"address"` - // Set this remote as default. - Default *bool `pulumi:"default"` - // Name of the Incus remote. Required when incusScheme set to https, to enable locating server certificate. + // Server authentication type, tls or oidc. ( Only for the `incus` protocol ) + AuthenticationType *string `pulumi:"authenticationType"` + // Name of the Incus remote. Name string `pulumi:"name"` - // Port Incus Daemon API is listening on. (default = 8443) - Port *string `pulumi:"port"` - // Unix (unix) or HTTPs (https). (default = unix) - Scheme *string `pulumi:"scheme"` - // The trust token for the remote. + // Server protocol ( incus, oci or simplestreams ) + Protocol *string `pulumi:"protocol"` + // Public image server + Public *bool `pulumi:"public"` + // The trust token used for initial authentication with the Incus remote. Token *string `pulumi:"token"` } @@ -40,17 +40,17 @@ type RemotesInput interface { } type RemotesArgs struct { - // The FQDN or IP where the Incus daemon can be contacted. (default = "" (read from lxc config)) + // The URL of the Incus host. The default will be the path to the local unix socket, or leaving it as an empty string will use the default socket path. Address pulumi.StringPtrInput `pulumi:"address"` - // Set this remote as default. - Default pulumi.BoolPtrInput `pulumi:"default"` - // Name of the Incus remote. Required when incusScheme set to https, to enable locating server certificate. + // Server authentication type, tls or oidc. ( Only for the `incus` protocol ) + AuthenticationType pulumi.StringPtrInput `pulumi:"authenticationType"` + // Name of the Incus remote. Name pulumi.StringInput `pulumi:"name"` - // Port Incus Daemon API is listening on. (default = 8443) - Port pulumi.StringPtrInput `pulumi:"port"` - // Unix (unix) or HTTPs (https). (default = unix) - Scheme pulumi.StringPtrInput `pulumi:"scheme"` - // The trust token for the remote. + // Server protocol ( incus, oci or simplestreams ) + Protocol pulumi.StringPtrInput `pulumi:"protocol"` + // Public image server + Public pulumi.BoolPtrInput `pulumi:"public"` + // The trust token used for initial authentication with the Incus remote. Token pulumi.StringPtrInput `pulumi:"token"` } @@ -105,32 +105,32 @@ func (o RemotesOutput) ToRemotesOutputWithContext(ctx context.Context) RemotesOu return o } -// The FQDN or IP where the Incus daemon can be contacted. (default = "" (read from lxc config)) +// The URL of the Incus host. The default will be the path to the local unix socket, or leaving it as an empty string will use the default socket path. func (o RemotesOutput) Address() pulumi.StringPtrOutput { return o.ApplyT(func(v Remotes) *string { return v.Address }).(pulumi.StringPtrOutput) } -// Set this remote as default. -func (o RemotesOutput) Default() pulumi.BoolPtrOutput { - return o.ApplyT(func(v Remotes) *bool { return v.Default }).(pulumi.BoolPtrOutput) +// Server authentication type, tls or oidc. ( Only for the `incus` protocol ) +func (o RemotesOutput) AuthenticationType() pulumi.StringPtrOutput { + return o.ApplyT(func(v Remotes) *string { return v.AuthenticationType }).(pulumi.StringPtrOutput) } -// Name of the Incus remote. Required when incusScheme set to https, to enable locating server certificate. +// Name of the Incus remote. func (o RemotesOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v Remotes) string { return v.Name }).(pulumi.StringOutput) } -// Port Incus Daemon API is listening on. (default = 8443) -func (o RemotesOutput) Port() pulumi.StringPtrOutput { - return o.ApplyT(func(v Remotes) *string { return v.Port }).(pulumi.StringPtrOutput) +// Server protocol ( incus, oci or simplestreams ) +func (o RemotesOutput) Protocol() pulumi.StringPtrOutput { + return o.ApplyT(func(v Remotes) *string { return v.Protocol }).(pulumi.StringPtrOutput) } -// Unix (unix) or HTTPs (https). (default = unix) -func (o RemotesOutput) Scheme() pulumi.StringPtrOutput { - return o.ApplyT(func(v Remotes) *string { return v.Scheme }).(pulumi.StringPtrOutput) +// Public image server +func (o RemotesOutput) Public() pulumi.BoolPtrOutput { + return o.ApplyT(func(v Remotes) *bool { return v.Public }).(pulumi.BoolPtrOutput) } -// The trust token for the remote. +// The trust token used for initial authentication with the Incus remote. func (o RemotesOutput) Token() pulumi.StringPtrOutput { return o.ApplyT(func(v Remotes) *string { return v.Token }).(pulumi.StringPtrOutput) } diff --git a/sdk/go/incus/getCluster.go b/sdk/go/incus/getCluster.go new file mode 100644 index 0000000..628cfef --- /dev/null +++ b/sdk/go/incus/getCluster.go @@ -0,0 +1,204 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # getCluster +// +// Provides information about an Incus cluster. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := incus.GetCluster(ctx, &incus.GetClusterArgs{}, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Example prevent execution if any cluster member is not online +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := incus.GetCluster(ctx, &incus.GetClusterArgs{ +// Remote: pulumi.StringRef("cluster"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Example create resource for each cluster member +// +// In this example, we define the server configuration [`core.bgp_address`](https://linuxcontainers.org/incus/docs/main/server_config/#core-configuration), +// +// which has scope `local`, on each cluster member. +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.GetCluster(ctx, &incus.GetClusterArgs{}, nil) +// if err != nil { +// return err +// } +// var tmp0 pulumi.String +// if this.IsClustered { +// tmp0 = pulumi.String(key0) +// } else { +// tmp0 = nil +// } +// var nodes []*incus.Server +// for key0, _ := range this.Members { +// __res, err := incus.NewServer(ctx, fmt.Sprintf("nodes-%v", key0), &incus.ServerArgs{ +// Target: pulumi.String(tmp0), +// Config: pulumi.StringMap{ +// "core.bgp_address": pulumi.String(":179"), +// }, +// }) +// if err != nil { +// return err +// } +// nodes = append(nodes, __res) +// } +// return nil +// }) +// } +// +// ``` +// +// ## Notes +// +// * For non-clustered setups, the `members` attribute will be `null`. +func GetCluster(ctx *pulumi.Context, args *GetClusterArgs, opts ...pulumi.InvokeOption) (*GetClusterResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv GetClusterResult + err := ctx.Invoke("incus:index/getCluster:getCluster", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getCluster. +type GetClusterArgs struct { + // *Optional* - The remote for which the Incus cluster information + // should be queried. If not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` +} + +// A collection of values returned by getCluster. +type GetClusterResult struct { + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + // Whether this is a clustered setup. + IsClustered bool `pulumi:"isClustered"` + // A map of cluster members. The key is the member name and the value + // is a member object. See reference below. + Members map[string]GetClusterMembers `pulumi:"members"` + Remote *string `pulumi:"remote"` +} + +func GetClusterOutput(ctx *pulumi.Context, args GetClusterOutputArgs, opts ...pulumi.InvokeOption) GetClusterResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (GetClusterResultOutput, error) { + args := v.(GetClusterArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("incus:index/getCluster:getCluster", args, GetClusterResultOutput{}, options).(GetClusterResultOutput), nil + }).(GetClusterResultOutput) +} + +// A collection of arguments for invoking getCluster. +type GetClusterOutputArgs struct { + // *Optional* - The remote for which the Incus cluster information + // should be queried. If not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput `pulumi:"remote"` +} + +func (GetClusterOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetClusterArgs)(nil)).Elem() +} + +// A collection of values returned by getCluster. +type GetClusterResultOutput struct{ *pulumi.OutputState } + +func (GetClusterResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetClusterResult)(nil)).Elem() +} + +func (o GetClusterResultOutput) ToGetClusterResultOutput() GetClusterResultOutput { + return o +} + +func (o GetClusterResultOutput) ToGetClusterResultOutputWithContext(ctx context.Context) GetClusterResultOutput { + return o +} + +// The provider-assigned unique ID for this managed resource. +func (o GetClusterResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v GetClusterResult) string { return v.Id }).(pulumi.StringOutput) +} + +// Whether this is a clustered setup. +func (o GetClusterResultOutput) IsClustered() pulumi.BoolOutput { + return o.ApplyT(func(v GetClusterResult) bool { return v.IsClustered }).(pulumi.BoolOutput) +} + +// A map of cluster members. The key is the member name and the value +// is a member object. See reference below. +func (o GetClusterResultOutput) Members() GetClusterMembersMapOutput { + return o.ApplyT(func(v GetClusterResult) map[string]GetClusterMembers { return v.Members }).(GetClusterMembersMapOutput) +} + +func (o GetClusterResultOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v GetClusterResult) *string { return v.Remote }).(pulumi.StringPtrOutput) +} + +func init() { + pulumi.RegisterOutputType(GetClusterResultOutput{}) +} diff --git a/sdk/go/incus/getImage.go b/sdk/go/incus/getImage.go index 1dbcadb..5699340 100644 --- a/sdk/go/incus/getImage.go +++ b/sdk/go/incus/getImage.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus diff --git a/sdk/go/incus/getInstance.go b/sdk/go/incus/getInstance.go new file mode 100644 index 0000000..c5d129f --- /dev/null +++ b/sdk/go/incus/getInstance.go @@ -0,0 +1,247 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # Instance +// +// Provides information about an Incus instance. +// See Incus instance [configuration reference](https://linuxcontainers.org/incus/docs/main/explanation/instance_config/) for more details. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.LookupInstance(ctx, &incus.LookupInstanceArgs{ +// Name: "default", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("instanceName", this.Name) +// return nil +// }) +// } +// +// ``` +func LookupInstance(ctx *pulumi.Context, args *LookupInstanceArgs, opts ...pulumi.InvokeOption) (*LookupInstanceResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupInstanceResult + err := ctx.Invoke("incus:index/getInstance:getInstance", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getInstance. +type LookupInstanceArgs struct { + // Architecture name. + Architecture *string `pulumi:"architecture"` + // Description of the instance. + Description *string `pulumi:"description"` + // Device definitions. See reference below. + Devices []GetInstanceDevice `pulumi:"devices"` + // Whether the instance is ephemeral (deleted on shutdown). + Ephemeral *bool `pulumi:"ephemeral"` + // Location of the instance. + Location *string `pulumi:"location"` + // **Required** - Name of the instance. + Name string `pulumi:"name"` + // List of profiles applied to the instance. + Profiles []string `pulumi:"profiles"` + // *Optional* - Name of the project where the instance is be stored. + Project *string `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` + // Whether the instance is stateful. + Stateful *bool `pulumi:"stateful"` + // Status of the instance. + Status *string `pulumi:"status"` + // 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 `pulumi:"type"` +} + +// A collection of values returned by getInstance. +type LookupInstanceResult struct { + // Architecture name. + Architecture string `pulumi:"architecture"` + // Map of key/value pairs of config settings. + // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/) + Config map[string]string `pulumi:"config"` + // Description of the instance. + Description string `pulumi:"description"` + // Device definitions. See reference below. + Devices []GetInstanceDevice `pulumi:"devices"` + // Whether the instance is ephemeral (deleted on shutdown). + Ephemeral bool `pulumi:"ephemeral"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + // Location of the instance. + Location string `pulumi:"location"` + // Name of the device. + Name string `pulumi:"name"` + // List of profiles applied to the instance. + Profiles []string `pulumi:"profiles"` + Project *string `pulumi:"project"` + Remote *string `pulumi:"remote"` + // Whether the instance is stateful. + Stateful bool `pulumi:"stateful"` + // Status of the instance. + Status string `pulumi:"status"` + // 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 `pulumi:"type"` +} + +func LookupInstanceOutput(ctx *pulumi.Context, args LookupInstanceOutputArgs, opts ...pulumi.InvokeOption) LookupInstanceResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (LookupInstanceResultOutput, error) { + args := v.(LookupInstanceArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("incus:index/getInstance:getInstance", args, LookupInstanceResultOutput{}, options).(LookupInstanceResultOutput), nil + }).(LookupInstanceResultOutput) +} + +// A collection of arguments for invoking getInstance. +type LookupInstanceOutputArgs struct { + // Architecture name. + Architecture pulumi.StringPtrInput `pulumi:"architecture"` + // Description of the instance. + Description pulumi.StringPtrInput `pulumi:"description"` + // Device definitions. See reference below. + Devices GetInstanceDeviceArrayInput `pulumi:"devices"` + // Whether the instance is ephemeral (deleted on shutdown). + Ephemeral pulumi.BoolPtrInput `pulumi:"ephemeral"` + // Location of the instance. + Location pulumi.StringPtrInput `pulumi:"location"` + // **Required** - Name of the instance. + Name pulumi.StringInput `pulumi:"name"` + // List of profiles applied to the instance. + Profiles pulumi.StringArrayInput `pulumi:"profiles"` + // *Optional* - Name of the project where the instance is be stored. + Project pulumi.StringPtrInput `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput `pulumi:"remote"` + // Whether the instance is stateful. + Stateful pulumi.BoolPtrInput `pulumi:"stateful"` + // Status of the instance. + Status pulumi.StringPtrInput `pulumi:"status"` + // 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.StringPtrInput `pulumi:"type"` +} + +func (LookupInstanceOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupInstanceArgs)(nil)).Elem() +} + +// A collection of values returned by getInstance. +type LookupInstanceResultOutput struct{ *pulumi.OutputState } + +func (LookupInstanceResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupInstanceResult)(nil)).Elem() +} + +func (o LookupInstanceResultOutput) ToLookupInstanceResultOutput() LookupInstanceResultOutput { + return o +} + +func (o LookupInstanceResultOutput) ToLookupInstanceResultOutputWithContext(ctx context.Context) LookupInstanceResultOutput { + return o +} + +// Architecture name. +func (o LookupInstanceResultOutput) Architecture() pulumi.StringOutput { + return o.ApplyT(func(v LookupInstanceResult) string { return v.Architecture }).(pulumi.StringOutput) +} + +// Map of key/value pairs of config settings. +// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/) +func (o LookupInstanceResultOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v LookupInstanceResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) +} + +// Description of the instance. +func (o LookupInstanceResultOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v LookupInstanceResult) string { return v.Description }).(pulumi.StringOutput) +} + +// Device definitions. See reference below. +func (o LookupInstanceResultOutput) Devices() GetInstanceDeviceArrayOutput { + return o.ApplyT(func(v LookupInstanceResult) []GetInstanceDevice { return v.Devices }).(GetInstanceDeviceArrayOutput) +} + +// Whether the instance is ephemeral (deleted on shutdown). +func (o LookupInstanceResultOutput) Ephemeral() pulumi.BoolOutput { + return o.ApplyT(func(v LookupInstanceResult) bool { return v.Ephemeral }).(pulumi.BoolOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupInstanceResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupInstanceResult) string { return v.Id }).(pulumi.StringOutput) +} + +// Location of the instance. +func (o LookupInstanceResultOutput) Location() pulumi.StringOutput { + return o.ApplyT(func(v LookupInstanceResult) string { return v.Location }).(pulumi.StringOutput) +} + +// Name of the device. +func (o LookupInstanceResultOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v LookupInstanceResult) string { return v.Name }).(pulumi.StringOutput) +} + +// List of profiles applied to the instance. +func (o LookupInstanceResultOutput) Profiles() pulumi.StringArrayOutput { + return o.ApplyT(func(v LookupInstanceResult) []string { return v.Profiles }).(pulumi.StringArrayOutput) +} + +func (o LookupInstanceResultOutput) Project() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupInstanceResult) *string { return v.Project }).(pulumi.StringPtrOutput) +} + +func (o LookupInstanceResultOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupInstanceResult) *string { return v.Remote }).(pulumi.StringPtrOutput) +} + +// Whether the instance is stateful. +func (o LookupInstanceResultOutput) Stateful() pulumi.BoolOutput { + return o.ApplyT(func(v LookupInstanceResult) bool { return v.Stateful }).(pulumi.BoolOutput) +} + +// Status of the instance. +func (o LookupInstanceResultOutput) Status() pulumi.StringOutput { + return o.ApplyT(func(v LookupInstanceResult) string { return v.Status }).(pulumi.StringOutput) +} + +// Type of the device Must be one of none, disk, nic, +// unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci. +func (o LookupInstanceResultOutput) Type() pulumi.StringOutput { + return o.ApplyT(func(v LookupInstanceResult) string { return v.Type }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupInstanceResultOutput{}) +} diff --git a/sdk/go/incus/getNetwork.go b/sdk/go/incus/getNetwork.go new file mode 100644 index 0000000..ef602f7 --- /dev/null +++ b/sdk/go/incus/getNetwork.go @@ -0,0 +1,210 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # Network +// +// Provides information about an Incus network. +// See Incus network [configuration reference](https://linuxcontainers.org/incus/docs/main/explanation/networks/) for more details. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.LookupNetwork(ctx, &incus.LookupNetworkArgs{ +// Name: "default", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("networkName", this.Name) +// return nil +// }) +// } +// +// ``` +func LookupNetwork(ctx *pulumi.Context, args *LookupNetworkArgs, opts ...pulumi.InvokeOption) (*LookupNetworkResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupNetworkResult + err := ctx.Invoke("incus:index/getNetwork:getNetwork", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getNetwork. +type LookupNetworkArgs struct { + // Description of the network. + Description *string `pulumi:"description"` + // Locations of the network. + Locations []string `pulumi:"locations"` + // Whether the network is managed by Incus. + Managed *bool `pulumi:"managed"` + // **Required** - Name of the network. + Name string `pulumi:"name"` + // *Optional* - Name of the project where the network is be stored. + Project *string `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` + // Status of the network. + Status *string `pulumi:"status"` + // *Optional* - Specify a target node in a cluster. + Target *string `pulumi:"target"` + // Network type. + // [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types) + Type *string `pulumi:"type"` +} + +// A collection of values returned by getNetwork. +type LookupNetworkResult struct { + // Map of key/value pairs of config settings. + // [network config settings](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types) + Config map[string]string `pulumi:"config"` + // Description of the network. + Description string `pulumi:"description"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + // Locations of the network. + Locations []string `pulumi:"locations"` + // Whether the network is managed by Incus. + Managed bool `pulumi:"managed"` + Name string `pulumi:"name"` + Project *string `pulumi:"project"` + Remote *string `pulumi:"remote"` + // Status of the network. + Status string `pulumi:"status"` + Target *string `pulumi:"target"` + // Network type. + // [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types) + Type string `pulumi:"type"` +} + +func LookupNetworkOutput(ctx *pulumi.Context, args LookupNetworkOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (LookupNetworkResultOutput, error) { + args := v.(LookupNetworkArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("incus:index/getNetwork:getNetwork", args, LookupNetworkResultOutput{}, options).(LookupNetworkResultOutput), nil + }).(LookupNetworkResultOutput) +} + +// A collection of arguments for invoking getNetwork. +type LookupNetworkOutputArgs struct { + // Description of the network. + Description pulumi.StringPtrInput `pulumi:"description"` + // Locations of the network. + Locations pulumi.StringArrayInput `pulumi:"locations"` + // Whether the network is managed by Incus. + Managed pulumi.BoolPtrInput `pulumi:"managed"` + // **Required** - Name of the network. + Name pulumi.StringInput `pulumi:"name"` + // *Optional* - Name of the project where the network is be stored. + Project pulumi.StringPtrInput `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput `pulumi:"remote"` + // Status of the network. + Status pulumi.StringPtrInput `pulumi:"status"` + // *Optional* - Specify a target node in a cluster. + Target pulumi.StringPtrInput `pulumi:"target"` + // Network type. + // [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types) + Type pulumi.StringPtrInput `pulumi:"type"` +} + +func (LookupNetworkOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkArgs)(nil)).Elem() +} + +// A collection of values returned by getNetwork. +type LookupNetworkResultOutput struct{ *pulumi.OutputState } + +func (LookupNetworkResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkResult)(nil)).Elem() +} + +func (o LookupNetworkResultOutput) ToLookupNetworkResultOutput() LookupNetworkResultOutput { + return o +} + +func (o LookupNetworkResultOutput) ToLookupNetworkResultOutputWithContext(ctx context.Context) LookupNetworkResultOutput { + return o +} + +// Map of key/value pairs of config settings. +// [network config settings](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types) +func (o LookupNetworkResultOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v LookupNetworkResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) +} + +// Description of the network. +func (o LookupNetworkResultOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkResult) string { return v.Description }).(pulumi.StringOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupNetworkResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkResult) string { return v.Id }).(pulumi.StringOutput) +} + +// Locations of the network. +func (o LookupNetworkResultOutput) Locations() pulumi.StringArrayOutput { + return o.ApplyT(func(v LookupNetworkResult) []string { return v.Locations }).(pulumi.StringArrayOutput) +} + +// Whether the network is managed by Incus. +func (o LookupNetworkResultOutput) Managed() pulumi.BoolOutput { + return o.ApplyT(func(v LookupNetworkResult) bool { return v.Managed }).(pulumi.BoolOutput) +} + +func (o LookupNetworkResultOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkResult) string { return v.Name }).(pulumi.StringOutput) +} + +func (o LookupNetworkResultOutput) Project() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkResult) *string { return v.Project }).(pulumi.StringPtrOutput) +} + +func (o LookupNetworkResultOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkResult) *string { return v.Remote }).(pulumi.StringPtrOutput) +} + +// Status of the network. +func (o LookupNetworkResultOutput) Status() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkResult) string { return v.Status }).(pulumi.StringOutput) +} + +func (o LookupNetworkResultOutput) Target() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkResult) *string { return v.Target }).(pulumi.StringPtrOutput) +} + +// Network type. +// [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types) +func (o LookupNetworkResultOutput) Type() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkResult) string { return v.Type }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupNetworkResultOutput{}) +} diff --git a/sdk/go/incus/getNetworkAcl.go b/sdk/go/incus/getNetworkAcl.go new file mode 100644 index 0000000..03fb12b --- /dev/null +++ b/sdk/go/incus/getNetworkAcl.go @@ -0,0 +1,173 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # NetworkAcl +// +// Provides information about an Incus network ACL. +// See Incus network ACL [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_acls/) for more details. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.LookupNetworkAcl(ctx, &incus.LookupNetworkAclArgs{ +// Name: "default", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("networkAclName", this.Name) +// return nil +// }) +// } +// +// ``` +func LookupNetworkAcl(ctx *pulumi.Context, args *LookupNetworkAclArgs, opts ...pulumi.InvokeOption) (*LookupNetworkAclResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupNetworkAclResult + err := ctx.Invoke("incus:index/getNetworkAcl:getNetworkAcl", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getNetworkAcl. +type LookupNetworkAclArgs struct { + // Description of the rule. + Description *string `pulumi:"description"` + // List of egress rules. + Egresses []GetNetworkAclEgress `pulumi:"egresses"` + // List of ingress rules. + Ingresses []GetNetworkAclIngress `pulumi:"ingresses"` + // **Required** - Name of the network ACL. + Name string `pulumi:"name"` + // *Optional* - Name of the project where the network ACL is be stored. + Project *string `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` +} + +// A collection of values returned by getNetworkAcl. +type LookupNetworkAclResult struct { + // Map of key/value pairs of config settings. + Config map[string]string `pulumi:"config"` + // Description of the rule. + Description string `pulumi:"description"` + // List of egress rules. + Egresses []GetNetworkAclEgress `pulumi:"egresses"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + // List of ingress rules. + Ingresses []GetNetworkAclIngress `pulumi:"ingresses"` + Name string `pulumi:"name"` + Project *string `pulumi:"project"` + Remote *string `pulumi:"remote"` +} + +func LookupNetworkAclOutput(ctx *pulumi.Context, args LookupNetworkAclOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkAclResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (LookupNetworkAclResultOutput, error) { + args := v.(LookupNetworkAclArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("incus:index/getNetworkAcl:getNetworkAcl", args, LookupNetworkAclResultOutput{}, options).(LookupNetworkAclResultOutput), nil + }).(LookupNetworkAclResultOutput) +} + +// A collection of arguments for invoking getNetworkAcl. +type LookupNetworkAclOutputArgs struct { + // Description of the rule. + Description pulumi.StringPtrInput `pulumi:"description"` + // List of egress rules. + Egresses GetNetworkAclEgressArrayInput `pulumi:"egresses"` + // List of ingress rules. + Ingresses GetNetworkAclIngressArrayInput `pulumi:"ingresses"` + // **Required** - Name of the network ACL. + Name pulumi.StringInput `pulumi:"name"` + // *Optional* - Name of the project where the network ACL is be stored. + Project pulumi.StringPtrInput `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput `pulumi:"remote"` +} + +func (LookupNetworkAclOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkAclArgs)(nil)).Elem() +} + +// A collection of values returned by getNetworkAcl. +type LookupNetworkAclResultOutput struct{ *pulumi.OutputState } + +func (LookupNetworkAclResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkAclResult)(nil)).Elem() +} + +func (o LookupNetworkAclResultOutput) ToLookupNetworkAclResultOutput() LookupNetworkAclResultOutput { + return o +} + +func (o LookupNetworkAclResultOutput) ToLookupNetworkAclResultOutputWithContext(ctx context.Context) LookupNetworkAclResultOutput { + return o +} + +// Map of key/value pairs of config settings. +func (o LookupNetworkAclResultOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v LookupNetworkAclResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) +} + +// Description of the rule. +func (o LookupNetworkAclResultOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkAclResult) string { return v.Description }).(pulumi.StringOutput) +} + +// List of egress rules. +func (o LookupNetworkAclResultOutput) Egresses() GetNetworkAclEgressArrayOutput { + return o.ApplyT(func(v LookupNetworkAclResult) []GetNetworkAclEgress { return v.Egresses }).(GetNetworkAclEgressArrayOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupNetworkAclResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkAclResult) string { return v.Id }).(pulumi.StringOutput) +} + +// List of ingress rules. +func (o LookupNetworkAclResultOutput) Ingresses() GetNetworkAclIngressArrayOutput { + return o.ApplyT(func(v LookupNetworkAclResult) []GetNetworkAclIngress { return v.Ingresses }).(GetNetworkAclIngressArrayOutput) +} + +func (o LookupNetworkAclResultOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkAclResult) string { return v.Name }).(pulumi.StringOutput) +} + +func (o LookupNetworkAclResultOutput) Project() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkAclResult) *string { return v.Project }).(pulumi.StringPtrOutput) +} + +func (o LookupNetworkAclResultOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkAclResult) *string { return v.Remote }).(pulumi.StringPtrOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupNetworkAclResultOutput{}) +} diff --git a/sdk/go/incus/getNetworkAddressSet.go b/sdk/go/incus/getNetworkAddressSet.go new file mode 100644 index 0000000..1955b4f --- /dev/null +++ b/sdk/go/incus/getNetworkAddressSet.go @@ -0,0 +1,162 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # NetworkAddressSet +// +// Provides information about an Incus network address set. +// See Incus network address set [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_address_sets/) for more details. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.LookupNetworkAddressSet(ctx, &incus.LookupNetworkAddressSetArgs{ +// Name: "default", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("networkAddressSetName", this.Name) +// return nil +// }) +// } +// +// ``` +func LookupNetworkAddressSet(ctx *pulumi.Context, args *LookupNetworkAddressSetArgs, opts ...pulumi.InvokeOption) (*LookupNetworkAddressSetResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupNetworkAddressSetResult + err := ctx.Invoke("incus:index/getNetworkAddressSet:getNetworkAddressSet", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getNetworkAddressSet. +type LookupNetworkAddressSetArgs struct { + // List of network addresses. + Addresses []string `pulumi:"addresses"` + // Description of the network address set. + Description *string `pulumi:"description"` + // **Required** - Name of the network address set. + Name string `pulumi:"name"` + // *Optional* - Name of the project where the network address set is be stored. + Project *string `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` +} + +// A collection of values returned by getNetworkAddressSet. +type LookupNetworkAddressSetResult struct { + // List of network addresses. + Addresses []string `pulumi:"addresses"` + // Map of key/value pairs of config settings. + Config map[string]string `pulumi:"config"` + // Description of the network address set. + Description string `pulumi:"description"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + Name string `pulumi:"name"` + Project *string `pulumi:"project"` + Remote *string `pulumi:"remote"` +} + +func LookupNetworkAddressSetOutput(ctx *pulumi.Context, args LookupNetworkAddressSetOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkAddressSetResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (LookupNetworkAddressSetResultOutput, error) { + args := v.(LookupNetworkAddressSetArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("incus:index/getNetworkAddressSet:getNetworkAddressSet", args, LookupNetworkAddressSetResultOutput{}, options).(LookupNetworkAddressSetResultOutput), nil + }).(LookupNetworkAddressSetResultOutput) +} + +// A collection of arguments for invoking getNetworkAddressSet. +type LookupNetworkAddressSetOutputArgs struct { + // List of network addresses. + Addresses pulumi.StringArrayInput `pulumi:"addresses"` + // Description of the network address set. + Description pulumi.StringPtrInput `pulumi:"description"` + // **Required** - Name of the network address set. + Name pulumi.StringInput `pulumi:"name"` + // *Optional* - Name of the project where the network address set is be stored. + Project pulumi.StringPtrInput `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput `pulumi:"remote"` +} + +func (LookupNetworkAddressSetOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkAddressSetArgs)(nil)).Elem() +} + +// A collection of values returned by getNetworkAddressSet. +type LookupNetworkAddressSetResultOutput struct{ *pulumi.OutputState } + +func (LookupNetworkAddressSetResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkAddressSetResult)(nil)).Elem() +} + +func (o LookupNetworkAddressSetResultOutput) ToLookupNetworkAddressSetResultOutput() LookupNetworkAddressSetResultOutput { + return o +} + +func (o LookupNetworkAddressSetResultOutput) ToLookupNetworkAddressSetResultOutputWithContext(ctx context.Context) LookupNetworkAddressSetResultOutput { + return o +} + +// List of network addresses. +func (o LookupNetworkAddressSetResultOutput) Addresses() pulumi.StringArrayOutput { + return o.ApplyT(func(v LookupNetworkAddressSetResult) []string { return v.Addresses }).(pulumi.StringArrayOutput) +} + +// Map of key/value pairs of config settings. +func (o LookupNetworkAddressSetResultOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v LookupNetworkAddressSetResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) +} + +// Description of the network address set. +func (o LookupNetworkAddressSetResultOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkAddressSetResult) string { return v.Description }).(pulumi.StringOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupNetworkAddressSetResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkAddressSetResult) string { return v.Id }).(pulumi.StringOutput) +} + +func (o LookupNetworkAddressSetResultOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkAddressSetResult) string { return v.Name }).(pulumi.StringOutput) +} + +func (o LookupNetworkAddressSetResultOutput) Project() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkAddressSetResult) *string { return v.Project }).(pulumi.StringPtrOutput) +} + +func (o LookupNetworkAddressSetResultOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkAddressSetResult) *string { return v.Remote }).(pulumi.StringPtrOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupNetworkAddressSetResultOutput{}) +} diff --git a/sdk/go/incus/getNetworkForward.go b/sdk/go/incus/getNetworkForward.go new file mode 100644 index 0000000..5c4be8a --- /dev/null +++ b/sdk/go/incus/getNetworkForward.go @@ -0,0 +1,192 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # NetworkForward +// +// Provides information about an Incus network forward. +// See Incus network forward [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_forwards/) for more details. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.LookupNetworkForward(ctx, &incus.LookupNetworkForwardArgs{ +// ListenAddress: "127.0.0.1", +// Network: "parent", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("networkForwardListenAddress", this.ListenAddress) +// return nil +// }) +// } +// +// ``` +func LookupNetworkForward(ctx *pulumi.Context, args *LookupNetworkForwardArgs, opts ...pulumi.InvokeOption) (*LookupNetworkForwardResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupNetworkForwardResult + err := ctx.Invoke("incus:index/getNetworkForward:getNetworkForward", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getNetworkForward. +type LookupNetworkForwardArgs struct { + // Description of the forward port. + Description *string `pulumi:"description"` + // **Required** - Listen Address of the network forward. + ListenAddress string `pulumi:"listenAddress"` + // Location of the network forward. + Location *string `pulumi:"location"` + // **Required** - Name of the parent network. + Network string `pulumi:"network"` + // List of ports to forward. + Ports []GetNetworkForwardPort `pulumi:"ports"` + // *Optional* - Name of the project where the network forward is be stored. + Project *string `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` + // *Optional* - Specify a target node in a cluster. + Target *string `pulumi:"target"` +} + +// A collection of values returned by getNetworkForward. +type LookupNetworkForwardResult struct { + // Map of key/value pairs of config settings. + Config map[string]string `pulumi:"config"` + // Description of the forward port. + Description string `pulumi:"description"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + ListenAddress string `pulumi:"listenAddress"` + // Location of the network forward. + Location string `pulumi:"location"` + Network string `pulumi:"network"` + // List of ports to forward. + Ports []GetNetworkForwardPort `pulumi:"ports"` + Project *string `pulumi:"project"` + Remote *string `pulumi:"remote"` + Target *string `pulumi:"target"` +} + +func LookupNetworkForwardOutput(ctx *pulumi.Context, args LookupNetworkForwardOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkForwardResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (LookupNetworkForwardResultOutput, error) { + args := v.(LookupNetworkForwardArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("incus:index/getNetworkForward:getNetworkForward", args, LookupNetworkForwardResultOutput{}, options).(LookupNetworkForwardResultOutput), nil + }).(LookupNetworkForwardResultOutput) +} + +// A collection of arguments for invoking getNetworkForward. +type LookupNetworkForwardOutputArgs struct { + // Description of the forward port. + Description pulumi.StringPtrInput `pulumi:"description"` + // **Required** - Listen Address of the network forward. + ListenAddress pulumi.StringInput `pulumi:"listenAddress"` + // Location of the network forward. + Location pulumi.StringPtrInput `pulumi:"location"` + // **Required** - Name of the parent network. + Network pulumi.StringInput `pulumi:"network"` + // List of ports to forward. + Ports GetNetworkForwardPortArrayInput `pulumi:"ports"` + // *Optional* - Name of the project where the network forward is be stored. + Project pulumi.StringPtrInput `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput `pulumi:"remote"` + // *Optional* - Specify a target node in a cluster. + Target pulumi.StringPtrInput `pulumi:"target"` +} + +func (LookupNetworkForwardOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkForwardArgs)(nil)).Elem() +} + +// A collection of values returned by getNetworkForward. +type LookupNetworkForwardResultOutput struct{ *pulumi.OutputState } + +func (LookupNetworkForwardResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkForwardResult)(nil)).Elem() +} + +func (o LookupNetworkForwardResultOutput) ToLookupNetworkForwardResultOutput() LookupNetworkForwardResultOutput { + return o +} + +func (o LookupNetworkForwardResultOutput) ToLookupNetworkForwardResultOutputWithContext(ctx context.Context) LookupNetworkForwardResultOutput { + return o +} + +// Map of key/value pairs of config settings. +func (o LookupNetworkForwardResultOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v LookupNetworkForwardResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) +} + +// Description of the forward port. +func (o LookupNetworkForwardResultOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkForwardResult) string { return v.Description }).(pulumi.StringOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupNetworkForwardResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkForwardResult) string { return v.Id }).(pulumi.StringOutput) +} + +func (o LookupNetworkForwardResultOutput) ListenAddress() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkForwardResult) string { return v.ListenAddress }).(pulumi.StringOutput) +} + +// Location of the network forward. +func (o LookupNetworkForwardResultOutput) Location() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkForwardResult) string { return v.Location }).(pulumi.StringOutput) +} + +func (o LookupNetworkForwardResultOutput) Network() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkForwardResult) string { return v.Network }).(pulumi.StringOutput) +} + +// List of ports to forward. +func (o LookupNetworkForwardResultOutput) Ports() GetNetworkForwardPortArrayOutput { + return o.ApplyT(func(v LookupNetworkForwardResult) []GetNetworkForwardPort { return v.Ports }).(GetNetworkForwardPortArrayOutput) +} + +func (o LookupNetworkForwardResultOutput) Project() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkForwardResult) *string { return v.Project }).(pulumi.StringPtrOutput) +} + +func (o LookupNetworkForwardResultOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkForwardResult) *string { return v.Remote }).(pulumi.StringPtrOutput) +} + +func (o LookupNetworkForwardResultOutput) Target() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkForwardResult) *string { return v.Target }).(pulumi.StringPtrOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupNetworkForwardResultOutput{}) +} diff --git a/sdk/go/incus/getNetworkIntegration.go b/sdk/go/incus/getNetworkIntegration.go new file mode 100644 index 0000000..b32180b --- /dev/null +++ b/sdk/go/incus/getNetworkIntegration.go @@ -0,0 +1,153 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # NetworkIntegration +// +// Provides information about an Incus network integration. +// See Incus network integration [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_integrations/) for more details. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.LookupNetworkIntegration(ctx, &incus.LookupNetworkIntegrationArgs{ +// Name: "default", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("networkIntegrationName", this.Name) +// return nil +// }) +// } +// +// ``` +func LookupNetworkIntegration(ctx *pulumi.Context, args *LookupNetworkIntegrationArgs, opts ...pulumi.InvokeOption) (*LookupNetworkIntegrationResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupNetworkIntegrationResult + err := ctx.Invoke("incus:index/getNetworkIntegration:getNetworkIntegration", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getNetworkIntegration. +type LookupNetworkIntegrationArgs struct { + // Description of the network integration. + Description *string `pulumi:"description"` + // **Required** - Name of the network integration. + Name string `pulumi:"name"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` + // Integration type. + Type *string `pulumi:"type"` +} + +// A collection of values returned by getNetworkIntegration. +type LookupNetworkIntegrationResult struct { + // Map of key/value pairs of config settings. + Config map[string]string `pulumi:"config"` + // Description of the network integration. + Description string `pulumi:"description"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + Name string `pulumi:"name"` + Remote *string `pulumi:"remote"` + // Integration type. + Type string `pulumi:"type"` +} + +func LookupNetworkIntegrationOutput(ctx *pulumi.Context, args LookupNetworkIntegrationOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkIntegrationResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (LookupNetworkIntegrationResultOutput, error) { + args := v.(LookupNetworkIntegrationArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("incus:index/getNetworkIntegration:getNetworkIntegration", args, LookupNetworkIntegrationResultOutput{}, options).(LookupNetworkIntegrationResultOutput), nil + }).(LookupNetworkIntegrationResultOutput) +} + +// A collection of arguments for invoking getNetworkIntegration. +type LookupNetworkIntegrationOutputArgs struct { + // Description of the network integration. + Description pulumi.StringPtrInput `pulumi:"description"` + // **Required** - Name of the network integration. + Name pulumi.StringInput `pulumi:"name"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput `pulumi:"remote"` + // Integration type. + Type pulumi.StringPtrInput `pulumi:"type"` +} + +func (LookupNetworkIntegrationOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkIntegrationArgs)(nil)).Elem() +} + +// A collection of values returned by getNetworkIntegration. +type LookupNetworkIntegrationResultOutput struct{ *pulumi.OutputState } + +func (LookupNetworkIntegrationResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkIntegrationResult)(nil)).Elem() +} + +func (o LookupNetworkIntegrationResultOutput) ToLookupNetworkIntegrationResultOutput() LookupNetworkIntegrationResultOutput { + return o +} + +func (o LookupNetworkIntegrationResultOutput) ToLookupNetworkIntegrationResultOutputWithContext(ctx context.Context) LookupNetworkIntegrationResultOutput { + return o +} + +// Map of key/value pairs of config settings. +func (o LookupNetworkIntegrationResultOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v LookupNetworkIntegrationResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) +} + +// Description of the network integration. +func (o LookupNetworkIntegrationResultOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkIntegrationResult) string { return v.Description }).(pulumi.StringOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupNetworkIntegrationResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkIntegrationResult) string { return v.Id }).(pulumi.StringOutput) +} + +func (o LookupNetworkIntegrationResultOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkIntegrationResult) string { return v.Name }).(pulumi.StringOutput) +} + +func (o LookupNetworkIntegrationResultOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkIntegrationResult) *string { return v.Remote }).(pulumi.StringPtrOutput) +} + +// Integration type. +func (o LookupNetworkIntegrationResultOutput) Type() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkIntegrationResult) string { return v.Type }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupNetworkIntegrationResultOutput{}) +} diff --git a/sdk/go/incus/getNetworkLoadBalancer.go b/sdk/go/incus/getNetworkLoadBalancer.go new file mode 100644 index 0000000..e94a977 --- /dev/null +++ b/sdk/go/incus/getNetworkLoadBalancer.go @@ -0,0 +1,194 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # getNetworkLoadBalancer +// +// Provides information about an Incus network load balancer. +// See Incus network load balancer [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_load_balancers/) for more details. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.LookupNetworkLoadBalancer(ctx, &incus.LookupNetworkLoadBalancerArgs{ +// ListenAddress: "127.0.0.1", +// Network: "parent", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("networkLoadBalancerListenAddress", this.ListenAddress) +// return nil +// }) +// } +// +// ``` +func LookupNetworkLoadBalancer(ctx *pulumi.Context, args *LookupNetworkLoadBalancerArgs, opts ...pulumi.InvokeOption) (*LookupNetworkLoadBalancerResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupNetworkLoadBalancerResult + err := ctx.Invoke("incus:index/getNetworkLoadBalancer:getNetworkLoadBalancer", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getNetworkLoadBalancer. +type LookupNetworkLoadBalancerArgs struct { + // List of load balancer backends. + Backends []GetNetworkLoadBalancerBackend `pulumi:"backends"` + // Description of the load balancer port. + Description *string `pulumi:"description"` + // **Required** - Listen Address of the network load balancer. + ListenAddress string `pulumi:"listenAddress"` + // Location of the network load balancer. + Location *string `pulumi:"location"` + // **Required** - Name of the parent network. + Network string `pulumi:"network"` + // List of load balancer ports. + Ports []GetNetworkLoadBalancerPort `pulumi:"ports"` + // *Optional* - Name of the project where the network load balancer is be stored. + Project *string `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` +} + +// A collection of values returned by getNetworkLoadBalancer. +type LookupNetworkLoadBalancerResult struct { + // List of load balancer backends. + Backends []GetNetworkLoadBalancerBackend `pulumi:"backends"` + // Map of key/value pairs of config settings. + Config map[string]string `pulumi:"config"` + // Description of the load balancer port. + Description string `pulumi:"description"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + ListenAddress string `pulumi:"listenAddress"` + // Location of the network load balancer. + Location string `pulumi:"location"` + Network string `pulumi:"network"` + // List of load balancer ports. + Ports []GetNetworkLoadBalancerPort `pulumi:"ports"` + Project *string `pulumi:"project"` + Remote *string `pulumi:"remote"` +} + +func LookupNetworkLoadBalancerOutput(ctx *pulumi.Context, args LookupNetworkLoadBalancerOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkLoadBalancerResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (LookupNetworkLoadBalancerResultOutput, error) { + args := v.(LookupNetworkLoadBalancerArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("incus:index/getNetworkLoadBalancer:getNetworkLoadBalancer", args, LookupNetworkLoadBalancerResultOutput{}, options).(LookupNetworkLoadBalancerResultOutput), nil + }).(LookupNetworkLoadBalancerResultOutput) +} + +// A collection of arguments for invoking getNetworkLoadBalancer. +type LookupNetworkLoadBalancerOutputArgs struct { + // List of load balancer backends. + Backends GetNetworkLoadBalancerBackendArrayInput `pulumi:"backends"` + // Description of the load balancer port. + Description pulumi.StringPtrInput `pulumi:"description"` + // **Required** - Listen Address of the network load balancer. + ListenAddress pulumi.StringInput `pulumi:"listenAddress"` + // Location of the network load balancer. + Location pulumi.StringPtrInput `pulumi:"location"` + // **Required** - Name of the parent network. + Network pulumi.StringInput `pulumi:"network"` + // List of load balancer ports. + Ports GetNetworkLoadBalancerPortArrayInput `pulumi:"ports"` + // *Optional* - Name of the project where the network load balancer is be stored. + Project pulumi.StringPtrInput `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput `pulumi:"remote"` +} + +func (LookupNetworkLoadBalancerOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkLoadBalancerArgs)(nil)).Elem() +} + +// A collection of values returned by getNetworkLoadBalancer. +type LookupNetworkLoadBalancerResultOutput struct{ *pulumi.OutputState } + +func (LookupNetworkLoadBalancerResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkLoadBalancerResult)(nil)).Elem() +} + +func (o LookupNetworkLoadBalancerResultOutput) ToLookupNetworkLoadBalancerResultOutput() LookupNetworkLoadBalancerResultOutput { + return o +} + +func (o LookupNetworkLoadBalancerResultOutput) ToLookupNetworkLoadBalancerResultOutputWithContext(ctx context.Context) LookupNetworkLoadBalancerResultOutput { + return o +} + +// List of load balancer backends. +func (o LookupNetworkLoadBalancerResultOutput) Backends() GetNetworkLoadBalancerBackendArrayOutput { + return o.ApplyT(func(v LookupNetworkLoadBalancerResult) []GetNetworkLoadBalancerBackend { return v.Backends }).(GetNetworkLoadBalancerBackendArrayOutput) +} + +// Map of key/value pairs of config settings. +func (o LookupNetworkLoadBalancerResultOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v LookupNetworkLoadBalancerResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) +} + +// Description of the load balancer port. +func (o LookupNetworkLoadBalancerResultOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkLoadBalancerResult) string { return v.Description }).(pulumi.StringOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupNetworkLoadBalancerResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkLoadBalancerResult) string { return v.Id }).(pulumi.StringOutput) +} + +func (o LookupNetworkLoadBalancerResultOutput) ListenAddress() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkLoadBalancerResult) string { return v.ListenAddress }).(pulumi.StringOutput) +} + +// Location of the network load balancer. +func (o LookupNetworkLoadBalancerResultOutput) Location() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkLoadBalancerResult) string { return v.Location }).(pulumi.StringOutput) +} + +func (o LookupNetworkLoadBalancerResultOutput) Network() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkLoadBalancerResult) string { return v.Network }).(pulumi.StringOutput) +} + +// List of load balancer ports. +func (o LookupNetworkLoadBalancerResultOutput) Ports() GetNetworkLoadBalancerPortArrayOutput { + return o.ApplyT(func(v LookupNetworkLoadBalancerResult) []GetNetworkLoadBalancerPort { return v.Ports }).(GetNetworkLoadBalancerPortArrayOutput) +} + +func (o LookupNetworkLoadBalancerResultOutput) Project() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkLoadBalancerResult) *string { return v.Project }).(pulumi.StringPtrOutput) +} + +func (o LookupNetworkLoadBalancerResultOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkLoadBalancerResult) *string { return v.Remote }).(pulumi.StringPtrOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupNetworkLoadBalancerResultOutput{}) +} diff --git a/sdk/go/incus/getNetworkPeer.go b/sdk/go/incus/getNetworkPeer.go new file mode 100644 index 0000000..491cbce --- /dev/null +++ b/sdk/go/incus/getNetworkPeer.go @@ -0,0 +1,216 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # NetworkPeer +// +// Provides information about an Incus network peer. +// See Incus network peer [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_peers/https://linuxcontainers.org/incus/docs/main/howto/network_ovn_peers/) for more details. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.LookupNetworkPeer(ctx, &incus.LookupNetworkPeerArgs{ +// Name: "default", +// Network: "parent", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("networkPeerName", this.Name) +// return nil +// }) +// } +// +// ``` +func LookupNetworkPeer(ctx *pulumi.Context, args *LookupNetworkPeerArgs, opts ...pulumi.InvokeOption) (*LookupNetworkPeerResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupNetworkPeerResult + err := ctx.Invoke("incus:index/getNetworkPeer:getNetworkPeer", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getNetworkPeer. +type LookupNetworkPeerArgs struct { + // Description of the network peer. + Description *string `pulumi:"description"` + // **Required** - Name of the network peer. + Name string `pulumi:"name"` + // **Required** - Name of the parent network. + Network string `pulumi:"network"` + // *Optional* - Name of the project where the network peer is be stored. + Project *string `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` + // Status of the network peer. + Status *string `pulumi:"status"` + // Target integration for the network peer. + TargetIntegration *string `pulumi:"targetIntegration"` + // Target network for the network peer. + TargetNetwork *string `pulumi:"targetNetwork"` + // Target project for the network peer. + TargetProject *string `pulumi:"targetProject"` + // Network peer type. + Type *string `pulumi:"type"` +} + +// A collection of values returned by getNetworkPeer. +type LookupNetworkPeerResult struct { + // Map of key/value pairs of config settings. + Config map[string]string `pulumi:"config"` + // Description of the network peer. + Description string `pulumi:"description"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + Name string `pulumi:"name"` + Network string `pulumi:"network"` + Project *string `pulumi:"project"` + Remote *string `pulumi:"remote"` + // Status of the network peer. + Status string `pulumi:"status"` + // Target integration for the network peer. + TargetIntegration string `pulumi:"targetIntegration"` + // Target network for the network peer. + TargetNetwork string `pulumi:"targetNetwork"` + // Target project for the network peer. + TargetProject string `pulumi:"targetProject"` + // Network peer type. + Type string `pulumi:"type"` +} + +func LookupNetworkPeerOutput(ctx *pulumi.Context, args LookupNetworkPeerOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkPeerResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (LookupNetworkPeerResultOutput, error) { + args := v.(LookupNetworkPeerArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("incus:index/getNetworkPeer:getNetworkPeer", args, LookupNetworkPeerResultOutput{}, options).(LookupNetworkPeerResultOutput), nil + }).(LookupNetworkPeerResultOutput) +} + +// A collection of arguments for invoking getNetworkPeer. +type LookupNetworkPeerOutputArgs struct { + // Description of the network peer. + Description pulumi.StringPtrInput `pulumi:"description"` + // **Required** - Name of the network peer. + Name pulumi.StringInput `pulumi:"name"` + // **Required** - Name of the parent network. + Network pulumi.StringInput `pulumi:"network"` + // *Optional* - Name of the project where the network peer is be stored. + Project pulumi.StringPtrInput `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput `pulumi:"remote"` + // Status of the network peer. + Status pulumi.StringPtrInput `pulumi:"status"` + // Target integration for the network peer. + TargetIntegration pulumi.StringPtrInput `pulumi:"targetIntegration"` + // Target network for the network peer. + TargetNetwork pulumi.StringPtrInput `pulumi:"targetNetwork"` + // Target project for the network peer. + TargetProject pulumi.StringPtrInput `pulumi:"targetProject"` + // Network peer type. + Type pulumi.StringPtrInput `pulumi:"type"` +} + +func (LookupNetworkPeerOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkPeerArgs)(nil)).Elem() +} + +// A collection of values returned by getNetworkPeer. +type LookupNetworkPeerResultOutput struct{ *pulumi.OutputState } + +func (LookupNetworkPeerResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkPeerResult)(nil)).Elem() +} + +func (o LookupNetworkPeerResultOutput) ToLookupNetworkPeerResultOutput() LookupNetworkPeerResultOutput { + return o +} + +func (o LookupNetworkPeerResultOutput) ToLookupNetworkPeerResultOutputWithContext(ctx context.Context) LookupNetworkPeerResultOutput { + return o +} + +// Map of key/value pairs of config settings. +func (o LookupNetworkPeerResultOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v LookupNetworkPeerResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) +} + +// Description of the network peer. +func (o LookupNetworkPeerResultOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.Description }).(pulumi.StringOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupNetworkPeerResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.Id }).(pulumi.StringOutput) +} + +func (o LookupNetworkPeerResultOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.Name }).(pulumi.StringOutput) +} + +func (o LookupNetworkPeerResultOutput) Network() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.Network }).(pulumi.StringOutput) +} + +func (o LookupNetworkPeerResultOutput) Project() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkPeerResult) *string { return v.Project }).(pulumi.StringPtrOutput) +} + +func (o LookupNetworkPeerResultOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkPeerResult) *string { return v.Remote }).(pulumi.StringPtrOutput) +} + +// Status of the network peer. +func (o LookupNetworkPeerResultOutput) Status() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.Status }).(pulumi.StringOutput) +} + +// Target integration for the network peer. +func (o LookupNetworkPeerResultOutput) TargetIntegration() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.TargetIntegration }).(pulumi.StringOutput) +} + +// Target network for the network peer. +func (o LookupNetworkPeerResultOutput) TargetNetwork() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.TargetNetwork }).(pulumi.StringOutput) +} + +// Target project for the network peer. +func (o LookupNetworkPeerResultOutput) TargetProject() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.TargetProject }).(pulumi.StringOutput) +} + +// Network peer type. +func (o LookupNetworkPeerResultOutput) Type() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.Type }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupNetworkPeerResultOutput{}) +} diff --git a/sdk/go/incus/getNetworkZone.go b/sdk/go/incus/getNetworkZone.go new file mode 100644 index 0000000..6cb904b --- /dev/null +++ b/sdk/go/incus/getNetworkZone.go @@ -0,0 +1,151 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # NetworkZone +// +// Provides information about an Incus network zone. +// See Incus network zone [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_zones/) for more details. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.LookupNetworkZone(ctx, &incus.LookupNetworkZoneArgs{ +// Name: "default", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("networkZoneName", this.Name) +// return nil +// }) +// } +// +// ``` +func LookupNetworkZone(ctx *pulumi.Context, args *LookupNetworkZoneArgs, opts ...pulumi.InvokeOption) (*LookupNetworkZoneResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupNetworkZoneResult + err := ctx.Invoke("incus:index/getNetworkZone:getNetworkZone", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getNetworkZone. +type LookupNetworkZoneArgs struct { + // Description of the network zone. + Description *string `pulumi:"description"` + // **Required** - Name of the network zone. + Name string `pulumi:"name"` + // *Optional* - Name of the project where the network zone is be stored. + Project *string `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` +} + +// A collection of values returned by getNetworkZone. +type LookupNetworkZoneResult struct { + // Map of key/value pairs of config settings. + Config map[string]string `pulumi:"config"` + // Description of the network zone. + Description string `pulumi:"description"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + Name string `pulumi:"name"` + Project *string `pulumi:"project"` + Remote *string `pulumi:"remote"` +} + +func LookupNetworkZoneOutput(ctx *pulumi.Context, args LookupNetworkZoneOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkZoneResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (LookupNetworkZoneResultOutput, error) { + args := v.(LookupNetworkZoneArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("incus:index/getNetworkZone:getNetworkZone", args, LookupNetworkZoneResultOutput{}, options).(LookupNetworkZoneResultOutput), nil + }).(LookupNetworkZoneResultOutput) +} + +// A collection of arguments for invoking getNetworkZone. +type LookupNetworkZoneOutputArgs struct { + // Description of the network zone. + Description pulumi.StringPtrInput `pulumi:"description"` + // **Required** - Name of the network zone. + Name pulumi.StringInput `pulumi:"name"` + // *Optional* - Name of the project where the network zone is be stored. + Project pulumi.StringPtrInput `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput `pulumi:"remote"` +} + +func (LookupNetworkZoneOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkZoneArgs)(nil)).Elem() +} + +// A collection of values returned by getNetworkZone. +type LookupNetworkZoneResultOutput struct{ *pulumi.OutputState } + +func (LookupNetworkZoneResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNetworkZoneResult)(nil)).Elem() +} + +func (o LookupNetworkZoneResultOutput) ToLookupNetworkZoneResultOutput() LookupNetworkZoneResultOutput { + return o +} + +func (o LookupNetworkZoneResultOutput) ToLookupNetworkZoneResultOutputWithContext(ctx context.Context) LookupNetworkZoneResultOutput { + return o +} + +// Map of key/value pairs of config settings. +func (o LookupNetworkZoneResultOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v LookupNetworkZoneResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) +} + +// Description of the network zone. +func (o LookupNetworkZoneResultOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkZoneResult) string { return v.Description }).(pulumi.StringOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupNetworkZoneResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkZoneResult) string { return v.Id }).(pulumi.StringOutput) +} + +func (o LookupNetworkZoneResultOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v LookupNetworkZoneResult) string { return v.Name }).(pulumi.StringOutput) +} + +func (o LookupNetworkZoneResultOutput) Project() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkZoneResult) *string { return v.Project }).(pulumi.StringPtrOutput) +} + +func (o LookupNetworkZoneResultOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupNetworkZoneResult) *string { return v.Remote }).(pulumi.StringPtrOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupNetworkZoneResultOutput{}) +} diff --git a/sdk/go/incus/getProfile.go b/sdk/go/incus/getProfile.go index 1f5e5c3..7e578b4 100644 --- a/sdk/go/incus/getProfile.go +++ b/sdk/go/incus/getProfile.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -14,6 +14,7 @@ import ( // ## # Profile // // Provides information about an Incus profile. +// See Incus profile [configuration reference](https://linuxcontainers.org/incus/docs/main/profiles/) for more details. // // ## Example Usage // @@ -29,22 +30,13 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _default, err := incus.LookupProfile(ctx, &incus.LookupProfileArgs{ +// this, err := incus.LookupProfile(ctx, &incus.LookupProfileArgs{ // Name: "default", // }, nil) // if err != nil { // return err // } -// _, err = incus.NewInstance(ctx, "d1", &incus.InstanceArgs{ -// Profiles: pulumi.StringArray{ -// pulumi.String(_default.Name), -// }, -// Image: pulumi.String("images:debian/12"), -// Name: pulumi.String("d1"), -// }) -// if err != nil { -// return err -// } +// ctx.Export("profileName", this.Name) // return nil // }) // } @@ -62,11 +54,13 @@ func LookupProfile(ctx *pulumi.Context, args *LookupProfileArgs, opts ...pulumi. // A collection of arguments for invoking getProfile. type LookupProfileArgs struct { - // Device definition. See reference below. + // Description of the profile. + Description *string `pulumi:"description"` + // Device definitions. See reference below. Devices []GetProfileDevice `pulumi:"devices"` // **Required** - Name of the profile. Name string `pulumi:"name"` - // *Optional* - Name of the project where the profile will be stored. + // *Optional* - Name of the project where the profile is be stored. Project *string `pulumi:"project"` // *Optional* - The remote in which the resource was created. If // not provided, the provider's default remote will be used. @@ -75,11 +69,12 @@ type LookupProfileArgs struct { // A collection of values returned by getProfile. type LookupProfileResult struct { - // Map of key/value pairs of - // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). - Config map[string]string `pulumi:"config"` - Description string `pulumi:"description"` - // Device definition. See reference below. + // Map of key/value pairs of config settings. + // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/) + Config map[string]string `pulumi:"config"` + // Description of the profile. + Description string `pulumi:"description"` + // Device definitions. See reference below. Devices []GetProfileDevice `pulumi:"devices"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` @@ -100,11 +95,13 @@ func LookupProfileOutput(ctx *pulumi.Context, args LookupProfileOutputArgs, opts // A collection of arguments for invoking getProfile. type LookupProfileOutputArgs struct { - // Device definition. See reference below. + // Description of the profile. + Description pulumi.StringPtrInput `pulumi:"description"` + // Device definitions. See reference below. Devices GetProfileDeviceArrayInput `pulumi:"devices"` // **Required** - Name of the profile. Name pulumi.StringInput `pulumi:"name"` - // *Optional* - Name of the project where the profile will be stored. + // *Optional* - Name of the project where the profile is be stored. Project pulumi.StringPtrInput `pulumi:"project"` // *Optional* - The remote in which the resource was created. If // not provided, the provider's default remote will be used. @@ -130,17 +127,18 @@ func (o LookupProfileResultOutput) ToLookupProfileResultOutputWithContext(ctx co return o } -// Map of key/value pairs of -// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). +// Map of key/value pairs of config settings. +// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/) func (o LookupProfileResultOutput) Config() pulumi.StringMapOutput { return o.ApplyT(func(v LookupProfileResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) } +// Description of the profile. func (o LookupProfileResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v LookupProfileResult) string { return v.Description }).(pulumi.StringOutput) } -// Device definition. See reference below. +// Device definitions. See reference below. func (o LookupProfileResultOutput) Devices() GetProfileDeviceArrayOutput { return o.ApplyT(func(v LookupProfileResult) []GetProfileDevice { return v.Devices }).(GetProfileDeviceArrayOutput) } diff --git a/sdk/go/incus/getProject.go b/sdk/go/incus/getProject.go index b93f06e..cc8c8de 100644 --- a/sdk/go/incus/getProject.go +++ b/sdk/go/incus/getProject.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -29,20 +29,13 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _default, err := incus.LookupProject(ctx, &incus.LookupProjectArgs{ +// this, err := incus.LookupProject(ctx, &incus.LookupProjectArgs{ // Name: "default", // }, nil) // if err != nil { // return err // } -// _, err = incus.NewInstance(ctx, "d1", &incus.InstanceArgs{ -// Project: pulumi.String(_default.Name), -// Image: pulumi.String("images:debian/12"), -// Name: pulumi.String("d1"), -// }) -// if err != nil { -// return err -// } +// ctx.Export("projectName", this.Name) // return nil // }) // } @@ -60,9 +53,6 @@ func LookupProject(ctx *pulumi.Context, args *LookupProjectArgs, opts ...pulumi. // A collection of arguments for invoking getProject. type LookupProjectArgs struct { - // Map of key/value pairs of - // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). - Config map[string]string `pulumi:"config"` // Description of the project. Description *string `pulumi:"description"` // **Required** - Name of the project. @@ -74,8 +64,8 @@ type LookupProjectArgs struct { // A collection of values returned by getProject. type LookupProjectResult struct { - // Map of key/value pairs of - // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). + // Map of key/value pairs of config settings. + // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/) Config map[string]string `pulumi:"config"` // Description of the project. Description string `pulumi:"description"` @@ -96,9 +86,6 @@ func LookupProjectOutput(ctx *pulumi.Context, args LookupProjectOutputArgs, opts // A collection of arguments for invoking getProject. type LookupProjectOutputArgs struct { - // Map of key/value pairs of - // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). - Config pulumi.StringMapInput `pulumi:"config"` // Description of the project. Description pulumi.StringPtrInput `pulumi:"description"` // **Required** - Name of the project. @@ -127,8 +114,8 @@ func (o LookupProjectResultOutput) ToLookupProjectResultOutputWithContext(ctx co return o } -// Map of key/value pairs of -// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). +// Map of key/value pairs of config settings. +// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/) func (o LookupProjectResultOutput) Config() pulumi.StringMapOutput { return o.ApplyT(func(v LookupProjectResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) } diff --git a/sdk/go/incus/getStorageBucket.go b/sdk/go/incus/getStorageBucket.go new file mode 100644 index 0000000..d81ffc4 --- /dev/null +++ b/sdk/go/incus/getStorageBucket.go @@ -0,0 +1,194 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # StorageBucket +// +// Provides information about an Incus storage bucket. +// See Incus storage bucket [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/) for more details. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.LookupStorageBucket(ctx, &incus.LookupStorageBucketArgs{ +// Name: "default", +// StoragePool: "parent", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("storageBucketName", this.Name) +// return nil +// }) +// } +// +// ``` +func LookupStorageBucket(ctx *pulumi.Context, args *LookupStorageBucketArgs, opts ...pulumi.InvokeOption) (*LookupStorageBucketResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupStorageBucketResult + err := ctx.Invoke("incus:index/getStorageBucket:getStorageBucket", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getStorageBucket. +type LookupStorageBucketArgs struct { + // Description of the storage bucket. + Description *string `pulumi:"description"` + // Location of the storage bucket. + Location *string `pulumi:"location"` + // **Required** - Name of the storage bucket. + Name string `pulumi:"name"` + // *Optional* - Name of the project where the storage bucket is be stored. + Project *string `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` + // Storage Bucket S3 URL. + S3Url *string `pulumi:"s3Url"` + // **Required** - Name of the parent storage pool. + StoragePool string `pulumi:"storagePool"` + // *Optional* - Specify a target node in a cluster. + Target *string `pulumi:"target"` +} + +// A collection of values returned by getStorageBucket. +type LookupStorageBucketResult struct { + // Map of key/value pairs of config settings. + // [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/) + Config map[string]string `pulumi:"config"` + // Description of the storage bucket. + Description string `pulumi:"description"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + // Location of the storage bucket. + Location string `pulumi:"location"` + Name string `pulumi:"name"` + Project *string `pulumi:"project"` + Remote *string `pulumi:"remote"` + // Storage Bucket S3 URL. + S3Url string `pulumi:"s3Url"` + StoragePool string `pulumi:"storagePool"` + Target *string `pulumi:"target"` +} + +func LookupStorageBucketOutput(ctx *pulumi.Context, args LookupStorageBucketOutputArgs, opts ...pulumi.InvokeOption) LookupStorageBucketResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (LookupStorageBucketResultOutput, error) { + args := v.(LookupStorageBucketArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("incus:index/getStorageBucket:getStorageBucket", args, LookupStorageBucketResultOutput{}, options).(LookupStorageBucketResultOutput), nil + }).(LookupStorageBucketResultOutput) +} + +// A collection of arguments for invoking getStorageBucket. +type LookupStorageBucketOutputArgs struct { + // Description of the storage bucket. + Description pulumi.StringPtrInput `pulumi:"description"` + // Location of the storage bucket. + Location pulumi.StringPtrInput `pulumi:"location"` + // **Required** - Name of the storage bucket. + Name pulumi.StringInput `pulumi:"name"` + // *Optional* - Name of the project where the storage bucket is be stored. + Project pulumi.StringPtrInput `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput `pulumi:"remote"` + // Storage Bucket S3 URL. + S3Url pulumi.StringPtrInput `pulumi:"s3Url"` + // **Required** - Name of the parent storage pool. + StoragePool pulumi.StringInput `pulumi:"storagePool"` + // *Optional* - Specify a target node in a cluster. + Target pulumi.StringPtrInput `pulumi:"target"` +} + +func (LookupStorageBucketOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupStorageBucketArgs)(nil)).Elem() +} + +// A collection of values returned by getStorageBucket. +type LookupStorageBucketResultOutput struct{ *pulumi.OutputState } + +func (LookupStorageBucketResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupStorageBucketResult)(nil)).Elem() +} + +func (o LookupStorageBucketResultOutput) ToLookupStorageBucketResultOutput() LookupStorageBucketResultOutput { + return o +} + +func (o LookupStorageBucketResultOutput) ToLookupStorageBucketResultOutputWithContext(ctx context.Context) LookupStorageBucketResultOutput { + return o +} + +// Map of key/value pairs of config settings. +// [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/) +func (o LookupStorageBucketResultOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v LookupStorageBucketResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) +} + +// Description of the storage bucket. +func (o LookupStorageBucketResultOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v LookupStorageBucketResult) string { return v.Description }).(pulumi.StringOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupStorageBucketResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupStorageBucketResult) string { return v.Id }).(pulumi.StringOutput) +} + +// Location of the storage bucket. +func (o LookupStorageBucketResultOutput) Location() pulumi.StringOutput { + return o.ApplyT(func(v LookupStorageBucketResult) string { return v.Location }).(pulumi.StringOutput) +} + +func (o LookupStorageBucketResultOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v LookupStorageBucketResult) string { return v.Name }).(pulumi.StringOutput) +} + +func (o LookupStorageBucketResultOutput) Project() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupStorageBucketResult) *string { return v.Project }).(pulumi.StringPtrOutput) +} + +func (o LookupStorageBucketResultOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupStorageBucketResult) *string { return v.Remote }).(pulumi.StringPtrOutput) +} + +// Storage Bucket S3 URL. +func (o LookupStorageBucketResultOutput) S3Url() pulumi.StringOutput { + return o.ApplyT(func(v LookupStorageBucketResult) string { return v.S3Url }).(pulumi.StringOutput) +} + +func (o LookupStorageBucketResultOutput) StoragePool() pulumi.StringOutput { + return o.ApplyT(func(v LookupStorageBucketResult) string { return v.StoragePool }).(pulumi.StringOutput) +} + +func (o LookupStorageBucketResultOutput) Target() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupStorageBucketResult) *string { return v.Target }).(pulumi.StringPtrOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupStorageBucketResultOutput{}) +} diff --git a/sdk/go/incus/getStoragePool.go b/sdk/go/incus/getStoragePool.go new file mode 100644 index 0000000..f66995d --- /dev/null +++ b/sdk/go/incus/getStoragePool.go @@ -0,0 +1,175 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # StoragePool +// +// Provides information about an Incus storage pool. +// See Incus storage pool [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/storage_pools/) for more details. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.LookupStoragePool(ctx, &incus.LookupStoragePoolArgs{ +// Name: "default", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("storagePoolName", this.Name) +// return nil +// }) +// } +// +// ``` +func LookupStoragePool(ctx *pulumi.Context, args *LookupStoragePoolArgs, opts ...pulumi.InvokeOption) (*LookupStoragePoolResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupStoragePoolResult + err := ctx.Invoke("incus:index/getStoragePool:getStoragePool", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getStoragePool. +type LookupStoragePoolArgs struct { + // Description of the storage pool. + Description *string `pulumi:"description"` + // Storage Pool driver. + Driver *string `pulumi:"driver"` + // **Required** - Name of the storage pool. + Name string `pulumi:"name"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` + // Status of the storage pool. + Status *string `pulumi:"status"` + // *Optional* - Specify a target node in a cluster. + Target *string `pulumi:"target"` +} + +// A collection of values returned by getStoragePool. +type LookupStoragePoolResult struct { + // Map of key/value pairs of config settings. + // [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/) + Config map[string]string `pulumi:"config"` + // Description of the storage pool. + Description string `pulumi:"description"` + // Storage Pool driver. + Driver string `pulumi:"driver"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + Name string `pulumi:"name"` + Remote *string `pulumi:"remote"` + // Status of the storage pool. + Status string `pulumi:"status"` + Target *string `pulumi:"target"` +} + +func LookupStoragePoolOutput(ctx *pulumi.Context, args LookupStoragePoolOutputArgs, opts ...pulumi.InvokeOption) LookupStoragePoolResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (LookupStoragePoolResultOutput, error) { + args := v.(LookupStoragePoolArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("incus:index/getStoragePool:getStoragePool", args, LookupStoragePoolResultOutput{}, options).(LookupStoragePoolResultOutput), nil + }).(LookupStoragePoolResultOutput) +} + +// A collection of arguments for invoking getStoragePool. +type LookupStoragePoolOutputArgs struct { + // Description of the storage pool. + Description pulumi.StringPtrInput `pulumi:"description"` + // Storage Pool driver. + Driver pulumi.StringPtrInput `pulumi:"driver"` + // **Required** - Name of the storage pool. + Name pulumi.StringInput `pulumi:"name"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput `pulumi:"remote"` + // Status of the storage pool. + Status pulumi.StringPtrInput `pulumi:"status"` + // *Optional* - Specify a target node in a cluster. + Target pulumi.StringPtrInput `pulumi:"target"` +} + +func (LookupStoragePoolOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupStoragePoolArgs)(nil)).Elem() +} + +// A collection of values returned by getStoragePool. +type LookupStoragePoolResultOutput struct{ *pulumi.OutputState } + +func (LookupStoragePoolResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupStoragePoolResult)(nil)).Elem() +} + +func (o LookupStoragePoolResultOutput) ToLookupStoragePoolResultOutput() LookupStoragePoolResultOutput { + return o +} + +func (o LookupStoragePoolResultOutput) ToLookupStoragePoolResultOutputWithContext(ctx context.Context) LookupStoragePoolResultOutput { + return o +} + +// Map of key/value pairs of config settings. +// [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/) +func (o LookupStoragePoolResultOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v LookupStoragePoolResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) +} + +// Description of the storage pool. +func (o LookupStoragePoolResultOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v LookupStoragePoolResult) string { return v.Description }).(pulumi.StringOutput) +} + +// Storage Pool driver. +func (o LookupStoragePoolResultOutput) Driver() pulumi.StringOutput { + return o.ApplyT(func(v LookupStoragePoolResult) string { return v.Driver }).(pulumi.StringOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupStoragePoolResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupStoragePoolResult) string { return v.Id }).(pulumi.StringOutput) +} + +func (o LookupStoragePoolResultOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v LookupStoragePoolResult) string { return v.Name }).(pulumi.StringOutput) +} + +func (o LookupStoragePoolResultOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupStoragePoolResult) *string { return v.Remote }).(pulumi.StringPtrOutput) +} + +// Status of the storage pool. +func (o LookupStoragePoolResultOutput) Status() pulumi.StringOutput { + return o.ApplyT(func(v LookupStoragePoolResult) string { return v.Status }).(pulumi.StringOutput) +} + +func (o LookupStoragePoolResultOutput) Target() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupStoragePoolResult) *string { return v.Target }).(pulumi.StringPtrOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupStoragePoolResultOutput{}) +} diff --git a/sdk/go/incus/getStorageVolume.go b/sdk/go/incus/getStorageVolume.go new file mode 100644 index 0000000..a0373b7 --- /dev/null +++ b/sdk/go/incus/getStorageVolume.go @@ -0,0 +1,204 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # StorageVolume +// +// Provides information about an Incus storage volume. +// See Incus storage volume [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/storage_volumes/) for more details. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.LookupStorageVolume(ctx, &incus.LookupStorageVolumeArgs{ +// Name: "default", +// Type: "custom", +// StoragePool: "parent", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("storageVolumeName", this.Name) +// return nil +// }) +// } +// +// ``` +func LookupStorageVolume(ctx *pulumi.Context, args *LookupStorageVolumeArgs, opts ...pulumi.InvokeOption) (*LookupStorageVolumeResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupStorageVolumeResult + err := ctx.Invoke("incus:index/getStorageVolume:getStorageVolume", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getStorageVolume. +type LookupStorageVolumeArgs struct { + // Storage Volume content type. + ContentType *string `pulumi:"contentType"` + // Description of the storage volume. + Description *string `pulumi:"description"` + // Location of the storage volume. + Location *string `pulumi:"location"` + // **Required** - Name of the storage volume. + Name string `pulumi:"name"` + // *Optional* - Name of the project where the storage volume is be stored. + Project *string `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` + // **Required** - Name of the parent storage pool. + StoragePool string `pulumi:"storagePool"` + // *Optional* - Specify a target node in a cluster. + Target *string `pulumi:"target"` + // **Required** - Storage Volume type. + Type string `pulumi:"type"` +} + +// A collection of values returned by getStorageVolume. +type LookupStorageVolumeResult struct { + // Map of key/value pairs of config settings. + // [storage volume config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/) + Config map[string]string `pulumi:"config"` + // Storage Volume content type. + ContentType string `pulumi:"contentType"` + // Description of the storage volume. + Description string `pulumi:"description"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + // Location of the storage volume. + Location string `pulumi:"location"` + Name string `pulumi:"name"` + Project *string `pulumi:"project"` + Remote *string `pulumi:"remote"` + StoragePool string `pulumi:"storagePool"` + Target *string `pulumi:"target"` + Type string `pulumi:"type"` +} + +func LookupStorageVolumeOutput(ctx *pulumi.Context, args LookupStorageVolumeOutputArgs, opts ...pulumi.InvokeOption) LookupStorageVolumeResultOutput { + return pulumi.ToOutputWithContext(ctx.Context(), args). + ApplyT(func(v interface{}) (LookupStorageVolumeResultOutput, error) { + args := v.(LookupStorageVolumeArgs) + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("incus:index/getStorageVolume:getStorageVolume", args, LookupStorageVolumeResultOutput{}, options).(LookupStorageVolumeResultOutput), nil + }).(LookupStorageVolumeResultOutput) +} + +// A collection of arguments for invoking getStorageVolume. +type LookupStorageVolumeOutputArgs struct { + // Storage Volume content type. + ContentType pulumi.StringPtrInput `pulumi:"contentType"` + // Description of the storage volume. + Description pulumi.StringPtrInput `pulumi:"description"` + // Location of the storage volume. + Location pulumi.StringPtrInput `pulumi:"location"` + // **Required** - Name of the storage volume. + Name pulumi.StringInput `pulumi:"name"` + // *Optional* - Name of the project where the storage volume is be stored. + Project pulumi.StringPtrInput `pulumi:"project"` + // *Optional* - The remote in which the resource was created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput `pulumi:"remote"` + // **Required** - Name of the parent storage pool. + StoragePool pulumi.StringInput `pulumi:"storagePool"` + // *Optional* - Specify a target node in a cluster. + Target pulumi.StringPtrInput `pulumi:"target"` + // **Required** - Storage Volume type. + Type pulumi.StringInput `pulumi:"type"` +} + +func (LookupStorageVolumeOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupStorageVolumeArgs)(nil)).Elem() +} + +// A collection of values returned by getStorageVolume. +type LookupStorageVolumeResultOutput struct{ *pulumi.OutputState } + +func (LookupStorageVolumeResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupStorageVolumeResult)(nil)).Elem() +} + +func (o LookupStorageVolumeResultOutput) ToLookupStorageVolumeResultOutput() LookupStorageVolumeResultOutput { + return o +} + +func (o LookupStorageVolumeResultOutput) ToLookupStorageVolumeResultOutputWithContext(ctx context.Context) LookupStorageVolumeResultOutput { + return o +} + +// Map of key/value pairs of config settings. +// [storage volume config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/) +func (o LookupStorageVolumeResultOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v LookupStorageVolumeResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) +} + +// Storage Volume content type. +func (o LookupStorageVolumeResultOutput) ContentType() pulumi.StringOutput { + return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.ContentType }).(pulumi.StringOutput) +} + +// Description of the storage volume. +func (o LookupStorageVolumeResultOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.Description }).(pulumi.StringOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupStorageVolumeResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.Id }).(pulumi.StringOutput) +} + +// Location of the storage volume. +func (o LookupStorageVolumeResultOutput) Location() pulumi.StringOutput { + return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.Location }).(pulumi.StringOutput) +} + +func (o LookupStorageVolumeResultOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.Name }).(pulumi.StringOutput) +} + +func (o LookupStorageVolumeResultOutput) Project() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupStorageVolumeResult) *string { return v.Project }).(pulumi.StringPtrOutput) +} + +func (o LookupStorageVolumeResultOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupStorageVolumeResult) *string { return v.Remote }).(pulumi.StringPtrOutput) +} + +func (o LookupStorageVolumeResultOutput) StoragePool() pulumi.StringOutput { + return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.StoragePool }).(pulumi.StringOutput) +} + +func (o LookupStorageVolumeResultOutput) Target() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupStorageVolumeResult) *string { return v.Target }).(pulumi.StringPtrOutput) +} + +func (o LookupStorageVolumeResultOutput) Type() pulumi.StringOutput { + return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.Type }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupStorageVolumeResultOutput{}) +} diff --git a/sdk/go/incus/image.go b/sdk/go/incus/image.go index 5e85b04..248a7af 100644 --- a/sdk/go/incus/image.go +++ b/sdk/go/incus/image.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -52,15 +52,53 @@ import ( // // ``` // +// ## Image alias Example +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := incus.NewImage(ctx, "alpine", &incus.ImageArgs{ +// SourceImage: &incus.ImageSourceImageArgs{ +// Remote: pulumi.String("images"), +// Name: pulumi.String("alpine/edge"), +// }, +// Aliases: incus.ImageAliasArray{ +// &incus.ImageAliasArgs{ +// Name: pulumi.String("alpine"), +// Description: pulumi.String("Alpine Linux"), +// }, +// &incus.ImageAliasArgs{ +// Name: pulumi.String("alpine-edge"), +// Description: pulumi.String("Alpine Linux Edge"), +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Notes // // * See the Incus [documentation](https://linuxcontainers.org/incus/docs/main/howto/images_remote) for more info on default image remotes. type Image struct { pulumi.CustomResourceState - // *Optional* - A list of aliases to assign to the image after - // pulling. - Aliases pulumi.StringArrayOutput `pulumi:"aliases"` + // Image alias + Aliases ImageAliasArrayOutput `pulumi:"aliases"` // The list of aliases that were copied from the // `sourceImage`. CopiedAliases pulumi.StringArrayOutput `pulumi:"copiedAliases"` @@ -112,9 +150,8 @@ func GetImage(ctx *pulumi.Context, // Input properties used for looking up and filtering Image resources. type imageState struct { - // *Optional* - A list of aliases to assign to the image after - // pulling. - Aliases []string `pulumi:"aliases"` + // Image alias + Aliases []ImageAlias `pulumi:"aliases"` // The list of aliases that were copied from the // `sourceImage`. CopiedAliases []string `pulumi:"copiedAliases"` @@ -137,9 +174,8 @@ type imageState struct { } type ImageState struct { - // *Optional* - A list of aliases to assign to the image after - // pulling. - Aliases pulumi.StringArrayInput + // Image alias + Aliases ImageAliasArrayInput // The list of aliases that were copied from the // `sourceImage`. CopiedAliases pulumi.StringArrayInput @@ -166,9 +202,8 @@ func (ImageState) ElementType() reflect.Type { } type imageArgs struct { - // *Optional* - A list of aliases to assign to the image after - // pulling. - Aliases []string `pulumi:"aliases"` + // Image alias + Aliases []ImageAlias `pulumi:"aliases"` // *Optional* - Name of the project where the image will be stored. Project *string `pulumi:"project"` // *Optional* - The remote in which the resource will be created. If @@ -184,9 +219,8 @@ type imageArgs struct { // The set of arguments for constructing a Image resource. type ImageArgs struct { - // *Optional* - A list of aliases to assign to the image after - // pulling. - Aliases pulumi.StringArrayInput + // Image alias + Aliases ImageAliasArrayInput // *Optional* - Name of the project where the image will be stored. Project pulumi.StringPtrInput // *Optional* - The remote in which the resource will be created. If @@ -287,10 +321,9 @@ func (o ImageOutput) ToImageOutputWithContext(ctx context.Context) ImageOutput { return o } -// *Optional* - A list of aliases to assign to the image after -// pulling. -func (o ImageOutput) Aliases() pulumi.StringArrayOutput { - return o.ApplyT(func(v *Image) pulumi.StringArrayOutput { return v.Aliases }).(pulumi.StringArrayOutput) +// Image alias +func (o ImageOutput) Aliases() ImageAliasArrayOutput { + return o.ApplyT(func(v *Image) ImageAliasArrayOutput { return v.Aliases }).(ImageAliasArrayOutput) } // The list of aliases that were copied from the diff --git a/sdk/go/incus/init.go b/sdk/go/incus/init.go index 65e9422..1db0047 100644 --- a/sdk/go/incus/init.go +++ b/sdk/go/incus/init.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -25,8 +25,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &Certificate{} case "incus:index/clusterGroup:ClusterGroup": r = &ClusterGroup{} - case "incus:index/clusterGroupAssignment:ClusterGroupAssignment": - r = &ClusterGroupAssignment{} + case "incus:index/clusterGroupMember:ClusterGroupMember": + r = &ClusterGroupMember{} case "incus:index/image:Image": r = &Image{} case "incus:index/instance:Instance": @@ -37,6 +37,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &Network{} case "incus:index/networkAcl:NetworkAcl": r = &NetworkAcl{} + case "incus:index/networkAddressSet:NetworkAddressSet": + r = &NetworkAddressSet{} case "incus:index/networkForward:NetworkForward": r = &NetworkForward{} case "incus:index/networkIntegration:NetworkIntegration": @@ -53,6 +55,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &Profile{} case "incus:index/project:Project": r = &Project{} + case "incus:index/server:Server": + r = &Server{} case "incus:index/storageBucket:StorageBucket": r = &StorageBucket{} case "incus:index/storageBucketKey:StorageBucketKey": @@ -104,7 +108,7 @@ func init() { ) pulumi.RegisterResourceModule( "incus", - "index/clusterGroupAssignment", + "index/clusterGroupMember", &module{version}, ) pulumi.RegisterResourceModule( @@ -132,6 +136,11 @@ func init() { "index/networkAcl", &module{version}, ) + pulumi.RegisterResourceModule( + "incus", + "index/networkAddressSet", + &module{version}, + ) pulumi.RegisterResourceModule( "incus", "index/networkForward", @@ -172,6 +181,11 @@ func init() { "index/project", &module{version}, ) + pulumi.RegisterResourceModule( + "incus", + "index/server", + &module{version}, + ) pulumi.RegisterResourceModule( "incus", "index/storageBucket", diff --git a/sdk/go/incus/instance.go b/sdk/go/incus/instance.go index 9ead9fb..0a69e8e 100644 --- a/sdk/go/incus/instance.go +++ b/sdk/go/incus/instance.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -7,6 +7,7 @@ import ( "context" "reflect" + "errors" "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -14,6 +15,8 @@ import ( type Instance struct { pulumi.CustomResourceState + // *Optional* - The instance architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. + Architecture pulumi.StringOutput `pulumi:"architecture"` // *Optional* - Map of key/value pairs of // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). Config pulumi.StringMapOutput `pulumi:"config"` @@ -69,9 +72,12 @@ type Instance struct { func NewInstance(ctx *pulumi.Context, name string, args *InstanceArgs, opts ...pulumi.ResourceOption) (*Instance, error) { if args == nil { - args = &InstanceArgs{} + return nil, errors.New("missing one or more required arguments") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } if args.Project == nil { args.Project = pulumi.StringPtr("default") } @@ -98,6 +104,8 @@ func GetInstance(ctx *pulumi.Context, // Input properties used for looking up and filtering Instance resources. type instanceState struct { + // *Optional* - The instance architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. + Architecture *string `pulumi:"architecture"` // *Optional* - Map of key/value pairs of // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). Config map[string]string `pulumi:"config"` @@ -150,6 +158,8 @@ type instanceState struct { } type InstanceState struct { + // *Optional* - The instance architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. + Architecture pulumi.StringPtrInput // *Optional* - Map of key/value pairs of // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). Config pulumi.StringMapInput @@ -206,6 +216,8 @@ func (InstanceState) ElementType() reflect.Type { } type instanceArgs struct { + // *Optional* - The instance architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. + Architecture *string `pulumi:"architecture"` // *Optional* - Map of key/value pairs of // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). Config map[string]string `pulumi:"config"` @@ -221,7 +233,7 @@ type instanceArgs struct { // specify [an image accessible from the provider remote](https://linuxcontainers.org/incus/docs/main/reference/image_servers/). Image *string `pulumi:"image"` // **Required** - Name of the instance. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // *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. @@ -248,6 +260,8 @@ type instanceArgs struct { // The set of arguments for constructing a Instance resource. type InstanceArgs struct { + // *Optional* - The instance architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. + Architecture pulumi.StringPtrInput // *Optional* - Map of key/value pairs of // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). Config pulumi.StringMapInput @@ -263,7 +277,7 @@ type InstanceArgs struct { // specify [an image accessible from the provider remote](https://linuxcontainers.org/incus/docs/main/reference/image_servers/). Image pulumi.StringPtrInput // **Required** - Name of the instance. - Name pulumi.StringPtrInput + Name pulumi.StringInput // *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. @@ -375,6 +389,11 @@ func (o InstanceOutput) ToInstanceOutputWithContext(ctx context.Context) Instanc return o } +// *Optional* - The instance architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. +func (o InstanceOutput) Architecture() pulumi.StringOutput { + return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.Architecture }).(pulumi.StringOutput) +} + // *Optional* - Map of key/value pairs of // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). func (o InstanceOutput) Config() pulumi.StringMapOutput { diff --git a/sdk/go/incus/instanceSnapshot.go b/sdk/go/incus/instanceSnapshot.go index 53c2e8a..a8aaa3a 100644 --- a/sdk/go/incus/instanceSnapshot.go +++ b/sdk/go/incus/instanceSnapshot.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -8,7 +8,6 @@ import ( "reflect" "errors" - "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -82,6 +81,9 @@ func NewInstanceSnapshot(ctx *pulumi.Context, if args.Instance == nil { return nil, errors.New("invalid value for required argument 'Instance'") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } if args.Project == nil { args.Project = pulumi.StringPtr("default") } @@ -153,7 +155,7 @@ type instanceSnapshotArgs struct { // **Required** - The name of the instance to snapshot. Instance string `pulumi:"instance"` // **Required** - Name of the snapshot. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // *Optional* - Name of the project where the snapshot will be stored. Project *string `pulumi:"project"` // *Optional* - The remote in which the resource will be created. If @@ -170,7 +172,7 @@ type InstanceSnapshotArgs struct { // **Required** - The name of the instance to snapshot. Instance pulumi.StringInput // **Required** - Name of the snapshot. - Name pulumi.StringPtrInput + Name pulumi.StringInput // *Optional* - Name of the project where the snapshot will be stored. Project pulumi.StringPtrInput // *Optional* - The remote in which the resource will be created. If diff --git a/sdk/go/incus/internal/pulumiUtilities.go b/sdk/go/incus/internal/pulumiUtilities.go index 7260221..3fe2401 100644 --- a/sdk/go/incus/internal/pulumiUtilities.go +++ b/sdk/go/incus/internal/pulumiUtilities.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package internal diff --git a/sdk/go/incus/internal/pulumiVersion.go b/sdk/go/incus/internal/pulumiVersion.go index d591687..4ad7cb8 100644 --- a/sdk/go/incus/internal/pulumiVersion.go +++ b/sdk/go/incus/internal/pulumiVersion.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package internal diff --git a/sdk/go/incus/network.go b/sdk/go/incus/network.go index 5725d49..da0917e 100644 --- a/sdk/go/incus/network.go +++ b/sdk/go/incus/network.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -7,6 +7,7 @@ import ( "context" "reflect" + "errors" "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -17,7 +18,7 @@ type Network struct { // *Optional* - Map of key/value pairs of // [network config settings](https://linuxcontainers.org/incus/docs/main/networks/). Config pulumi.StringMapOutput `pulumi:"config"` - // *Optional* - Description of the network. + // *Optional* - Description of the network. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description pulumi.StringOutput `pulumi:"description"` // Whether or not the network is managed. Managed pulumi.BoolOutput `pulumi:"managed"` @@ -41,9 +42,12 @@ type Network struct { func NewNetwork(ctx *pulumi.Context, name string, args *NetworkArgs, opts ...pulumi.ResourceOption) (*Network, error) { if args == nil { - args = &NetworkArgs{} + return nil, errors.New("missing one or more required arguments") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } if args.Project == nil { args.Project = pulumi.StringPtr("default") } @@ -73,7 +77,7 @@ type networkState struct { // *Optional* - Map of key/value pairs of // [network config settings](https://linuxcontainers.org/incus/docs/main/networks/). Config map[string]string `pulumi:"config"` - // *Optional* - Description of the network. + // *Optional* - Description of the network. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description *string `pulumi:"description"` // Whether or not the network is managed. Managed *bool `pulumi:"managed"` @@ -97,7 +101,7 @@ type NetworkState struct { // *Optional* - Map of key/value pairs of // [network config settings](https://linuxcontainers.org/incus/docs/main/networks/). Config pulumi.StringMapInput - // *Optional* - Description of the network. + // *Optional* - Description of the network. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description pulumi.StringPtrInput // Whether or not the network is managed. Managed pulumi.BoolPtrInput @@ -125,11 +129,11 @@ type networkArgs struct { // *Optional* - Map of key/value pairs of // [network config settings](https://linuxcontainers.org/incus/docs/main/networks/). Config map[string]string `pulumi:"config"` - // *Optional* - Description of the network. + // *Optional* - Description of the network. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description *string `pulumi:"description"` // **Required** - Name of the network. This is usually the device the // network will appear as to instances. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // *Optional* - Name of the project where the network will be created. Project *string `pulumi:"project"` // *Optional* - The remote in which the resource will be created. If @@ -148,11 +152,11 @@ type NetworkArgs struct { // *Optional* - Map of key/value pairs of // [network config settings](https://linuxcontainers.org/incus/docs/main/networks/). Config pulumi.StringMapInput - // *Optional* - Description of the network. + // *Optional* - Description of the network. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description pulumi.StringPtrInput // **Required** - Name of the network. This is usually the device the // network will appear as to instances. - Name pulumi.StringPtrInput + Name pulumi.StringInput // *Optional* - Name of the project where the network will be created. Project pulumi.StringPtrInput // *Optional* - The remote in which the resource will be created. If @@ -259,7 +263,7 @@ func (o NetworkOutput) Config() pulumi.StringMapOutput { return o.ApplyT(func(v *Network) pulumi.StringMapOutput { return v.Config }).(pulumi.StringMapOutput) } -// *Optional* - Description of the network. +// *Optional* - Description of the network. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. func (o NetworkOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v *Network) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) } diff --git a/sdk/go/incus/networkAcl.go b/sdk/go/incus/networkAcl.go index aab6775..a96206e 100644 --- a/sdk/go/incus/networkAcl.go +++ b/sdk/go/incus/networkAcl.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -7,6 +7,7 @@ import ( "context" "reflect" + "errors" "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -38,9 +39,12 @@ type NetworkAcl struct { func NewNetworkAcl(ctx *pulumi.Context, name string, args *NetworkAclArgs, opts ...pulumi.ResourceOption) (*NetworkAcl, error) { if args == nil { - args = &NetworkAclArgs{} + return nil, errors.New("missing one or more required arguments") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } if args.Project == nil { args.Project = pulumi.StringPtr("default") } @@ -125,7 +129,7 @@ type networkAclArgs struct { // The network ACL rule supports: Ingresses []NetworkAclIngress `pulumi:"ingresses"` // **Required** - Name of the network ACL. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // *Optional* - Name of the project where the network ACL will be created. Project *string `pulumi:"project"` // *Optional* - The remote in which the resource will be created. If @@ -147,7 +151,7 @@ type NetworkAclArgs struct { // The network ACL rule supports: Ingresses NetworkAclIngressArrayInput // **Required** - Name of the network ACL. - Name pulumi.StringPtrInput + Name pulumi.StringInput // *Optional* - Name of the project where the network ACL will be created. Project pulumi.StringPtrInput // *Optional* - The remote in which the resource will be created. If diff --git a/sdk/go/incus/networkAddressSet.go b/sdk/go/incus/networkAddressSet.go new file mode 100644 index 0000000..1b3195c --- /dev/null +++ b/sdk/go/incus/networkAddressSet.go @@ -0,0 +1,387 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "errors" + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # NetworkAddressSet +// +// Network address sets are a list of either IPv4, IPv6 addresses with or without CIDR suffix. They can be used in source or destination fields of [ACLs](https://linuxcontainers.org/incus/docs/main/howto/network_acls/#network-acls-rules-properties). +// +// ## Basic Example +// +// ```go +// package main +// +// import ( +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := incus.NewNetworkAddressSet(ctx, "this", &incus.NetworkAddressSetArgs{ +// Name: pulumi.String("Network Address Set"), +// Description: pulumi.String("Network Address Set description"), +// Addresses: pulumi.StringArray{ +// pulumi.String("10.0.0.2"), +// pulumi.String("10.0.0.3"), +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## ACL Example +// +// ```go +// package main +// +// import ( +// +// "fmt" +// +// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// this, err := incus.NewNetworkAddressSet(ctx, "this", &incus.NetworkAddressSetArgs{ +// Name: pulumi.String("network_address_set"), +// Description: pulumi.String("Network Address Set description"), +// Addresses: pulumi.StringArray{ +// pulumi.String("10.0.0.2"), +// pulumi.String("10.0.0.3"), +// }, +// }) +// if err != nil { +// return err +// } +// _, err = incus.NewNetworkAcl(ctx, "this", &incus.NetworkAclArgs{ +// Name: pulumi.String("network_acl"), +// Ingresses: incus.NetworkAclIngressArray{ +// &incus.NetworkAclIngressArgs{ +// Action: pulumi.String("allow"), +// Source: pulumi.String("${incus_network_address_set.this.name}"), +// Destination_port: "22", +// Protocol: pulumi.String("tcp"), +// Description: this.Name.ApplyT(func(name string) (string, error) { +// return fmt.Sprintf("Incoming SSH connections from %v", name), nil +// }).(pulumi.StringOutput), +// State: pulumi.String("logged"), +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +type NetworkAddressSet struct { + pulumi.CustomResourceState + + // **Required** - IP addresses of the address set. + Addresses pulumi.StringArrayOutput `pulumi:"addresses"` + // *Optional* - Map of key/value pairs of [network address set config settings](https://linuxcontainers.org/incus/docs/main/howto/network_address_sets/#address-set-configuration-options) + Config pulumi.StringMapOutput `pulumi:"config"` + // *Optional* - Description of the network address set. + Description pulumi.StringOutput `pulumi:"description"` + // **Required** - Name of the network address set. + Name pulumi.StringOutput `pulumi:"name"` + // *Optional* - Name of the project where the network address set will be created. + Project pulumi.StringPtrOutput `pulumi:"project"` + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrOutput `pulumi:"remote"` +} + +// NewNetworkAddressSet registers a new resource with the given unique name, arguments, and options. +func NewNetworkAddressSet(ctx *pulumi.Context, + name string, args *NetworkAddressSetArgs, opts ...pulumi.ResourceOption) (*NetworkAddressSet, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Addresses == nil { + return nil, errors.New("invalid value for required argument 'Addresses'") + } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource NetworkAddressSet + err := ctx.RegisterResource("incus:index/networkAddressSet:NetworkAddressSet", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetNetworkAddressSet gets an existing NetworkAddressSet resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetNetworkAddressSet(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *NetworkAddressSetState, opts ...pulumi.ResourceOption) (*NetworkAddressSet, error) { + var resource NetworkAddressSet + err := ctx.ReadResource("incus:index/networkAddressSet:NetworkAddressSet", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering NetworkAddressSet resources. +type networkAddressSetState struct { + // **Required** - IP addresses of the address set. + Addresses []string `pulumi:"addresses"` + // *Optional* - Map of key/value pairs of [network address set config settings](https://linuxcontainers.org/incus/docs/main/howto/network_address_sets/#address-set-configuration-options) + Config map[string]string `pulumi:"config"` + // *Optional* - Description of the network address set. + Description *string `pulumi:"description"` + // **Required** - Name of the network address set. + Name *string `pulumi:"name"` + // *Optional* - Name of the project where the network address set will be created. + Project *string `pulumi:"project"` + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` +} + +type NetworkAddressSetState struct { + // **Required** - IP addresses of the address set. + Addresses pulumi.StringArrayInput + // *Optional* - Map of key/value pairs of [network address set config settings](https://linuxcontainers.org/incus/docs/main/howto/network_address_sets/#address-set-configuration-options) + Config pulumi.StringMapInput + // *Optional* - Description of the network address set. + Description pulumi.StringPtrInput + // **Required** - Name of the network address set. + Name pulumi.StringPtrInput + // *Optional* - Name of the project where the network address set will be created. + Project pulumi.StringPtrInput + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput +} + +func (NetworkAddressSetState) ElementType() reflect.Type { + return reflect.TypeOf((*networkAddressSetState)(nil)).Elem() +} + +type networkAddressSetArgs struct { + // **Required** - IP addresses of the address set. + Addresses []string `pulumi:"addresses"` + // *Optional* - Map of key/value pairs of [network address set config settings](https://linuxcontainers.org/incus/docs/main/howto/network_address_sets/#address-set-configuration-options) + Config map[string]string `pulumi:"config"` + // *Optional* - Description of the network address set. + Description *string `pulumi:"description"` + // **Required** - Name of the network address set. + Name string `pulumi:"name"` + // *Optional* - Name of the project where the network address set will be created. + Project *string `pulumi:"project"` + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` +} + +// The set of arguments for constructing a NetworkAddressSet resource. +type NetworkAddressSetArgs struct { + // **Required** - IP addresses of the address set. + Addresses pulumi.StringArrayInput + // *Optional* - Map of key/value pairs of [network address set config settings](https://linuxcontainers.org/incus/docs/main/howto/network_address_sets/#address-set-configuration-options) + Config pulumi.StringMapInput + // *Optional* - Description of the network address set. + Description pulumi.StringPtrInput + // **Required** - Name of the network address set. + Name pulumi.StringInput + // *Optional* - Name of the project where the network address set will be created. + Project pulumi.StringPtrInput + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput +} + +func (NetworkAddressSetArgs) ElementType() reflect.Type { + return reflect.TypeOf((*networkAddressSetArgs)(nil)).Elem() +} + +type NetworkAddressSetInput interface { + pulumi.Input + + ToNetworkAddressSetOutput() NetworkAddressSetOutput + ToNetworkAddressSetOutputWithContext(ctx context.Context) NetworkAddressSetOutput +} + +func (*NetworkAddressSet) ElementType() reflect.Type { + return reflect.TypeOf((**NetworkAddressSet)(nil)).Elem() +} + +func (i *NetworkAddressSet) ToNetworkAddressSetOutput() NetworkAddressSetOutput { + return i.ToNetworkAddressSetOutputWithContext(context.Background()) +} + +func (i *NetworkAddressSet) ToNetworkAddressSetOutputWithContext(ctx context.Context) NetworkAddressSetOutput { + return pulumi.ToOutputWithContext(ctx, i).(NetworkAddressSetOutput) +} + +// NetworkAddressSetArrayInput is an input type that accepts NetworkAddressSetArray and NetworkAddressSetArrayOutput values. +// You can construct a concrete instance of `NetworkAddressSetArrayInput` via: +// +// NetworkAddressSetArray{ NetworkAddressSetArgs{...} } +type NetworkAddressSetArrayInput interface { + pulumi.Input + + ToNetworkAddressSetArrayOutput() NetworkAddressSetArrayOutput + ToNetworkAddressSetArrayOutputWithContext(context.Context) NetworkAddressSetArrayOutput +} + +type NetworkAddressSetArray []NetworkAddressSetInput + +func (NetworkAddressSetArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*NetworkAddressSet)(nil)).Elem() +} + +func (i NetworkAddressSetArray) ToNetworkAddressSetArrayOutput() NetworkAddressSetArrayOutput { + return i.ToNetworkAddressSetArrayOutputWithContext(context.Background()) +} + +func (i NetworkAddressSetArray) ToNetworkAddressSetArrayOutputWithContext(ctx context.Context) NetworkAddressSetArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(NetworkAddressSetArrayOutput) +} + +// NetworkAddressSetMapInput is an input type that accepts NetworkAddressSetMap and NetworkAddressSetMapOutput values. +// You can construct a concrete instance of `NetworkAddressSetMapInput` via: +// +// NetworkAddressSetMap{ "key": NetworkAddressSetArgs{...} } +type NetworkAddressSetMapInput interface { + pulumi.Input + + ToNetworkAddressSetMapOutput() NetworkAddressSetMapOutput + ToNetworkAddressSetMapOutputWithContext(context.Context) NetworkAddressSetMapOutput +} + +type NetworkAddressSetMap map[string]NetworkAddressSetInput + +func (NetworkAddressSetMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*NetworkAddressSet)(nil)).Elem() +} + +func (i NetworkAddressSetMap) ToNetworkAddressSetMapOutput() NetworkAddressSetMapOutput { + return i.ToNetworkAddressSetMapOutputWithContext(context.Background()) +} + +func (i NetworkAddressSetMap) ToNetworkAddressSetMapOutputWithContext(ctx context.Context) NetworkAddressSetMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(NetworkAddressSetMapOutput) +} + +type NetworkAddressSetOutput struct{ *pulumi.OutputState } + +func (NetworkAddressSetOutput) ElementType() reflect.Type { + return reflect.TypeOf((**NetworkAddressSet)(nil)).Elem() +} + +func (o NetworkAddressSetOutput) ToNetworkAddressSetOutput() NetworkAddressSetOutput { + return o +} + +func (o NetworkAddressSetOutput) ToNetworkAddressSetOutputWithContext(ctx context.Context) NetworkAddressSetOutput { + return o +} + +// **Required** - IP addresses of the address set. +func (o NetworkAddressSetOutput) Addresses() pulumi.StringArrayOutput { + return o.ApplyT(func(v *NetworkAddressSet) pulumi.StringArrayOutput { return v.Addresses }).(pulumi.StringArrayOutput) +} + +// *Optional* - Map of key/value pairs of [network address set config settings](https://linuxcontainers.org/incus/docs/main/howto/network_address_sets/#address-set-configuration-options) +func (o NetworkAddressSetOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v *NetworkAddressSet) pulumi.StringMapOutput { return v.Config }).(pulumi.StringMapOutput) +} + +// *Optional* - Description of the network address set. +func (o NetworkAddressSetOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v *NetworkAddressSet) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) +} + +// **Required** - Name of the network address set. +func (o NetworkAddressSetOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v *NetworkAddressSet) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) +} + +// *Optional* - Name of the project where the network address set will be created. +func (o NetworkAddressSetOutput) Project() pulumi.StringPtrOutput { + return o.ApplyT(func(v *NetworkAddressSet) pulumi.StringPtrOutput { return v.Project }).(pulumi.StringPtrOutput) +} + +// *Optional* - The remote in which the resource will be created. If +// not provided, the provider's default remote will be used. +func (o NetworkAddressSetOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v *NetworkAddressSet) pulumi.StringPtrOutput { return v.Remote }).(pulumi.StringPtrOutput) +} + +type NetworkAddressSetArrayOutput struct{ *pulumi.OutputState } + +func (NetworkAddressSetArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*NetworkAddressSet)(nil)).Elem() +} + +func (o NetworkAddressSetArrayOutput) ToNetworkAddressSetArrayOutput() NetworkAddressSetArrayOutput { + return o +} + +func (o NetworkAddressSetArrayOutput) ToNetworkAddressSetArrayOutputWithContext(ctx context.Context) NetworkAddressSetArrayOutput { + return o +} + +func (o NetworkAddressSetArrayOutput) Index(i pulumi.IntInput) NetworkAddressSetOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkAddressSet { + return vs[0].([]*NetworkAddressSet)[vs[1].(int)] + }).(NetworkAddressSetOutput) +} + +type NetworkAddressSetMapOutput struct{ *pulumi.OutputState } + +func (NetworkAddressSetMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*NetworkAddressSet)(nil)).Elem() +} + +func (o NetworkAddressSetMapOutput) ToNetworkAddressSetMapOutput() NetworkAddressSetMapOutput { + return o +} + +func (o NetworkAddressSetMapOutput) ToNetworkAddressSetMapOutputWithContext(ctx context.Context) NetworkAddressSetMapOutput { + return o +} + +func (o NetworkAddressSetMapOutput) MapIndex(k pulumi.StringInput) NetworkAddressSetOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkAddressSet { + return vs[0].(map[string]*NetworkAddressSet)[vs[1].(string)] + }).(NetworkAddressSetOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*NetworkAddressSetInput)(nil)).Elem(), &NetworkAddressSet{}) + pulumi.RegisterInputType(reflect.TypeOf((*NetworkAddressSetArrayInput)(nil)).Elem(), NetworkAddressSetArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*NetworkAddressSetMapInput)(nil)).Elem(), NetworkAddressSetMap{}) + pulumi.RegisterOutputType(NetworkAddressSetOutput{}) + pulumi.RegisterOutputType(NetworkAddressSetArrayOutput{}) + pulumi.RegisterOutputType(NetworkAddressSetMapOutput{}) +} diff --git a/sdk/go/incus/networkForward.go b/sdk/go/incus/networkForward.go index 50d04d6..39cd03c 100644 --- a/sdk/go/incus/networkForward.go +++ b/sdk/go/incus/networkForward.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -8,7 +8,6 @@ import ( "reflect" "errors" - "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) diff --git a/sdk/go/incus/networkIntegration.go b/sdk/go/incus/networkIntegration.go index e29020e..d37cfc5 100644 --- a/sdk/go/incus/networkIntegration.go +++ b/sdk/go/incus/networkIntegration.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -8,7 +8,6 @@ import ( "reflect" "errors" - "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -123,6 +122,9 @@ func NewNetworkIntegration(ctx *pulumi.Context, return nil, errors.New("missing one or more required arguments") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } if args.Type == nil { return nil, errors.New("invalid value for required argument 'Type'") } @@ -193,7 +195,7 @@ type networkIntegrationArgs struct { // *Optional* - Description of the network integration. Description *string `pulumi:"description"` // **Required** - Name of the network integration. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // *Optional* - Name of the project where the network will be created. Project *string `pulumi:"project"` // *Optional* - The remote in which the resource will be created. If @@ -210,7 +212,7 @@ type NetworkIntegrationArgs struct { // *Optional* - Description of the network integration. Description pulumi.StringPtrInput // **Required** - Name of the network integration. - Name pulumi.StringPtrInput + Name pulumi.StringInput // *Optional* - Name of the project where the network will be created. Project pulumi.StringPtrInput // *Optional* - The remote in which the resource will be created. If diff --git a/sdk/go/incus/networkLoadBalancer.go b/sdk/go/incus/networkLoadBalancer.go index 601ba26..331b713 100644 --- a/sdk/go/incus/networkLoadBalancer.go +++ b/sdk/go/incus/networkLoadBalancer.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -8,7 +8,6 @@ import ( "reflect" "errors" - "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) diff --git a/sdk/go/incus/networkPeer.go b/sdk/go/incus/networkPeer.go index 405addd..a02492b 100644 --- a/sdk/go/incus/networkPeer.go +++ b/sdk/go/incus/networkPeer.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -7,6 +7,7 @@ import ( "context" "reflect" + "errors" "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -109,9 +110,12 @@ type NetworkPeer struct { func NewNetworkPeer(ctx *pulumi.Context, name string, args *NetworkPeerArgs, opts ...pulumi.ResourceOption) (*NetworkPeer, error) { if args == nil { - args = &NetworkPeerArgs{} + return nil, errors.New("missing one or more required arguments") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } if args.Project == nil { args.Project = pulumi.StringPtr("default") } @@ -195,7 +199,7 @@ type networkPeerArgs struct { // *Optional* - Description of the network peering Description *string `pulumi:"description"` // **required** - Name of the network peering on the local network - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // **Required** - Name of the local network. Network *string `pulumi:"network"` // *Optional* - Name of the project where the network is located. @@ -219,7 +223,7 @@ type NetworkPeerArgs struct { // *Optional* - Description of the network peering Description pulumi.StringPtrInput // **required** - Name of the network peering on the local network - Name pulumi.StringPtrInput + Name pulumi.StringInput // **Required** - Name of the local network. Network pulumi.StringPtrInput // *Optional* - Name of the project where the network is located. diff --git a/sdk/go/incus/networkZone.go b/sdk/go/incus/networkZone.go index ac96f01..f64c8f3 100644 --- a/sdk/go/incus/networkZone.go +++ b/sdk/go/incus/networkZone.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -7,6 +7,7 @@ import ( "context" "reflect" + "errors" "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -32,9 +33,12 @@ type NetworkZone struct { func NewNetworkZone(ctx *pulumi.Context, name string, args *NetworkZoneArgs, opts ...pulumi.ResourceOption) (*NetworkZone, error) { if args == nil { - args = &NetworkZoneArgs{} + return nil, errors.New("missing one or more required arguments") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } if args.Project == nil { args.Project = pulumi.StringPtr("default") } @@ -101,7 +105,7 @@ type networkZoneArgs struct { // *Optional* - Description of the network zone. Description *string `pulumi:"description"` // **Required** - Name of the network zone. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // *Optional* - Name of the project where the network zone will be created. Project *string `pulumi:"project"` // *Optional* - The remote in which the resource will be created. If @@ -117,7 +121,7 @@ type NetworkZoneArgs struct { // *Optional* - Description of the network zone. Description pulumi.StringPtrInput // **Required** - Name of the network zone. - Name pulumi.StringPtrInput + Name pulumi.StringInput // *Optional* - Name of the project where the network zone will be created. Project pulumi.StringPtrInput // *Optional* - The remote in which the resource will be created. If diff --git a/sdk/go/incus/networkZoneRecord.go b/sdk/go/incus/networkZoneRecord.go index 41d91bc..5480d32 100644 --- a/sdk/go/incus/networkZoneRecord.go +++ b/sdk/go/incus/networkZoneRecord.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -8,7 +8,6 @@ import ( "reflect" "errors" - "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -41,6 +40,9 @@ func NewNetworkZoneRecord(ctx *pulumi.Context, return nil, errors.New("missing one or more required arguments") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } if args.Zone == nil { return nil, errors.New("invalid value for required argument 'Zone'") } @@ -120,7 +122,7 @@ type networkZoneRecordArgs struct { // *Optional* - Entry in network zone record - see below. Entries []NetworkZoneRecordEntry `pulumi:"entries"` // **Required** - Name of the network zone record. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // *Optional* - Name of the project where the network zone record will be created. Project *string `pulumi:"project"` // *Optional* - The remote in which the resource will be created. If @@ -140,7 +142,7 @@ type NetworkZoneRecordArgs struct { // *Optional* - Entry in network zone record - see below. Entries NetworkZoneRecordEntryArrayInput // **Required** - Name of the network zone record. - Name pulumi.StringPtrInput + Name pulumi.StringInput // *Optional* - Name of the project where the network zone record will be created. Project pulumi.StringPtrInput // *Optional* - The remote in which the resource will be created. If diff --git a/sdk/go/incus/profile.go b/sdk/go/incus/profile.go index b8b6783..11a5a12 100644 --- a/sdk/go/incus/profile.go +++ b/sdk/go/incus/profile.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -7,6 +7,7 @@ import ( "context" "reflect" + "errors" "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -34,9 +35,12 @@ type Profile struct { func NewProfile(ctx *pulumi.Context, name string, args *ProfileArgs, opts ...pulumi.ResourceOption) (*Profile, error) { if args == nil { - args = &ProfileArgs{} + return nil, errors.New("missing one or more required arguments") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } if args.Project == nil { args.Project = pulumi.StringPtr("default") } @@ -109,7 +113,7 @@ type profileArgs struct { // *Optional* - Device definition. See reference below. Devices []ProfileDevice `pulumi:"devices"` // **Required** - Name of the profile. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // *Optional* - Name of the project where the profile will be stored. Project *string `pulumi:"project"` // *Optional* - The remote in which the resource will be created. If @@ -127,7 +131,7 @@ type ProfileArgs struct { // *Optional* - Device definition. See reference below. Devices ProfileDeviceArrayInput // **Required** - Name of the profile. - Name pulumi.StringPtrInput + Name pulumi.StringInput // *Optional* - Name of the project where the profile will be stored. Project pulumi.StringPtrInput // *Optional* - The remote in which the resource will be created. If diff --git a/sdk/go/incus/project.go b/sdk/go/incus/project.go index f6d9b60..91412fc 100644 --- a/sdk/go/incus/project.go +++ b/sdk/go/incus/project.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -7,6 +7,7 @@ import ( "context" "reflect" + "errors" "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -18,6 +19,8 @@ type Project struct { Config pulumi.StringMapOutput `pulumi:"config"` // *Optional* - Description of the project. Description pulumi.StringOutput `pulumi:"description"` + // *Optional* - Whether to delete everything the project contains on destroy so that it can be destroyed without any error. + ForceDestroy pulumi.BoolOutput `pulumi:"forceDestroy"` // **Required** - Name of the project. Name pulumi.StringOutput `pulumi:"name"` // *Optional* - The remote in which the resource will be created. If @@ -29,9 +32,12 @@ type Project struct { func NewProject(ctx *pulumi.Context, name string, args *ProjectArgs, opts ...pulumi.ResourceOption) (*Project, error) { if args == nil { - args = &ProjectArgs{} + return nil, errors.New("missing one or more required arguments") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } opts = internal.PkgResourceDefaultOpts(opts) var resource Project err := ctx.RegisterResource("incus:index/project:Project", name, args, &resource, opts...) @@ -59,6 +65,8 @@ type projectState struct { Config map[string]string `pulumi:"config"` // *Optional* - Description of the project. Description *string `pulumi:"description"` + // *Optional* - Whether to delete everything the project contains on destroy so that it can be destroyed without any error. + ForceDestroy *bool `pulumi:"forceDestroy"` // **Required** - Name of the project. Name *string `pulumi:"name"` // *Optional* - The remote in which the resource will be created. If @@ -71,6 +79,8 @@ type ProjectState struct { Config pulumi.StringMapInput // *Optional* - Description of the project. Description pulumi.StringPtrInput + // *Optional* - Whether to delete everything the project contains on destroy so that it can be destroyed without any error. + ForceDestroy pulumi.BoolPtrInput // **Required** - Name of the project. Name pulumi.StringPtrInput // *Optional* - The remote in which the resource will be created. If @@ -87,8 +97,10 @@ type projectArgs struct { Config map[string]string `pulumi:"config"` // *Optional* - Description of the project. Description *string `pulumi:"description"` + // *Optional* - Whether to delete everything the project contains on destroy so that it can be destroyed without any error. + ForceDestroy *bool `pulumi:"forceDestroy"` // **Required** - Name of the project. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // *Optional* - The remote in which the resource will be created. If // not provided, the provider's default remote will be used. Remote *string `pulumi:"remote"` @@ -100,8 +112,10 @@ type ProjectArgs struct { Config pulumi.StringMapInput // *Optional* - Description of the project. Description pulumi.StringPtrInput + // *Optional* - Whether to delete everything the project contains on destroy so that it can be destroyed without any error. + ForceDestroy pulumi.BoolPtrInput // **Required** - Name of the project. - Name pulumi.StringPtrInput + Name pulumi.StringInput // *Optional* - The remote in which the resource will be created. If // not provided, the provider's default remote will be used. Remote pulumi.StringPtrInput @@ -204,6 +218,11 @@ func (o ProjectOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) } +// *Optional* - Whether to delete everything the project contains on destroy so that it can be destroyed without any error. +func (o ProjectOutput) ForceDestroy() pulumi.BoolOutput { + return o.ApplyT(func(v *Project) pulumi.BoolOutput { return v.ForceDestroy }).(pulumi.BoolOutput) +} + // **Required** - Name of the project. func (o ProjectOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) diff --git a/sdk/go/incus/provider.go b/sdk/go/incus/provider.go index 6d6a0f7..dec07a8 100644 --- a/sdk/go/incus/provider.go +++ b/sdk/go/incus/provider.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -20,8 +20,9 @@ type Provider struct { // The directory to look for existing Incus configuration. (default = $HOME/.config/incus) ConfigDir pulumi.StringPtrOutput `pulumi:"configDir"` - // The project where project-scoped resources will be created. Can be overridden in individual resources. (default = - // default) + // The default remote to use when no other remote is defined in a resource. + DefaultRemote pulumi.StringPtrOutput `pulumi:"defaultRemote"` + // The project where project-scoped resources will be created. Can be overridden in individual resources. (default = default) Project pulumi.StringPtrOutput `pulumi:"project"` } @@ -46,10 +47,11 @@ type providerArgs struct { AcceptRemoteCertificate *bool `pulumi:"acceptRemoteCertificate"` // The directory to look for existing Incus configuration. (default = $HOME/.config/incus) ConfigDir *string `pulumi:"configDir"` + // The default remote to use when no other remote is defined in a resource. + DefaultRemote *string `pulumi:"defaultRemote"` // Automatically generate the Incus client certificates if they don't exist. GenerateClientCertificates *bool `pulumi:"generateClientCertificates"` - // The project where project-scoped resources will be created. Can be overridden in individual resources. (default = - // default) + // The project where project-scoped resources will be created. Can be overridden in individual resources. (default = default) Project *string `pulumi:"project"` // Incus Remote Remotes []ProviderRemote `pulumi:"remotes"` @@ -61,10 +63,11 @@ type ProviderArgs struct { AcceptRemoteCertificate pulumi.BoolPtrInput // The directory to look for existing Incus configuration. (default = $HOME/.config/incus) ConfigDir pulumi.StringPtrInput + // The default remote to use when no other remote is defined in a resource. + DefaultRemote pulumi.StringPtrInput // Automatically generate the Incus client certificates if they don't exist. GenerateClientCertificates pulumi.BoolPtrInput - // The project where project-scoped resources will be created. Can be overridden in individual resources. (default = - // default) + // The project where project-scoped resources will be created. Can be overridden in individual resources. (default = default) Project pulumi.StringPtrInput // Incus Remote Remotes ProviderRemoteArrayInput @@ -74,6 +77,29 @@ func (ProviderArgs) ElementType() reflect.Type { return reflect.TypeOf((*providerArgs)(nil)).Elem() } +// This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider. +func (r *Provider) TerraformConfig(ctx *pulumi.Context) (ProviderTerraformConfigResultOutput, error) { + out, err := ctx.Call("pulumi:providers:incus/terraformConfig", nil, ProviderTerraformConfigResultOutput{}, r) + if err != nil { + return ProviderTerraformConfigResultOutput{}, err + } + return out.(ProviderTerraformConfigResultOutput), nil +} + +type ProviderTerraformConfigResult struct { + Result map[string]interface{} `pulumi:"result"` +} + +type ProviderTerraformConfigResultOutput struct{ *pulumi.OutputState } + +func (ProviderTerraformConfigResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ProviderTerraformConfigResult)(nil)).Elem() +} + +func (o ProviderTerraformConfigResultOutput) Result() pulumi.MapOutput { + return o.ApplyT(func(v ProviderTerraformConfigResult) map[string]interface{} { return v.Result }).(pulumi.MapOutput) +} + type ProviderInput interface { pulumi.Input @@ -112,8 +138,12 @@ func (o ProviderOutput) ConfigDir() pulumi.StringPtrOutput { return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.ConfigDir }).(pulumi.StringPtrOutput) } -// The project where project-scoped resources will be created. Can be overridden in individual resources. (default = -// default) +// The default remote to use when no other remote is defined in a resource. +func (o ProviderOutput) DefaultRemote() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.DefaultRemote }).(pulumi.StringPtrOutput) +} + +// The project where project-scoped resources will be created. Can be overridden in individual resources. (default = default) func (o ProviderOutput) Project() pulumi.StringPtrOutput { return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Project }).(pulumi.StringPtrOutput) } @@ -121,4 +151,5 @@ func (o ProviderOutput) Project() pulumi.StringPtrOutput { func init() { pulumi.RegisterInputType(reflect.TypeOf((*ProviderInput)(nil)).Elem(), &Provider{}) pulumi.RegisterOutputType(ProviderOutput{}) + pulumi.RegisterOutputType(ProviderTerraformConfigResultOutput{}) } diff --git a/sdk/go/incus/pulumiTypes.go b/sdk/go/incus/pulumiTypes.go index 3a53961..45db474 100644 --- a/sdk/go/incus/pulumiTypes.go +++ b/sdk/go/incus/pulumiTypes.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -13,6 +13,112 @@ import ( var _ = internal.GetEnvOrDefault +type ImageAlias struct { + // *Optional* - A description for the alias. + Description *string `pulumi:"description"` + // **Required** - The name of the alias. + Name string `pulumi:"name"` +} + +// ImageAliasInput is an input type that accepts ImageAliasArgs and ImageAliasOutput values. +// You can construct a concrete instance of `ImageAliasInput` via: +// +// ImageAliasArgs{...} +type ImageAliasInput interface { + pulumi.Input + + ToImageAliasOutput() ImageAliasOutput + ToImageAliasOutputWithContext(context.Context) ImageAliasOutput +} + +type ImageAliasArgs struct { + // *Optional* - A description for the alias. + Description pulumi.StringPtrInput `pulumi:"description"` + // **Required** - The name of the alias. + Name pulumi.StringInput `pulumi:"name"` +} + +func (ImageAliasArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ImageAlias)(nil)).Elem() +} + +func (i ImageAliasArgs) ToImageAliasOutput() ImageAliasOutput { + return i.ToImageAliasOutputWithContext(context.Background()) +} + +func (i ImageAliasArgs) ToImageAliasOutputWithContext(ctx context.Context) ImageAliasOutput { + return pulumi.ToOutputWithContext(ctx, i).(ImageAliasOutput) +} + +// ImageAliasArrayInput is an input type that accepts ImageAliasArray and ImageAliasArrayOutput values. +// You can construct a concrete instance of `ImageAliasArrayInput` via: +// +// ImageAliasArray{ ImageAliasArgs{...} } +type ImageAliasArrayInput interface { + pulumi.Input + + ToImageAliasArrayOutput() ImageAliasArrayOutput + ToImageAliasArrayOutputWithContext(context.Context) ImageAliasArrayOutput +} + +type ImageAliasArray []ImageAliasInput + +func (ImageAliasArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]ImageAlias)(nil)).Elem() +} + +func (i ImageAliasArray) ToImageAliasArrayOutput() ImageAliasArrayOutput { + return i.ToImageAliasArrayOutputWithContext(context.Background()) +} + +func (i ImageAliasArray) ToImageAliasArrayOutputWithContext(ctx context.Context) ImageAliasArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(ImageAliasArrayOutput) +} + +type ImageAliasOutput struct{ *pulumi.OutputState } + +func (ImageAliasOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ImageAlias)(nil)).Elem() +} + +func (o ImageAliasOutput) ToImageAliasOutput() ImageAliasOutput { + return o +} + +func (o ImageAliasOutput) ToImageAliasOutputWithContext(ctx context.Context) ImageAliasOutput { + return o +} + +// *Optional* - A description for the alias. +func (o ImageAliasOutput) Description() pulumi.StringPtrOutput { + return o.ApplyT(func(v ImageAlias) *string { return v.Description }).(pulumi.StringPtrOutput) +} + +// **Required** - The name of the alias. +func (o ImageAliasOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v ImageAlias) string { return v.Name }).(pulumi.StringOutput) +} + +type ImageAliasArrayOutput struct{ *pulumi.OutputState } + +func (ImageAliasArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]ImageAlias)(nil)).Elem() +} + +func (o ImageAliasArrayOutput) ToImageAliasArrayOutput() ImageAliasArrayOutput { + return o +} + +func (o ImageAliasArrayOutput) ToImageAliasArrayOutputWithContext(ctx context.Context) ImageAliasArrayOutput { + return o +} + +func (o ImageAliasArrayOutput) Index(i pulumi.IntInput) ImageAliasOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) ImageAlias { + return vs[0].([]ImageAlias)[vs[1].(int)] + }).(ImageAliasOutput) +} + type ImageSourceFile struct { // **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 @@ -2090,17 +2196,17 @@ func (o ProfileDeviceArrayOutput) Index(i pulumi.IntInput) ProfileDeviceOutput { } type ProviderRemote struct { - // The FQDN or IP where the Incus daemon can be contacted. (default = "" (read from lxc config)) + // The URL of the Incus host. The default will be the path to the local unix socket, or leaving it as an empty string will use the default socket path. Address *string `pulumi:"address"` - // Set this remote as default. - Default *bool `pulumi:"default"` - // Name of the Incus remote. Required when incusScheme set to https, to enable locating server certificate. + // Server authentication type, tls or oidc. ( Only for the `incus` protocol ) + AuthenticationType *string `pulumi:"authenticationType"` + // Name of the Incus remote. Name string `pulumi:"name"` - // Port Incus Daemon API is listening on. (default = 8443) - Port *string `pulumi:"port"` - // Unix (unix) or HTTPs (https). (default = unix) - Scheme *string `pulumi:"scheme"` - // The trust token for the remote. + // Server protocol ( incus, oci or simplestreams ) + Protocol *string `pulumi:"protocol"` + // Public image server + Public *bool `pulumi:"public"` + // The trust token used for initial authentication with the Incus remote. Token *string `pulumi:"token"` } @@ -2116,17 +2222,17 @@ type ProviderRemoteInput interface { } type ProviderRemoteArgs struct { - // The FQDN or IP where the Incus daemon can be contacted. (default = "" (read from lxc config)) + // The URL of the Incus host. The default will be the path to the local unix socket, or leaving it as an empty string will use the default socket path. Address pulumi.StringPtrInput `pulumi:"address"` - // Set this remote as default. - Default pulumi.BoolPtrInput `pulumi:"default"` - // Name of the Incus remote. Required when incusScheme set to https, to enable locating server certificate. + // Server authentication type, tls or oidc. ( Only for the `incus` protocol ) + AuthenticationType pulumi.StringPtrInput `pulumi:"authenticationType"` + // Name of the Incus remote. Name pulumi.StringInput `pulumi:"name"` - // Port Incus Daemon API is listening on. (default = 8443) - Port pulumi.StringPtrInput `pulumi:"port"` - // Unix (unix) or HTTPs (https). (default = unix) - Scheme pulumi.StringPtrInput `pulumi:"scheme"` - // The trust token for the remote. + // Server protocol ( incus, oci or simplestreams ) + Protocol pulumi.StringPtrInput `pulumi:"protocol"` + // Public image server + Public pulumi.BoolPtrInput `pulumi:"public"` + // The trust token used for initial authentication with the Incus remote. Token pulumi.StringPtrInput `pulumi:"token"` } @@ -2181,32 +2287,32 @@ func (o ProviderRemoteOutput) ToProviderRemoteOutputWithContext(ctx context.Cont return o } -// The FQDN or IP where the Incus daemon can be contacted. (default = "" (read from lxc config)) +// The URL of the Incus host. The default will be the path to the local unix socket, or leaving it as an empty string will use the default socket path. func (o ProviderRemoteOutput) Address() pulumi.StringPtrOutput { return o.ApplyT(func(v ProviderRemote) *string { return v.Address }).(pulumi.StringPtrOutput) } -// Set this remote as default. -func (o ProviderRemoteOutput) Default() pulumi.BoolPtrOutput { - return o.ApplyT(func(v ProviderRemote) *bool { return v.Default }).(pulumi.BoolPtrOutput) +// Server authentication type, tls or oidc. ( Only for the `incus` protocol ) +func (o ProviderRemoteOutput) AuthenticationType() pulumi.StringPtrOutput { + return o.ApplyT(func(v ProviderRemote) *string { return v.AuthenticationType }).(pulumi.StringPtrOutput) } -// Name of the Incus remote. Required when incusScheme set to https, to enable locating server certificate. +// Name of the Incus remote. func (o ProviderRemoteOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ProviderRemote) string { return v.Name }).(pulumi.StringOutput) } -// Port Incus Daemon API is listening on. (default = 8443) -func (o ProviderRemoteOutput) Port() pulumi.StringPtrOutput { - return o.ApplyT(func(v ProviderRemote) *string { return v.Port }).(pulumi.StringPtrOutput) +// Server protocol ( incus, oci or simplestreams ) +func (o ProviderRemoteOutput) Protocol() pulumi.StringPtrOutput { + return o.ApplyT(func(v ProviderRemote) *string { return v.Protocol }).(pulumi.StringPtrOutput) } -// Unix (unix) or HTTPs (https). (default = unix) -func (o ProviderRemoteOutput) Scheme() pulumi.StringPtrOutput { - return o.ApplyT(func(v ProviderRemote) *string { return v.Scheme }).(pulumi.StringPtrOutput) +// Public image server +func (o ProviderRemoteOutput) Public() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ProviderRemote) *bool { return v.Public }).(pulumi.BoolPtrOutput) } -// The trust token for the remote. +// The trust token used for initial authentication with the Incus remote. func (o ProviderRemoteOutput) Token() pulumi.StringPtrOutput { return o.ApplyT(func(v ProviderRemote) *string { return v.Token }).(pulumi.StringPtrOutput) } @@ -2410,6 +2516,1033 @@ func (o StorageVolumeSourceVolumePtrOutput) Remote() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } +type GetClusterMembers struct { + // Address of the cluster member, that is used for cluster communication. + Address string `pulumi:"address"` + // Architecture of the cluster member (e.g. x86_64, aarch64). + // See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) + // for all possible values. + Architecture string `pulumi:"architecture"` + // Description of the cluster member. + Description string `pulumi:"description"` + // Failure domain of the cluster member. + FailureDomain string `pulumi:"failureDomain"` + // A list of groups the cluster member belongs to. + Groups []string `pulumi:"groups"` + // A list of roles assigned to the cluster member. + Roles []string `pulumi:"roles"` + // Status of the cluster member. Possible values are + // `Online`, `Evacuated`, `Offline`, `Blocked`. + Status string `pulumi:"status"` +} + +// GetClusterMembersInput is an input type that accepts GetClusterMembersArgs and GetClusterMembersOutput values. +// You can construct a concrete instance of `GetClusterMembersInput` via: +// +// GetClusterMembersArgs{...} +type GetClusterMembersInput interface { + pulumi.Input + + ToGetClusterMembersOutput() GetClusterMembersOutput + ToGetClusterMembersOutputWithContext(context.Context) GetClusterMembersOutput +} + +type GetClusterMembersArgs struct { + // Address of the cluster member, that is used for cluster communication. + Address pulumi.StringInput `pulumi:"address"` + // Architecture of the cluster member (e.g. x86_64, aarch64). + // See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) + // for all possible values. + Architecture pulumi.StringInput `pulumi:"architecture"` + // Description of the cluster member. + Description pulumi.StringInput `pulumi:"description"` + // Failure domain of the cluster member. + FailureDomain pulumi.StringInput `pulumi:"failureDomain"` + // A list of groups the cluster member belongs to. + Groups pulumi.StringArrayInput `pulumi:"groups"` + // A list of roles assigned to the cluster member. + Roles pulumi.StringArrayInput `pulumi:"roles"` + // Status of the cluster member. Possible values are + // `Online`, `Evacuated`, `Offline`, `Blocked`. + Status pulumi.StringInput `pulumi:"status"` +} + +func (GetClusterMembersArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetClusterMembers)(nil)).Elem() +} + +func (i GetClusterMembersArgs) ToGetClusterMembersOutput() GetClusterMembersOutput { + return i.ToGetClusterMembersOutputWithContext(context.Background()) +} + +func (i GetClusterMembersArgs) ToGetClusterMembersOutputWithContext(ctx context.Context) GetClusterMembersOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetClusterMembersOutput) +} + +// GetClusterMembersMapInput is an input type that accepts GetClusterMembersMap and GetClusterMembersMapOutput values. +// You can construct a concrete instance of `GetClusterMembersMapInput` via: +// +// GetClusterMembersMap{ "key": GetClusterMembersArgs{...} } +type GetClusterMembersMapInput interface { + pulumi.Input + + ToGetClusterMembersMapOutput() GetClusterMembersMapOutput + ToGetClusterMembersMapOutputWithContext(context.Context) GetClusterMembersMapOutput +} + +type GetClusterMembersMap map[string]GetClusterMembersInput + +func (GetClusterMembersMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]GetClusterMembers)(nil)).Elem() +} + +func (i GetClusterMembersMap) ToGetClusterMembersMapOutput() GetClusterMembersMapOutput { + return i.ToGetClusterMembersMapOutputWithContext(context.Background()) +} + +func (i GetClusterMembersMap) ToGetClusterMembersMapOutputWithContext(ctx context.Context) GetClusterMembersMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetClusterMembersMapOutput) +} + +type GetClusterMembersOutput struct{ *pulumi.OutputState } + +func (GetClusterMembersOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetClusterMembers)(nil)).Elem() +} + +func (o GetClusterMembersOutput) ToGetClusterMembersOutput() GetClusterMembersOutput { + return o +} + +func (o GetClusterMembersOutput) ToGetClusterMembersOutputWithContext(ctx context.Context) GetClusterMembersOutput { + return o +} + +// Address of the cluster member, that is used for cluster communication. +func (o GetClusterMembersOutput) Address() pulumi.StringOutput { + return o.ApplyT(func(v GetClusterMembers) string { return v.Address }).(pulumi.StringOutput) +} + +// Architecture of the cluster member (e.g. x86_64, aarch64). +// See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) +// for all possible values. +func (o GetClusterMembersOutput) Architecture() pulumi.StringOutput { + return o.ApplyT(func(v GetClusterMembers) string { return v.Architecture }).(pulumi.StringOutput) +} + +// Description of the cluster member. +func (o GetClusterMembersOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v GetClusterMembers) string { return v.Description }).(pulumi.StringOutput) +} + +// Failure domain of the cluster member. +func (o GetClusterMembersOutput) FailureDomain() pulumi.StringOutput { + return o.ApplyT(func(v GetClusterMembers) string { return v.FailureDomain }).(pulumi.StringOutput) +} + +// A list of groups the cluster member belongs to. +func (o GetClusterMembersOutput) Groups() pulumi.StringArrayOutput { + return o.ApplyT(func(v GetClusterMembers) []string { return v.Groups }).(pulumi.StringArrayOutput) +} + +// A list of roles assigned to the cluster member. +func (o GetClusterMembersOutput) Roles() pulumi.StringArrayOutput { + return o.ApplyT(func(v GetClusterMembers) []string { return v.Roles }).(pulumi.StringArrayOutput) +} + +// Status of the cluster member. Possible values are +// `Online`, `Evacuated`, `Offline`, `Blocked`. +func (o GetClusterMembersOutput) Status() pulumi.StringOutput { + return o.ApplyT(func(v GetClusterMembers) string { return v.Status }).(pulumi.StringOutput) +} + +type GetClusterMembersMapOutput struct{ *pulumi.OutputState } + +func (GetClusterMembersMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]GetClusterMembers)(nil)).Elem() +} + +func (o GetClusterMembersMapOutput) ToGetClusterMembersMapOutput() GetClusterMembersMapOutput { + return o +} + +func (o GetClusterMembersMapOutput) ToGetClusterMembersMapOutputWithContext(ctx context.Context) GetClusterMembersMapOutput { + return o +} + +func (o GetClusterMembersMapOutput) MapIndex(k pulumi.StringInput) GetClusterMembersOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) GetClusterMembers { + return vs[0].(map[string]GetClusterMembers)[vs[1].(string)] + }).(GetClusterMembersOutput) +} + +type GetInstanceDevice struct { + // **Required** - Name of the instance. + Name string `pulumi:"name"` + // Map of key/value pairs of + // [device properties](https://linuxcontainers.org/incus/docs/main/reference/devices/). + Properties map[string]string `pulumi:"properties"` + // 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 `pulumi:"type"` +} + +// GetInstanceDeviceInput is an input type that accepts GetInstanceDeviceArgs and GetInstanceDeviceOutput values. +// You can construct a concrete instance of `GetInstanceDeviceInput` via: +// +// GetInstanceDeviceArgs{...} +type GetInstanceDeviceInput interface { + pulumi.Input + + ToGetInstanceDeviceOutput() GetInstanceDeviceOutput + ToGetInstanceDeviceOutputWithContext(context.Context) GetInstanceDeviceOutput +} + +type GetInstanceDeviceArgs struct { + // **Required** - Name of the instance. + Name pulumi.StringInput `pulumi:"name"` + // Map of key/value pairs of + // [device properties](https://linuxcontainers.org/incus/docs/main/reference/devices/). + Properties pulumi.StringMapInput `pulumi:"properties"` + // 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.StringInput `pulumi:"type"` +} + +func (GetInstanceDeviceArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetInstanceDevice)(nil)).Elem() +} + +func (i GetInstanceDeviceArgs) ToGetInstanceDeviceOutput() GetInstanceDeviceOutput { + return i.ToGetInstanceDeviceOutputWithContext(context.Background()) +} + +func (i GetInstanceDeviceArgs) ToGetInstanceDeviceOutputWithContext(ctx context.Context) GetInstanceDeviceOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetInstanceDeviceOutput) +} + +// GetInstanceDeviceArrayInput is an input type that accepts GetInstanceDeviceArray and GetInstanceDeviceArrayOutput values. +// You can construct a concrete instance of `GetInstanceDeviceArrayInput` via: +// +// GetInstanceDeviceArray{ GetInstanceDeviceArgs{...} } +type GetInstanceDeviceArrayInput interface { + pulumi.Input + + ToGetInstanceDeviceArrayOutput() GetInstanceDeviceArrayOutput + ToGetInstanceDeviceArrayOutputWithContext(context.Context) GetInstanceDeviceArrayOutput +} + +type GetInstanceDeviceArray []GetInstanceDeviceInput + +func (GetInstanceDeviceArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetInstanceDevice)(nil)).Elem() +} + +func (i GetInstanceDeviceArray) ToGetInstanceDeviceArrayOutput() GetInstanceDeviceArrayOutput { + return i.ToGetInstanceDeviceArrayOutputWithContext(context.Background()) +} + +func (i GetInstanceDeviceArray) ToGetInstanceDeviceArrayOutputWithContext(ctx context.Context) GetInstanceDeviceArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetInstanceDeviceArrayOutput) +} + +type GetInstanceDeviceOutput struct{ *pulumi.OutputState } + +func (GetInstanceDeviceOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetInstanceDevice)(nil)).Elem() +} + +func (o GetInstanceDeviceOutput) ToGetInstanceDeviceOutput() GetInstanceDeviceOutput { + return o +} + +func (o GetInstanceDeviceOutput) ToGetInstanceDeviceOutputWithContext(ctx context.Context) GetInstanceDeviceOutput { + return o +} + +// **Required** - Name of the instance. +func (o GetInstanceDeviceOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v GetInstanceDevice) string { return v.Name }).(pulumi.StringOutput) +} + +// Map of key/value pairs of +// [device properties](https://linuxcontainers.org/incus/docs/main/reference/devices/). +func (o GetInstanceDeviceOutput) Properties() pulumi.StringMapOutput { + return o.ApplyT(func(v GetInstanceDevice) map[string]string { return v.Properties }).(pulumi.StringMapOutput) +} + +// Type of the device Must be one of none, disk, nic, +// unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci. +func (o GetInstanceDeviceOutput) Type() pulumi.StringOutput { + return o.ApplyT(func(v GetInstanceDevice) string { return v.Type }).(pulumi.StringOutput) +} + +type GetInstanceDeviceArrayOutput struct{ *pulumi.OutputState } + +func (GetInstanceDeviceArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetInstanceDevice)(nil)).Elem() +} + +func (o GetInstanceDeviceArrayOutput) ToGetInstanceDeviceArrayOutput() GetInstanceDeviceArrayOutput { + return o +} + +func (o GetInstanceDeviceArrayOutput) ToGetInstanceDeviceArrayOutputWithContext(ctx context.Context) GetInstanceDeviceArrayOutput { + return o +} + +func (o GetInstanceDeviceArrayOutput) Index(i pulumi.IntInput) GetInstanceDeviceOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetInstanceDevice { + return vs[0].([]GetInstanceDevice)[vs[1].(int)] + }).(GetInstanceDeviceOutput) +} + +type GetNetworkAclEgress struct { + // Action to perform on rule match. + Action string `pulumi:"action"` + // Description of the rule. + Description string `pulumi:"description"` + // Destination address. + Destination string `pulumi:"destination"` + // Destination port. + DestinationPort string `pulumi:"destinationPort"` + // ICMP message code (for ICMP protocol). + IcmpCode string `pulumi:"icmpCode"` + // Type of ICMP message. + IcmpType string `pulumi:"icmpType"` + // Protocol (e.g., tcp, udp). + Protocol string `pulumi:"protocol"` + // Source address. + Source string `pulumi:"source"` + // Source port. + SourcePort string `pulumi:"sourcePort"` + // State of the rule. + State string `pulumi:"state"` +} + +// GetNetworkAclEgressInput is an input type that accepts GetNetworkAclEgressArgs and GetNetworkAclEgressOutput values. +// You can construct a concrete instance of `GetNetworkAclEgressInput` via: +// +// GetNetworkAclEgressArgs{...} +type GetNetworkAclEgressInput interface { + pulumi.Input + + ToGetNetworkAclEgressOutput() GetNetworkAclEgressOutput + ToGetNetworkAclEgressOutputWithContext(context.Context) GetNetworkAclEgressOutput +} + +type GetNetworkAclEgressArgs struct { + // Action to perform on rule match. + Action pulumi.StringInput `pulumi:"action"` + // Description of the rule. + Description pulumi.StringInput `pulumi:"description"` + // Destination address. + Destination pulumi.StringInput `pulumi:"destination"` + // Destination port. + DestinationPort pulumi.StringInput `pulumi:"destinationPort"` + // ICMP message code (for ICMP protocol). + IcmpCode pulumi.StringInput `pulumi:"icmpCode"` + // Type of ICMP message. + IcmpType pulumi.StringInput `pulumi:"icmpType"` + // Protocol (e.g., tcp, udp). + Protocol pulumi.StringInput `pulumi:"protocol"` + // Source address. + Source pulumi.StringInput `pulumi:"source"` + // Source port. + SourcePort pulumi.StringInput `pulumi:"sourcePort"` + // State of the rule. + State pulumi.StringInput `pulumi:"state"` +} + +func (GetNetworkAclEgressArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetNetworkAclEgress)(nil)).Elem() +} + +func (i GetNetworkAclEgressArgs) ToGetNetworkAclEgressOutput() GetNetworkAclEgressOutput { + return i.ToGetNetworkAclEgressOutputWithContext(context.Background()) +} + +func (i GetNetworkAclEgressArgs) ToGetNetworkAclEgressOutputWithContext(ctx context.Context) GetNetworkAclEgressOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNetworkAclEgressOutput) +} + +// GetNetworkAclEgressArrayInput is an input type that accepts GetNetworkAclEgressArray and GetNetworkAclEgressArrayOutput values. +// You can construct a concrete instance of `GetNetworkAclEgressArrayInput` via: +// +// GetNetworkAclEgressArray{ GetNetworkAclEgressArgs{...} } +type GetNetworkAclEgressArrayInput interface { + pulumi.Input + + ToGetNetworkAclEgressArrayOutput() GetNetworkAclEgressArrayOutput + ToGetNetworkAclEgressArrayOutputWithContext(context.Context) GetNetworkAclEgressArrayOutput +} + +type GetNetworkAclEgressArray []GetNetworkAclEgressInput + +func (GetNetworkAclEgressArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNetworkAclEgress)(nil)).Elem() +} + +func (i GetNetworkAclEgressArray) ToGetNetworkAclEgressArrayOutput() GetNetworkAclEgressArrayOutput { + return i.ToGetNetworkAclEgressArrayOutputWithContext(context.Background()) +} + +func (i GetNetworkAclEgressArray) ToGetNetworkAclEgressArrayOutputWithContext(ctx context.Context) GetNetworkAclEgressArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNetworkAclEgressArrayOutput) +} + +type GetNetworkAclEgressOutput struct{ *pulumi.OutputState } + +func (GetNetworkAclEgressOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetNetworkAclEgress)(nil)).Elem() +} + +func (o GetNetworkAclEgressOutput) ToGetNetworkAclEgressOutput() GetNetworkAclEgressOutput { + return o +} + +func (o GetNetworkAclEgressOutput) ToGetNetworkAclEgressOutputWithContext(ctx context.Context) GetNetworkAclEgressOutput { + return o +} + +// Action to perform on rule match. +func (o GetNetworkAclEgressOutput) Action() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclEgress) string { return v.Action }).(pulumi.StringOutput) +} + +// Description of the rule. +func (o GetNetworkAclEgressOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclEgress) string { return v.Description }).(pulumi.StringOutput) +} + +// Destination address. +func (o GetNetworkAclEgressOutput) Destination() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclEgress) string { return v.Destination }).(pulumi.StringOutput) +} + +// Destination port. +func (o GetNetworkAclEgressOutput) DestinationPort() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclEgress) string { return v.DestinationPort }).(pulumi.StringOutput) +} + +// ICMP message code (for ICMP protocol). +func (o GetNetworkAclEgressOutput) IcmpCode() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclEgress) string { return v.IcmpCode }).(pulumi.StringOutput) +} + +// Type of ICMP message. +func (o GetNetworkAclEgressOutput) IcmpType() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclEgress) string { return v.IcmpType }).(pulumi.StringOutput) +} + +// Protocol (e.g., tcp, udp). +func (o GetNetworkAclEgressOutput) Protocol() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclEgress) string { return v.Protocol }).(pulumi.StringOutput) +} + +// Source address. +func (o GetNetworkAclEgressOutput) Source() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclEgress) string { return v.Source }).(pulumi.StringOutput) +} + +// Source port. +func (o GetNetworkAclEgressOutput) SourcePort() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclEgress) string { return v.SourcePort }).(pulumi.StringOutput) +} + +// State of the rule. +func (o GetNetworkAclEgressOutput) State() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclEgress) string { return v.State }).(pulumi.StringOutput) +} + +type GetNetworkAclEgressArrayOutput struct{ *pulumi.OutputState } + +func (GetNetworkAclEgressArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNetworkAclEgress)(nil)).Elem() +} + +func (o GetNetworkAclEgressArrayOutput) ToGetNetworkAclEgressArrayOutput() GetNetworkAclEgressArrayOutput { + return o +} + +func (o GetNetworkAclEgressArrayOutput) ToGetNetworkAclEgressArrayOutputWithContext(ctx context.Context) GetNetworkAclEgressArrayOutput { + return o +} + +func (o GetNetworkAclEgressArrayOutput) Index(i pulumi.IntInput) GetNetworkAclEgressOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetNetworkAclEgress { + return vs[0].([]GetNetworkAclEgress)[vs[1].(int)] + }).(GetNetworkAclEgressOutput) +} + +type GetNetworkAclIngress struct { + // Action to perform on rule match. + Action string `pulumi:"action"` + // Description of the rule. + Description string `pulumi:"description"` + // Destination address. + Destination string `pulumi:"destination"` + // Destination port. + DestinationPort string `pulumi:"destinationPort"` + // ICMP message code (for ICMP protocol). + IcmpCode string `pulumi:"icmpCode"` + // Type of ICMP message. + IcmpType string `pulumi:"icmpType"` + // Protocol (e.g., tcp, udp). + Protocol string `pulumi:"protocol"` + // Source address. + Source string `pulumi:"source"` + // Source port. + SourcePort string `pulumi:"sourcePort"` + // State of the rule. + State string `pulumi:"state"` +} + +// GetNetworkAclIngressInput is an input type that accepts GetNetworkAclIngressArgs and GetNetworkAclIngressOutput values. +// You can construct a concrete instance of `GetNetworkAclIngressInput` via: +// +// GetNetworkAclIngressArgs{...} +type GetNetworkAclIngressInput interface { + pulumi.Input + + ToGetNetworkAclIngressOutput() GetNetworkAclIngressOutput + ToGetNetworkAclIngressOutputWithContext(context.Context) GetNetworkAclIngressOutput +} + +type GetNetworkAclIngressArgs struct { + // Action to perform on rule match. + Action pulumi.StringInput `pulumi:"action"` + // Description of the rule. + Description pulumi.StringInput `pulumi:"description"` + // Destination address. + Destination pulumi.StringInput `pulumi:"destination"` + // Destination port. + DestinationPort pulumi.StringInput `pulumi:"destinationPort"` + // ICMP message code (for ICMP protocol). + IcmpCode pulumi.StringInput `pulumi:"icmpCode"` + // Type of ICMP message. + IcmpType pulumi.StringInput `pulumi:"icmpType"` + // Protocol (e.g., tcp, udp). + Protocol pulumi.StringInput `pulumi:"protocol"` + // Source address. + Source pulumi.StringInput `pulumi:"source"` + // Source port. + SourcePort pulumi.StringInput `pulumi:"sourcePort"` + // State of the rule. + State pulumi.StringInput `pulumi:"state"` +} + +func (GetNetworkAclIngressArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetNetworkAclIngress)(nil)).Elem() +} + +func (i GetNetworkAclIngressArgs) ToGetNetworkAclIngressOutput() GetNetworkAclIngressOutput { + return i.ToGetNetworkAclIngressOutputWithContext(context.Background()) +} + +func (i GetNetworkAclIngressArgs) ToGetNetworkAclIngressOutputWithContext(ctx context.Context) GetNetworkAclIngressOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNetworkAclIngressOutput) +} + +// GetNetworkAclIngressArrayInput is an input type that accepts GetNetworkAclIngressArray and GetNetworkAclIngressArrayOutput values. +// You can construct a concrete instance of `GetNetworkAclIngressArrayInput` via: +// +// GetNetworkAclIngressArray{ GetNetworkAclIngressArgs{...} } +type GetNetworkAclIngressArrayInput interface { + pulumi.Input + + ToGetNetworkAclIngressArrayOutput() GetNetworkAclIngressArrayOutput + ToGetNetworkAclIngressArrayOutputWithContext(context.Context) GetNetworkAclIngressArrayOutput +} + +type GetNetworkAclIngressArray []GetNetworkAclIngressInput + +func (GetNetworkAclIngressArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNetworkAclIngress)(nil)).Elem() +} + +func (i GetNetworkAclIngressArray) ToGetNetworkAclIngressArrayOutput() GetNetworkAclIngressArrayOutput { + return i.ToGetNetworkAclIngressArrayOutputWithContext(context.Background()) +} + +func (i GetNetworkAclIngressArray) ToGetNetworkAclIngressArrayOutputWithContext(ctx context.Context) GetNetworkAclIngressArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNetworkAclIngressArrayOutput) +} + +type GetNetworkAclIngressOutput struct{ *pulumi.OutputState } + +func (GetNetworkAclIngressOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetNetworkAclIngress)(nil)).Elem() +} + +func (o GetNetworkAclIngressOutput) ToGetNetworkAclIngressOutput() GetNetworkAclIngressOutput { + return o +} + +func (o GetNetworkAclIngressOutput) ToGetNetworkAclIngressOutputWithContext(ctx context.Context) GetNetworkAclIngressOutput { + return o +} + +// Action to perform on rule match. +func (o GetNetworkAclIngressOutput) Action() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclIngress) string { return v.Action }).(pulumi.StringOutput) +} + +// Description of the rule. +func (o GetNetworkAclIngressOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclIngress) string { return v.Description }).(pulumi.StringOutput) +} + +// Destination address. +func (o GetNetworkAclIngressOutput) Destination() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclIngress) string { return v.Destination }).(pulumi.StringOutput) +} + +// Destination port. +func (o GetNetworkAclIngressOutput) DestinationPort() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclIngress) string { return v.DestinationPort }).(pulumi.StringOutput) +} + +// ICMP message code (for ICMP protocol). +func (o GetNetworkAclIngressOutput) IcmpCode() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclIngress) string { return v.IcmpCode }).(pulumi.StringOutput) +} + +// Type of ICMP message. +func (o GetNetworkAclIngressOutput) IcmpType() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclIngress) string { return v.IcmpType }).(pulumi.StringOutput) +} + +// Protocol (e.g., tcp, udp). +func (o GetNetworkAclIngressOutput) Protocol() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclIngress) string { return v.Protocol }).(pulumi.StringOutput) +} + +// Source address. +func (o GetNetworkAclIngressOutput) Source() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclIngress) string { return v.Source }).(pulumi.StringOutput) +} + +// Source port. +func (o GetNetworkAclIngressOutput) SourcePort() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclIngress) string { return v.SourcePort }).(pulumi.StringOutput) +} + +// State of the rule. +func (o GetNetworkAclIngressOutput) State() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkAclIngress) string { return v.State }).(pulumi.StringOutput) +} + +type GetNetworkAclIngressArrayOutput struct{ *pulumi.OutputState } + +func (GetNetworkAclIngressArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNetworkAclIngress)(nil)).Elem() +} + +func (o GetNetworkAclIngressArrayOutput) ToGetNetworkAclIngressArrayOutput() GetNetworkAclIngressArrayOutput { + return o +} + +func (o GetNetworkAclIngressArrayOutput) ToGetNetworkAclIngressArrayOutputWithContext(ctx context.Context) GetNetworkAclIngressArrayOutput { + return o +} + +func (o GetNetworkAclIngressArrayOutput) Index(i pulumi.IntInput) GetNetworkAclIngressOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetNetworkAclIngress { + return vs[0].([]GetNetworkAclIngress)[vs[1].(int)] + }).(GetNetworkAclIngressOutput) +} + +type GetNetworkForwardPort struct { + // Description of the forward port. + Description string `pulumi:"description"` + // ListenPort(s) to forward (comma delimited ranges). + ListenPort string `pulumi:"listenPort"` + // Protocol for port forward (either tcp or udp). + Protocol string `pulumi:"protocol"` + // SNAT controls whether to apply a matching SNAT rule to new outgoing traffic from the target. + Snat bool `pulumi:"snat"` + // Target address to forward ListenPorts to. + TargetAddress string `pulumi:"targetAddress"` + // Target port(s) to forward ListenPorts to (allows for many-to-one). + TargetPort string `pulumi:"targetPort"` +} + +// GetNetworkForwardPortInput is an input type that accepts GetNetworkForwardPortArgs and GetNetworkForwardPortOutput values. +// You can construct a concrete instance of `GetNetworkForwardPortInput` via: +// +// GetNetworkForwardPortArgs{...} +type GetNetworkForwardPortInput interface { + pulumi.Input + + ToGetNetworkForwardPortOutput() GetNetworkForwardPortOutput + ToGetNetworkForwardPortOutputWithContext(context.Context) GetNetworkForwardPortOutput +} + +type GetNetworkForwardPortArgs struct { + // Description of the forward port. + Description pulumi.StringInput `pulumi:"description"` + // ListenPort(s) to forward (comma delimited ranges). + ListenPort pulumi.StringInput `pulumi:"listenPort"` + // Protocol for port forward (either tcp or udp). + Protocol pulumi.StringInput `pulumi:"protocol"` + // SNAT controls whether to apply a matching SNAT rule to new outgoing traffic from the target. + Snat pulumi.BoolInput `pulumi:"snat"` + // Target address to forward ListenPorts to. + TargetAddress pulumi.StringInput `pulumi:"targetAddress"` + // Target port(s) to forward ListenPorts to (allows for many-to-one). + TargetPort pulumi.StringInput `pulumi:"targetPort"` +} + +func (GetNetworkForwardPortArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetNetworkForwardPort)(nil)).Elem() +} + +func (i GetNetworkForwardPortArgs) ToGetNetworkForwardPortOutput() GetNetworkForwardPortOutput { + return i.ToGetNetworkForwardPortOutputWithContext(context.Background()) +} + +func (i GetNetworkForwardPortArgs) ToGetNetworkForwardPortOutputWithContext(ctx context.Context) GetNetworkForwardPortOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNetworkForwardPortOutput) +} + +// GetNetworkForwardPortArrayInput is an input type that accepts GetNetworkForwardPortArray and GetNetworkForwardPortArrayOutput values. +// You can construct a concrete instance of `GetNetworkForwardPortArrayInput` via: +// +// GetNetworkForwardPortArray{ GetNetworkForwardPortArgs{...} } +type GetNetworkForwardPortArrayInput interface { + pulumi.Input + + ToGetNetworkForwardPortArrayOutput() GetNetworkForwardPortArrayOutput + ToGetNetworkForwardPortArrayOutputWithContext(context.Context) GetNetworkForwardPortArrayOutput +} + +type GetNetworkForwardPortArray []GetNetworkForwardPortInput + +func (GetNetworkForwardPortArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNetworkForwardPort)(nil)).Elem() +} + +func (i GetNetworkForwardPortArray) ToGetNetworkForwardPortArrayOutput() GetNetworkForwardPortArrayOutput { + return i.ToGetNetworkForwardPortArrayOutputWithContext(context.Background()) +} + +func (i GetNetworkForwardPortArray) ToGetNetworkForwardPortArrayOutputWithContext(ctx context.Context) GetNetworkForwardPortArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNetworkForwardPortArrayOutput) +} + +type GetNetworkForwardPortOutput struct{ *pulumi.OutputState } + +func (GetNetworkForwardPortOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetNetworkForwardPort)(nil)).Elem() +} + +func (o GetNetworkForwardPortOutput) ToGetNetworkForwardPortOutput() GetNetworkForwardPortOutput { + return o +} + +func (o GetNetworkForwardPortOutput) ToGetNetworkForwardPortOutputWithContext(ctx context.Context) GetNetworkForwardPortOutput { + return o +} + +// Description of the forward port. +func (o GetNetworkForwardPortOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkForwardPort) string { return v.Description }).(pulumi.StringOutput) +} + +// ListenPort(s) to forward (comma delimited ranges). +func (o GetNetworkForwardPortOutput) ListenPort() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkForwardPort) string { return v.ListenPort }).(pulumi.StringOutput) +} + +// Protocol for port forward (either tcp or udp). +func (o GetNetworkForwardPortOutput) Protocol() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkForwardPort) string { return v.Protocol }).(pulumi.StringOutput) +} + +// SNAT controls whether to apply a matching SNAT rule to new outgoing traffic from the target. +func (o GetNetworkForwardPortOutput) Snat() pulumi.BoolOutput { + return o.ApplyT(func(v GetNetworkForwardPort) bool { return v.Snat }).(pulumi.BoolOutput) +} + +// Target address to forward ListenPorts to. +func (o GetNetworkForwardPortOutput) TargetAddress() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkForwardPort) string { return v.TargetAddress }).(pulumi.StringOutput) +} + +// Target port(s) to forward ListenPorts to (allows for many-to-one). +func (o GetNetworkForwardPortOutput) TargetPort() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkForwardPort) string { return v.TargetPort }).(pulumi.StringOutput) +} + +type GetNetworkForwardPortArrayOutput struct{ *pulumi.OutputState } + +func (GetNetworkForwardPortArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNetworkForwardPort)(nil)).Elem() +} + +func (o GetNetworkForwardPortArrayOutput) ToGetNetworkForwardPortArrayOutput() GetNetworkForwardPortArrayOutput { + return o +} + +func (o GetNetworkForwardPortArrayOutput) ToGetNetworkForwardPortArrayOutputWithContext(ctx context.Context) GetNetworkForwardPortArrayOutput { + return o +} + +func (o GetNetworkForwardPortArrayOutput) Index(i pulumi.IntInput) GetNetworkForwardPortOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetNetworkForwardPort { + return vs[0].([]GetNetworkForwardPort)[vs[1].(int)] + }).(GetNetworkForwardPortOutput) +} + +type GetNetworkLoadBalancerBackend struct { + // Description of the load balancer port. + Description string `pulumi:"description"` + // Name of the load balancer backend. + Name string `pulumi:"name"` + // TargetAddress to forward ListenPorts to. + TargetAddress string `pulumi:"targetAddress"` + // TargetPort(s) for the forward ListenPorts to (allows for many-to one). + TargetPort string `pulumi:"targetPort"` +} + +// GetNetworkLoadBalancerBackendInput is an input type that accepts GetNetworkLoadBalancerBackendArgs and GetNetworkLoadBalancerBackendOutput values. +// You can construct a concrete instance of `GetNetworkLoadBalancerBackendInput` via: +// +// GetNetworkLoadBalancerBackendArgs{...} +type GetNetworkLoadBalancerBackendInput interface { + pulumi.Input + + ToGetNetworkLoadBalancerBackendOutput() GetNetworkLoadBalancerBackendOutput + ToGetNetworkLoadBalancerBackendOutputWithContext(context.Context) GetNetworkLoadBalancerBackendOutput +} + +type GetNetworkLoadBalancerBackendArgs struct { + // Description of the load balancer port. + Description pulumi.StringInput `pulumi:"description"` + // Name of the load balancer backend. + Name pulumi.StringInput `pulumi:"name"` + // TargetAddress to forward ListenPorts to. + TargetAddress pulumi.StringInput `pulumi:"targetAddress"` + // TargetPort(s) for the forward ListenPorts to (allows for many-to one). + TargetPort pulumi.StringInput `pulumi:"targetPort"` +} + +func (GetNetworkLoadBalancerBackendArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetNetworkLoadBalancerBackend)(nil)).Elem() +} + +func (i GetNetworkLoadBalancerBackendArgs) ToGetNetworkLoadBalancerBackendOutput() GetNetworkLoadBalancerBackendOutput { + return i.ToGetNetworkLoadBalancerBackendOutputWithContext(context.Background()) +} + +func (i GetNetworkLoadBalancerBackendArgs) ToGetNetworkLoadBalancerBackendOutputWithContext(ctx context.Context) GetNetworkLoadBalancerBackendOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNetworkLoadBalancerBackendOutput) +} + +// GetNetworkLoadBalancerBackendArrayInput is an input type that accepts GetNetworkLoadBalancerBackendArray and GetNetworkLoadBalancerBackendArrayOutput values. +// You can construct a concrete instance of `GetNetworkLoadBalancerBackendArrayInput` via: +// +// GetNetworkLoadBalancerBackendArray{ GetNetworkLoadBalancerBackendArgs{...} } +type GetNetworkLoadBalancerBackendArrayInput interface { + pulumi.Input + + ToGetNetworkLoadBalancerBackendArrayOutput() GetNetworkLoadBalancerBackendArrayOutput + ToGetNetworkLoadBalancerBackendArrayOutputWithContext(context.Context) GetNetworkLoadBalancerBackendArrayOutput +} + +type GetNetworkLoadBalancerBackendArray []GetNetworkLoadBalancerBackendInput + +func (GetNetworkLoadBalancerBackendArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNetworkLoadBalancerBackend)(nil)).Elem() +} + +func (i GetNetworkLoadBalancerBackendArray) ToGetNetworkLoadBalancerBackendArrayOutput() GetNetworkLoadBalancerBackendArrayOutput { + return i.ToGetNetworkLoadBalancerBackendArrayOutputWithContext(context.Background()) +} + +func (i GetNetworkLoadBalancerBackendArray) ToGetNetworkLoadBalancerBackendArrayOutputWithContext(ctx context.Context) GetNetworkLoadBalancerBackendArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNetworkLoadBalancerBackendArrayOutput) +} + +type GetNetworkLoadBalancerBackendOutput struct{ *pulumi.OutputState } + +func (GetNetworkLoadBalancerBackendOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetNetworkLoadBalancerBackend)(nil)).Elem() +} + +func (o GetNetworkLoadBalancerBackendOutput) ToGetNetworkLoadBalancerBackendOutput() GetNetworkLoadBalancerBackendOutput { + return o +} + +func (o GetNetworkLoadBalancerBackendOutput) ToGetNetworkLoadBalancerBackendOutputWithContext(ctx context.Context) GetNetworkLoadBalancerBackendOutput { + return o +} + +// Description of the load balancer port. +func (o GetNetworkLoadBalancerBackendOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkLoadBalancerBackend) string { return v.Description }).(pulumi.StringOutput) +} + +// Name of the load balancer backend. +func (o GetNetworkLoadBalancerBackendOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkLoadBalancerBackend) string { return v.Name }).(pulumi.StringOutput) +} + +// TargetAddress to forward ListenPorts to. +func (o GetNetworkLoadBalancerBackendOutput) TargetAddress() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkLoadBalancerBackend) string { return v.TargetAddress }).(pulumi.StringOutput) +} + +// TargetPort(s) for the forward ListenPorts to (allows for many-to one). +func (o GetNetworkLoadBalancerBackendOutput) TargetPort() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkLoadBalancerBackend) string { return v.TargetPort }).(pulumi.StringOutput) +} + +type GetNetworkLoadBalancerBackendArrayOutput struct{ *pulumi.OutputState } + +func (GetNetworkLoadBalancerBackendArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNetworkLoadBalancerBackend)(nil)).Elem() +} + +func (o GetNetworkLoadBalancerBackendArrayOutput) ToGetNetworkLoadBalancerBackendArrayOutput() GetNetworkLoadBalancerBackendArrayOutput { + return o +} + +func (o GetNetworkLoadBalancerBackendArrayOutput) ToGetNetworkLoadBalancerBackendArrayOutputWithContext(ctx context.Context) GetNetworkLoadBalancerBackendArrayOutput { + return o +} + +func (o GetNetworkLoadBalancerBackendArrayOutput) Index(i pulumi.IntInput) GetNetworkLoadBalancerBackendOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetNetworkLoadBalancerBackend { + return vs[0].([]GetNetworkLoadBalancerBackend)[vs[1].(int)] + }).(GetNetworkLoadBalancerBackendOutput) +} + +type GetNetworkLoadBalancerPort struct { + // Description of the load balancer port. + Description string `pulumi:"description"` + // ListenPort(s) for the load balancer (comma delimited ranges). + ListenPort string `pulumi:"listenPort"` + // Protocol for load balancer (either tcp or udp). + Protocol string `pulumi:"protocol"` + // TargetBackend backend names to load balance ListenPorts to. + TargetBackends []string `pulumi:"targetBackends"` +} + +// GetNetworkLoadBalancerPortInput is an input type that accepts GetNetworkLoadBalancerPortArgs and GetNetworkLoadBalancerPortOutput values. +// You can construct a concrete instance of `GetNetworkLoadBalancerPortInput` via: +// +// GetNetworkLoadBalancerPortArgs{...} +type GetNetworkLoadBalancerPortInput interface { + pulumi.Input + + ToGetNetworkLoadBalancerPortOutput() GetNetworkLoadBalancerPortOutput + ToGetNetworkLoadBalancerPortOutputWithContext(context.Context) GetNetworkLoadBalancerPortOutput +} + +type GetNetworkLoadBalancerPortArgs struct { + // Description of the load balancer port. + Description pulumi.StringInput `pulumi:"description"` + // ListenPort(s) for the load balancer (comma delimited ranges). + ListenPort pulumi.StringInput `pulumi:"listenPort"` + // Protocol for load balancer (either tcp or udp). + Protocol pulumi.StringInput `pulumi:"protocol"` + // TargetBackend backend names to load balance ListenPorts to. + TargetBackends pulumi.StringArrayInput `pulumi:"targetBackends"` +} + +func (GetNetworkLoadBalancerPortArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetNetworkLoadBalancerPort)(nil)).Elem() +} + +func (i GetNetworkLoadBalancerPortArgs) ToGetNetworkLoadBalancerPortOutput() GetNetworkLoadBalancerPortOutput { + return i.ToGetNetworkLoadBalancerPortOutputWithContext(context.Background()) +} + +func (i GetNetworkLoadBalancerPortArgs) ToGetNetworkLoadBalancerPortOutputWithContext(ctx context.Context) GetNetworkLoadBalancerPortOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNetworkLoadBalancerPortOutput) +} + +// GetNetworkLoadBalancerPortArrayInput is an input type that accepts GetNetworkLoadBalancerPortArray and GetNetworkLoadBalancerPortArrayOutput values. +// You can construct a concrete instance of `GetNetworkLoadBalancerPortArrayInput` via: +// +// GetNetworkLoadBalancerPortArray{ GetNetworkLoadBalancerPortArgs{...} } +type GetNetworkLoadBalancerPortArrayInput interface { + pulumi.Input + + ToGetNetworkLoadBalancerPortArrayOutput() GetNetworkLoadBalancerPortArrayOutput + ToGetNetworkLoadBalancerPortArrayOutputWithContext(context.Context) GetNetworkLoadBalancerPortArrayOutput +} + +type GetNetworkLoadBalancerPortArray []GetNetworkLoadBalancerPortInput + +func (GetNetworkLoadBalancerPortArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNetworkLoadBalancerPort)(nil)).Elem() +} + +func (i GetNetworkLoadBalancerPortArray) ToGetNetworkLoadBalancerPortArrayOutput() GetNetworkLoadBalancerPortArrayOutput { + return i.ToGetNetworkLoadBalancerPortArrayOutputWithContext(context.Background()) +} + +func (i GetNetworkLoadBalancerPortArray) ToGetNetworkLoadBalancerPortArrayOutputWithContext(ctx context.Context) GetNetworkLoadBalancerPortArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNetworkLoadBalancerPortArrayOutput) +} + +type GetNetworkLoadBalancerPortOutput struct{ *pulumi.OutputState } + +func (GetNetworkLoadBalancerPortOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetNetworkLoadBalancerPort)(nil)).Elem() +} + +func (o GetNetworkLoadBalancerPortOutput) ToGetNetworkLoadBalancerPortOutput() GetNetworkLoadBalancerPortOutput { + return o +} + +func (o GetNetworkLoadBalancerPortOutput) ToGetNetworkLoadBalancerPortOutputWithContext(ctx context.Context) GetNetworkLoadBalancerPortOutput { + return o +} + +// Description of the load balancer port. +func (o GetNetworkLoadBalancerPortOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkLoadBalancerPort) string { return v.Description }).(pulumi.StringOutput) +} + +// ListenPort(s) for the load balancer (comma delimited ranges). +func (o GetNetworkLoadBalancerPortOutput) ListenPort() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkLoadBalancerPort) string { return v.ListenPort }).(pulumi.StringOutput) +} + +// Protocol for load balancer (either tcp or udp). +func (o GetNetworkLoadBalancerPortOutput) Protocol() pulumi.StringOutput { + return o.ApplyT(func(v GetNetworkLoadBalancerPort) string { return v.Protocol }).(pulumi.StringOutput) +} + +// TargetBackend backend names to load balance ListenPorts to. +func (o GetNetworkLoadBalancerPortOutput) TargetBackends() pulumi.StringArrayOutput { + return o.ApplyT(func(v GetNetworkLoadBalancerPort) []string { return v.TargetBackends }).(pulumi.StringArrayOutput) +} + +type GetNetworkLoadBalancerPortArrayOutput struct{ *pulumi.OutputState } + +func (GetNetworkLoadBalancerPortArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNetworkLoadBalancerPort)(nil)).Elem() +} + +func (o GetNetworkLoadBalancerPortArrayOutput) ToGetNetworkLoadBalancerPortArrayOutput() GetNetworkLoadBalancerPortArrayOutput { + return o +} + +func (o GetNetworkLoadBalancerPortArrayOutput) ToGetNetworkLoadBalancerPortArrayOutputWithContext(ctx context.Context) GetNetworkLoadBalancerPortArrayOutput { + return o +} + +func (o GetNetworkLoadBalancerPortArrayOutput) Index(i pulumi.IntInput) GetNetworkLoadBalancerPortOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetNetworkLoadBalancerPort { + return vs[0].([]GetNetworkLoadBalancerPort)[vs[1].(int)] + }).(GetNetworkLoadBalancerPortOutput) +} + type GetProfileDevice struct { // **Required** - Name of the profile. Name string `pulumi:"name"` @@ -2532,6 +3665,8 @@ func (o GetProfileDeviceArrayOutput) Index(i pulumi.IntInput) GetProfileDeviceOu } func init() { + pulumi.RegisterInputType(reflect.TypeOf((*ImageAliasInput)(nil)).Elem(), ImageAliasArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ImageAliasArrayInput)(nil)).Elem(), ImageAliasArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ImageSourceFileInput)(nil)).Elem(), ImageSourceFileArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ImageSourceFilePtrInput)(nil)).Elem(), ImageSourceFileArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ImageSourceImageInput)(nil)).Elem(), ImageSourceImageArgs{}) @@ -2564,8 +3699,24 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*ProviderRemoteArrayInput)(nil)).Elem(), ProviderRemoteArray{}) pulumi.RegisterInputType(reflect.TypeOf((*StorageVolumeSourceVolumeInput)(nil)).Elem(), StorageVolumeSourceVolumeArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*StorageVolumeSourceVolumePtrInput)(nil)).Elem(), StorageVolumeSourceVolumeArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetClusterMembersInput)(nil)).Elem(), GetClusterMembersArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetClusterMembersMapInput)(nil)).Elem(), GetClusterMembersMap{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetInstanceDeviceInput)(nil)).Elem(), GetInstanceDeviceArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetInstanceDeviceArrayInput)(nil)).Elem(), GetInstanceDeviceArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNetworkAclEgressInput)(nil)).Elem(), GetNetworkAclEgressArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNetworkAclEgressArrayInput)(nil)).Elem(), GetNetworkAclEgressArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNetworkAclIngressInput)(nil)).Elem(), GetNetworkAclIngressArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNetworkAclIngressArrayInput)(nil)).Elem(), GetNetworkAclIngressArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNetworkForwardPortInput)(nil)).Elem(), GetNetworkForwardPortArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNetworkForwardPortArrayInput)(nil)).Elem(), GetNetworkForwardPortArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNetworkLoadBalancerBackendInput)(nil)).Elem(), GetNetworkLoadBalancerBackendArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNetworkLoadBalancerBackendArrayInput)(nil)).Elem(), GetNetworkLoadBalancerBackendArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNetworkLoadBalancerPortInput)(nil)).Elem(), GetNetworkLoadBalancerPortArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNetworkLoadBalancerPortArrayInput)(nil)).Elem(), GetNetworkLoadBalancerPortArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetProfileDeviceInput)(nil)).Elem(), GetProfileDeviceArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetProfileDeviceArrayInput)(nil)).Elem(), GetProfileDeviceArray{}) + pulumi.RegisterOutputType(ImageAliasOutput{}) + pulumi.RegisterOutputType(ImageAliasArrayOutput{}) pulumi.RegisterOutputType(ImageSourceFileOutput{}) pulumi.RegisterOutputType(ImageSourceFilePtrOutput{}) pulumi.RegisterOutputType(ImageSourceImageOutput{}) @@ -2598,6 +3749,20 @@ func init() { pulumi.RegisterOutputType(ProviderRemoteArrayOutput{}) pulumi.RegisterOutputType(StorageVolumeSourceVolumeOutput{}) pulumi.RegisterOutputType(StorageVolumeSourceVolumePtrOutput{}) + pulumi.RegisterOutputType(GetClusterMembersOutput{}) + pulumi.RegisterOutputType(GetClusterMembersMapOutput{}) + pulumi.RegisterOutputType(GetInstanceDeviceOutput{}) + pulumi.RegisterOutputType(GetInstanceDeviceArrayOutput{}) + pulumi.RegisterOutputType(GetNetworkAclEgressOutput{}) + pulumi.RegisterOutputType(GetNetworkAclEgressArrayOutput{}) + pulumi.RegisterOutputType(GetNetworkAclIngressOutput{}) + pulumi.RegisterOutputType(GetNetworkAclIngressArrayOutput{}) + pulumi.RegisterOutputType(GetNetworkForwardPortOutput{}) + pulumi.RegisterOutputType(GetNetworkForwardPortArrayOutput{}) + pulumi.RegisterOutputType(GetNetworkLoadBalancerBackendOutput{}) + pulumi.RegisterOutputType(GetNetworkLoadBalancerBackendArrayOutput{}) + pulumi.RegisterOutputType(GetNetworkLoadBalancerPortOutput{}) + pulumi.RegisterOutputType(GetNetworkLoadBalancerPortArrayOutput{}) pulumi.RegisterOutputType(GetProfileDeviceOutput{}) pulumi.RegisterOutputType(GetProfileDeviceArrayOutput{}) } diff --git a/sdk/go/incus/server.go b/sdk/go/incus/server.go new file mode 100644 index 0000000..2c4e4f2 --- /dev/null +++ b/sdk/go/incus/server.go @@ -0,0 +1,268 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package incus + +import ( + "context" + "reflect" + + "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type Server struct { + pulumi.CustomResourceState + + // *Optional* - Map of key/value pairs of + // [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/). + Config pulumi.StringMapOutput `pulumi:"config"` + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrOutput `pulumi:"remote"` + // *Optional* - Specify a target node in a cluster where the config + // options should be applied. This is in particular important for config options + // with `local` scope. + Target pulumi.StringPtrOutput `pulumi:"target"` +} + +// NewServer registers a new resource with the given unique name, arguments, and options. +func NewServer(ctx *pulumi.Context, + name string, args *ServerArgs, opts ...pulumi.ResourceOption) (*Server, error) { + if args == nil { + args = &ServerArgs{} + } + + opts = internal.PkgResourceDefaultOpts(opts) + var resource Server + err := ctx.RegisterResource("incus:index/server:Server", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetServer gets an existing Server resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetServer(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *ServerState, opts ...pulumi.ResourceOption) (*Server, error) { + var resource Server + err := ctx.ReadResource("incus:index/server:Server", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering Server resources. +type serverState struct { + // *Optional* - Map of key/value pairs of + // [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/). + Config map[string]string `pulumi:"config"` + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` + // *Optional* - Specify a target node in a cluster where the config + // options should be applied. This is in particular important for config options + // with `local` scope. + Target *string `pulumi:"target"` +} + +type ServerState struct { + // *Optional* - Map of key/value pairs of + // [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/). + Config pulumi.StringMapInput + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput + // *Optional* - Specify a target node in a cluster where the config + // options should be applied. This is in particular important for config options + // with `local` scope. + Target pulumi.StringPtrInput +} + +func (ServerState) ElementType() reflect.Type { + return reflect.TypeOf((*serverState)(nil)).Elem() +} + +type serverArgs struct { + // *Optional* - Map of key/value pairs of + // [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/). + Config map[string]string `pulumi:"config"` + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote *string `pulumi:"remote"` + // *Optional* - Specify a target node in a cluster where the config + // options should be applied. This is in particular important for config options + // with `local` scope. + Target *string `pulumi:"target"` +} + +// The set of arguments for constructing a Server resource. +type ServerArgs struct { + // *Optional* - Map of key/value pairs of + // [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/). + Config pulumi.StringMapInput + // *Optional* - The remote in which the resource will be created. If + // not provided, the provider's default remote will be used. + Remote pulumi.StringPtrInput + // *Optional* - Specify a target node in a cluster where the config + // options should be applied. This is in particular important for config options + // with `local` scope. + Target pulumi.StringPtrInput +} + +func (ServerArgs) ElementType() reflect.Type { + return reflect.TypeOf((*serverArgs)(nil)).Elem() +} + +type ServerInput interface { + pulumi.Input + + ToServerOutput() ServerOutput + ToServerOutputWithContext(ctx context.Context) ServerOutput +} + +func (*Server) ElementType() reflect.Type { + return reflect.TypeOf((**Server)(nil)).Elem() +} + +func (i *Server) ToServerOutput() ServerOutput { + return i.ToServerOutputWithContext(context.Background()) +} + +func (i *Server) ToServerOutputWithContext(ctx context.Context) ServerOutput { + return pulumi.ToOutputWithContext(ctx, i).(ServerOutput) +} + +// ServerArrayInput is an input type that accepts ServerArray and ServerArrayOutput values. +// You can construct a concrete instance of `ServerArrayInput` via: +// +// ServerArray{ ServerArgs{...} } +type ServerArrayInput interface { + pulumi.Input + + ToServerArrayOutput() ServerArrayOutput + ToServerArrayOutputWithContext(context.Context) ServerArrayOutput +} + +type ServerArray []ServerInput + +func (ServerArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*Server)(nil)).Elem() +} + +func (i ServerArray) ToServerArrayOutput() ServerArrayOutput { + return i.ToServerArrayOutputWithContext(context.Background()) +} + +func (i ServerArray) ToServerArrayOutputWithContext(ctx context.Context) ServerArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(ServerArrayOutput) +} + +// ServerMapInput is an input type that accepts ServerMap and ServerMapOutput values. +// You can construct a concrete instance of `ServerMapInput` via: +// +// ServerMap{ "key": ServerArgs{...} } +type ServerMapInput interface { + pulumi.Input + + ToServerMapOutput() ServerMapOutput + ToServerMapOutputWithContext(context.Context) ServerMapOutput +} + +type ServerMap map[string]ServerInput + +func (ServerMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*Server)(nil)).Elem() +} + +func (i ServerMap) ToServerMapOutput() ServerMapOutput { + return i.ToServerMapOutputWithContext(context.Background()) +} + +func (i ServerMap) ToServerMapOutputWithContext(ctx context.Context) ServerMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(ServerMapOutput) +} + +type ServerOutput struct{ *pulumi.OutputState } + +func (ServerOutput) ElementType() reflect.Type { + return reflect.TypeOf((**Server)(nil)).Elem() +} + +func (o ServerOutput) ToServerOutput() ServerOutput { + return o +} + +func (o ServerOutput) ToServerOutputWithContext(ctx context.Context) ServerOutput { + return o +} + +// *Optional* - Map of key/value pairs of +// [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/). +func (o ServerOutput) Config() pulumi.StringMapOutput { + return o.ApplyT(func(v *Server) pulumi.StringMapOutput { return v.Config }).(pulumi.StringMapOutput) +} + +// *Optional* - The remote in which the resource will be created. If +// not provided, the provider's default remote will be used. +func (o ServerOutput) Remote() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Server) pulumi.StringPtrOutput { return v.Remote }).(pulumi.StringPtrOutput) +} + +// *Optional* - Specify a target node in a cluster where the config +// options should be applied. This is in particular important for config options +// with `local` scope. +func (o ServerOutput) Target() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Server) pulumi.StringPtrOutput { return v.Target }).(pulumi.StringPtrOutput) +} + +type ServerArrayOutput struct{ *pulumi.OutputState } + +func (ServerArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*Server)(nil)).Elem() +} + +func (o ServerArrayOutput) ToServerArrayOutput() ServerArrayOutput { + return o +} + +func (o ServerArrayOutput) ToServerArrayOutputWithContext(ctx context.Context) ServerArrayOutput { + return o +} + +func (o ServerArrayOutput) Index(i pulumi.IntInput) ServerOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Server { + return vs[0].([]*Server)[vs[1].(int)] + }).(ServerOutput) +} + +type ServerMapOutput struct{ *pulumi.OutputState } + +func (ServerMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*Server)(nil)).Elem() +} + +func (o ServerMapOutput) ToServerMapOutput() ServerMapOutput { + return o +} + +func (o ServerMapOutput) ToServerMapOutputWithContext(ctx context.Context) ServerMapOutput { + return o +} + +func (o ServerMapOutput) MapIndex(k pulumi.StringInput) ServerOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Server { + return vs[0].(map[string]*Server)[vs[1].(string)] + }).(ServerOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*ServerInput)(nil)).Elem(), &Server{}) + pulumi.RegisterInputType(reflect.TypeOf((*ServerArrayInput)(nil)).Elem(), ServerArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*ServerMapInput)(nil)).Elem(), ServerMap{}) + pulumi.RegisterOutputType(ServerOutput{}) + pulumi.RegisterOutputType(ServerArrayOutput{}) + pulumi.RegisterOutputType(ServerMapOutput{}) +} diff --git a/sdk/go/incus/storageBucket.go b/sdk/go/incus/storageBucket.go index 07cdd23..661a270 100644 --- a/sdk/go/incus/storageBucket.go +++ b/sdk/go/incus/storageBucket.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -8,7 +8,6 @@ import ( "reflect" "errors" - "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -46,6 +45,9 @@ func NewStorageBucket(ctx *pulumi.Context, return nil, errors.New("missing one or more required arguments") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } if args.Pool == nil { return nil, errors.New("invalid value for required argument 'Pool'") } @@ -134,7 +136,7 @@ type storageBucketArgs struct { // *Optional* - Description of the storage bucket. Description *string `pulumi:"description"` // **Required** - Name of the storage bucket. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // **Required** - Name of storage pool to host the storage bucket. Pool string `pulumi:"pool"` // *Optional* - Name of the project where the storage bucket will be stored. @@ -157,7 +159,7 @@ type StorageBucketArgs struct { // *Optional* - Description of the storage bucket. Description pulumi.StringPtrInput // **Required** - Name of the storage bucket. - Name pulumi.StringPtrInput + Name pulumi.StringInput // **Required** - Name of storage pool to host the storage bucket. Pool pulumi.StringInput // *Optional* - Name of the project where the storage bucket will be stored. diff --git a/sdk/go/incus/storageBucketKey.go b/sdk/go/incus/storageBucketKey.go index c4a73bf..c99225b 100644 --- a/sdk/go/incus/storageBucketKey.go +++ b/sdk/go/incus/storageBucketKey.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -8,7 +8,6 @@ import ( "reflect" "errors" - "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -45,6 +44,9 @@ func NewStorageBucketKey(ctx *pulumi.Context, return nil, errors.New("missing one or more required arguments") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } if args.Pool == nil { return nil, errors.New("invalid value for required argument 'Pool'") } @@ -135,7 +137,7 @@ type storageBucketKeyArgs struct { // *Optional* - Description of the storage bucket key. Description *string `pulumi:"description"` // **Required** - Name of the storage bucket key. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // **Required** - Name of storage pool to host the storage bucket key. Pool string `pulumi:"pool"` // *Optional* - Name of the project where the storage bucket key will be stored. @@ -155,7 +157,7 @@ type StorageBucketKeyArgs struct { // *Optional* - Description of the storage bucket key. Description pulumi.StringPtrInput // **Required** - Name of the storage bucket key. - Name pulumi.StringPtrInput + Name pulumi.StringInput // **Required** - Name of storage pool to host the storage bucket key. Pool pulumi.StringInput // *Optional* - Name of the project where the storage bucket key will be stored. diff --git a/sdk/go/incus/storagePool.go b/sdk/go/incus/storagePool.go index ea99709..e9d3f82 100644 --- a/sdk/go/incus/storagePool.go +++ b/sdk/go/incus/storagePool.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -8,7 +8,6 @@ import ( "reflect" "errors" - "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -20,9 +19,9 @@ type StoragePool struct { // [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). // Config settings vary from driver to driver. Config pulumi.StringMapOutput `pulumi:"config"` - // *Optional* - Description of the storage pool. + // *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description pulumi.StringOutput `pulumi:"description"` - // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `btrfs`, `ceph`, `cephfs`, or `cephobject`. + // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. Driver pulumi.StringOutput `pulumi:"driver"` // **Required** - Name of the storage pool. Name pulumi.StringOutput `pulumi:"name"` @@ -45,6 +44,9 @@ func NewStoragePool(ctx *pulumi.Context, if args.Driver == nil { return nil, errors.New("invalid value for required argument 'Driver'") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } if args.Project == nil { args.Project = pulumi.StringPtr("default") } @@ -75,9 +77,9 @@ type storagePoolState struct { // [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). // Config settings vary from driver to driver. Config map[string]string `pulumi:"config"` - // *Optional* - Description of the storage pool. + // *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description *string `pulumi:"description"` - // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `btrfs`, `ceph`, `cephfs`, or `cephobject`. + // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. Driver *string `pulumi:"driver"` // **Required** - Name of the storage pool. Name *string `pulumi:"name"` @@ -95,9 +97,9 @@ type StoragePoolState struct { // [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). // Config settings vary from driver to driver. Config pulumi.StringMapInput - // *Optional* - Description of the storage pool. + // *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description pulumi.StringPtrInput - // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `btrfs`, `ceph`, `cephfs`, or `cephobject`. + // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. Driver pulumi.StringPtrInput // **Required** - Name of the storage pool. Name pulumi.StringPtrInput @@ -119,12 +121,12 @@ type storagePoolArgs struct { // [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). // Config settings vary from driver to driver. Config map[string]string `pulumi:"config"` - // *Optional* - Description of the storage pool. + // *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description *string `pulumi:"description"` - // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `btrfs`, `ceph`, `cephfs`, or `cephobject`. + // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. Driver string `pulumi:"driver"` // **Required** - Name of the storage pool. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // *Optional* - Name of the project where the storage pool will be stored. Project *string `pulumi:"project"` // *Optional* - The remote in which the resource will be created. If @@ -140,12 +142,12 @@ type StoragePoolArgs struct { // [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). // Config settings vary from driver to driver. Config pulumi.StringMapInput - // *Optional* - Description of the storage pool. + // *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description pulumi.StringPtrInput - // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `btrfs`, `ceph`, `cephfs`, or `cephobject`. + // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. Driver pulumi.StringInput // **Required** - Name of the storage pool. - Name pulumi.StringPtrInput + Name pulumi.StringInput // *Optional* - Name of the project where the storage pool will be stored. Project pulumi.StringPtrInput // *Optional* - The remote in which the resource will be created. If @@ -249,12 +251,12 @@ func (o StoragePoolOutput) Config() pulumi.StringMapOutput { return o.ApplyT(func(v *StoragePool) pulumi.StringMapOutput { return v.Config }).(pulumi.StringMapOutput) } -// *Optional* - Description of the storage pool. +// *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. func (o StoragePoolOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v *StoragePool) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) } -// **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `btrfs`, `ceph`, `cephfs`, or `cephobject`. +// **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. func (o StoragePoolOutput) Driver() pulumi.StringOutput { return o.ApplyT(func(v *StoragePool) pulumi.StringOutput { return v.Driver }).(pulumi.StringOutput) } diff --git a/sdk/go/incus/storageVolume.go b/sdk/go/incus/storageVolume.go index 8187f30..2fbbd2f 100644 --- a/sdk/go/incus/storageVolume.go +++ b/sdk/go/incus/storageVolume.go @@ -1,4 +1,4 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus @@ -8,7 +8,6 @@ import ( "reflect" "errors" - "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -53,6 +52,9 @@ func NewStorageVolume(ctx *pulumi.Context, return nil, errors.New("missing one or more required arguments") } + if args.Name == nil { + return nil, errors.New("invalid value for required argument 'Name'") + } if args.Pool == nil { return nil, errors.New("invalid value for required argument 'Pool'") } @@ -157,7 +159,7 @@ type storageVolumeArgs struct { // *Optional* - Description of the volume. Description *string `pulumi:"description"` // **Required** - Name of the storage volume. - Name *string `pulumi:"name"` + Name string `pulumi:"name"` // **Required** - Name of storage pool to host the volume. Pool string `pulumi:"pool"` // *Optional* - Name of the project where the volume will be stored. @@ -187,7 +189,7 @@ type StorageVolumeArgs struct { // *Optional* - Description of the volume. Description pulumi.StringPtrInput // **Required** - Name of the storage volume. - Name pulumi.StringPtrInput + Name pulumi.StringInput // **Required** - Name of storage pool to host the volume. Pool pulumi.StringInput // *Optional* - Name of the project where the volume will be stored. diff --git a/sdk/nodejs/.gitattributes b/sdk/nodejs/.gitattributes new file mode 100644 index 0000000..aae64e2 --- /dev/null +++ b/sdk/nodejs/.gitattributes @@ -0,0 +1 @@ +* linguist-generated diff --git a/sdk/nodejs/.gitignore b/sdk/nodejs/.gitignore new file mode 100644 index 0000000..204ade5 --- /dev/null +++ b/sdk/nodejs/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +bin/ diff --git a/sdk/nodejs/certificate.ts b/sdk/nodejs/certificate.ts index 14ecc81..3fdf26a 100644 --- a/sdk/nodejs/certificate.ts +++ b/sdk/nodejs/certificate.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -40,37 +40,37 @@ export class Certificate extends pulumi.CustomResource { /** * **Required** - The certificate. */ - public readonly certificate!: pulumi.Output; + declare public readonly certificate: pulumi.Output; /** * *Optional* - Description of the certificate. */ - public readonly description!: pulumi.Output; + declare public readonly description: pulumi.Output; /** * The fingerprint of the certificate. */ - public /*out*/ readonly fingerprint!: pulumi.Output; + declare public /*out*/ readonly fingerprint: pulumi.Output; /** * **Required** - Name of the certificate. */ - public readonly name!: pulumi.Output; + declare public readonly name: pulumi.Output; /** * *Optional* - List of projects to restrict the certificate to. */ - public readonly projects!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * *Optional* - Restrict the certificate to one or more projects. */ - public readonly restricted!: pulumi.Output; + declare 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; + declare public readonly type: pulumi.Output; /** * Create a Certificate resource with the given unique name, arguments, and options. @@ -85,26 +85,29 @@ export class Certificate extends pulumi.CustomResource { 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; + resourceInputs["certificate"] = state?.certificate; + resourceInputs["description"] = state?.description; + resourceInputs["fingerprint"] = state?.fingerprint; + resourceInputs["name"] = state?.name; + resourceInputs["projects"] = state?.projects; + resourceInputs["remote"] = state?.remote; + resourceInputs["restricted"] = state?.restricted; + resourceInputs["type"] = state?.type; } else { const args = argsOrState as CertificateArgs | undefined; - if ((!args || args.certificate === undefined) && !opts.urn) { + if (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; + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + resourceInputs["certificate"] = args?.certificate; + resourceInputs["description"] = args?.description; + resourceInputs["name"] = args?.name; + resourceInputs["projects"] = args?.projects; + resourceInputs["remote"] = args?.remote; + resourceInputs["restricted"] = args?.restricted; + resourceInputs["type"] = args?.type; resourceInputs["fingerprint"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); @@ -167,7 +170,7 @@ export interface CertificateArgs { /** * **Required** - Name of the certificate. */ - name?: pulumi.Input; + name: pulumi.Input; /** * *Optional* - List of projects to restrict the certificate to. */ diff --git a/sdk/nodejs/clusterGroup.ts b/sdk/nodejs/clusterGroup.ts index 3063e7e..928422b 100644 --- a/sdk/nodejs/clusterGroup.ts +++ b/sdk/nodejs/clusterGroup.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -36,17 +36,20 @@ export class ClusterGroup extends pulumi.CustomResource { * *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; + declare public readonly config: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of the cluster group. + */ + declare public readonly description: pulumi.Output; /** * **Required** - Name of the cluster group. */ - public readonly name!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * Create a ClusterGroup resource with the given unique name, arguments, and options. @@ -55,22 +58,25 @@ export class ClusterGroup extends pulumi.CustomResource { * @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, 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; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["name"] = state?.name; + resourceInputs["remote"] = state?.remote; } 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; + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["name"] = args?.name; + resourceInputs["remote"] = args?.remote; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ClusterGroup.__pulumiType, name, resourceInputs, opts); @@ -86,6 +92,9 @@ export interface ClusterGroupState { * [cluster group config settings](https://linuxcontainers.org/incus/docs/main/howto/cluster_groups/#configuration-options). */ config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the cluster group. + */ description?: pulumi.Input; /** * **Required** - Name of the cluster group. @@ -107,11 +116,14 @@ export interface ClusterGroupArgs { * [cluster group config settings](https://linuxcontainers.org/incus/docs/main/howto/cluster_groups/#configuration-options). */ config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the cluster group. + */ description?: pulumi.Input; /** * **Required** - Name of the cluster group. */ - name?: pulumi.Input; + name: pulumi.Input; /** * *Optional* - The remote in which the resource will be created. If * not provided, the provider's default remote will be used. diff --git a/sdk/nodejs/clusterGroupAssignment.ts b/sdk/nodejs/clusterGroupMember.ts similarity index 54% rename from sdk/nodejs/clusterGroupAssignment.ts rename to sdk/nodejs/clusterGroupMember.ts index 5a3158c..39ae4fa 100644 --- a/sdk/nodejs/clusterGroupAssignment.ts +++ b/sdk/nodejs/clusterGroupMember.ts @@ -1,12 +1,12 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** 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 { +export class ClusterGroupMember extends pulumi.CustomResource { /** - * Get an existing ClusterGroupAssignment resource's state with the given name, ID, and optional extra + * Get an existing ClusterGroupMember 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. @@ -14,75 +14,75 @@ export class ClusterGroupAssignment extends pulumi.CustomResource { * @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 }); + public static get(name: string, id: pulumi.Input, state?: ClusterGroupMemberState, opts?: pulumi.CustomResourceOptions): ClusterGroupMember { + return new ClusterGroupMember(name, state, { ...opts, id: id }); } /** @internal */ - public static readonly __pulumiType = 'incus:index/clusterGroupAssignment:ClusterGroupAssignment'; + public static readonly __pulumiType = 'incus:index/clusterGroupMember:ClusterGroupMember'; /** - * Returns true if the given object is an instance of ClusterGroupAssignment. This is designed to work even + * Returns true if the given object is an instance of ClusterGroupMember. 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 { + public static isInstance(obj: any): obj is ClusterGroupMember { if (obj === undefined || obj === null) { return false; } - return obj['__pulumiType'] === ClusterGroupAssignment.__pulumiType; + return obj['__pulumiType'] === ClusterGroupMember.__pulumiType; } /** * **Required** - Name of the cluster group. */ - public readonly clusterGroup!: pulumi.Output; + declare public readonly clusterGroup: pulumi.Output; /** * **Required** - Name of the cluster group member. */ - public readonly member!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** - * Create a ClusterGroupAssignment resource with the given unique name, arguments, and options. + * Create a ClusterGroupMember 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) { + constructor(name: string, args: ClusterGroupMemberArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: ClusterGroupMemberArgs | ClusterGroupMemberState, 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; + const state = argsOrState as ClusterGroupMemberState | undefined; + resourceInputs["clusterGroup"] = state?.clusterGroup; + resourceInputs["member"] = state?.member; + resourceInputs["remote"] = state?.remote; } else { - const args = argsOrState as ClusterGroupAssignmentArgs | undefined; - if ((!args || args.clusterGroup === undefined) && !opts.urn) { + const args = argsOrState as ClusterGroupMemberArgs | undefined; + if (args?.clusterGroup === undefined && !opts.urn) { throw new Error("Missing required property 'clusterGroup'"); } - if ((!args || args.member === undefined) && !opts.urn) { + if (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; + resourceInputs["clusterGroup"] = args?.clusterGroup; + resourceInputs["member"] = args?.member; + resourceInputs["remote"] = args?.remote; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - super(ClusterGroupAssignment.__pulumiType, name, resourceInputs, opts); + super(ClusterGroupMember.__pulumiType, name, resourceInputs, opts); } } /** - * Input properties used for looking up and filtering ClusterGroupAssignment resources. + * Input properties used for looking up and filtering ClusterGroupMember resources. */ -export interface ClusterGroupAssignmentState { +export interface ClusterGroupMemberState { /** * **Required** - Name of the cluster group. */ @@ -99,9 +99,9 @@ export interface ClusterGroupAssignmentState { } /** - * The set of arguments for constructing a ClusterGroupAssignment resource. + * The set of arguments for constructing a ClusterGroupMember resource. */ -export interface ClusterGroupAssignmentArgs { +export interface ClusterGroupMemberArgs { /** * **Required** - Name of the cluster group. */ diff --git a/sdk/nodejs/config/index.ts b/sdk/nodejs/config/index.ts index ed497ed..3fbadc8 100644 --- a/sdk/nodejs/config/index.ts +++ b/sdk/nodejs/config/index.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** // Export members: diff --git a/sdk/nodejs/config/vars.ts b/sdk/nodejs/config/vars.ts index 33132e8..d4b0b0a 100644 --- a/sdk/nodejs/config/vars.ts +++ b/sdk/nodejs/config/vars.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -31,6 +31,17 @@ Object.defineProperty(exports, "configDir", { enumerable: true, }); +/** + * The default remote to use when no other remote is defined in a resource. + */ +export declare const defaultRemote: string | undefined; +Object.defineProperty(exports, "defaultRemote", { + get() { + return __config.get("defaultRemote"); + }, + enumerable: true, +}); + /** * Automatically generate the Incus client certificates if they don't exist. */ @@ -43,8 +54,7 @@ Object.defineProperty(exports, "generateClientCertificates", { }); /** - * The project where project-scoped resources will be created. Can be overridden in individual resources. (default = - * default) + * 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", { diff --git a/sdk/nodejs/getCluster.ts b/sdk/nodejs/getCluster.ts new file mode 100644 index 0000000..227924b --- /dev/null +++ b/sdk/nodejs/getCluster.ts @@ -0,0 +1,168 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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.getCluster + * + * Provides information about an Incus cluster. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getCluster({}); + * ``` + * + * ## Example prevent execution if any cluster member is not online + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getCluster({ + * remote: "cluster", + * }); + * ``` + * + * ## Example create resource for each cluster member + * + * In this example, we define the server configuration [`core.bgp_address`](https://linuxcontainers.org/incus/docs/main/server_config/#core-configuration), + * which has scope `local`, on each cluster member. + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * export = async () => { + * const _this = await incus.getCluster({}); + * const nodes: incus.Server[] = []; + * for (const range of Object.entries(_this.members).map(([k, v]) => ({key: k, value: v}))) { + * nodes.push(new incus.Server(`nodes-${range.key}`, { + * target: _this.isClustered ? range.key : null, + * config: { + * "core.bgp_address": ":179", + * }, + * })); + * } + * } + * ``` + * + * ## Notes + * + * * For non-clustered setups, the `members` attribute will be `null`. + */ +export function getCluster(args?: GetClusterArgs, opts?: pulumi.InvokeOptions): Promise { + args = args || {}; + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getCluster:getCluster", { + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getCluster. + */ +export interface GetClusterArgs { + /** + * *Optional* - The remote for which the Incus cluster information + * should be queried. If not provided, the provider's default remote will be used. + */ + remote?: string; +} + +/** + * A collection of values returned by getCluster. + */ +export interface GetClusterResult { + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + /** + * Whether this is a clustered setup. + */ + readonly isClustered: boolean; + /** + * A map of cluster members. The key is the member name and the value + * is a member object. See reference below. + */ + readonly members: {[key: string]: outputs.GetClusterMembers}; + readonly remote?: string; +} +/** + * ## # incus.getCluster + * + * Provides information about an Incus cluster. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getCluster({}); + * ``` + * + * ## Example prevent execution if any cluster member is not online + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getCluster({ + * remote: "cluster", + * }); + * ``` + * + * ## Example create resource for each cluster member + * + * In this example, we define the server configuration [`core.bgp_address`](https://linuxcontainers.org/incus/docs/main/server_config/#core-configuration), + * which has scope `local`, on each cluster member. + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * export = async () => { + * const _this = await incus.getCluster({}); + * const nodes: incus.Server[] = []; + * for (const range of Object.entries(_this.members).map(([k, v]) => ({key: k, value: v}))) { + * nodes.push(new incus.Server(`nodes-${range.key}`, { + * target: _this.isClustered ? range.key : null, + * config: { + * "core.bgp_address": ":179", + * }, + * })); + * } + * } + * ``` + * + * ## Notes + * + * * For non-clustered setups, the `members` attribute will be `null`. + */ +export function getClusterOutput(args?: GetClusterOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + args = args || {}; + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getCluster:getCluster", { + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getCluster. + */ +export interface GetClusterOutputArgs { + /** + * *Optional* - The remote for which the Incus cluster information + * should be queried. If not provided, the provider's default remote will be used. + */ + remote?: pulumi.Input; +} diff --git a/sdk/nodejs/getImage.ts b/sdk/nodejs/getImage.ts index d906e7c..be94995 100644 --- a/sdk/nodejs/getImage.ts +++ b/sdk/nodejs/getImage.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -14,7 +14,6 @@ import * as utilities from "./utilities"; * ```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", @@ -102,7 +101,6 @@ export interface GetImageResult { * ```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", diff --git a/sdk/nodejs/getInstance.ts b/sdk/nodejs/getInstance.ts new file mode 100644 index 0000000..74e96a4 --- /dev/null +++ b/sdk/nodejs/getInstance.ts @@ -0,0 +1,248 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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.Instance + * + * Provides information about an Incus instance. + * See Incus instance [configuration reference](https://linuxcontainers.org/incus/docs/main/explanation/instance_config/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getInstance({ + * name: "default", + * }); + * export const instanceName = _this.then(_this => _this.name); + * ``` + */ +export function getInstance(args: GetInstanceArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getInstance:getInstance", { + "architecture": args.architecture, + "description": args.description, + "devices": args.devices, + "ephemeral": args.ephemeral, + "location": args.location, + "name": args.name, + "profiles": args.profiles, + "project": args.project, + "remote": args.remote, + "stateful": args.stateful, + "status": args.status, + "type": args.type, + }, opts); +} + +/** + * A collection of arguments for invoking getInstance. + */ +export interface GetInstanceArgs { + /** + * Architecture name. + */ + architecture?: string; + /** + * Description of the instance. + */ + description?: string; + /** + * Device definitions. See reference below. + */ + devices?: inputs.GetInstanceDevice[]; + /** + * Whether the instance is ephemeral (deleted on shutdown). + */ + ephemeral?: boolean; + /** + * Location of the instance. + */ + location?: string; + /** + * **Required** - Name of the instance. + */ + name: string; + /** + * List of profiles applied to the instance. + */ + profiles?: string[]; + /** + * *Optional* - Name of the project where the instance is 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; + /** + * Whether the instance is stateful. + */ + stateful?: boolean; + /** + * Status of the instance. + */ + status?: 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; +} + +/** + * A collection of values returned by getInstance. + */ +export interface GetInstanceResult { + /** + * Architecture name. + */ + readonly architecture: string; + /** + * Map of key/value pairs of config settings. + * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/) + */ + readonly config: {[key: string]: string}; + /** + * Description of the instance. + */ + readonly description: string; + /** + * Device definitions. See reference below. + */ + readonly devices?: outputs.GetInstanceDevice[]; + /** + * Whether the instance is ephemeral (deleted on shutdown). + */ + readonly ephemeral: boolean; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + /** + * Location of the instance. + */ + readonly location: string; + /** + * Name of the device. + */ + readonly name: string; + /** + * List of profiles applied to the instance. + */ + readonly profiles: string[]; + readonly project?: string; + readonly remote?: string; + /** + * Whether the instance is stateful. + */ + readonly stateful: boolean; + /** + * Status of the instance. + */ + readonly status: string; + /** + * Type of the device Must be one of none, disk, nic, + * unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci. + */ + readonly type: string; +} +/** + * ## # incus.Instance + * + * Provides information about an Incus instance. + * See Incus instance [configuration reference](https://linuxcontainers.org/incus/docs/main/explanation/instance_config/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getInstance({ + * name: "default", + * }); + * export const instanceName = _this.then(_this => _this.name); + * ``` + */ +export function getInstanceOutput(args: GetInstanceOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getInstance:getInstance", { + "architecture": args.architecture, + "description": args.description, + "devices": args.devices, + "ephemeral": args.ephemeral, + "location": args.location, + "name": args.name, + "profiles": args.profiles, + "project": args.project, + "remote": args.remote, + "stateful": args.stateful, + "status": args.status, + "type": args.type, + }, opts); +} + +/** + * A collection of arguments for invoking getInstance. + */ +export interface GetInstanceOutputArgs { + /** + * Architecture name. + */ + architecture?: pulumi.Input; + /** + * Description of the instance. + */ + description?: pulumi.Input; + /** + * Device definitions. See reference below. + */ + devices?: pulumi.Input[]>; + /** + * Whether the instance is ephemeral (deleted on shutdown). + */ + ephemeral?: pulumi.Input; + /** + * Location of the instance. + */ + location?: pulumi.Input; + /** + * **Required** - Name of the instance. + */ + name: pulumi.Input; + /** + * List of profiles applied to the instance. + */ + profiles?: pulumi.Input[]>; + /** + * *Optional* - Name of the project where the instance is 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; + /** + * Whether the instance is stateful. + */ + stateful?: pulumi.Input; + /** + * Status of the instance. + */ + status?: 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; +} diff --git a/sdk/nodejs/getNetwork.ts b/sdk/nodejs/getNetwork.ts new file mode 100644 index 0000000..1d09387 --- /dev/null +++ b/sdk/nodejs/getNetwork.ts @@ -0,0 +1,198 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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.Network + * + * Provides information about an Incus network. + * See Incus network [configuration reference](https://linuxcontainers.org/incus/docs/main/explanation/networks/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetwork({ + * name: "default", + * }); + * export const networkName = _this.then(_this => _this.name); + * ``` + */ +export function getNetwork(args: GetNetworkArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getNetwork:getNetwork", { + "description": args.description, + "locations": args.locations, + "managed": args.managed, + "name": args.name, + "project": args.project, + "remote": args.remote, + "status": args.status, + "target": args.target, + "type": args.type, + }, opts); +} + +/** + * A collection of arguments for invoking getNetwork. + */ +export interface GetNetworkArgs { + /** + * Description of the network. + */ + description?: string; + /** + * Locations of the network. + */ + locations?: string[]; + /** + * Whether the network is managed by Incus. + */ + managed?: boolean; + /** + * **Required** - Name of the network. + */ + name: string; + /** + * *Optional* - Name of the project where the network is 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; + /** + * Status of the network. + */ + status?: string; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: string; + /** + * Network type. + * [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types) + */ + type?: string; +} + +/** + * A collection of values returned by getNetwork. + */ +export interface GetNetworkResult { + /** + * Map of key/value pairs of config settings. + * [network config settings](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types) + */ + readonly config: {[key: string]: string}; + /** + * Description of the network. + */ + readonly description: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + /** + * Locations of the network. + */ + readonly locations: string[]; + /** + * Whether the network is managed by Incus. + */ + readonly managed: boolean; + readonly name: string; + readonly project?: string; + readonly remote?: string; + /** + * Status of the network. + */ + readonly status: string; + readonly target?: string; + /** + * Network type. + * [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types) + */ + readonly type: string; +} +/** + * ## # incus.Network + * + * Provides information about an Incus network. + * See Incus network [configuration reference](https://linuxcontainers.org/incus/docs/main/explanation/networks/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetwork({ + * name: "default", + * }); + * export const networkName = _this.then(_this => _this.name); + * ``` + */ +export function getNetworkOutput(args: GetNetworkOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getNetwork:getNetwork", { + "description": args.description, + "locations": args.locations, + "managed": args.managed, + "name": args.name, + "project": args.project, + "remote": args.remote, + "status": args.status, + "target": args.target, + "type": args.type, + }, opts); +} + +/** + * A collection of arguments for invoking getNetwork. + */ +export interface GetNetworkOutputArgs { + /** + * Description of the network. + */ + description?: pulumi.Input; + /** + * Locations of the network. + */ + locations?: pulumi.Input[]>; + /** + * Whether the network is managed by Incus. + */ + managed?: pulumi.Input; + /** + * **Required** - Name of the network. + */ + name: pulumi.Input; + /** + * *Optional* - Name of the project where the network is 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; + /** + * Status of the network. + */ + status?: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; + /** + * Network type. + * [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types) + */ + type?: pulumi.Input; +} diff --git a/sdk/nodejs/getNetworkAcl.ts b/sdk/nodejs/getNetworkAcl.ts new file mode 100644 index 0000000..8d8f262 --- /dev/null +++ b/sdk/nodejs/getNetworkAcl.ts @@ -0,0 +1,157 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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.NetworkAcl + * + * Provides information about an Incus network ACL. + * See Incus network ACL [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_acls/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkAcl({ + * name: "default", + * }); + * export const networkAclName = _this.then(_this => _this.name); + * ``` + */ +export function getNetworkAcl(args: GetNetworkAclArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getNetworkAcl:getNetworkAcl", { + "description": args.description, + "egresses": args.egresses, + "ingresses": args.ingresses, + "name": args.name, + "project": args.project, + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkAcl. + */ +export interface GetNetworkAclArgs { + /** + * Description of the rule. + */ + description?: string; + /** + * List of egress rules. + */ + egresses?: inputs.GetNetworkAclEgress[]; + /** + * List of ingress rules. + */ + ingresses?: inputs.GetNetworkAclIngress[]; + /** + * **Required** - Name of the network ACL. + */ + name: string; + /** + * *Optional* - Name of the project where the network ACL is 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 getNetworkAcl. + */ +export interface GetNetworkAclResult { + /** + * Map of key/value pairs of config settings. + */ + readonly config: {[key: string]: string}; + /** + * Description of the rule. + */ + readonly description: string; + /** + * List of egress rules. + */ + readonly egresses: outputs.GetNetworkAclEgress[]; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + /** + * List of ingress rules. + */ + readonly ingresses: outputs.GetNetworkAclIngress[]; + readonly name: string; + readonly project?: string; + readonly remote?: string; +} +/** + * ## # incus.NetworkAcl + * + * Provides information about an Incus network ACL. + * See Incus network ACL [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_acls/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkAcl({ + * name: "default", + * }); + * export const networkAclName = _this.then(_this => _this.name); + * ``` + */ +export function getNetworkAclOutput(args: GetNetworkAclOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getNetworkAcl:getNetworkAcl", { + "description": args.description, + "egresses": args.egresses, + "ingresses": args.ingresses, + "name": args.name, + "project": args.project, + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkAcl. + */ +export interface GetNetworkAclOutputArgs { + /** + * Description of the rule. + */ + description?: pulumi.Input; + /** + * List of egress rules. + */ + egresses?: pulumi.Input[]>; + /** + * List of ingress rules. + */ + ingresses?: pulumi.Input[]>; + /** + * **Required** - Name of the network ACL. + */ + name: pulumi.Input; + /** + * *Optional* - Name of the project where the network ACL is 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/getNetworkAddressSet.ts b/sdk/nodejs/getNetworkAddressSet.ts new file mode 100644 index 0000000..93501b7 --- /dev/null +++ b/sdk/nodejs/getNetworkAddressSet.ts @@ -0,0 +1,141 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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.NetworkAddressSet + * + * Provides information about an Incus network address set. + * See Incus network address set [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_address_sets/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkAddressSet({ + * name: "default", + * }); + * export const networkAddressSetName = _this.then(_this => _this.name); + * ``` + */ +export function getNetworkAddressSet(args: GetNetworkAddressSetArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getNetworkAddressSet:getNetworkAddressSet", { + "addresses": args.addresses, + "description": args.description, + "name": args.name, + "project": args.project, + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkAddressSet. + */ +export interface GetNetworkAddressSetArgs { + /** + * List of network addresses. + */ + addresses?: string[]; + /** + * Description of the network address set. + */ + description?: string; + /** + * **Required** - Name of the network address set. + */ + name: string; + /** + * *Optional* - Name of the project where the network address set is 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 getNetworkAddressSet. + */ +export interface GetNetworkAddressSetResult { + /** + * List of network addresses. + */ + readonly addresses: string[]; + /** + * Map of key/value pairs of config settings. + */ + readonly config: {[key: string]: string}; + /** + * Description of the network address set. + */ + readonly description: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + readonly name: string; + readonly project?: string; + readonly remote?: string; +} +/** + * ## # incus.NetworkAddressSet + * + * Provides information about an Incus network address set. + * See Incus network address set [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_address_sets/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkAddressSet({ + * name: "default", + * }); + * export const networkAddressSetName = _this.then(_this => _this.name); + * ``` + */ +export function getNetworkAddressSetOutput(args: GetNetworkAddressSetOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getNetworkAddressSet:getNetworkAddressSet", { + "addresses": args.addresses, + "description": args.description, + "name": args.name, + "project": args.project, + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkAddressSet. + */ +export interface GetNetworkAddressSetOutputArgs { + /** + * List of network addresses. + */ + addresses?: pulumi.Input[]>; + /** + * Description of the network address set. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the network address set. + */ + name: pulumi.Input; + /** + * *Optional* - Name of the project where the network address set is 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/getNetworkForward.ts b/sdk/nodejs/getNetworkForward.ts new file mode 100644 index 0000000..8c97161 --- /dev/null +++ b/sdk/nodejs/getNetworkForward.ts @@ -0,0 +1,181 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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.NetworkForward + * + * Provides information about an Incus network forward. + * See Incus network forward [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_forwards/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkForward({ + * listenAddress: "127.0.0.1", + * network: "parent", + * }); + * export const networkForwardListenAddress = _this.then(_this => _this.listenAddress); + * ``` + */ +export function getNetworkForward(args: GetNetworkForwardArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getNetworkForward:getNetworkForward", { + "description": args.description, + "listenAddress": args.listenAddress, + "location": args.location, + "network": args.network, + "ports": args.ports, + "project": args.project, + "remote": args.remote, + "target": args.target, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkForward. + */ +export interface GetNetworkForwardArgs { + /** + * Description of the forward port. + */ + description?: string; + /** + * **Required** - Listen Address of the network forward. + */ + listenAddress: string; + /** + * Location of the network forward. + */ + location?: string; + /** + * **Required** - Name of the parent network. + */ + network: string; + /** + * List of ports to forward. + */ + ports?: inputs.GetNetworkForwardPort[]; + /** + * *Optional* - Name of the project where the network forward is 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; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: string; +} + +/** + * A collection of values returned by getNetworkForward. + */ +export interface GetNetworkForwardResult { + /** + * Map of key/value pairs of config settings. + */ + readonly config: {[key: string]: string}; + /** + * Description of the forward port. + */ + readonly description: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + readonly listenAddress: string; + /** + * Location of the network forward. + */ + readonly location: string; + readonly network: string; + /** + * List of ports to forward. + */ + readonly ports: outputs.GetNetworkForwardPort[]; + readonly project?: string; + readonly remote?: string; + readonly target?: string; +} +/** + * ## # incus.NetworkForward + * + * Provides information about an Incus network forward. + * See Incus network forward [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_forwards/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkForward({ + * listenAddress: "127.0.0.1", + * network: "parent", + * }); + * export const networkForwardListenAddress = _this.then(_this => _this.listenAddress); + * ``` + */ +export function getNetworkForwardOutput(args: GetNetworkForwardOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getNetworkForward:getNetworkForward", { + "description": args.description, + "listenAddress": args.listenAddress, + "location": args.location, + "network": args.network, + "ports": args.ports, + "project": args.project, + "remote": args.remote, + "target": args.target, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkForward. + */ +export interface GetNetworkForwardOutputArgs { + /** + * Description of the forward port. + */ + description?: pulumi.Input; + /** + * **Required** - Listen Address of the network forward. + */ + listenAddress: pulumi.Input; + /** + * Location of the network forward. + */ + location?: pulumi.Input; + /** + * **Required** - Name of the parent network. + */ + network: pulumi.Input; + /** + * List of ports to forward. + */ + ports?: pulumi.Input[]>; + /** + * *Optional* - Name of the project where the network forward is 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; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; +} diff --git a/sdk/nodejs/getNetworkIntegration.ts b/sdk/nodejs/getNetworkIntegration.ts new file mode 100644 index 0000000..9e49961 --- /dev/null +++ b/sdk/nodejs/getNetworkIntegration.ts @@ -0,0 +1,130 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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 + * + * Provides information about an Incus network integration. + * See Incus network integration [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_integrations/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkIntegration({ + * name: "default", + * }); + * export const networkIntegrationName = _this.then(_this => _this.name); + * ``` + */ +export function getNetworkIntegration(args: GetNetworkIntegrationArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getNetworkIntegration:getNetworkIntegration", { + "description": args.description, + "name": args.name, + "remote": args.remote, + "type": args.type, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkIntegration. + */ +export interface GetNetworkIntegrationArgs { + /** + * Description of the network integration. + */ + description?: string; + /** + * **Required** - Name of the network integration. + */ + name: string; + /** + * *Optional* - The remote in which the resource was created. If + * not provided, the provider's default remote will be used. + */ + remote?: string; + /** + * Integration type. + */ + type?: string; +} + +/** + * A collection of values returned by getNetworkIntegration. + */ +export interface GetNetworkIntegrationResult { + /** + * Map of key/value pairs of config settings. + */ + readonly config: {[key: string]: string}; + /** + * Description of the network integration. + */ + readonly description: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + readonly name: string; + readonly remote?: string; + /** + * Integration type. + */ + readonly type: string; +} +/** + * ## # incus.NetworkIntegration + * + * Provides information about an Incus network integration. + * See Incus network integration [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_integrations/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkIntegration({ + * name: "default", + * }); + * export const networkIntegrationName = _this.then(_this => _this.name); + * ``` + */ +export function getNetworkIntegrationOutput(args: GetNetworkIntegrationOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getNetworkIntegration:getNetworkIntegration", { + "description": args.description, + "name": args.name, + "remote": args.remote, + "type": args.type, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkIntegration. + */ +export interface GetNetworkIntegrationOutputArgs { + /** + * Description of the network integration. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the network integration. + */ + 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; + /** + * Integration type. + */ + type?: pulumi.Input; +} diff --git a/sdk/nodejs/getNetworkLoadBalancer.ts b/sdk/nodejs/getNetworkLoadBalancer.ts new file mode 100644 index 0000000..d0e701d --- /dev/null +++ b/sdk/nodejs/getNetworkLoadBalancer.ts @@ -0,0 +1,184 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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.getNetworkLoadBalancer + * + * Provides information about an Incus network load balancer. + * See Incus network load balancer [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_load_balancers/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkLoadBalancer({ + * listenAddress: "127.0.0.1", + * network: "parent", + * }); + * export const networkLoadBalancerListenAddress = _this.then(_this => _this.listenAddress); + * ``` + */ +export function getNetworkLoadBalancer(args: GetNetworkLoadBalancerArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getNetworkLoadBalancer:getNetworkLoadBalancer", { + "backends": args.backends, + "description": args.description, + "listenAddress": args.listenAddress, + "location": args.location, + "network": args.network, + "ports": args.ports, + "project": args.project, + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkLoadBalancer. + */ +export interface GetNetworkLoadBalancerArgs { + /** + * List of load balancer backends. + */ + backends?: inputs.GetNetworkLoadBalancerBackend[]; + /** + * Description of the load balancer port. + */ + description?: string; + /** + * **Required** - Listen Address of the network load balancer. + */ + listenAddress: string; + /** + * Location of the network load balancer. + */ + location?: string; + /** + * **Required** - Name of the parent network. + */ + network: string; + /** + * List of load balancer ports. + */ + ports?: inputs.GetNetworkLoadBalancerPort[]; + /** + * *Optional* - Name of the project where the network load balancer is 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 getNetworkLoadBalancer. + */ +export interface GetNetworkLoadBalancerResult { + /** + * List of load balancer backends. + */ + readonly backends: outputs.GetNetworkLoadBalancerBackend[]; + /** + * Map of key/value pairs of config settings. + */ + readonly config: {[key: string]: string}; + /** + * Description of the load balancer port. + */ + readonly description: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + readonly listenAddress: string; + /** + * Location of the network load balancer. + */ + readonly location: string; + readonly network: string; + /** + * List of load balancer ports. + */ + readonly ports: outputs.GetNetworkLoadBalancerPort[]; + readonly project?: string; + readonly remote?: string; +} +/** + * ## # incus.getNetworkLoadBalancer + * + * Provides information about an Incus network load balancer. + * See Incus network load balancer [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_load_balancers/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkLoadBalancer({ + * listenAddress: "127.0.0.1", + * network: "parent", + * }); + * export const networkLoadBalancerListenAddress = _this.then(_this => _this.listenAddress); + * ``` + */ +export function getNetworkLoadBalancerOutput(args: GetNetworkLoadBalancerOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getNetworkLoadBalancer:getNetworkLoadBalancer", { + "backends": args.backends, + "description": args.description, + "listenAddress": args.listenAddress, + "location": args.location, + "network": args.network, + "ports": args.ports, + "project": args.project, + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkLoadBalancer. + */ +export interface GetNetworkLoadBalancerOutputArgs { + /** + * List of load balancer backends. + */ + backends?: pulumi.Input[]>; + /** + * Description of the load balancer port. + */ + description?: pulumi.Input; + /** + * **Required** - Listen Address of the network load balancer. + */ + listenAddress: pulumi.Input; + /** + * Location of the network load balancer. + */ + location?: pulumi.Input; + /** + * **Required** - Name of the parent network. + */ + network: pulumi.Input; + /** + * List of load balancer ports. + */ + ports?: pulumi.Input[]>; + /** + * *Optional* - Name of the project where the network load balancer is 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/getNetworkPeer.ts b/sdk/nodejs/getNetworkPeer.ts new file mode 100644 index 0000000..a87390e --- /dev/null +++ b/sdk/nodejs/getNetworkPeer.ts @@ -0,0 +1,210 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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 + * + * Provides information about an Incus network peer. + * See Incus network peer [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_peers/https://linuxcontainers.org/incus/docs/main/howto/network_ovn_peers/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkPeer({ + * name: "default", + * network: "parent", + * }); + * export const networkPeerName = _this.then(_this => _this.name); + * ``` + */ +export function getNetworkPeer(args: GetNetworkPeerArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getNetworkPeer:getNetworkPeer", { + "description": args.description, + "name": args.name, + "network": args.network, + "project": args.project, + "remote": args.remote, + "status": args.status, + "targetIntegration": args.targetIntegration, + "targetNetwork": args.targetNetwork, + "targetProject": args.targetProject, + "type": args.type, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkPeer. + */ +export interface GetNetworkPeerArgs { + /** + * Description of the network peer. + */ + description?: string; + /** + * **Required** - Name of the network peer. + */ + name: string; + /** + * **Required** - Name of the parent network. + */ + network: string; + /** + * *Optional* - Name of the project where the network peer is 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; + /** + * Status of the network peer. + */ + status?: string; + /** + * Target integration for the network peer. + */ + targetIntegration?: string; + /** + * Target network for the network peer. + */ + targetNetwork?: string; + /** + * Target project for the network peer. + */ + targetProject?: string; + /** + * Network peer type. + */ + type?: string; +} + +/** + * A collection of values returned by getNetworkPeer. + */ +export interface GetNetworkPeerResult { + /** + * Map of key/value pairs of config settings. + */ + readonly config: {[key: string]: string}; + /** + * Description of the network peer. + */ + readonly description: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + readonly name: string; + readonly network: string; + readonly project?: string; + readonly remote?: string; + /** + * Status of the network peer. + */ + readonly status: string; + /** + * Target integration for the network peer. + */ + readonly targetIntegration: string; + /** + * Target network for the network peer. + */ + readonly targetNetwork: string; + /** + * Target project for the network peer. + */ + readonly targetProject: string; + /** + * Network peer type. + */ + readonly type: string; +} +/** + * ## # incus.NetworkPeer + * + * Provides information about an Incus network peer. + * See Incus network peer [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_peers/https://linuxcontainers.org/incus/docs/main/howto/network_ovn_peers/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkPeer({ + * name: "default", + * network: "parent", + * }); + * export const networkPeerName = _this.then(_this => _this.name); + * ``` + */ +export function getNetworkPeerOutput(args: GetNetworkPeerOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getNetworkPeer:getNetworkPeer", { + "description": args.description, + "name": args.name, + "network": args.network, + "project": args.project, + "remote": args.remote, + "status": args.status, + "targetIntegration": args.targetIntegration, + "targetNetwork": args.targetNetwork, + "targetProject": args.targetProject, + "type": args.type, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkPeer. + */ +export interface GetNetworkPeerOutputArgs { + /** + * Description of the network peer. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the network peer. + */ + name: pulumi.Input; + /** + * **Required** - Name of the parent network. + */ + network: pulumi.Input; + /** + * *Optional* - Name of the project where the network peer is 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; + /** + * Status of the network peer. + */ + status?: pulumi.Input; + /** + * Target integration for the network peer. + */ + targetIntegration?: pulumi.Input; + /** + * Target network for the network peer. + */ + targetNetwork?: pulumi.Input; + /** + * Target project for the network peer. + */ + targetProject?: pulumi.Input; + /** + * Network peer type. + */ + type?: pulumi.Input; +} diff --git a/sdk/nodejs/getNetworkZone.ts b/sdk/nodejs/getNetworkZone.ts new file mode 100644 index 0000000..a08b0ce --- /dev/null +++ b/sdk/nodejs/getNetworkZone.ts @@ -0,0 +1,127 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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.NetworkZone + * + * Provides information about an Incus network zone. + * See Incus network zone [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_zones/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkZone({ + * name: "default", + * }); + * export const networkZoneName = _this.then(_this => _this.name); + * ``` + */ +export function getNetworkZone(args: GetNetworkZoneArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getNetworkZone:getNetworkZone", { + "description": args.description, + "name": args.name, + "project": args.project, + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkZone. + */ +export interface GetNetworkZoneArgs { + /** + * Description of the network zone. + */ + description?: string; + /** + * **Required** - Name of the network zone. + */ + name: string; + /** + * *Optional* - Name of the project where the network zone is 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 getNetworkZone. + */ +export interface GetNetworkZoneResult { + /** + * Map of key/value pairs of config settings. + */ + readonly config: {[key: string]: string}; + /** + * Description of the network zone. + */ + readonly description: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + readonly name: string; + readonly project?: string; + readonly remote?: string; +} +/** + * ## # incus.NetworkZone + * + * Provides information about an Incus network zone. + * See Incus network zone [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_zones/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getNetworkZone({ + * name: "default", + * }); + * export const networkZoneName = _this.then(_this => _this.name); + * ``` + */ +export function getNetworkZoneOutput(args: GetNetworkZoneOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getNetworkZone:getNetworkZone", { + "description": args.description, + "name": args.name, + "project": args.project, + "remote": args.remote, + }, opts); +} + +/** + * A collection of arguments for invoking getNetworkZone. + */ +export interface GetNetworkZoneOutputArgs { + /** + * 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 is 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/getProfile.ts b/sdk/nodejs/getProfile.ts index 93f2bee..55a37f2 100644 --- a/sdk/nodejs/getProfile.ts +++ b/sdk/nodejs/getProfile.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -10,27 +10,24 @@ import * as utilities from "./utilities"; * ## # incus.Profile * * Provides information about an Incus profile. + * See Incus profile [configuration reference](https://linuxcontainers.org/incus/docs/main/profiles/) for more details. * * ## 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({ + * const _this = incus.getProfile({ * name: "default", * }); - * const d1 = new incus.Instance("d1", { - * profiles: [_default.then(_default => _default.name)], - * image: "images:debian/12", - * name: "d1", - * }); + * export const profileName = _this.then(_this => _this.name); * ``` */ export function getProfile(args: GetProfileArgs, opts?: pulumi.InvokeOptions): Promise { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("incus:index/getProfile:getProfile", { + "description": args.description, "devices": args.devices, "name": args.name, "project": args.project, @@ -43,7 +40,11 @@ export function getProfile(args: GetProfileArgs, opts?: pulumi.InvokeOptions): P */ export interface GetProfileArgs { /** - * Device definition. See reference below. + * Description of the profile. + */ + description?: string; + /** + * Device definitions. See reference below. */ devices?: inputs.GetProfileDevice[]; /** @@ -51,7 +52,7 @@ export interface GetProfileArgs { */ name: string; /** - * *Optional* - Name of the project where the profile will be stored. + * *Optional* - Name of the project where the profile is be stored. */ project?: string; /** @@ -66,13 +67,16 @@ export interface GetProfileArgs { */ export interface GetProfileResult { /** - * Map of key/value pairs of - * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). + * Map of key/value pairs of config settings. + * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/) */ readonly config: {[key: string]: string}; + /** + * Description of the profile. + */ readonly description: string; /** - * Device definition. See reference below. + * Device definitions. See reference below. */ readonly devices?: outputs.GetProfileDevice[]; /** @@ -90,27 +94,24 @@ export interface GetProfileResult { * ## # incus.Profile * * Provides information about an Incus profile. + * See Incus profile [configuration reference](https://linuxcontainers.org/incus/docs/main/profiles/) for more details. * * ## 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({ + * const _this = incus.getProfile({ * name: "default", * }); - * const d1 = new incus.Instance("d1", { - * profiles: [_default.then(_default => _default.name)], - * image: "images:debian/12", - * name: "d1", - * }); + * export const profileName = _this.then(_this => _this.name); * ``` */ export function getProfileOutput(args: GetProfileOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("incus:index/getProfile:getProfile", { + "description": args.description, "devices": args.devices, "name": args.name, "project": args.project, @@ -123,7 +124,11 @@ export function getProfileOutput(args: GetProfileOutputArgs, opts?: pulumi.Invok */ export interface GetProfileOutputArgs { /** - * Device definition. See reference below. + * Description of the profile. + */ + description?: pulumi.Input; + /** + * Device definitions. See reference below. */ devices?: pulumi.Input[]>; /** @@ -131,7 +136,7 @@ export interface GetProfileOutputArgs { */ name: pulumi.Input; /** - * *Optional* - Name of the project where the profile will be stored. + * *Optional* - Name of the project where the profile is be stored. */ project?: pulumi.Input; /** diff --git a/sdk/nodejs/getProject.ts b/sdk/nodejs/getProject.ts index c2c6e08..f257bd0 100644 --- a/sdk/nodejs/getProject.ts +++ b/sdk/nodejs/getProject.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -14,22 +14,16 @@ import * as utilities from "./utilities"; * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as incus from "@kiterun/incus"; - * import * as incus from "@pulumi/incus"; * - * const _default = incus.getProject({ + * const _this = incus.getProject({ * name: "default", * }); - * const d1 = new incus.Instance("d1", { - * project: _default.then(_default => _default.name), - * image: "images:debian/12", - * name: "d1", - * }); + * export const projectName = _this.then(_this => _this.name); * ``` */ 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, @@ -40,11 +34,6 @@ export function getProject(args: GetProjectArgs, opts?: pulumi.InvokeOptions): P * 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. */ @@ -65,8 +54,8 @@ export interface GetProjectArgs { */ export interface GetProjectResult { /** - * Map of key/value pairs of - * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). + * Map of key/value pairs of config settings. + * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/) */ readonly config: {[key: string]: string}; /** @@ -90,22 +79,16 @@ export interface GetProjectResult { * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as incus from "@kiterun/incus"; - * import * as incus from "@pulumi/incus"; * - * const _default = incus.getProject({ + * const _this = incus.getProject({ * name: "default", * }); - * const d1 = new incus.Instance("d1", { - * project: _default.then(_default => _default.name), - * image: "images:debian/12", - * name: "d1", - * }); + * export const projectName = _this.then(_this => _this.name); * ``` */ 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, @@ -116,11 +99,6 @@ export function getProjectOutput(args: GetProjectOutputArgs, opts?: pulumi.Invok * 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. */ diff --git a/sdk/nodejs/getStorageBucket.ts b/sdk/nodejs/getStorageBucket.ts new file mode 100644 index 0000000..084e46a --- /dev/null +++ b/sdk/nodejs/getStorageBucket.ts @@ -0,0 +1,180 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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.StorageBucket + * + * Provides information about an Incus storage bucket. + * See Incus storage bucket [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getStorageBucket({ + * name: "default", + * storagePool: "parent", + * }); + * export const storageBucketName = _this.then(_this => _this.name); + * ``` + */ +export function getStorageBucket(args: GetStorageBucketArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getStorageBucket:getStorageBucket", { + "description": args.description, + "location": args.location, + "name": args.name, + "project": args.project, + "remote": args.remote, + "s3Url": args.s3Url, + "storagePool": args.storagePool, + "target": args.target, + }, opts); +} + +/** + * A collection of arguments for invoking getStorageBucket. + */ +export interface GetStorageBucketArgs { + /** + * Description of the storage bucket. + */ + description?: string; + /** + * Location of the storage bucket. + */ + location?: string; + /** + * **Required** - Name of the storage bucket. + */ + name: string; + /** + * *Optional* - Name of the project where the storage bucket is 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; + /** + * Storage Bucket S3 URL. + */ + s3Url?: string; + /** + * **Required** - Name of the parent storage pool. + */ + storagePool: string; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: string; +} + +/** + * A collection of values returned by getStorageBucket. + */ +export interface GetStorageBucketResult { + /** + * Map of key/value pairs of config settings. + * [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/) + */ + readonly config: {[key: string]: string}; + /** + * Description of the storage bucket. + */ + readonly description: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + /** + * Location of the storage bucket. + */ + readonly location: string; + readonly name: string; + readonly project?: string; + readonly remote?: string; + /** + * Storage Bucket S3 URL. + */ + readonly s3Url: string; + readonly storagePool: string; + readonly target?: string; +} +/** + * ## # incus.StorageBucket + * + * Provides information about an Incus storage bucket. + * See Incus storage bucket [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getStorageBucket({ + * name: "default", + * storagePool: "parent", + * }); + * export const storageBucketName = _this.then(_this => _this.name); + * ``` + */ +export function getStorageBucketOutput(args: GetStorageBucketOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getStorageBucket:getStorageBucket", { + "description": args.description, + "location": args.location, + "name": args.name, + "project": args.project, + "remote": args.remote, + "s3Url": args.s3Url, + "storagePool": args.storagePool, + "target": args.target, + }, opts); +} + +/** + * A collection of arguments for invoking getStorageBucket. + */ +export interface GetStorageBucketOutputArgs { + /** + * Description of the storage bucket. + */ + description?: pulumi.Input; + /** + * Location of the storage bucket. + */ + location?: pulumi.Input; + /** + * **Required** - Name of the storage bucket. + */ + name: pulumi.Input; + /** + * *Optional* - Name of the project where the storage bucket is 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; + /** + * Storage Bucket S3 URL. + */ + s3Url?: pulumi.Input; + /** + * **Required** - Name of the parent storage pool. + */ + storagePool: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; +} diff --git a/sdk/nodejs/getStoragePool.ts b/sdk/nodejs/getStoragePool.ts new file mode 100644 index 0000000..5169441 --- /dev/null +++ b/sdk/nodejs/getStoragePool.ts @@ -0,0 +1,156 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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.StoragePool + * + * Provides information about an Incus storage pool. + * See Incus storage pool [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/storage_pools/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getStoragePool({ + * name: "default", + * }); + * export const storagePoolName = _this.then(_this => _this.name); + * ``` + */ +export function getStoragePool(args: GetStoragePoolArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getStoragePool:getStoragePool", { + "description": args.description, + "driver": args.driver, + "name": args.name, + "remote": args.remote, + "status": args.status, + "target": args.target, + }, opts); +} + +/** + * A collection of arguments for invoking getStoragePool. + */ +export interface GetStoragePoolArgs { + /** + * Description of the storage pool. + */ + description?: string; + /** + * Storage Pool driver. + */ + driver?: string; + /** + * **Required** - Name of the storage pool. + */ + name: string; + /** + * *Optional* - The remote in which the resource was created. If + * not provided, the provider's default remote will be used. + */ + remote?: string; + /** + * Status of the storage pool. + */ + status?: string; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: string; +} + +/** + * A collection of values returned by getStoragePool. + */ +export interface GetStoragePoolResult { + /** + * Map of key/value pairs of config settings. + * [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/) + */ + readonly config: {[key: string]: string}; + /** + * Description of the storage pool. + */ + readonly description: string; + /** + * Storage Pool driver. + */ + readonly driver: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + readonly name: string; + readonly remote?: string; + /** + * Status of the storage pool. + */ + readonly status: string; + readonly target?: string; +} +/** + * ## # incus.StoragePool + * + * Provides information about an Incus storage pool. + * See Incus storage pool [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/storage_pools/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getStoragePool({ + * name: "default", + * }); + * export const storagePoolName = _this.then(_this => _this.name); + * ``` + */ +export function getStoragePoolOutput(args: GetStoragePoolOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getStoragePool:getStoragePool", { + "description": args.description, + "driver": args.driver, + "name": args.name, + "remote": args.remote, + "status": args.status, + "target": args.target, + }, opts); +} + +/** + * A collection of arguments for invoking getStoragePool. + */ +export interface GetStoragePoolOutputArgs { + /** + * Description of the storage pool. + */ + description?: pulumi.Input; + /** + * Storage Pool driver. + */ + driver?: pulumi.Input; + /** + * **Required** - Name of the storage pool. + */ + 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; + /** + * Status of the storage pool. + */ + status?: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; +} diff --git a/sdk/nodejs/getStorageVolume.ts b/sdk/nodejs/getStorageVolume.ts new file mode 100644 index 0000000..e192411 --- /dev/null +++ b/sdk/nodejs/getStorageVolume.ts @@ -0,0 +1,193 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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.StorageVolume + * + * Provides information about an Incus storage volume. + * See Incus storage volume [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/storage_volumes/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getStorageVolume({ + * name: "default", + * type: "custom", + * storagePool: "parent", + * }); + * export const storageVolumeName = _this.then(_this => _this.name); + * ``` + */ +export function getStorageVolume(args: GetStorageVolumeArgs, opts?: pulumi.InvokeOptions): Promise { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("incus:index/getStorageVolume:getStorageVolume", { + "contentType": args.contentType, + "description": args.description, + "location": args.location, + "name": args.name, + "project": args.project, + "remote": args.remote, + "storagePool": args.storagePool, + "target": args.target, + "type": args.type, + }, opts); +} + +/** + * A collection of arguments for invoking getStorageVolume. + */ +export interface GetStorageVolumeArgs { + /** + * Storage Volume content type. + */ + contentType?: string; + /** + * Description of the storage volume. + */ + description?: string; + /** + * Location of the storage volume. + */ + location?: string; + /** + * **Required** - Name of the storage volume. + */ + name: string; + /** + * *Optional* - Name of the project where the storage volume is 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; + /** + * **Required** - Name of the parent storage pool. + */ + storagePool: string; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: string; + /** + * **Required** - Storage Volume type. + */ + type: string; +} + +/** + * A collection of values returned by getStorageVolume. + */ +export interface GetStorageVolumeResult { + /** + * Map of key/value pairs of config settings. + * [storage volume config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/) + */ + readonly config: {[key: string]: string}; + /** + * Storage Volume content type. + */ + readonly contentType: string; + /** + * Description of the storage volume. + */ + readonly description: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + /** + * Location of the storage volume. + */ + readonly location: string; + readonly name: string; + readonly project?: string; + readonly remote?: string; + readonly storagePool: string; + readonly target?: string; + readonly type: string; +} +/** + * ## # incus.StorageVolume + * + * Provides information about an Incus storage volume. + * See Incus storage volume [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/storage_volumes/) for more details. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = incus.getStorageVolume({ + * name: "default", + * type: "custom", + * storagePool: "parent", + * }); + * export const storageVolumeName = _this.then(_this => _this.name); + * ``` + */ +export function getStorageVolumeOutput(args: GetStorageVolumeOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output { + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("incus:index/getStorageVolume:getStorageVolume", { + "contentType": args.contentType, + "description": args.description, + "location": args.location, + "name": args.name, + "project": args.project, + "remote": args.remote, + "storagePool": args.storagePool, + "target": args.target, + "type": args.type, + }, opts); +} + +/** + * A collection of arguments for invoking getStorageVolume. + */ +export interface GetStorageVolumeOutputArgs { + /** + * Storage Volume content type. + */ + contentType?: pulumi.Input; + /** + * Description of the storage volume. + */ + description?: pulumi.Input; + /** + * Location of the storage volume. + */ + location?: pulumi.Input; + /** + * **Required** - Name of the storage volume. + */ + name: pulumi.Input; + /** + * *Optional* - Name of the project where the storage volume is 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; + /** + * **Required** - Name of the parent storage pool. + */ + storagePool: pulumi.Input; + /** + * *Optional* - Specify a target node in a cluster. + */ + target?: pulumi.Input; + /** + * **Required** - Storage Volume type. + */ + type: pulumi.Input; +} diff --git a/sdk/nodejs/go.mod b/sdk/nodejs/go.mod index 2cb3f12..104eb1a 100644 --- a/sdk/nodejs/go.mod +++ b/sdk/nodejs/go.mod @@ -1,3 +1,3 @@ module fake_nodejs_module // Exclude this directory from Go tools -go 1.25 +go 1.17 diff --git a/sdk/nodejs/image.ts b/sdk/nodejs/image.ts index b8ca81a..fa98b89 100644 --- a/sdk/nodejs/image.ts +++ b/sdk/nodejs/image.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -28,6 +28,30 @@ import * as utilities from "./utilities"; * }); * ``` * + * ## Image alias Example + * + * ```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", + * }, + * aliases: [ + * { + * name: "alpine", + * description: "Alpine Linux", + * }, + * { + * name: "alpine-edge", + * description: "Alpine Linux Edge", + * }, + * ], + * }); + * ``` + * * ## Notes * * * See the Incus [documentation](https://linuxcontainers.org/incus/docs/main/howto/images_remote) for more info on default image remotes. @@ -61,45 +85,44 @@ export class Image extends pulumi.CustomResource { } /** - * *Optional* - A list of aliases to assign to the image after - * pulling. + * Image alias */ - public readonly aliases!: pulumi.Output; + declare public readonly aliases: pulumi.Output; /** * The list of aliases that were copied from the * `sourceImage`. */ - public /*out*/ readonly copiedAliases!: pulumi.Output; + declare public /*out*/ readonly copiedAliases: pulumi.Output; /** * The datetime of image creation, in Unix time. */ - public /*out*/ readonly createdAt!: pulumi.Output; + declare public /*out*/ readonly createdAt: pulumi.Output; /** * The unique hash fingperint of the image. */ - public /*out*/ readonly fingerprint!: pulumi.Output; + declare public /*out*/ readonly fingerprint: pulumi.Output; /** * *Optional* - Name of the project where the image will be stored. */ - public readonly project!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; + declare 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; + declare public readonly sourceFile: pulumi.Output; /** * *Optional* - The source image from which the image will be created. See reference below. */ - public readonly sourceImage!: pulumi.Output; + declare public readonly sourceImage: pulumi.Output; /** * *Optional* - The source instance from which the image will be created. See reference below. */ - public readonly sourceInstance!: pulumi.Output; + declare public readonly sourceInstance: pulumi.Output; /** * Create a Image resource with the given unique name, arguments, and options. @@ -114,24 +137,24 @@ export class Image extends pulumi.CustomResource { 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; + resourceInputs["aliases"] = state?.aliases; + resourceInputs["copiedAliases"] = state?.copiedAliases; + resourceInputs["createdAt"] = state?.createdAt; + resourceInputs["fingerprint"] = state?.fingerprint; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; + resourceInputs["resourceId"] = state?.resourceId; + resourceInputs["sourceFile"] = state?.sourceFile; + resourceInputs["sourceImage"] = state?.sourceImage; + resourceInputs["sourceInstance"] = state?.sourceInstance; } 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["aliases"] = args?.aliases; + resourceInputs["project"] = args?.project; + resourceInputs["remote"] = args?.remote; + resourceInputs["sourceFile"] = args?.sourceFile; + resourceInputs["sourceImage"] = args?.sourceImage; + resourceInputs["sourceInstance"] = args?.sourceInstance; resourceInputs["copiedAliases"] = undefined /*out*/; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["fingerprint"] = undefined /*out*/; @@ -147,10 +170,9 @@ export class Image extends pulumi.CustomResource { */ export interface ImageState { /** - * *Optional* - A list of aliases to assign to the image after - * pulling. + * Image alias */ - aliases?: pulumi.Input[]>; + aliases?: pulumi.Input[]>; /** * The list of aliases that were copied from the * `sourceImage`. @@ -193,10 +215,9 @@ export interface ImageState { */ export interface ImageArgs { /** - * *Optional* - A list of aliases to assign to the image after - * pulling. + * Image alias */ - aliases?: pulumi.Input[]>; + aliases?: pulumi.Input[]>; /** * *Optional* - Name of the project where the image will be stored. */ diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index 7bc6a84..c3731e6 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -15,16 +15,66 @@ 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 { ClusterGroupMemberArgs, ClusterGroupMemberState } from "./clusterGroupMember"; +export type ClusterGroupMember = import("./clusterGroupMember").ClusterGroupMember; +export const ClusterGroupMember: typeof import("./clusterGroupMember").ClusterGroupMember = null as any; +utilities.lazyLoad(exports, ["ClusterGroupMember"], () => require("./clusterGroupMember")); + +export { GetClusterArgs, GetClusterResult, GetClusterOutputArgs } from "./getCluster"; +export const getCluster: typeof import("./getCluster").getCluster = null as any; +export const getClusterOutput: typeof import("./getCluster").getClusterOutput = null as any; +utilities.lazyLoad(exports, ["getCluster","getClusterOutput"], () => require("./getCluster")); 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 { GetInstanceArgs, GetInstanceResult, GetInstanceOutputArgs } from "./getInstance"; +export const getInstance: typeof import("./getInstance").getInstance = null as any; +export const getInstanceOutput: typeof import("./getInstance").getInstanceOutput = null as any; +utilities.lazyLoad(exports, ["getInstance","getInstanceOutput"], () => require("./getInstance")); + +export { GetNetworkArgs, GetNetworkResult, GetNetworkOutputArgs } from "./getNetwork"; +export const getNetwork: typeof import("./getNetwork").getNetwork = null as any; +export const getNetworkOutput: typeof import("./getNetwork").getNetworkOutput = null as any; +utilities.lazyLoad(exports, ["getNetwork","getNetworkOutput"], () => require("./getNetwork")); + +export { GetNetworkAclArgs, GetNetworkAclResult, GetNetworkAclOutputArgs } from "./getNetworkAcl"; +export const getNetworkAcl: typeof import("./getNetworkAcl").getNetworkAcl = null as any; +export const getNetworkAclOutput: typeof import("./getNetworkAcl").getNetworkAclOutput = null as any; +utilities.lazyLoad(exports, ["getNetworkAcl","getNetworkAclOutput"], () => require("./getNetworkAcl")); + +export { GetNetworkAddressSetArgs, GetNetworkAddressSetResult, GetNetworkAddressSetOutputArgs } from "./getNetworkAddressSet"; +export const getNetworkAddressSet: typeof import("./getNetworkAddressSet").getNetworkAddressSet = null as any; +export const getNetworkAddressSetOutput: typeof import("./getNetworkAddressSet").getNetworkAddressSetOutput = null as any; +utilities.lazyLoad(exports, ["getNetworkAddressSet","getNetworkAddressSetOutput"], () => require("./getNetworkAddressSet")); + +export { GetNetworkForwardArgs, GetNetworkForwardResult, GetNetworkForwardOutputArgs } from "./getNetworkForward"; +export const getNetworkForward: typeof import("./getNetworkForward").getNetworkForward = null as any; +export const getNetworkForwardOutput: typeof import("./getNetworkForward").getNetworkForwardOutput = null as any; +utilities.lazyLoad(exports, ["getNetworkForward","getNetworkForwardOutput"], () => require("./getNetworkForward")); + +export { GetNetworkIntegrationArgs, GetNetworkIntegrationResult, GetNetworkIntegrationOutputArgs } from "./getNetworkIntegration"; +export const getNetworkIntegration: typeof import("./getNetworkIntegration").getNetworkIntegration = null as any; +export const getNetworkIntegrationOutput: typeof import("./getNetworkIntegration").getNetworkIntegrationOutput = null as any; +utilities.lazyLoad(exports, ["getNetworkIntegration","getNetworkIntegrationOutput"], () => require("./getNetworkIntegration")); + +export { GetNetworkLoadBalancerArgs, GetNetworkLoadBalancerResult, GetNetworkLoadBalancerOutputArgs } from "./getNetworkLoadBalancer"; +export const getNetworkLoadBalancer: typeof import("./getNetworkLoadBalancer").getNetworkLoadBalancer = null as any; +export const getNetworkLoadBalancerOutput: typeof import("./getNetworkLoadBalancer").getNetworkLoadBalancerOutput = null as any; +utilities.lazyLoad(exports, ["getNetworkLoadBalancer","getNetworkLoadBalancerOutput"], () => require("./getNetworkLoadBalancer")); + +export { GetNetworkPeerArgs, GetNetworkPeerResult, GetNetworkPeerOutputArgs } from "./getNetworkPeer"; +export const getNetworkPeer: typeof import("./getNetworkPeer").getNetworkPeer = null as any; +export const getNetworkPeerOutput: typeof import("./getNetworkPeer").getNetworkPeerOutput = null as any; +utilities.lazyLoad(exports, ["getNetworkPeer","getNetworkPeerOutput"], () => require("./getNetworkPeer")); + +export { GetNetworkZoneArgs, GetNetworkZoneResult, GetNetworkZoneOutputArgs } from "./getNetworkZone"; +export const getNetworkZone: typeof import("./getNetworkZone").getNetworkZone = null as any; +export const getNetworkZoneOutput: typeof import("./getNetworkZone").getNetworkZoneOutput = null as any; +utilities.lazyLoad(exports, ["getNetworkZone","getNetworkZoneOutput"], () => require("./getNetworkZone")); + 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; @@ -35,6 +85,21 @@ 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 { GetStorageBucketArgs, GetStorageBucketResult, GetStorageBucketOutputArgs } from "./getStorageBucket"; +export const getStorageBucket: typeof import("./getStorageBucket").getStorageBucket = null as any; +export const getStorageBucketOutput: typeof import("./getStorageBucket").getStorageBucketOutput = null as any; +utilities.lazyLoad(exports, ["getStorageBucket","getStorageBucketOutput"], () => require("./getStorageBucket")); + +export { GetStoragePoolArgs, GetStoragePoolResult, GetStoragePoolOutputArgs } from "./getStoragePool"; +export const getStoragePool: typeof import("./getStoragePool").getStoragePool = null as any; +export const getStoragePoolOutput: typeof import("./getStoragePool").getStoragePoolOutput = null as any; +utilities.lazyLoad(exports, ["getStoragePool","getStoragePoolOutput"], () => require("./getStoragePool")); + +export { GetStorageVolumeArgs, GetStorageVolumeResult, GetStorageVolumeOutputArgs } from "./getStorageVolume"; +export const getStorageVolume: typeof import("./getStorageVolume").getStorageVolume = null as any; +export const getStorageVolumeOutput: typeof import("./getStorageVolume").getStorageVolumeOutput = null as any; +utilities.lazyLoad(exports, ["getStorageVolume","getStorageVolumeOutput"], () => require("./getStorageVolume")); + export { ImageArgs, ImageState } from "./image"; export type Image = import("./image").Image; export const Image: typeof import("./image").Image = null as any; @@ -60,6 +125,11 @@ export type NetworkAcl = import("./networkAcl").NetworkAcl; export const NetworkAcl: typeof import("./networkAcl").NetworkAcl = null as any; utilities.lazyLoad(exports, ["NetworkAcl"], () => require("./networkAcl")); +export { NetworkAddressSetArgs, NetworkAddressSetState } from "./networkAddressSet"; +export type NetworkAddressSet = import("./networkAddressSet").NetworkAddressSet; +export const NetworkAddressSet: typeof import("./networkAddressSet").NetworkAddressSet = null as any; +utilities.lazyLoad(exports, ["NetworkAddressSet"], () => require("./networkAddressSet")); + export { NetworkForwardArgs, NetworkForwardState } from "./networkForward"; export type NetworkForward = import("./networkForward").NetworkForward; export const NetworkForward: typeof import("./networkForward").NetworkForward = null as any; @@ -100,10 +170,13 @@ 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 * from "./provider"; +import { Provider } from "./provider"; + +export { ServerArgs, ServerState } from "./server"; +export type Server = import("./server").Server; +export const Server: typeof import("./server").Server = null as any; +utilities.lazyLoad(exports, ["Server"], () => require("./server")); export { StorageBucketArgs, StorageBucketState } from "./storageBucket"; export type StorageBucket = import("./storageBucket").StorageBucket; @@ -143,8 +216,8 @@ const _module = { 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/clusterGroupMember:ClusterGroupMember": + return new ClusterGroupMember(name, undefined, { urn }) case "incus:index/image:Image": return new Image(name, undefined, { urn }) case "incus:index/instance:Instance": @@ -155,6 +228,8 @@ const _module = { return new Network(name, undefined, { urn }) case "incus:index/networkAcl:NetworkAcl": return new NetworkAcl(name, undefined, { urn }) + case "incus:index/networkAddressSet:NetworkAddressSet": + return new NetworkAddressSet(name, undefined, { urn }) case "incus:index/networkForward:NetworkForward": return new NetworkForward(name, undefined, { urn }) case "incus:index/networkIntegration:NetworkIntegration": @@ -171,6 +246,8 @@ const _module = { return new Profile(name, undefined, { urn }) case "incus:index/project:Project": return new Project(name, undefined, { urn }) + case "incus:index/server:Server": + return new Server(name, undefined, { urn }) case "incus:index/storageBucket:StorageBucket": return new StorageBucket(name, undefined, { urn }) case "incus:index/storageBucketKey:StorageBucketKey": @@ -186,12 +263,13 @@ const _module = { }; 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/clusterGroupMember", _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/networkAddressSet", _module) pulumi.runtime.registerResourceModule("incus", "index/networkForward", _module) pulumi.runtime.registerResourceModule("incus", "index/networkIntegration", _module) pulumi.runtime.registerResourceModule("incus", "index/networkLoadBalancer", _module) @@ -200,6 +278,7 @@ 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/server", _module) pulumi.runtime.registerResourceModule("incus", "index/storageBucket", _module) pulumi.runtime.registerResourceModule("incus", "index/storageBucketKey", _module) pulumi.runtime.registerResourceModule("incus", "index/storagePool", _module) diff --git a/sdk/nodejs/instance.ts b/sdk/nodejs/instance.ts index 6b539d0..fb08e53 100644 --- a/sdk/nodejs/instance.ts +++ b/sdk/nodejs/instance.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -34,95 +34,99 @@ export class Instance extends pulumi.CustomResource { return obj['__pulumiType'] === Instance.__pulumiType; } + /** + * *Optional* - The instance architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. + */ + declare public readonly architecture: pulumi.Output; /** * *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}>; + declare public readonly config: pulumi.Output<{[key: string]: string}>; /** * *Optional* - Description of the instance. */ - public readonly description!: pulumi.Output; + declare public readonly description: pulumi.Output; /** * *Optional* - Device definition. See reference below. */ - public readonly devices!: pulumi.Output; + declare public readonly devices: pulumi.Output; /** * *Optional* - Boolean indicating if this instance is ephemeral. Defaults to `false`. */ - public readonly ephemeral!: pulumi.Output; + declare public readonly ephemeral: pulumi.Output; /** * *Optional* - File to upload to the instance. See reference below. */ - public readonly files!: pulumi.Output; + declare 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; + declare public readonly image: pulumi.Output; /** * The IPv4 Address of the instance. See Instance Network * Access for more details. */ - public /*out*/ readonly ipv4Address!: pulumi.Output; + declare 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; + declare 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; + declare public /*out*/ readonly macAddress: pulumi.Output; /** * **Required** - Name of the instance. */ - public readonly name!: pulumi.Output; + declare 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; + declare public readonly profiles: pulumi.Output; /** * *Optional* - Name of the project where the instance will be spawned. */ - public readonly project!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * *Optional* - Boolean indicating whether the instance should be started (running). Defaults to `true`. */ - public readonly running!: pulumi.Output; + declare 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; + declare public readonly sourceFile: pulumi.Output; /** * *Optional* - The source instance from which the instance will be created. See reference below. */ - public readonly sourceInstance!: pulumi.Output; + declare public readonly sourceInstance: pulumi.Output; /** * The status of the instance. */ - public /*out*/ readonly status!: pulumi.Output; + declare public /*out*/ readonly status: pulumi.Output; /** * *Optional* - Specify a target node in a cluster. */ - public readonly target!: pulumi.Output; + declare public readonly target: pulumi.Output; /** * *Optional* - Instance type. Can be `container`, or `virtual-machine`. Defaults to `container`. */ - public readonly type!: pulumi.Output; + declare 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; + declare public readonly waitFors: pulumi.Output; /** * Create a Instance resource with the given unique name, arguments, and options. @@ -131,50 +135,55 @@ export class Instance extends pulumi.CustomResource { * @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, 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; + resourceInputs["architecture"] = state?.architecture; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["devices"] = state?.devices; + resourceInputs["ephemeral"] = state?.ephemeral; + resourceInputs["files"] = state?.files; + resourceInputs["image"] = state?.image; + resourceInputs["ipv4Address"] = state?.ipv4Address; + resourceInputs["ipv6Address"] = state?.ipv6Address; + resourceInputs["macAddress"] = state?.macAddress; + resourceInputs["name"] = state?.name; + resourceInputs["profiles"] = state?.profiles; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; + resourceInputs["running"] = state?.running; + resourceInputs["sourceFile"] = state?.sourceFile; + resourceInputs["sourceInstance"] = state?.sourceInstance; + resourceInputs["status"] = state?.status; + resourceInputs["target"] = state?.target; + resourceInputs["type"] = state?.type; + resourceInputs["waitFors"] = state?.waitFors; } 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; + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + resourceInputs["architecture"] = args?.architecture; + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["devices"] = args?.devices; + resourceInputs["ephemeral"] = args?.ephemeral; + resourceInputs["files"] = args?.files; + resourceInputs["image"] = args?.image; + resourceInputs["name"] = args?.name; + resourceInputs["profiles"] = args?.profiles; + resourceInputs["project"] = (args?.project) ?? "default"; + resourceInputs["remote"] = args?.remote; + resourceInputs["running"] = args?.running; + resourceInputs["sourceFile"] = args?.sourceFile; + resourceInputs["sourceInstance"] = args?.sourceInstance; + resourceInputs["target"] = args?.target; + resourceInputs["type"] = args?.type; + resourceInputs["waitFors"] = args?.waitFors; resourceInputs["ipv4Address"] = undefined /*out*/; resourceInputs["ipv6Address"] = undefined /*out*/; resourceInputs["macAddress"] = undefined /*out*/; @@ -189,6 +198,10 @@ export class Instance extends pulumi.CustomResource { * Input properties used for looking up and filtering Instance resources. */ export interface InstanceState { + /** + * *Optional* - The instance architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. + */ + architecture?: pulumi.Input; /** * *Optional* - Map of key/value pairs of * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). @@ -284,6 +297,10 @@ export interface InstanceState { * The set of arguments for constructing a Instance resource. */ export interface InstanceArgs { + /** + * *Optional* - The instance architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. + */ + architecture?: pulumi.Input; /** * *Optional* - Map of key/value pairs of * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). @@ -313,7 +330,7 @@ export interface InstanceArgs { /** * **Required** - Name of the instance. */ - name?: pulumi.Input; + 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`). diff --git a/sdk/nodejs/instanceSnapshot.ts b/sdk/nodejs/instanceSnapshot.ts index eaa7b1b..cfa3ce1 100644 --- a/sdk/nodejs/instanceSnapshot.ts +++ b/sdk/nodejs/instanceSnapshot.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -58,30 +58,30 @@ export class InstanceSnapshot extends pulumi.CustomResource { * The time Incus reported the snapshot was successfully created, * in UTC. */ - public /*out*/ readonly createdAt!: pulumi.Output; + declare public /*out*/ readonly createdAt: pulumi.Output; /** * **Required** - The name of the instance to snapshot. */ - public readonly instance!: pulumi.Output; + declare public readonly instance: pulumi.Output; /** * **Required** - Name of the snapshot. */ - public readonly name!: pulumi.Output; + declare public readonly name: pulumi.Output; /** * *Optional* - Name of the project where the snapshot will be stored. */ - public readonly project!: pulumi.Output; + declare 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; + declare 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; + declare public readonly stateful: pulumi.Output; /** * Create a InstanceSnapshot resource with the given unique name, arguments, and options. @@ -96,22 +96,25 @@ export class InstanceSnapshot extends pulumi.CustomResource { 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; + resourceInputs["createdAt"] = state?.createdAt; + resourceInputs["instance"] = state?.instance; + resourceInputs["name"] = state?.name; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; + resourceInputs["stateful"] = state?.stateful; } else { const args = argsOrState as InstanceSnapshotArgs | undefined; - if ((!args || args.instance === undefined) && !opts.urn) { + if (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; + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + resourceInputs["instance"] = args?.instance; + resourceInputs["name"] = args?.name; + resourceInputs["project"] = (args?.project) ?? "default"; + resourceInputs["remote"] = args?.remote; + resourceInputs["stateful"] = args?.stateful; resourceInputs["createdAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); @@ -164,7 +167,7 @@ export interface InstanceSnapshotArgs { /** * **Required** - Name of the snapshot. */ - name?: pulumi.Input; + name: pulumi.Input; /** * *Optional* - Name of the project where the snapshot will be stored. */ diff --git a/sdk/nodejs/network.ts b/sdk/nodejs/network.ts index 607610e..6771e45 100644 --- a/sdk/nodejs/network.ts +++ b/sdk/nodejs/network.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -36,39 +36,39 @@ export class Network extends pulumi.CustomResource { * *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}>; + declare public readonly config: pulumi.Output<{[key: string]: string}>; /** - * *Optional* - Description of the network. + * *Optional* - Description of the network. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. */ - public readonly description!: pulumi.Output; + declare public readonly description: pulumi.Output; /** * Whether or not the network is managed. */ - public /*out*/ readonly managed!: pulumi.Output; + declare 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; + declare public readonly name: pulumi.Output; /** * *Optional* - Name of the project where the network will be created. */ - public readonly project!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * *Optional* - Specify a target node in a cluster. */ - public readonly target!: pulumi.Output; + declare 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; + declare public readonly type: pulumi.Output; /** * Create a Network resource with the given unique name, arguments, and options. @@ -77,29 +77,32 @@ export class Network extends pulumi.CustomResource { * @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, 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; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["managed"] = state?.managed; + resourceInputs["name"] = state?.name; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; + resourceInputs["target"] = state?.target; + resourceInputs["type"] = state?.type; } 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; + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["name"] = args?.name; + resourceInputs["project"] = (args?.project) ?? "default"; + resourceInputs["remote"] = args?.remote; + resourceInputs["target"] = args?.target; + resourceInputs["type"] = args?.type; resourceInputs["managed"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); @@ -117,7 +120,7 @@ export interface NetworkState { */ config?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * *Optional* - Description of the network. + * *Optional* - Description of the network. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. */ description?: pulumi.Input; /** @@ -160,14 +163,14 @@ export interface NetworkArgs { */ config?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * *Optional* - Description of the network. + * *Optional* - Description of the network. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. */ description?: pulumi.Input; /** * **Required** - Name of the network. This is usually the device the * network will appear as to instances. */ - name?: pulumi.Input; + name: pulumi.Input; /** * *Optional* - Name of the project where the network will be created. */ diff --git a/sdk/nodejs/networkAcl.ts b/sdk/nodejs/networkAcl.ts index 1e3787c..3ba89cc 100644 --- a/sdk/nodejs/networkAcl.ts +++ b/sdk/nodejs/networkAcl.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -38,34 +38,34 @@ export class NetworkAcl extends pulumi.CustomResource { * *Optional* - Map of key/value pairs of * network ACL config settings. */ - public readonly config!: pulumi.Output<{[key: string]: string}>; + declare public readonly config: pulumi.Output<{[key: string]: string}>; /** * *Optional* - Description of the network ACL rule. */ - public readonly description!: pulumi.Output; + declare public readonly description: pulumi.Output; /** * *Optional* - List of network ACL rules for egress traffic. See reference below. */ - public readonly egresses!: pulumi.Output; + declare 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; + declare public readonly ingresses: pulumi.Output; /** * **Required** - Name of the network ACL. */ - public readonly name!: pulumi.Output; + declare public readonly name: pulumi.Output; /** * *Optional* - Name of the project where the network ACL will be created. */ - public readonly project!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * Create a NetworkAcl resource with the given unique name, arguments, and options. @@ -74,28 +74,31 @@ export class NetworkAcl extends pulumi.CustomResource { * @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, 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; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["egresses"] = state?.egresses; + resourceInputs["ingresses"] = state?.ingresses; + resourceInputs["name"] = state?.name; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; } 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; + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["egresses"] = args?.egresses; + resourceInputs["ingresses"] = args?.ingresses; + resourceInputs["name"] = args?.name; + resourceInputs["project"] = (args?.project) ?? "default"; + resourceInputs["remote"] = args?.remote; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NetworkAcl.__pulumiType, name, resourceInputs, opts); @@ -166,7 +169,7 @@ export interface NetworkAclArgs { /** * **Required** - Name of the network ACL. */ - name?: pulumi.Input; + name: pulumi.Input; /** * *Optional* - Name of the project where the network ACL will be created. */ diff --git a/sdk/nodejs/networkAddressSet.ts b/sdk/nodejs/networkAddressSet.ts new file mode 100644 index 0000000..382b55c --- /dev/null +++ b/sdk/nodejs/networkAddressSet.ts @@ -0,0 +1,208 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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.NetworkAddressSet + * + * Network address sets are a list of either IPv4, IPv6 addresses with or without CIDR suffix. They can be used in source or destination fields of [ACLs](https://linuxcontainers.org/incus/docs/main/howto/network_acls/#network-acls-rules-properties). + * + * ## Basic Example + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = new incus.NetworkAddressSet("this", { + * name: "Network Address Set", + * description: "Network Address Set description", + * addresses: [ + * "10.0.0.2", + * "10.0.0.3", + * ], + * }); + * ``` + * + * ## ACL Example + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as incus from "@kiterun/incus"; + * + * const _this = new incus.NetworkAddressSet("this", { + * name: "network_address_set", + * description: "Network Address Set description", + * addresses: [ + * "10.0.0.2", + * "10.0.0.3", + * ], + * }); + * const thisNetworkAcl = new incus.NetworkAcl("this", { + * name: "network_acl", + * ingresses: [{ + * action: "allow", + * source: "${incus_network_address_set.this.name}", + * destination_port: "22", + * protocol: "tcp", + * description: pulumi.interpolate`Incoming SSH connections from ${_this.name}`, + * state: "logged", + * }], + * }); + * ``` + */ +export class NetworkAddressSet extends pulumi.CustomResource { + /** + * Get an existing NetworkAddressSet 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?: NetworkAddressSetState, opts?: pulumi.CustomResourceOptions): NetworkAddressSet { + return new NetworkAddressSet(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/networkAddressSet:NetworkAddressSet'; + + /** + * Returns true if the given object is an instance of NetworkAddressSet. 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 NetworkAddressSet { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === NetworkAddressSet.__pulumiType; + } + + /** + * **Required** - IP addresses of the address set. + */ + declare public readonly addresses: pulumi.Output; + /** + * *Optional* - Map of key/value pairs of [network address set config settings](https://linuxcontainers.org/incus/docs/main/howto/network_address_sets/#address-set-configuration-options) + */ + declare public readonly config: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - Description of the network address set. + */ + declare public readonly description: pulumi.Output; + /** + * **Required** - Name of the network address set. + */ + declare public readonly name: pulumi.Output; + /** + * *Optional* - Name of the project where the network address set will be created. + */ + declare 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. + */ + declare public readonly remote: pulumi.Output; + + /** + * Create a NetworkAddressSet 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: NetworkAddressSetArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: NetworkAddressSetArgs | NetworkAddressSetState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as NetworkAddressSetState | undefined; + resourceInputs["addresses"] = state?.addresses; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["name"] = state?.name; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; + } else { + const args = argsOrState as NetworkAddressSetArgs | undefined; + if (args?.addresses === undefined && !opts.urn) { + throw new Error("Missing required property 'addresses'"); + } + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + resourceInputs["addresses"] = args?.addresses; + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["name"] = args?.name; + resourceInputs["project"] = args?.project; + resourceInputs["remote"] = args?.remote; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(NetworkAddressSet.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering NetworkAddressSet resources. + */ +export interface NetworkAddressSetState { + /** + * **Required** - IP addresses of the address set. + */ + addresses?: pulumi.Input[]>; + /** + * *Optional* - Map of key/value pairs of [network address set config settings](https://linuxcontainers.org/incus/docs/main/howto/network_address_sets/#address-set-configuration-options) + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network address set. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the network address set. + */ + name?: pulumi.Input; + /** + * *Optional* - Name of the project where the network address set 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 NetworkAddressSet resource. + */ +export interface NetworkAddressSetArgs { + /** + * **Required** - IP addresses of the address set. + */ + addresses: pulumi.Input[]>; + /** + * *Optional* - Map of key/value pairs of [network address set config settings](https://linuxcontainers.org/incus/docs/main/howto/network_address_sets/#address-set-configuration-options) + */ + config?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * *Optional* - Description of the network address set. + */ + description?: pulumi.Input; + /** + * **Required** - Name of the network address set. + */ + name: pulumi.Input; + /** + * *Optional* - Name of the project where the network address set 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 index 1503a4d..7afa971 100644 --- a/sdk/nodejs/networkForward.ts +++ b/sdk/nodejs/networkForward.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -38,34 +38,34 @@ export class NetworkForward extends pulumi.CustomResource { * *Optional* - Map of key/value pairs of * network forward config settings. */ - public readonly config!: pulumi.Output<{[key: string]: string}>; + declare public readonly config: pulumi.Output<{[key: string]: string}>; /** * *Optional* - Description of port(s) */ - public readonly description!: pulumi.Output; + declare public readonly description: pulumi.Output; /** * **Required** - IP address to listen on. */ - public readonly listenAddress!: pulumi.Output; + declare public readonly listenAddress: pulumi.Output; /** * **Required** - Name of the network. */ - public readonly network!: pulumi.Output; + declare public readonly network: pulumi.Output; /** * *Optional* - List of port specifications. See reference below. * * The network forward port supports: */ - public readonly ports!: pulumi.Output; + declare public readonly ports: pulumi.Output; /** * *Optional* - Name of the project where the network forward will be created. */ - public readonly project!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * Create a NetworkForward resource with the given unique name, arguments, and options. @@ -80,28 +80,28 @@ export class NetworkForward extends pulumi.CustomResource { 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; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["listenAddress"] = state?.listenAddress; + resourceInputs["network"] = state?.network; + resourceInputs["ports"] = state?.ports; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; } else { const args = argsOrState as NetworkForwardArgs | undefined; - if ((!args || args.listenAddress === undefined) && !opts.urn) { + if (args?.listenAddress === undefined && !opts.urn) { throw new Error("Missing required property 'listenAddress'"); } - if ((!args || args.network === undefined) && !opts.urn) { + if (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; + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["listenAddress"] = args?.listenAddress; + resourceInputs["network"] = args?.network; + resourceInputs["ports"] = args?.ports; + resourceInputs["project"] = args?.project; + resourceInputs["remote"] = args?.remote; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NetworkForward.__pulumiType, name, resourceInputs, opts); diff --git a/sdk/nodejs/networkIntegration.ts b/sdk/nodejs/networkIntegration.ts index 6efadbf..3839305 100644 --- a/sdk/nodejs/networkIntegration.ts +++ b/sdk/nodejs/networkIntegration.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -86,28 +86,28 @@ export class NetworkIntegration extends pulumi.CustomResource { /** * *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}>; + declare public readonly config: pulumi.Output<{[key: string]: string}>; /** * *Optional* - Description of the network integration. */ - public readonly description!: pulumi.Output; + declare public readonly description: pulumi.Output; /** * **Required** - Name of the network integration. */ - public readonly name!: pulumi.Output; + declare public readonly name: pulumi.Output; /** * *Optional* - Name of the project where the network will be created. */ - public readonly project!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * **Required** - The type of the network integration. Currently, only supports `ovn` type. */ - public readonly type!: pulumi.Output; + declare public readonly type: pulumi.Output; /** * Create a NetworkIntegration resource with the given unique name, arguments, and options. @@ -122,23 +122,26 @@ export class NetworkIntegration extends pulumi.CustomResource { 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; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["name"] = state?.name; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; + resourceInputs["type"] = state?.type; } else { const args = argsOrState as NetworkIntegrationArgs | undefined; - if ((!args || args.type === undefined) && !opts.urn) { + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + if (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; + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["name"] = args?.name; + resourceInputs["project"] = (args?.project) ?? "default"; + resourceInputs["remote"] = args?.remote; + resourceInputs["type"] = args?.type; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NetworkIntegration.__pulumiType, name, resourceInputs, opts); @@ -191,7 +194,7 @@ export interface NetworkIntegrationArgs { /** * **Required** - Name of the network integration. */ - name?: pulumi.Input; + name: pulumi.Input; /** * *Optional* - Name of the project where the network will be created. */ diff --git a/sdk/nodejs/networkLoadBalancer.ts b/sdk/nodejs/networkLoadBalancer.ts index 9df51b4..a593c43 100644 --- a/sdk/nodejs/networkLoadBalancer.ts +++ b/sdk/nodejs/networkLoadBalancer.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -37,17 +37,17 @@ export class NetworkLoadBalancer extends pulumi.CustomResource { /** * 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; + declare public readonly backends: pulumi.Output; + declare public readonly config: pulumi.Output<{[key: string]: string}>; + declare public readonly description: pulumi.Output; + declare public readonly listenAddress: pulumi.Output; + declare public readonly network: pulumi.Output; /** * Network load balancer port */ - public readonly ports!: pulumi.Output; - public readonly project!: pulumi.Output; - public readonly remote!: pulumi.Output; + declare public readonly ports: pulumi.Output; + declare public readonly project: pulumi.Output; + declare public readonly remote: pulumi.Output; /** * Create a NetworkLoadBalancer resource with the given unique name, arguments, and options. @@ -62,30 +62,30 @@ export class NetworkLoadBalancer extends pulumi.CustomResource { 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; + resourceInputs["backends"] = state?.backends; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["listenAddress"] = state?.listenAddress; + resourceInputs["network"] = state?.network; + resourceInputs["ports"] = state?.ports; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; } else { const args = argsOrState as NetworkLoadBalancerArgs | undefined; - if ((!args || args.listenAddress === undefined) && !opts.urn) { + if (args?.listenAddress === undefined && !opts.urn) { throw new Error("Missing required property 'listenAddress'"); } - if ((!args || args.network === undefined) && !opts.urn) { + if (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; + resourceInputs["backends"] = args?.backends; + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["listenAddress"] = args?.listenAddress; + resourceInputs["network"] = args?.network; + resourceInputs["ports"] = args?.ports; + resourceInputs["project"] = args?.project; + resourceInputs["remote"] = args?.remote; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NetworkLoadBalancer.__pulumiType, name, resourceInputs, opts); diff --git a/sdk/nodejs/networkPeer.ts b/sdk/nodejs/networkPeer.ts index 8287493..5f9b050 100644 --- a/sdk/nodejs/networkPeer.ts +++ b/sdk/nodejs/networkPeer.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -81,42 +81,42 @@ export class NetworkPeer extends pulumi.CustomResource { /** * *Optional* - Configuration options as key/value pairs (only user.* custom keys supported) */ - public readonly config!: pulumi.Output<{[key: string]: string}>; + declare public readonly config: pulumi.Output<{[key: string]: string}>; /** * *Optional* - Description of the network peering */ - public readonly description!: pulumi.Output; + declare public readonly description: pulumi.Output; /** * **required** - Name of the network peering on the local network */ - public readonly name!: pulumi.Output; + declare public readonly name: pulumi.Output; /** * **Required** - Name of the local network. */ - public readonly network!: pulumi.Output; + declare public readonly network: pulumi.Output; /** * *Optional* - Name of the project where the network is located. */ - public readonly project!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; + declare public /*out*/ readonly status: pulumi.Output; + declare 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; + declare 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; + declare public readonly targetProject: pulumi.Output; /** * *Optional* - Type of network peering */ - public readonly type!: pulumi.Output; + declare public readonly type: pulumi.Output; /** * Create a NetworkPeer resource with the given unique name, arguments, and options. @@ -125,35 +125,38 @@ export class NetworkPeer extends pulumi.CustomResource { * @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, 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; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["name"] = state?.name; + resourceInputs["network"] = state?.network; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; + resourceInputs["status"] = state?.status; + resourceInputs["targetIntegration"] = state?.targetIntegration; + resourceInputs["targetNetwork"] = state?.targetNetwork; + resourceInputs["targetProject"] = state?.targetProject; + resourceInputs["type"] = state?.type; } 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; + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["name"] = args?.name; + resourceInputs["network"] = args?.network; + resourceInputs["project"] = (args?.project) ?? "default"; + resourceInputs["remote"] = args?.remote; + resourceInputs["targetIntegration"] = args?.targetIntegration; + resourceInputs["targetNetwork"] = args?.targetNetwork; + resourceInputs["targetProject"] = args?.targetProject; + resourceInputs["type"] = args?.type; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); @@ -221,7 +224,7 @@ export interface NetworkPeerArgs { /** * **required** - Name of the network peering on the local network */ - name?: pulumi.Input; + name: pulumi.Input; /** * **Required** - Name of the local network. */ diff --git a/sdk/nodejs/networkZone.ts b/sdk/nodejs/networkZone.ts index d3aed9d..9894356 100644 --- a/sdk/nodejs/networkZone.ts +++ b/sdk/nodejs/networkZone.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -36,24 +36,24 @@ export class NetworkZone extends pulumi.CustomResource { * *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}>; + declare public readonly config: pulumi.Output<{[key: string]: string}>; /** * *Optional* - Description of the network zone. */ - public readonly description!: pulumi.Output; + declare public readonly description: pulumi.Output; /** * **Required** - Name of the network zone. */ - public readonly name!: pulumi.Output; + declare public readonly name: pulumi.Output; /** * *Optional* - Name of the project where the network zone will be created. */ - public readonly project!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * Create a NetworkZone resource with the given unique name, arguments, and options. @@ -62,24 +62,27 @@ export class NetworkZone extends pulumi.CustomResource { * @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, 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; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["name"] = state?.name; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; } 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; + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["name"] = args?.name; + resourceInputs["project"] = (args?.project) ?? "default"; + resourceInputs["remote"] = args?.remote; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NetworkZone.__pulumiType, name, resourceInputs, opts); @@ -130,7 +133,7 @@ export interface NetworkZoneArgs { /** * **Required** - Name of the network zone. */ - name?: pulumi.Input; + name: pulumi.Input; /** * *Optional* - Name of the project where the network zone will be created. */ diff --git a/sdk/nodejs/networkZoneRecord.ts b/sdk/nodejs/networkZoneRecord.ts index cb52757..30eb5c4 100644 --- a/sdk/nodejs/networkZoneRecord.ts +++ b/sdk/nodejs/networkZoneRecord.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -38,32 +38,32 @@ export class NetworkZoneRecord extends pulumi.CustomResource { * *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}>; + declare public readonly config: pulumi.Output<{[key: string]: string}>; /** * *Optional* - Description of the network zone. */ - public readonly description!: pulumi.Output; + declare public readonly description: pulumi.Output; /** * *Optional* - Entry in network zone record - see below. */ - public readonly entries!: pulumi.Output; + declare public readonly entries: pulumi.Output; /** * **Required** - Name of the network zone record. */ - public readonly name!: pulumi.Output; + declare public readonly name: pulumi.Output; /** * *Optional* - Name of the project where the network zone record will be created. */ - public readonly project!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * **Required** - Name of the zone to add the entries of this record. */ - public readonly zone!: pulumi.Output; + declare public readonly zone: pulumi.Output; /** * Create a NetworkZoneRecord resource with the given unique name, arguments, and options. @@ -78,25 +78,28 @@ export class NetworkZoneRecord extends pulumi.CustomResource { 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; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["entries"] = state?.entries; + resourceInputs["name"] = state?.name; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; + resourceInputs["zone"] = state?.zone; } else { const args = argsOrState as NetworkZoneRecordArgs | undefined; - if ((!args || args.zone === undefined) && !opts.urn) { + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + if (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; + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["entries"] = args?.entries; + resourceInputs["name"] = args?.name; + resourceInputs["project"] = (args?.project) ?? "default"; + resourceInputs["remote"] = args?.remote; + resourceInputs["zone"] = args?.zone; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NetworkZoneRecord.__pulumiType, name, resourceInputs, opts); @@ -159,7 +162,7 @@ export interface NetworkZoneRecordArgs { /** * **Required** - Name of the network zone record. */ - name?: pulumi.Input; + name: pulumi.Input; /** * *Optional* - Name of the project where the network zone record will be created. */ diff --git a/sdk/nodejs/profile.ts b/sdk/nodejs/profile.ts index e06ee40..6c6ac1e 100644 --- a/sdk/nodejs/profile.ts +++ b/sdk/nodejs/profile.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -38,28 +38,28 @@ export class Profile extends pulumi.CustomResource { * *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}>; + declare public readonly config: pulumi.Output<{[key: string]: string}>; /** * *Optional* - Description of the profile. */ - public readonly description!: pulumi.Output; + declare public readonly description: pulumi.Output; /** * *Optional* - Device definition. See reference below. */ - public readonly devices!: pulumi.Output; + declare public readonly devices: pulumi.Output; /** * **Required** - Name of the profile. */ - public readonly name!: pulumi.Output; + declare public readonly name: pulumi.Output; /** * *Optional* - Name of the project where the profile will be stored. */ - public readonly project!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * Create a Profile resource with the given unique name, arguments, and options. @@ -68,26 +68,29 @@ export class Profile extends pulumi.CustomResource { * @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, 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; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["devices"] = state?.devices; + resourceInputs["name"] = state?.name; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; } 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; + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["devices"] = args?.devices; + resourceInputs["name"] = args?.name; + resourceInputs["project"] = (args?.project) ?? "default"; + resourceInputs["remote"] = args?.remote; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Profile.__pulumiType, name, resourceInputs, opts); @@ -146,7 +149,7 @@ export interface ProfileArgs { /** * **Required** - Name of the profile. */ - name?: pulumi.Input; + name: pulumi.Input; /** * *Optional* - Name of the project where the profile will be stored. */ diff --git a/sdk/nodejs/project.ts b/sdk/nodejs/project.ts index 1174bf7..4334fb3 100644 --- a/sdk/nodejs/project.ts +++ b/sdk/nodejs/project.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -35,20 +35,24 @@ export class Project extends pulumi.CustomResource { /** * *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}>; + declare public readonly config: pulumi.Output<{[key: string]: string}>; /** * *Optional* - Description of the project. */ - public readonly description!: pulumi.Output; + declare public readonly description: pulumi.Output; + /** + * *Optional* - Whether to delete everything the project contains on destroy so that it can be destroyed without any error. + */ + declare public readonly forceDestroy: pulumi.Output; /** * **Required** - Name of the project. */ - public readonly name!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * Create a Project resource with the given unique name, arguments, and options. @@ -57,22 +61,27 @@ export class Project extends pulumi.CustomResource { * @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, 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; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["forceDestroy"] = state?.forceDestroy; + resourceInputs["name"] = state?.name; + resourceInputs["remote"] = state?.remote; } 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; + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["forceDestroy"] = args?.forceDestroy; + resourceInputs["name"] = args?.name; + resourceInputs["remote"] = args?.remote; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Project.__pulumiType, name, resourceInputs, opts); @@ -91,6 +100,10 @@ export interface ProjectState { * *Optional* - Description of the project. */ description?: pulumi.Input; + /** + * *Optional* - Whether to delete everything the project contains on destroy so that it can be destroyed without any error. + */ + forceDestroy?: pulumi.Input; /** * **Required** - Name of the project. */ @@ -114,10 +127,14 @@ export interface ProjectArgs { * *Optional* - Description of the project. */ description?: pulumi.Input; + /** + * *Optional* - Whether to delete everything the project contains on destroy so that it can be destroyed without any error. + */ + forceDestroy?: pulumi.Input; /** * **Required** - Name of the project. */ - name?: pulumi.Input; + name: pulumi.Input; /** * *Optional* - The remote in which the resource will be created. If * not provided, the provider's default remote will be used. diff --git a/sdk/nodejs/provider.ts b/sdk/nodejs/provider.ts index e0faf38..139a00b 100644 --- a/sdk/nodejs/provider.ts +++ b/sdk/nodejs/provider.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -30,12 +30,15 @@ export class Provider extends pulumi.ProviderResource { /** * The directory to look for existing Incus configuration. (default = $HOME/.config/incus) */ - public readonly configDir!: pulumi.Output; + declare public readonly configDir: pulumi.Output; /** - * The project where project-scoped resources will be created. Can be overridden in individual resources. (default = - * default) + * The default remote to use when no other remote is defined in a resource. */ - public readonly project!: pulumi.Output; + declare public readonly defaultRemote: pulumi.Output; + /** + * The project where project-scoped resources will be created. Can be overridden in individual resources. (default = default) + */ + declare public readonly project: pulumi.Output; /** * Create a Provider resource with the given unique name, arguments, and options. @@ -48,15 +51,25 @@ export class Provider extends pulumi.ProviderResource { 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); + resourceInputs["acceptRemoteCertificate"] = pulumi.output(args?.acceptRemoteCertificate).apply(JSON.stringify); + resourceInputs["configDir"] = args?.configDir; + resourceInputs["defaultRemote"] = args?.defaultRemote; + resourceInputs["generateClientCertificates"] = pulumi.output(args?.generateClientCertificates).apply(JSON.stringify); + resourceInputs["project"] = args?.project; + resourceInputs["remotes"] = pulumi.output(args?.remotes).apply(JSON.stringify); } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Provider.__pulumiType, name, resourceInputs, opts); } + + /** + * This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider. + */ + terraformConfig(): pulumi.Output { + return pulumi.runtime.call("pulumi:providers:incus/terraformConfig", { + "__self__": this, + }, this); + } } /** @@ -71,13 +84,16 @@ export interface ProviderArgs { * The directory to look for existing Incus configuration. (default = $HOME/.config/incus) */ configDir?: pulumi.Input; + /** + * The default remote to use when no other remote is defined in a resource. + */ + defaultRemote?: 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) + * The project where project-scoped resources will be created. Can be overridden in individual resources. (default = default) */ project?: pulumi.Input; /** @@ -85,3 +101,13 @@ export interface ProviderArgs { */ remotes?: pulumi.Input[]>; } + +export namespace Provider { + /** + * The results of the Provider.terraformConfig method. + */ + export interface TerraformConfigResult { + readonly result: {[key: string]: any}; + } + +} diff --git a/sdk/nodejs/server.ts b/sdk/nodejs/server.ts new file mode 100644 index 0000000..63410fd --- /dev/null +++ b/sdk/nodejs/server.ts @@ -0,0 +1,121 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** 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 Server extends pulumi.CustomResource { + /** + * Get an existing Server 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?: ServerState, opts?: pulumi.CustomResourceOptions): Server { + return new Server(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'incus:index/server:Server'; + + /** + * Returns true if the given object is an instance of Server. 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 Server { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === Server.__pulumiType; + } + + /** + * *Optional* - Map of key/value pairs of + * [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/). + */ + declare public readonly config: pulumi.Output<{[key: string]: string}>; + /** + * *Optional* - The remote in which the resource will be created. If + * not provided, the provider's default remote will be used. + */ + declare public readonly remote: pulumi.Output; + /** + * *Optional* - Specify a target node in a cluster where the config + * options should be applied. This is in particular important for config options + * with `local` scope. + */ + declare public readonly target: pulumi.Output; + + /** + * Create a Server 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?: ServerArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: ServerArgs | ServerState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as ServerState | undefined; + resourceInputs["config"] = state?.config; + resourceInputs["remote"] = state?.remote; + resourceInputs["target"] = state?.target; + } else { + const args = argsOrState as ServerArgs | undefined; + resourceInputs["config"] = args?.config; + resourceInputs["remote"] = args?.remote; + resourceInputs["target"] = args?.target; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(Server.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering Server resources. + */ +export interface ServerState { + /** + * *Optional* - Map of key/value pairs of + * [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/). + */ + config?: pulumi.Input<{[key: string]: 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 where the config + * options should be applied. This is in particular important for config options + * with `local` scope. + */ + target?: pulumi.Input; +} + +/** + * The set of arguments for constructing a Server resource. + */ +export interface ServerArgs { + /** + * *Optional* - Map of key/value pairs of + * [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/). + */ + config?: pulumi.Input<{[key: string]: 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 where the config + * options should be applied. This is in particular important for config options + * with `local` scope. + */ + target?: pulumi.Input; +} diff --git a/sdk/nodejs/storageBucket.ts b/sdk/nodejs/storageBucket.ts index 8d86e10..9ccdb34 100644 --- a/sdk/nodejs/storageBucket.ts +++ b/sdk/nodejs/storageBucket.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -37,40 +37,40 @@ export class StorageBucket extends pulumi.CustomResource { * [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}>; + declare public readonly config: pulumi.Output<{[key: string]: string}>; /** * *Optional* - Description of the storage bucket. */ - public readonly description!: pulumi.Output; + declare 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; + declare public /*out*/ readonly location: pulumi.Output; /** * **Required** - Name of the storage bucket. */ - public readonly name!: pulumi.Output; + declare public readonly name: pulumi.Output; /** * **Required** - Name of storage pool to host the storage bucket. */ - public readonly pool!: pulumi.Output; + declare public readonly pool: pulumi.Output; /** * *Optional* - Name of the project where the storage bucket will be stored. */ - public readonly project!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * *Optional* - Path to a backup file from which the bucket will be created. */ - public readonly sourceFile!: pulumi.Output; + declare public readonly sourceFile: pulumi.Output; /** * *Optional* - Specify a target node in a cluster. */ - public readonly target!: pulumi.Output; + declare public readonly target: pulumi.Output; /** * Create a StorageBucket resource with the given unique name, arguments, and options. @@ -85,28 +85,31 @@ export class StorageBucket extends pulumi.CustomResource { 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; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["location"] = state?.location; + resourceInputs["name"] = state?.name; + resourceInputs["pool"] = state?.pool; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; + resourceInputs["sourceFile"] = state?.sourceFile; + resourceInputs["target"] = state?.target; } else { const args = argsOrState as StorageBucketArgs | undefined; - if ((!args || args.pool === undefined) && !opts.urn) { + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + if (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["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["name"] = args?.name; + resourceInputs["pool"] = args?.pool; + resourceInputs["project"] = (args?.project) ?? "default"; + resourceInputs["remote"] = args?.remote; + resourceInputs["sourceFile"] = args?.sourceFile; + resourceInputs["target"] = args?.target; resourceInputs["location"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); @@ -176,7 +179,7 @@ export interface StorageBucketArgs { /** * **Required** - Name of the storage bucket. */ - name?: pulumi.Input; + name: pulumi.Input; /** * **Required** - Name of storage pool to host the storage bucket. */ diff --git a/sdk/nodejs/storageBucketKey.ts b/sdk/nodejs/storageBucketKey.ts index 35be4fd..77387d4 100644 --- a/sdk/nodejs/storageBucketKey.ts +++ b/sdk/nodejs/storageBucketKey.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -35,41 +35,41 @@ export class StorageBucketKey extends pulumi.CustomResource { /** * Access key of the storage bucket key. */ - public /*out*/ readonly accessKey!: pulumi.Output; + declare public /*out*/ readonly accessKey: pulumi.Output; /** * *Optional* - Description of the storage bucket key. */ - public readonly description!: pulumi.Output; + declare public readonly description: pulumi.Output; /** * **Required** - Name of the storage bucket key. */ - public readonly name!: pulumi.Output; + declare public readonly name: pulumi.Output; /** * **Required** - Name of storage pool to host the storage bucket key. */ - public readonly pool!: pulumi.Output; + declare public readonly pool: pulumi.Output; /** * *Optional* - Name of the project where the storage bucket key will be stored. */ - public readonly project!: pulumi.Output; + declare 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; + declare 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; + declare public readonly role: pulumi.Output; /** * Secret key of the storage bucket key. */ - public /*out*/ readonly secretKey!: pulumi.Output; + declare public /*out*/ readonly secretKey: pulumi.Output; /** * **Required** - Name of the storage bucket. */ - public readonly storageBucket!: pulumi.Output; + declare public readonly storageBucket: pulumi.Output; /** * Create a StorageBucketKey resource with the given unique name, arguments, and options. @@ -84,30 +84,33 @@ export class StorageBucketKey extends pulumi.CustomResource { 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; + resourceInputs["accessKey"] = state?.accessKey; + resourceInputs["description"] = state?.description; + resourceInputs["name"] = state?.name; + resourceInputs["pool"] = state?.pool; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; + resourceInputs["role"] = state?.role; + resourceInputs["secretKey"] = state?.secretKey; + resourceInputs["storageBucket"] = state?.storageBucket; } else { const args = argsOrState as StorageBucketKeyArgs | undefined; - if ((!args || args.pool === undefined) && !opts.urn) { + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + if (args?.pool === undefined && !opts.urn) { throw new Error("Missing required property 'pool'"); } - if ((!args || args.storageBucket === undefined) && !opts.urn) { + if (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["description"] = args?.description; + resourceInputs["name"] = args?.name; + resourceInputs["pool"] = args?.pool; + resourceInputs["project"] = (args?.project) ?? "default"; + resourceInputs["remote"] = args?.remote; + resourceInputs["role"] = args?.role; + resourceInputs["storageBucket"] = args?.storageBucket; resourceInputs["accessKey"] = undefined /*out*/; resourceInputs["secretKey"] = undefined /*out*/; } @@ -173,7 +176,7 @@ export interface StorageBucketKeyArgs { /** * **Required** - Name of the storage bucket key. */ - name?: pulumi.Input; + name: pulumi.Input; /** * **Required** - Name of storage pool to host the storage bucket key. */ diff --git a/sdk/nodejs/storagePool.ts b/sdk/nodejs/storagePool.ts index e4a2169..0b495e9 100644 --- a/sdk/nodejs/storagePool.ts +++ b/sdk/nodejs/storagePool.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -37,32 +37,32 @@ export class StoragePool extends pulumi.CustomResource { * [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}>; + declare public readonly config: pulumi.Output<{[key: string]: string}>; /** - * *Optional* - Description of the storage pool. + * *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. */ - public readonly description!: pulumi.Output; + declare public readonly description: pulumi.Output; /** - * **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `btrfs`, `ceph`, `cephfs`, or `cephobject`. + * **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. */ - public readonly driver!: pulumi.Output; + declare public readonly driver: pulumi.Output; /** * **Required** - Name of the storage pool. */ - public readonly name!: pulumi.Output; + declare public readonly name: pulumi.Output; /** * *Optional* - Name of the project where the storage pool will be stored. */ - public readonly project!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * *Optional* - Specify a target node in a cluster. */ - public readonly target!: pulumi.Output; + declare public readonly target: pulumi.Output; /** * Create a StoragePool resource with the given unique name, arguments, and options. @@ -77,25 +77,28 @@ export class StoragePool extends pulumi.CustomResource { 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; + resourceInputs["config"] = state?.config; + resourceInputs["description"] = state?.description; + resourceInputs["driver"] = state?.driver; + resourceInputs["name"] = state?.name; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; + resourceInputs["target"] = state?.target; } else { const args = argsOrState as StoragePoolArgs | undefined; - if ((!args || args.driver === undefined) && !opts.urn) { + if (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; + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + resourceInputs["config"] = args?.config; + resourceInputs["description"] = args?.description; + resourceInputs["driver"] = args?.driver; + resourceInputs["name"] = args?.name; + resourceInputs["project"] = (args?.project) ?? "default"; + resourceInputs["remote"] = args?.remote; + resourceInputs["target"] = args?.target; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(StoragePool.__pulumiType, name, resourceInputs, opts); @@ -113,11 +116,11 @@ export interface StoragePoolState { */ config?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * *Optional* - Description of the storage pool. + * *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. */ description?: pulumi.Input; /** - * **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `btrfs`, `ceph`, `cephfs`, or `cephobject`. + * **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. */ driver?: pulumi.Input; /** @@ -150,17 +153,17 @@ export interface StoragePoolArgs { */ config?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * *Optional* - Description of the storage pool. + * *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. */ description?: pulumi.Input; /** - * **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `btrfs`, `ceph`, `cephfs`, or `cephobject`. + * **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. */ driver: pulumi.Input; /** * **Required** - Name of the storage pool. */ - name?: pulumi.Input; + name: pulumi.Input; /** * *Optional* - Name of the project where the storage pool will be stored. */ diff --git a/sdk/nodejs/storageVolume.ts b/sdk/nodejs/storageVolume.ts index 60c87be..aa34503 100644 --- a/sdk/nodejs/storageVolume.ts +++ b/sdk/nodejs/storageVolume.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -39,53 +39,53 @@ export class StorageVolume extends pulumi.CustomResource { * [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}>; + declare public readonly config: pulumi.Output<{[key: string]: string}>; /** * *Optional* - Volume content type (`filesystem` or `block`) */ - public readonly contentType!: pulumi.Output; + declare public readonly contentType: pulumi.Output; /** * *Optional* - Description of the volume. */ - public readonly description!: pulumi.Output; + declare 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; + declare public /*out*/ readonly location: pulumi.Output; /** * **Required** - Name of the storage volume. */ - public readonly name!: pulumi.Output; + declare public readonly name: pulumi.Output; /** * **Required** - Name of storage pool to host the volume. */ - public readonly pool!: pulumi.Output; + declare public readonly pool: pulumi.Output; /** * *Optional* - Name of the project where the volume will be stored. */ - public readonly project!: pulumi.Output; + declare 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; + declare public readonly remote: pulumi.Output; /** * *Optional* - Path to a backup file from which the volume will be created. */ - public readonly sourceFile!: pulumi.Output; + declare public readonly sourceFile: pulumi.Output; /** * *Optional* - The source volume from which the volume will be created. See reference below. */ - public readonly sourceVolume!: pulumi.Output; + declare public readonly sourceVolume: pulumi.Output; /** * *Optional* - Specify a target node in a cluster. */ - public readonly target!: pulumi.Output; + declare 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; + declare public readonly type: pulumi.Output; /** * Create a StorageVolume resource with the given unique name, arguments, and options. @@ -100,34 +100,37 @@ export class StorageVolume extends pulumi.CustomResource { 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; + resourceInputs["config"] = state?.config; + resourceInputs["contentType"] = state?.contentType; + resourceInputs["description"] = state?.description; + resourceInputs["location"] = state?.location; + resourceInputs["name"] = state?.name; + resourceInputs["pool"] = state?.pool; + resourceInputs["project"] = state?.project; + resourceInputs["remote"] = state?.remote; + resourceInputs["sourceFile"] = state?.sourceFile; + resourceInputs["sourceVolume"] = state?.sourceVolume; + resourceInputs["target"] = state?.target; + resourceInputs["type"] = state?.type; } else { const args = argsOrState as StorageVolumeArgs | undefined; - if ((!args || args.pool === undefined) && !opts.urn) { + if (args?.name === undefined && !opts.urn) { + throw new Error("Missing required property 'name'"); + } + if (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["config"] = args?.config; + resourceInputs["contentType"] = args?.contentType; + resourceInputs["description"] = args?.description; + resourceInputs["name"] = args?.name; + resourceInputs["pool"] = args?.pool; + resourceInputs["project"] = (args?.project) ?? "default"; + resourceInputs["remote"] = args?.remote; + resourceInputs["sourceFile"] = args?.sourceFile; + resourceInputs["sourceVolume"] = args?.sourceVolume; + resourceInputs["target"] = args?.target; + resourceInputs["type"] = args?.type; resourceInputs["location"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); @@ -214,7 +217,7 @@ export interface StorageVolumeArgs { /** * **Required** - Name of the storage volume. */ - name?: pulumi.Input; + name: pulumi.Input; /** * **Required** - Name of storage pool to host the volume. */ diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index 1d36e2c..5c2b567 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "outDir": "bin", - "target": "es2016", + "target": "ES2020", "module": "commonjs", "moduleResolution": "node", "declaration": true, @@ -15,18 +15,32 @@ "files": [ "certificate.ts", "clusterGroup.ts", - "clusterGroupAssignment.ts", + "clusterGroupMember.ts", "config/index.ts", "config/vars.ts", + "getCluster.ts", "getImage.ts", + "getInstance.ts", + "getNetwork.ts", + "getNetworkAcl.ts", + "getNetworkAddressSet.ts", + "getNetworkForward.ts", + "getNetworkIntegration.ts", + "getNetworkLoadBalancer.ts", + "getNetworkPeer.ts", + "getNetworkZone.ts", "getProfile.ts", "getProject.ts", + "getStorageBucket.ts", + "getStoragePool.ts", + "getStorageVolume.ts", "image.ts", "index.ts", "instance.ts", "instanceSnapshot.ts", "network.ts", "networkAcl.ts", + "networkAddressSet.ts", "networkForward.ts", "networkIntegration.ts", "networkLoadBalancer.ts", @@ -36,6 +50,7 @@ "profile.ts", "project.ts", "provider.ts", + "server.ts", "storageBucket.ts", "storageBucketKey.ts", "storagePool.ts", diff --git a/sdk/nodejs/types/index.ts b/sdk/nodejs/types/index.ts index c7b9909..f0db274 100644 --- a/sdk/nodejs/types/index.ts +++ b/sdk/nodejs/types/index.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as utilities from "../utilities"; diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 2cb04a7..65ad8f9 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -1,10 +1,346 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** 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 GetInstanceDevice { + /** + * **Required** - Name of the instance. + */ + 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 GetInstanceDeviceArgs { + /** + * **Required** - Name of the instance. + */ + 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 GetNetworkAclEgress { + /** + * Action to perform on rule match. + */ + action: string; + /** + * Description of the rule. + */ + description: string; + /** + * Destination address. + */ + destination: string; + /** + * Destination port. + */ + destinationPort: string; + /** + * ICMP message code (for ICMP protocol). + */ + icmpCode: string; + /** + * Type of ICMP message. + */ + icmpType: string; + /** + * Protocol (e.g., tcp, udp). + */ + protocol: string; + /** + * Source address. + */ + source: string; + /** + * Source port. + */ + sourcePort: string; + /** + * State of the rule. + */ + state: string; +} + +export interface GetNetworkAclEgressArgs { + /** + * Action to perform on rule match. + */ + action: pulumi.Input; + /** + * Description of the rule. + */ + description: pulumi.Input; + /** + * Destination address. + */ + destination: pulumi.Input; + /** + * Destination port. + */ + destinationPort: pulumi.Input; + /** + * ICMP message code (for ICMP protocol). + */ + icmpCode: pulumi.Input; + /** + * Type of ICMP message. + */ + icmpType: pulumi.Input; + /** + * Protocol (e.g., tcp, udp). + */ + protocol: pulumi.Input; + /** + * Source address. + */ + source: pulumi.Input; + /** + * Source port. + */ + sourcePort: pulumi.Input; + /** + * State of the rule. + */ + state: pulumi.Input; +} + +export interface GetNetworkAclIngress { + /** + * Action to perform on rule match. + */ + action: string; + /** + * Description of the rule. + */ + description: string; + /** + * Destination address. + */ + destination: string; + /** + * Destination port. + */ + destinationPort: string; + /** + * ICMP message code (for ICMP protocol). + */ + icmpCode: string; + /** + * Type of ICMP message. + */ + icmpType: string; + /** + * Protocol (e.g., tcp, udp). + */ + protocol: string; + /** + * Source address. + */ + source: string; + /** + * Source port. + */ + sourcePort: string; + /** + * State of the rule. + */ + state: string; +} + +export interface GetNetworkAclIngressArgs { + /** + * Action to perform on rule match. + */ + action: pulumi.Input; + /** + * Description of the rule. + */ + description: pulumi.Input; + /** + * Destination address. + */ + destination: pulumi.Input; + /** + * Destination port. + */ + destinationPort: pulumi.Input; + /** + * ICMP message code (for ICMP protocol). + */ + icmpCode: pulumi.Input; + /** + * Type of ICMP message. + */ + icmpType: pulumi.Input; + /** + * Protocol (e.g., tcp, udp). + */ + protocol: pulumi.Input; + /** + * Source address. + */ + source: pulumi.Input; + /** + * Source port. + */ + sourcePort: pulumi.Input; + /** + * State of the rule. + */ + state: pulumi.Input; +} + +export interface GetNetworkForwardPort { + /** + * Description of the forward port. + */ + description: string; + /** + * ListenPort(s) to forward (comma delimited ranges). + */ + listenPort: string; + /** + * Protocol for port forward (either tcp or udp). + */ + protocol: string; + /** + * SNAT controls whether to apply a matching SNAT rule to new outgoing traffic from the target. + */ + snat: boolean; + /** + * Target address to forward ListenPorts to. + */ + targetAddress: string; + /** + * Target port(s) to forward ListenPorts to (allows for many-to-one). + */ + targetPort: string; +} + +export interface GetNetworkForwardPortArgs { + /** + * Description of the forward port. + */ + description: pulumi.Input; + /** + * ListenPort(s) to forward (comma delimited ranges). + */ + listenPort: pulumi.Input; + /** + * Protocol for port forward (either tcp or udp). + */ + protocol: pulumi.Input; + /** + * SNAT controls whether to apply a matching SNAT rule to new outgoing traffic from the target. + */ + snat: pulumi.Input; + /** + * Target address to forward ListenPorts to. + */ + targetAddress: pulumi.Input; + /** + * Target port(s) to forward ListenPorts to (allows for many-to-one). + */ + targetPort: pulumi.Input; +} + +export interface GetNetworkLoadBalancerBackend { + /** + * Description of the load balancer port. + */ + description: string; + /** + * Name of the load balancer backend. + */ + name: string; + /** + * TargetAddress to forward ListenPorts to. + */ + targetAddress: string; + /** + * TargetPort(s) for the forward ListenPorts to (allows for many-to one). + */ + targetPort: string; +} + +export interface GetNetworkLoadBalancerBackendArgs { + /** + * Description of the load balancer port. + */ + description: pulumi.Input; + /** + * Name of the load balancer backend. + */ + name: pulumi.Input; + /** + * TargetAddress to forward ListenPorts to. + */ + targetAddress: pulumi.Input; + /** + * TargetPort(s) for the forward ListenPorts to (allows for many-to one). + */ + targetPort: pulumi.Input; +} + +export interface GetNetworkLoadBalancerPort { + /** + * Description of the load balancer port. + */ + description: string; + /** + * ListenPort(s) for the load balancer (comma delimited ranges). + */ + listenPort: string; + /** + * Protocol for load balancer (either tcp or udp). + */ + protocol: string; + /** + * TargetBackend backend names to load balance ListenPorts to. + */ + targetBackends: string[]; +} + +export interface GetNetworkLoadBalancerPortArgs { + /** + * Description of the load balancer port. + */ + description: pulumi.Input; + /** + * ListenPort(s) for the load balancer (comma delimited ranges). + */ + listenPort: pulumi.Input; + /** + * Protocol for load balancer (either tcp or udp). + */ + protocol: pulumi.Input; + /** + * TargetBackend backend names to load balance ListenPorts to. + */ + targetBackends: pulumi.Input[]>; +} + export interface GetProfileDevice { /** * **Required** - Name of the profile. @@ -39,6 +375,17 @@ export interface GetProfileDeviceArgs { type?: pulumi.Input; } +export interface ImageAlias { + /** + * *Optional* - A description for the alias. + */ + description?: pulumi.Input; + /** + * **Required** - The name of the alias. + */ + name: 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) @@ -344,27 +691,27 @@ export interface ProfileDevice { export interface ProviderRemote { /** - * The FQDN or IP where the Incus daemon can be contacted. (default = "" (read from lxc config)) + * The URL of the Incus host. The default will be the path to the local unix socket, or leaving it as an empty string will use the default socket path. */ address?: pulumi.Input; /** - * Set this remote as default. + * Server authentication type, tls or oidc. ( Only for the `incus` protocol ) */ - default?: pulumi.Input; + authenticationType?: pulumi.Input; /** - * Name of the Incus remote. Required when incusScheme set to https, to enable locating server certificate. + * Name of the Incus remote. */ name: pulumi.Input; /** - * Port Incus Daemon API is listening on. (default = 8443) + * Server protocol ( incus, oci or simplestreams ) */ - port?: pulumi.Input; + protocol?: pulumi.Input; /** - * Unix (unix) or HTTPs (https). (default = unix) + * Public image server */ - scheme?: pulumi.Input; + public?: pulumi.Input; /** - * The trust token for the remote. + * The trust token used for initial authentication with the Incus remote. */ token?: pulumi.Input; } diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index 93258db..5d6dd2c 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -1,10 +1,212 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** 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 GetClusterMembers { + /** + * Address of the cluster member, that is used for cluster communication. + */ + address: string; + /** + * Architecture of the cluster member (e.g. x86_64, aarch64). + * See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) + * for all possible values. + */ + architecture: string; + /** + * Description of the cluster member. + */ + description: string; + /** + * Failure domain of the cluster member. + */ + failureDomain: string; + /** + * A list of groups the cluster member belongs to. + */ + groups: string[]; + /** + * A list of roles assigned to the cluster member. + */ + roles: string[]; + /** + * Status of the cluster member. Possible values are + * `Online`, `Evacuated`, `Offline`, `Blocked`. + */ + status: string; +} + +export interface GetInstanceDevice { + /** + * **Required** - Name of the instance. + */ + 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 GetNetworkAclEgress { + /** + * Action to perform on rule match. + */ + action: string; + /** + * Description of the rule. + */ + description: string; + /** + * Destination address. + */ + destination: string; + /** + * Destination port. + */ + destinationPort: string; + /** + * ICMP message code (for ICMP protocol). + */ + icmpCode: string; + /** + * Type of ICMP message. + */ + icmpType: string; + /** + * Protocol (e.g., tcp, udp). + */ + protocol: string; + /** + * Source address. + */ + source: string; + /** + * Source port. + */ + sourcePort: string; + /** + * State of the rule. + */ + state: string; +} + +export interface GetNetworkAclIngress { + /** + * Action to perform on rule match. + */ + action: string; + /** + * Description of the rule. + */ + description: string; + /** + * Destination address. + */ + destination: string; + /** + * Destination port. + */ + destinationPort: string; + /** + * ICMP message code (for ICMP protocol). + */ + icmpCode: string; + /** + * Type of ICMP message. + */ + icmpType: string; + /** + * Protocol (e.g., tcp, udp). + */ + protocol: string; + /** + * Source address. + */ + source: string; + /** + * Source port. + */ + sourcePort: string; + /** + * State of the rule. + */ + state: string; +} + +export interface GetNetworkForwardPort { + /** + * Description of the forward port. + */ + description: string; + /** + * ListenPort(s) to forward (comma delimited ranges). + */ + listenPort: string; + /** + * Protocol for port forward (either tcp or udp). + */ + protocol: string; + /** + * SNAT controls whether to apply a matching SNAT rule to new outgoing traffic from the target. + */ + snat: boolean; + /** + * Target address to forward ListenPorts to. + */ + targetAddress: string; + /** + * Target port(s) to forward ListenPorts to (allows for many-to-one). + */ + targetPort: string; +} + +export interface GetNetworkLoadBalancerBackend { + /** + * Description of the load balancer port. + */ + description: string; + /** + * Name of the load balancer backend. + */ + name: string; + /** + * TargetAddress to forward ListenPorts to. + */ + targetAddress: string; + /** + * TargetPort(s) for the forward ListenPorts to (allows for many-to one). + */ + targetPort: string; +} + +export interface GetNetworkLoadBalancerPort { + /** + * Description of the load balancer port. + */ + description: string; + /** + * ListenPort(s) for the load balancer (comma delimited ranges). + */ + listenPort: string; + /** + * Protocol for load balancer (either tcp or udp). + */ + protocol: string; + /** + * TargetBackend backend names to load balance ListenPorts to. + */ + targetBackends: string[]; +} + export interface GetProfileDevice { /** * **Required** - Name of the profile. @@ -22,6 +224,17 @@ export interface GetProfileDevice { type: string; } +export interface ImageAlias { + /** + * *Optional* - A description for the alias. + */ + description: string; + /** + * **Required** - The name of the alias. + */ + name: string; +} + export interface ImageSourceFile { /** * **Required** - Either the path of an [unified image](https://linuxcontainers.org/incus/docs/main/reference/image_format/#image-format-unified) @@ -271,7 +484,7 @@ export interface NetworkLoadBalancerBackend { /** * LB backend target port */ - targetPort: string; + targetPort?: string; } export interface NetworkLoadBalancerPort { @@ -344,27 +557,27 @@ export interface StorageVolumeSourceVolume { export namespace config { export interface Remotes { /** - * The FQDN or IP where the Incus daemon can be contacted. (default = "" (read from lxc config)) + * The URL of the Incus host. The default will be the path to the local unix socket, or leaving it as an empty string will use the default socket path. */ address?: string; /** - * Set this remote as default. + * Server authentication type, tls or oidc. ( Only for the `incus` protocol ) */ - default?: boolean; + authenticationType?: string; /** - * Name of the Incus remote. Required when incusScheme set to https, to enable locating server certificate. + * Name of the Incus remote. */ name: string; /** - * Port Incus Daemon API is listening on. (default = 8443) + * Server protocol ( incus, oci or simplestreams ) */ - port?: string; + protocol?: string; /** - * Unix (unix) or HTTPs (https). (default = unix) + * Public image server */ - scheme?: string; + public?: boolean; /** - * The trust token for the remote. + * The trust token used for initial authentication with the Incus remote. */ token?: string; } diff --git a/sdk/nodejs/utilities.ts b/sdk/nodejs/utilities.ts index cd67224..daff7fa 100644 --- a/sdk/nodejs/utilities.ts +++ b/sdk/nodejs/utilities.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** @@ -68,6 +68,7 @@ export function lazyLoad(exports: any, props: string[], loadModule: any) { } } +/** @internal */ export async function callAsync( tok: string, props: pulumi.Inputs,