Exoscale v0.56.0 published on Sunday, Mar 3, 2024 by Pulumiverse
exoscale.getComputeInstance
Explore with Pulumi AI
Fetch Exoscale Compute Instances data.
Corresponding resource: exoscale_compute_instance.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Exoscale = Pulumi.Exoscale;
return await Deployment.RunAsync(() =>
{
var myInstance = Exoscale.GetComputeInstance.Invoke(new()
{
Zone = "ch-gva-2",
Name = "my-instance",
});
return new Dictionary<string, object?>
{
["myInstanceId"] = myInstance.Apply(getComputeInstanceResult => getComputeInstanceResult.Id),
};
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-exoscale/sdk/go/exoscale"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
myInstance, err := exoscale.LookupComputeInstance(ctx, &exoscale.LookupComputeInstanceArgs{
Zone: "ch-gva-2",
Name: pulumi.StringRef("my-instance"),
}, nil)
if err != nil {
return err
}
ctx.Export("myInstanceId", myInstance.Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.exoscale.ExoscaleFunctions;
import com.pulumi.exoscale.inputs.GetComputeInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var myInstance = ExoscaleFunctions.getComputeInstance(GetComputeInstanceArgs.builder()
.zone("ch-gva-2")
.name("my-instance")
.build());
ctx.export("myInstanceId", myInstance.applyValue(getComputeInstanceResult -> getComputeInstanceResult.id()));
}
}
import pulumi
import pulumi_exoscale as exoscale
my_instance = exoscale.get_compute_instance(zone="ch-gva-2",
name="my-instance")
pulumi.export("myInstanceId", my_instance.id)
import * as pulumi from "@pulumi/pulumi";
import * as exoscale from "@pulumi/exoscale";
const myInstance = exoscale.getComputeInstance({
zone: "ch-gva-2",
name: "my-instance",
});
export const myInstanceId = myInstance.then(myInstance => myInstance.id);
variables:
myInstance:
fn::invoke:
Function: exoscale:getComputeInstance
Arguments:
zone: ch-gva-2
name: my-instance
outputs:
myInstanceId: ${myInstance.id}
Using getComputeInstance
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getComputeInstance(args: GetComputeInstanceArgs, opts?: InvokeOptions): Promise<GetComputeInstanceResult>
function getComputeInstanceOutput(args: GetComputeInstanceOutputArgs, opts?: InvokeOptions): Output<GetComputeInstanceResult>
def get_compute_instance(id: Optional[str] = None,
name: Optional[str] = None,
zone: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetComputeInstanceResult
def get_compute_instance_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
zone: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetComputeInstanceResult]
func LookupComputeInstance(ctx *Context, args *LookupComputeInstanceArgs, opts ...InvokeOption) (*LookupComputeInstanceResult, error)
func LookupComputeInstanceOutput(ctx *Context, args *LookupComputeInstanceOutputArgs, opts ...InvokeOption) LookupComputeInstanceResultOutput
> Note: This function is named LookupComputeInstance
in the Go SDK.
public static class GetComputeInstance
{
public static Task<GetComputeInstanceResult> InvokeAsync(GetComputeInstanceArgs args, InvokeOptions? opts = null)
public static Output<GetComputeInstanceResult> Invoke(GetComputeInstanceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetComputeInstanceResult> getComputeInstance(GetComputeInstanceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: exoscale:index/getComputeInstance:getComputeInstance
arguments:
# arguments dictionary
The following arguments are supported:
getComputeInstance Result
The following output properties are available:
- Anti
Affinity List<string>Group Ids - The list of attached exoscaleantiaffinity_group (IDs).
- Created
At string - The compute instance creation date.
- Deploy
Target stringId - A deploy target ID.
- Disk
Size int - The instance disk size (GiB).
- Elastic
Ip List<string>Ids - The list of attached exoscaleelasticip (IDs).
- Ipv6 bool
- Whether IPv6 is enabled on the instance.
- Ipv6Address string
- The instance (main network interface) IPv6 address (if enabled).
- Labels Dictionary<string, string>
- A map of key/value labels.
- Manager
Id string - The instance manager ID, if any.
- Manager
Type string - The instance manager type (instance pool, SKS node pool, etc.), if any.
- Private
Network List<string>Ids - The list of attached exoscaleprivatenetwork (IDs).
- Public
Ip stringAddress - The instance (main network interface) IPv4 address.
- Reverse
Dns string - Domain name for reverse DNS record.
- Security
Group List<string>Ids - The list of attached exoscalesecuritygroup (IDs).
- Ssh
Key string - The exoscalesshkey (name) authorized on the instance.
- State string
- The instance state.
- Template
Id string - The instance exoscale.getTemplate ID.
- Type string
- The instance type.
- User
Data string - The instance cloud-init configuration.
- Zone string
- The Exoscale Zone name.
- Id string
- The compute instance ID to match (conflicts with
name
). - Name string
- The instance name to match (conflicts with
id
).
- Anti
Affinity []stringGroup Ids - The list of attached exoscaleantiaffinity_group (IDs).
- Created
At string - The compute instance creation date.
- Deploy
Target stringId - A deploy target ID.
- Disk
Size int - The instance disk size (GiB).
- Elastic
Ip []stringIds - The list of attached exoscaleelasticip (IDs).
- Ipv6 bool
- Whether IPv6 is enabled on the instance.
- Ipv6Address string
- The instance (main network interface) IPv6 address (if enabled).
- Labels map[string]string
- A map of key/value labels.
- Manager
Id string - The instance manager ID, if any.
- Manager
Type string - The instance manager type (instance pool, SKS node pool, etc.), if any.
- Private
Network []stringIds - The list of attached exoscaleprivatenetwork (IDs).
- Public
Ip stringAddress - The instance (main network interface) IPv4 address.
- Reverse
Dns string - Domain name for reverse DNS record.
- Security
Group []stringIds - The list of attached exoscalesecuritygroup (IDs).
- Ssh
Key string - The exoscalesshkey (name) authorized on the instance.
- State string
- The instance state.
- Template
Id string - The instance exoscale.getTemplate ID.
- Type string
- The instance type.
- User
Data string - The instance cloud-init configuration.
- Zone string
- The Exoscale Zone name.
- Id string
- The compute instance ID to match (conflicts with
name
). - Name string
- The instance name to match (conflicts with
id
).
- anti
Affinity List<String>Group Ids - The list of attached exoscaleantiaffinity_group (IDs).
- created
At String - The compute instance creation date.
- deploy
Target StringId - A deploy target ID.
- disk
Size Integer - The instance disk size (GiB).
- elastic
Ip List<String>Ids - The list of attached exoscaleelasticip (IDs).
- ipv6 Boolean
- Whether IPv6 is enabled on the instance.
- ipv6Address String
- The instance (main network interface) IPv6 address (if enabled).
- labels Map<String,String>
- A map of key/value labels.
- manager
Id String - The instance manager ID, if any.
- manager
Type String - The instance manager type (instance pool, SKS node pool, etc.), if any.
- private
Network List<String>Ids - The list of attached exoscaleprivatenetwork (IDs).
- public
Ip StringAddress - The instance (main network interface) IPv4 address.
- reverse
Dns String - Domain name for reverse DNS record.
- security
Group List<String>Ids - The list of attached exoscalesecuritygroup (IDs).
- ssh
Key String - The exoscalesshkey (name) authorized on the instance.
- state String
- The instance state.
- template
Id String - The instance exoscale.getTemplate ID.
- type String
- The instance type.
- user
Data String - The instance cloud-init configuration.
- zone String
- The Exoscale Zone name.
- id String
- The compute instance ID to match (conflicts with
name
). - name String
- The instance name to match (conflicts with
id
).
- anti
Affinity string[]Group Ids - The list of attached exoscaleantiaffinity_group (IDs).
- created
At string - The compute instance creation date.
- deploy
Target stringId - A deploy target ID.
- disk
Size number - The instance disk size (GiB).
- elastic
Ip string[]Ids - The list of attached exoscaleelasticip (IDs).
- ipv6 boolean
- Whether IPv6 is enabled on the instance.
- ipv6Address string
- The instance (main network interface) IPv6 address (if enabled).
- labels {[key: string]: string}
- A map of key/value labels.
- manager
Id string - The instance manager ID, if any.
- manager
Type string - The instance manager type (instance pool, SKS node pool, etc.), if any.
- private
Network string[]Ids - The list of attached exoscaleprivatenetwork (IDs).
- public
Ip stringAddress - The instance (main network interface) IPv4 address.
- reverse
Dns string - Domain name for reverse DNS record.
- security
Group string[]Ids - The list of attached exoscalesecuritygroup (IDs).
- ssh
Key string - The exoscalesshkey (name) authorized on the instance.
- state string
- The instance state.
- template
Id string - The instance exoscale.getTemplate ID.
- type string
- The instance type.
- user
Data string - The instance cloud-init configuration.
- zone string
- The Exoscale Zone name.
- id string
- The compute instance ID to match (conflicts with
name
). - name string
- The instance name to match (conflicts with
id
).
- anti_
affinity_ Sequence[str]group_ ids - The list of attached exoscaleantiaffinity_group (IDs).
- created_
at str - The compute instance creation date.
- deploy_
target_ strid - A deploy target ID.
- disk_
size int - The instance disk size (GiB).
- elastic_
ip_ Sequence[str]ids - The list of attached exoscaleelasticip (IDs).
- ipv6 bool
- Whether IPv6 is enabled on the instance.
- ipv6_
address str - The instance (main network interface) IPv6 address (if enabled).
- labels Mapping[str, str]
- A map of key/value labels.
- manager_
id str - The instance manager ID, if any.
- manager_
type str - The instance manager type (instance pool, SKS node pool, etc.), if any.
- private_
network_ Sequence[str]ids - The list of attached exoscaleprivatenetwork (IDs).
- public_
ip_ straddress - The instance (main network interface) IPv4 address.
- reverse_
dns str - Domain name for reverse DNS record.
- security_
group_ Sequence[str]ids - The list of attached exoscalesecuritygroup (IDs).
- ssh_
key str - The exoscalesshkey (name) authorized on the instance.
- state str
- The instance state.
- template_
id str - The instance exoscale.getTemplate ID.
- type str
- The instance type.
- user_
data str - The instance cloud-init configuration.
- zone str
- The Exoscale Zone name.
- id str
- The compute instance ID to match (conflicts with
name
). - name str
- The instance name to match (conflicts with
id
).
- anti
Affinity List<String>Group Ids - The list of attached exoscaleantiaffinity_group (IDs).
- created
At String - The compute instance creation date.
- deploy
Target StringId - A deploy target ID.
- disk
Size Number - The instance disk size (GiB).
- elastic
Ip List<String>Ids - The list of attached exoscaleelasticip (IDs).
- ipv6 Boolean
- Whether IPv6 is enabled on the instance.
- ipv6Address String
- The instance (main network interface) IPv6 address (if enabled).
- labels Map<String>
- A map of key/value labels.
- manager
Id String - The instance manager ID, if any.
- manager
Type String - The instance manager type (instance pool, SKS node pool, etc.), if any.
- private
Network List<String>Ids - The list of attached exoscaleprivatenetwork (IDs).
- public
Ip StringAddress - The instance (main network interface) IPv4 address.
- reverse
Dns String - Domain name for reverse DNS record.
- security
Group List<String>Ids - The list of attached exoscalesecuritygroup (IDs).
- ssh
Key String - The exoscalesshkey (name) authorized on the instance.
- state String
- The instance state.
- template
Id String - The instance exoscale.getTemplate ID.
- type String
- The instance type.
- user
Data String - The instance cloud-init configuration.
- zone String
- The Exoscale Zone name.
- id String
- The compute instance ID to match (conflicts with
name
). - name String
- The instance name to match (conflicts with
id
).
Package Details
- Repository
- exoscale pulumiverse/pulumi-exoscale
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
exoscale
Terraform Provider.