vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs
vkcs.getComputeInstance
Explore with Pulumi AI
Use this data source to get the details of a running server
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
const instance = vkcs.getComputeInstance({
id: vkcs_compute_instance.basic.id,
});
import pulumi
import pulumi_vkcs as vkcs
instance = vkcs.get_compute_instance(id=vkcs_compute_instance["basic"]["id"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vkcs.LookupComputeInstance(ctx, &vkcs.LookupComputeInstanceArgs{
Id: vkcs_compute_instance.Basic.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
var instance = Vkcs.GetComputeInstance.Invoke(new()
{
Id = vkcs_compute_instance.Basic.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.VkcsFunctions;
import com.pulumi.vkcs.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 instance = VkcsFunctions.getComputeInstance(GetComputeInstanceArgs.builder()
.id(vkcs_compute_instance.basic().id())
.build());
}
}
variables:
instance:
fn::invoke:
function: vkcs:getComputeInstance
arguments:
id: ${vkcs_compute_instance.basic.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,
networks: Optional[Sequence[GetComputeInstanceNetwork]] = None,
region: Optional[str] = None,
user_data: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetComputeInstanceResult
def get_compute_instance_output(id: Optional[pulumi.Input[str]] = None,
networks: Optional[pulumi.Input[Sequence[pulumi.Input[GetComputeInstanceNetworkArgs]]]] = None,
region: Optional[pulumi.Input[str]] = None,
user_data: 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)
public static Output<GetComputeInstanceResult> getComputeInstance(GetComputeInstanceArgs args, InvokeOptions options)
fn::invoke:
function: vkcs:index/getComputeInstance:getComputeInstance
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- required string → The UUID of the instance
- Networks
List<Get
Compute Instance Network> - → An array of maps, detailed below.
- Region string
- optional string → The region in which to obtain the Compute client. If omitted, the
region
argument of the provider is used. - User
Data string - optional string → The user data added when the server was created.
- Id string
- required string → The UUID of the instance
- Networks
[]Get
Compute Instance Network - → An array of maps, detailed below.
- Region string
- optional string → The region in which to obtain the Compute client. If omitted, the
region
argument of the provider is used. - User
Data string - optional string → The user data added when the server was created.
- id String
- required string → The UUID of the instance
- networks
List<Get
Compute Instance Network> - → An array of maps, detailed below.
- region String
- optional string → The region in which to obtain the Compute client. If omitted, the
region
argument of the provider is used. - user
Data String - optional string → The user data added when the server was created.
- id string
- required string → The UUID of the instance
- networks
Get
Compute Instance Network[] - → An array of maps, detailed below.
- region string
- optional string → The region in which to obtain the Compute client. If omitted, the
region
argument of the provider is used. - user
Data string - optional string → The user data added when the server was created.
- id str
- required string → The UUID of the instance
- networks
Sequence[Get
Compute Instance Network] - → An array of maps, detailed below.
- region str
- optional string → The region in which to obtain the Compute client. If omitted, the
region
argument of the provider is used. - user_
data str - optional string → The user data added when the server was created.
- id String
- required string → The UUID of the instance
- networks List<Property Map>
- → An array of maps, detailed below.
- region String
- optional string → The region in which to obtain the Compute client. If omitted, the
region
argument of the provider is used. - user
Data String - optional string → The user data added when the server was created.
getComputeInstance Result
The following output properties are available:
- Access
Ip stringV4 - string → The first IPv4 address assigned to this server.
- Availability
Zone string - string → The availability zone of this server.
- Flavor
Id string - string → The flavor ID used to create the server.
- Flavor
Name string - string → The flavor name used to create the server.
- Id string
- Image
Id string - string → The image ID used to create the server.
- Image
Name string - string → The image name used to create the server.
- Key
Pair string - string → The name of the key pair assigned to this server.
- Metadata Dictionary<string, string>
- map of string → A set of key/value pairs made available to the server.
- Name string
- string → The name of the network
- Power
State string - string → VM state
- Region string
- Security
Group List<string>Ids - set of string → An array of one or more security group ids to associate with the server.New since v0.7.3.
- Security
Groups List<string> - set of string → An array of security group names associated with this server.
- List<string>
- set of string → A set of string tags for the instance.
- User
Data string - Networks
List<Get
Compute Instance Network> - → An array of maps, detailed below.
- Access
Ip stringV4 - string → The first IPv4 address assigned to this server.
- Availability
Zone string - string → The availability zone of this server.
- Flavor
Id string - string → The flavor ID used to create the server.
- Flavor
Name string - string → The flavor name used to create the server.
- Id string
- Image
Id string - string → The image ID used to create the server.
- Image
Name string - string → The image name used to create the server.
- Key
Pair string - string → The name of the key pair assigned to this server.
- Metadata map[string]string
- map of string → A set of key/value pairs made available to the server.
- Name string
- string → The name of the network
- Power
State string - string → VM state
- Region string
- Security
Group []stringIds - set of string → An array of one or more security group ids to associate with the server.New since v0.7.3.
- Security
Groups []string - set of string → An array of security group names associated with this server.
- []string
- set of string → A set of string tags for the instance.
- User
Data string - Networks
[]Get
Compute Instance Network - → An array of maps, detailed below.
- access
Ip StringV4 - string → The first IPv4 address assigned to this server.
- availability
Zone String - string → The availability zone of this server.
- flavor
Id String - string → The flavor ID used to create the server.
- flavor
Name String - string → The flavor name used to create the server.
- id String
- image
Id String - string → The image ID used to create the server.
- image
Name String - string → The image name used to create the server.
- key
Pair String - string → The name of the key pair assigned to this server.
- metadata Map<String,String>
- map of string → A set of key/value pairs made available to the server.
- name String
- string → The name of the network
- power
State String - string → VM state
- region String
- security
Group List<String>Ids - set of string → An array of one or more security group ids to associate with the server.New since v0.7.3.
- security
Groups List<String> - set of string → An array of security group names associated with this server.
- List<String>
- set of string → A set of string tags for the instance.
- user
Data String - networks
List<Get
Compute Instance Network> - → An array of maps, detailed below.
- access
Ip stringV4 - string → The first IPv4 address assigned to this server.
- availability
Zone string - string → The availability zone of this server.
- flavor
Id string - string → The flavor ID used to create the server.
- flavor
Name string - string → The flavor name used to create the server.
- id string
- image
Id string - string → The image ID used to create the server.
- image
Name string - string → The image name used to create the server.
- key
Pair string - string → The name of the key pair assigned to this server.
- metadata {[key: string]: string}
- map of string → A set of key/value pairs made available to the server.
- name string
- string → The name of the network
- power
State string - string → VM state
- region string
- security
Group string[]Ids - set of string → An array of one or more security group ids to associate with the server.New since v0.7.3.
- security
Groups string[] - set of string → An array of security group names associated with this server.
- string[]
- set of string → A set of string tags for the instance.
- user
Data string - networks
Get
Compute Instance Network[] - → An array of maps, detailed below.
- access_
ip_ strv4 - string → The first IPv4 address assigned to this server.
- availability_
zone str - string → The availability zone of this server.
- flavor_
id str - string → The flavor ID used to create the server.
- flavor_
name str - string → The flavor name used to create the server.
- id str
- image_
id str - string → The image ID used to create the server.
- image_
name str - string → The image name used to create the server.
- key_
pair str - string → The name of the key pair assigned to this server.
- metadata Mapping[str, str]
- map of string → A set of key/value pairs made available to the server.
- name str
- string → The name of the network
- power_
state str - string → VM state
- region str
- security_
group_ Sequence[str]ids - set of string → An array of one or more security group ids to associate with the server.New since v0.7.3.
- security_
groups Sequence[str] - set of string → An array of security group names associated with this server.
- Sequence[str]
- set of string → A set of string tags for the instance.
- user_
data str - networks
Sequence[Get
Compute Instance Network] - → An array of maps, detailed below.
- access
Ip StringV4 - string → The first IPv4 address assigned to this server.
- availability
Zone String - string → The availability zone of this server.
- flavor
Id String - string → The flavor ID used to create the server.
- flavor
Name String - string → The flavor name used to create the server.
- id String
- image
Id String - string → The image ID used to create the server.
- image
Name String - string → The image name used to create the server.
- key
Pair String - string → The name of the key pair assigned to this server.
- metadata Map<String>
- map of string → A set of key/value pairs made available to the server.
- name String
- string → The name of the network
- power
State String - string → VM state
- region String
- security
Group List<String>Ids - set of string → An array of one or more security group ids to associate with the server.New since v0.7.3.
- security
Groups List<String> - set of string → An array of security group names associated with this server.
- List<String>
- set of string → A set of string tags for the instance.
- user
Data String - networks List<Property Map>
- → An array of maps, detailed below.
Supporting Types
GetComputeInstanceNetwork
- fixed_
ip_ strv4 - string → The IPv4 address assigned to this network port.
- mac str
- string → The MAC address assigned to this network interface.
- name str
- string → The name of the network
- port str
- string → The port UUID for this network
- uuid str
- string → The UUID of the network
Package Details
- Repository
- vkcs vk-cs/terraform-provider-vkcs
- License
- Notes
- This Pulumi package is based on the
vkcs
Terraform Provider.