193 lines
7.4 KiB
Go
Generated
193 lines
7.4 KiB
Go
Generated
// 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{})
|
|
}
|