ovh.CloudProject.Instance
Explore with Pulumi AI
This resource uses a Beta API Creates an instance associated with a public cloud project.
Example Usage
Create a instance.
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const instance = new ovh.cloudproject.Instance("instance", {
serviceName: "XXX",
region: "RRRR",
billingPeriod: "hourly",
bootFrom: {
imageId: "UUID",
},
flavor: {
flavorId: "UUID",
},
name: "instance name",
sshKey: {
name: "sshname",
},
network: {
"public": true,
},
});
import pulumi
import pulumi_ovh as ovh
instance = ovh.cloud_project.Instance("instance",
service_name="XXX",
region="RRRR",
billing_period="hourly",
boot_from={
"image_id": "UUID",
},
flavor={
"flavor_id": "UUID",
},
name="instance name",
ssh_key={
"name": "sshname",
},
network={
"public": True,
})
package main
import (
"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudproject.NewInstance(ctx, "instance", &cloudproject.InstanceArgs{
ServiceName: pulumi.String("XXX"),
Region: pulumi.String("RRRR"),
BillingPeriod: pulumi.String("hourly"),
BootFrom: &cloudproject.InstanceBootFromArgs{
ImageId: pulumi.String("UUID"),
},
Flavor: &cloudproject.InstanceFlavorArgs{
FlavorId: pulumi.String("UUID"),
},
Name: pulumi.String("instance name"),
SshKey: &cloudproject.InstanceSshKeyArgs{
Name: pulumi.String("sshname"),
},
Network: &cloudproject.InstanceNetworkArgs{
Public: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var instance = new Ovh.CloudProject.Instance("instance", new()
{
ServiceName = "XXX",
Region = "RRRR",
BillingPeriod = "hourly",
BootFrom = new Ovh.CloudProject.Inputs.InstanceBootFromArgs
{
ImageId = "UUID",
},
Flavor = new Ovh.CloudProject.Inputs.InstanceFlavorArgs
{
FlavorId = "UUID",
},
Name = "instance name",
SshKey = new Ovh.CloudProject.Inputs.InstanceSshKeyArgs
{
Name = "sshname",
},
Network = new Ovh.CloudProject.Inputs.InstanceNetworkArgs
{
Public = true,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.ovhcloud.pulumi.ovh.CloudProject.Instance;
import com.ovhcloud.pulumi.ovh.CloudProject.InstanceArgs;
import com.pulumi.ovh.CloudProject.inputs.InstanceBootFromArgs;
import com.pulumi.ovh.CloudProject.inputs.InstanceFlavorArgs;
import com.pulumi.ovh.CloudProject.inputs.InstanceSshKeyArgs;
import com.pulumi.ovh.CloudProject.inputs.InstanceNetworkArgs;
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) {
var instance = new Instance("instance", InstanceArgs.builder()
.serviceName("XXX")
.region("RRRR")
.billingPeriod("hourly")
.bootFrom(InstanceBootFromArgs.builder()
.imageId("UUID")
.build())
.flavor(InstanceFlavorArgs.builder()
.flavorId("UUID")
.build())
.name("instance name")
.sshKey(InstanceSshKeyArgs.builder()
.name("sshname")
.build())
.network(InstanceNetworkArgs.builder()
.public_(true)
.build())
.build());
}
}
resources:
instance:
type: ovh:CloudProject:Instance
properties:
serviceName: XXX
region: RRRR
billingPeriod: hourly
bootFrom:
imageId: UUID
flavor:
flavorId: UUID
name: instance name
sshKey:
name: sshname
network:
public: true
Create Instance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
@overload
def Instance(resource_name: str,
args: InstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Instance(resource_name: str,
opts: Optional[ResourceOptions] = None,
region: Optional[str] = None,
flavor: Optional[InstanceFlavorArgs] = None,
billing_period: Optional[str] = None,
boot_from: Optional[InstanceBootFromArgs] = None,
network: Optional[InstanceNetworkArgs] = None,
ssh_key_create: Optional[InstanceSshKeyCreateArgs] = None,
bulk: Optional[int] = None,
group: Optional[InstanceGroupArgs] = None,
availability_zone: Optional[str] = None,
auto_backup: Optional[InstanceAutoBackupArgs] = None,
service_name: Optional[str] = None,
ssh_key: Optional[InstanceSshKeyArgs] = None,
name: Optional[str] = None,
user_data: Optional[str] = None)
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: ovh:CloudProject:Instance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var instanceResource = new Ovh.CloudProject.Instance("instanceResource", new()
{
Region = "string",
Flavor = new Ovh.CloudProject.Inputs.InstanceFlavorArgs
{
FlavorId = "string",
},
BillingPeriod = "string",
BootFrom = new Ovh.CloudProject.Inputs.InstanceBootFromArgs
{
ImageId = "string",
VolumeId = "string",
},
Network = new Ovh.CloudProject.Inputs.InstanceNetworkArgs
{
Private = new Ovh.CloudProject.Inputs.InstanceNetworkPrivateArgs
{
FloatingIp = new Ovh.CloudProject.Inputs.InstanceNetworkPrivateFloatingIpArgs
{
Id = "string",
},
FloatingIpCreate = new Ovh.CloudProject.Inputs.InstanceNetworkPrivateFloatingIpCreateArgs
{
Description = "string",
},
Gateway = new Ovh.CloudProject.Inputs.InstanceNetworkPrivateGatewayArgs
{
Id = "string",
},
GatewayCreate = new Ovh.CloudProject.Inputs.InstanceNetworkPrivateGatewayCreateArgs
{
Model = "string",
Name = "string",
},
Ip = "string",
Network = new Ovh.CloudProject.Inputs.InstanceNetworkPrivateNetworkArgs
{
Id = "string",
SubnetId = "string",
},
NetworkCreate = new Ovh.CloudProject.Inputs.InstanceNetworkPrivateNetworkCreateArgs
{
Name = "string",
Subnet = new Ovh.CloudProject.Inputs.InstanceNetworkPrivateNetworkCreateSubnetArgs
{
Cidr = "string",
EnableDhcp = false,
IpVersion = 0,
},
VlanId = 0,
},
},
Public = false,
},
SshKeyCreate = new Ovh.CloudProject.Inputs.InstanceSshKeyCreateArgs
{
Name = "string",
PublicKey = "string",
},
Bulk = 0,
Group = new Ovh.CloudProject.Inputs.InstanceGroupArgs
{
GroupId = "string",
},
AvailabilityZone = "string",
AutoBackup = new Ovh.CloudProject.Inputs.InstanceAutoBackupArgs
{
Cron = "string",
Rotation = 0,
},
ServiceName = "string",
SshKey = new Ovh.CloudProject.Inputs.InstanceSshKeyArgs
{
Name = "string",
},
Name = "string",
UserData = "string",
});
example, err := cloudproject.NewInstance(ctx, "instanceResource", &cloudproject.InstanceArgs{
Region: pulumi.String("string"),
Flavor: &cloudproject.InstanceFlavorArgs{
FlavorId: pulumi.String("string"),
},
BillingPeriod: pulumi.String("string"),
BootFrom: &cloudproject.InstanceBootFromArgs{
ImageId: pulumi.String("string"),
VolumeId: pulumi.String("string"),
},
Network: &cloudproject.InstanceNetworkArgs{
Private: &cloudproject.InstanceNetworkPrivateArgs{
FloatingIp: &cloudproject.InstanceNetworkPrivateFloatingIpArgs{
Id: pulumi.String("string"),
},
FloatingIpCreate: &cloudproject.InstanceNetworkPrivateFloatingIpCreateArgs{
Description: pulumi.String("string"),
},
Gateway: &cloudproject.InstanceNetworkPrivateGatewayArgs{
Id: pulumi.String("string"),
},
GatewayCreate: &cloudproject.InstanceNetworkPrivateGatewayCreateArgs{
Model: pulumi.String("string"),
Name: pulumi.String("string"),
},
Ip: pulumi.String("string"),
Network: &cloudproject.InstanceNetworkPrivateNetworkArgs{
Id: pulumi.String("string"),
SubnetId: pulumi.String("string"),
},
NetworkCreate: &cloudproject.InstanceNetworkPrivateNetworkCreateArgs{
Name: pulumi.String("string"),
Subnet: &cloudproject.InstanceNetworkPrivateNetworkCreateSubnetArgs{
Cidr: pulumi.String("string"),
EnableDhcp: pulumi.Bool(false),
IpVersion: pulumi.Int(0),
},
VlanId: pulumi.Int(0),
},
},
Public: pulumi.Bool(false),
},
SshKeyCreate: &cloudproject.InstanceSshKeyCreateArgs{
Name: pulumi.String("string"),
PublicKey: pulumi.String("string"),
},
Bulk: pulumi.Int(0),
Group: &cloudproject.InstanceGroupArgs{
GroupId: pulumi.String("string"),
},
AvailabilityZone: pulumi.String("string"),
AutoBackup: &cloudproject.InstanceAutoBackupArgs{
Cron: pulumi.String("string"),
Rotation: pulumi.Int(0),
},
ServiceName: pulumi.String("string"),
SshKey: &cloudproject.InstanceSshKeyArgs{
Name: pulumi.String("string"),
},
Name: pulumi.String("string"),
UserData: pulumi.String("string"),
})
var instanceResource = new Instance("instanceResource", InstanceArgs.builder()
.region("string")
.flavor(InstanceFlavorArgs.builder()
.flavorId("string")
.build())
.billingPeriod("string")
.bootFrom(InstanceBootFromArgs.builder()
.imageId("string")
.volumeId("string")
.build())
.network(InstanceNetworkArgs.builder()
.private_(InstanceNetworkPrivateArgs.builder()
.floatingIp(InstanceNetworkPrivateFloatingIpArgs.builder()
.id("string")
.build())
.floatingIpCreate(InstanceNetworkPrivateFloatingIpCreateArgs.builder()
.description("string")
.build())
.gateway(InstanceNetworkPrivateGatewayArgs.builder()
.id("string")
.build())
.gatewayCreate(InstanceNetworkPrivateGatewayCreateArgs.builder()
.model("string")
.name("string")
.build())
.ip("string")
.network(InstanceNetworkPrivateNetworkArgs.builder()
.id("string")
.subnetId("string")
.build())
.networkCreate(InstanceNetworkPrivateNetworkCreateArgs.builder()
.name("string")
.subnet(InstanceNetworkPrivateNetworkCreateSubnetArgs.builder()
.cidr("string")
.enableDhcp(false)
.ipVersion(0)
.build())
.vlanId(0)
.build())
.build())
.public_(false)
.build())
.sshKeyCreate(InstanceSshKeyCreateArgs.builder()
.name("string")
.publicKey("string")
.build())
.bulk(0)
.group(InstanceGroupArgs.builder()
.groupId("string")
.build())
.availabilityZone("string")
.autoBackup(InstanceAutoBackupArgs.builder()
.cron("string")
.rotation(0)
.build())
.serviceName("string")
.sshKey(InstanceSshKeyArgs.builder()
.name("string")
.build())
.name("string")
.userData("string")
.build());
instance_resource = ovh.cloud_project.Instance("instanceResource",
region="string",
flavor={
"flavor_id": "string",
},
billing_period="string",
boot_from={
"image_id": "string",
"volume_id": "string",
},
network={
"private": {
"floating_ip": {
"id": "string",
},
"floating_ip_create": {
"description": "string",
},
"gateway": {
"id": "string",
},
"gateway_create": {
"model": "string",
"name": "string",
},
"ip": "string",
"network": {
"id": "string",
"subnet_id": "string",
},
"network_create": {
"name": "string",
"subnet": {
"cidr": "string",
"enable_dhcp": False,
"ip_version": 0,
},
"vlan_id": 0,
},
},
"public": False,
},
ssh_key_create={
"name": "string",
"public_key": "string",
},
bulk=0,
group={
"group_id": "string",
},
availability_zone="string",
auto_backup={
"cron": "string",
"rotation": 0,
},
service_name="string",
ssh_key={
"name": "string",
},
name="string",
user_data="string")
const instanceResource = new ovh.cloudproject.Instance("instanceResource", {
region: "string",
flavor: {
flavorId: "string",
},
billingPeriod: "string",
bootFrom: {
imageId: "string",
volumeId: "string",
},
network: {
"private": {
floatingIp: {
id: "string",
},
floatingIpCreate: {
description: "string",
},
gateway: {
id: "string",
},
gatewayCreate: {
model: "string",
name: "string",
},
ip: "string",
network: {
id: "string",
subnetId: "string",
},
networkCreate: {
name: "string",
subnet: {
cidr: "string",
enableDhcp: false,
ipVersion: 0,
},
vlanId: 0,
},
},
"public": false,
},
sshKeyCreate: {
name: "string",
publicKey: "string",
},
bulk: 0,
group: {
groupId: "string",
},
availabilityZone: "string",
autoBackup: {
cron: "string",
rotation: 0,
},
serviceName: "string",
sshKey: {
name: "string",
},
name: "string",
userData: "string",
});
type: ovh:CloudProject:Instance
properties:
autoBackup:
cron: string
rotation: 0
availabilityZone: string
billingPeriod: string
bootFrom:
imageId: string
volumeId: string
bulk: 0
flavor:
flavorId: string
group:
groupId: string
name: string
network:
private:
floatingIp:
id: string
floatingIpCreate:
description: string
gateway:
id: string
gatewayCreate:
model: string
name: string
ip: string
network:
id: string
subnetId: string
networkCreate:
name: string
subnet:
cidr: string
enableDhcp: false
ipVersion: 0
vlanId: 0
public: false
region: string
serviceName: string
sshKey:
name: string
sshKeyCreate:
name: string
publicKey: string
userData: string
Instance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Instance resource accepts the following input properties:
- Billing
Period string - Billing period - hourly or monthly
- Boot
From InstanceBoot From - Boot the instance from an image or a volume
- Flavor
Instance
Flavor - Flavor information
- Network
Instance
Network - Create network interfaces
- Region string
- Instance region
- Auto
Backup InstanceAuto Backup - Create an autobackup workflow after instance start up.
- Availability
Zone string - The availability zone where the instance will be created
- Bulk int
- Create multiple instances
- Group
Instance
Group - Start instance in group
- Name string
- Instance name
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used - Ssh
Key InstanceSsh Key - Existing SSH Keypair
- Ssh
Key InstanceCreate Ssh Key Create - Add existing SSH Key pair into your Public Cloud project and link it to the instance
- User
Data string - Configuration information or scripts to use upon launch
- Billing
Period string - Billing period - hourly or monthly
- Boot
From InstanceBoot From Args - Boot the instance from an image or a volume
- Flavor
Instance
Flavor Args - Flavor information
- Network
Instance
Network Args - Create network interfaces
- Region string
- Instance region
- Auto
Backup InstanceAuto Backup Args - Create an autobackup workflow after instance start up.
- Availability
Zone string - The availability zone where the instance will be created
- Bulk int
- Create multiple instances
- Group
Instance
Group Args - Start instance in group
- Name string
- Instance name
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used - Ssh
Key InstanceSsh Key Args - Existing SSH Keypair
- Ssh
Key InstanceCreate Ssh Key Create Args - Add existing SSH Key pair into your Public Cloud project and link it to the instance
- User
Data string - Configuration information or scripts to use upon launch
- billing
Period String - Billing period - hourly or monthly
- boot
From InstanceBoot From - Boot the instance from an image or a volume
- flavor
Instance
Flavor - Flavor information
- network
Instance
Network - Create network interfaces
- region String
- Instance region
- auto
Backup InstanceAuto Backup - Create an autobackup workflow after instance start up.
- availability
Zone String - The availability zone where the instance will be created
- bulk Integer
- Create multiple instances
- group
Instance
Group - Start instance in group
- name String
- Instance name
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used - ssh
Key InstanceSsh Key - Existing SSH Keypair
- ssh
Key InstanceCreate Ssh Key Create - Add existing SSH Key pair into your Public Cloud project and link it to the instance
- user
Data String - Configuration information or scripts to use upon launch
- billing
Period string - Billing period - hourly or monthly
- boot
From InstanceBoot From - Boot the instance from an image or a volume
- flavor
Instance
Flavor - Flavor information
- network
Instance
Network - Create network interfaces
- region string
- Instance region
- auto
Backup InstanceAuto Backup - Create an autobackup workflow after instance start up.
- availability
Zone string - The availability zone where the instance will be created
- bulk number
- Create multiple instances
- group
Instance
Group - Start instance in group
- name string
- Instance name
- service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used - ssh
Key InstanceSsh Key - Existing SSH Keypair
- ssh
Key InstanceCreate Ssh Key Create - Add existing SSH Key pair into your Public Cloud project and link it to the instance
- user
Data string - Configuration information or scripts to use upon launch
- billing_
period str - Billing period - hourly or monthly
- boot_
from InstanceBoot From Args - Boot the instance from an image or a volume
- flavor
Instance
Flavor Args - Flavor information
- network
Instance
Network Args - Create network interfaces
- region str
- Instance region
- auto_
backup InstanceAuto Backup Args - Create an autobackup workflow after instance start up.
- availability_
zone str - The availability zone where the instance will be created
- bulk int
- Create multiple instances
- group
Instance
Group Args - Start instance in group
- name str
- Instance name
- service_
name str - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used - ssh_
key InstanceSsh Key Args - Existing SSH Keypair
- ssh_
key_ Instancecreate Ssh Key Create Args - Add existing SSH Key pair into your Public Cloud project and link it to the instance
- user_
data str - Configuration information or scripts to use upon launch
- billing
Period String - Billing period - hourly or monthly
- boot
From Property Map - Boot the instance from an image or a volume
- flavor Property Map
- Flavor information
- network Property Map
- Create network interfaces
- region String
- Instance region
- auto
Backup Property Map - Create an autobackup workflow after instance start up.
- availability
Zone String - The availability zone where the instance will be created
- bulk Number
- Create multiple instances
- group Property Map
- Start instance in group
- name String
- Instance name
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used - ssh
Key Property Map - Existing SSH Keypair
- ssh
Key Property MapCreate - Add existing SSH Key pair into your Public Cloud project and link it to the instance
- user
Data String - Configuration information or scripts to use upon launch
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Addresses
List<Instance
Address> - Instance IP addresses
- Attached
Volumes List<InstanceAttached Volume> - Volumes attached to the instance
- Flavor
Id string - Flavor id
- Flavor
Name string - Flavor name
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Id string - Image id
- Status string
- Instance status
- Task
State string - Instance task state
- Addresses
[]Instance
Address - Instance IP addresses
- Attached
Volumes []InstanceAttached Volume - Volumes attached to the instance
- Flavor
Id string - Flavor id
- Flavor
Name string - Flavor name
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Id string - Image id
- Status string
- Instance status
- Task
State string - Instance task state
- addresses
List<Instance
Address> - Instance IP addresses
- attached
Volumes List<InstanceAttached Volume> - Volumes attached to the instance
- flavor
Id String - Flavor id
- flavor
Name String - Flavor name
- id String
- The provider-assigned unique ID for this managed resource.
- image
Id String - Image id
- status String
- Instance status
- task
State String - Instance task state
- addresses
Instance
Address[] - Instance IP addresses
- attached
Volumes InstanceAttached Volume[] - Volumes attached to the instance
- flavor
Id string - Flavor id
- flavor
Name string - Flavor name
- id string
- The provider-assigned unique ID for this managed resource.
- image
Id string - Image id
- status string
- Instance status
- task
State string - Instance task state
- addresses
Sequence[Instance
Address] - Instance IP addresses
- attached_
volumes Sequence[InstanceAttached Volume] - Volumes attached to the instance
- flavor_
id str - Flavor id
- flavor_
name str - Flavor name
- id str
- The provider-assigned unique ID for this managed resource.
- image_
id str - Image id
- status str
- Instance status
- task_
state str - Instance task state
- addresses List<Property Map>
- Instance IP addresses
- attached
Volumes List<Property Map> - Volumes attached to the instance
- flavor
Id String - Flavor id
- flavor
Name String - Flavor name
- id String
- The provider-assigned unique ID for this managed resource.
- image
Id String - Image id
- status String
- Instance status
- task
State String - Instance task state
Look up Existing Instance Resource
Get an existing Instance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: InstanceState, opts?: CustomResourceOptions): Instance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
addresses: Optional[Sequence[InstanceAddressArgs]] = None,
attached_volumes: Optional[Sequence[InstanceAttachedVolumeArgs]] = None,
auto_backup: Optional[InstanceAutoBackupArgs] = None,
availability_zone: Optional[str] = None,
billing_period: Optional[str] = None,
boot_from: Optional[InstanceBootFromArgs] = None,
bulk: Optional[int] = None,
flavor: Optional[InstanceFlavorArgs] = None,
flavor_id: Optional[str] = None,
flavor_name: Optional[str] = None,
group: Optional[InstanceGroupArgs] = None,
image_id: Optional[str] = None,
name: Optional[str] = None,
network: Optional[InstanceNetworkArgs] = None,
region: Optional[str] = None,
service_name: Optional[str] = None,
ssh_key: Optional[InstanceSshKeyArgs] = None,
ssh_key_create: Optional[InstanceSshKeyCreateArgs] = None,
status: Optional[str] = None,
task_state: Optional[str] = None,
user_data: Optional[str] = None) -> Instance
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
resources: _: type: ovh:CloudProject:Instance get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Addresses
List<Instance
Address> - Instance IP addresses
- Attached
Volumes List<InstanceAttached Volume> - Volumes attached to the instance
- Auto
Backup InstanceAuto Backup - Create an autobackup workflow after instance start up.
- Availability
Zone string - The availability zone where the instance will be created
- Billing
Period string - Billing period - hourly or monthly
- Boot
From InstanceBoot From - Boot the instance from an image or a volume
- Bulk int
- Create multiple instances
- Flavor
Instance
Flavor - Flavor information
- Flavor
Id string - Flavor id
- Flavor
Name string - Flavor name
- Group
Instance
Group - Start instance in group
- Image
Id string - Image id
- Name string
- Instance name
- Network
Instance
Network - Create network interfaces
- Region string
- Instance region
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used - Ssh
Key InstanceSsh Key - Existing SSH Keypair
- Ssh
Key InstanceCreate Ssh Key Create - Add existing SSH Key pair into your Public Cloud project and link it to the instance
- Status string
- Instance status
- Task
State string - Instance task state
- User
Data string - Configuration information or scripts to use upon launch
- Addresses
[]Instance
Address Args - Instance IP addresses
- Attached
Volumes []InstanceAttached Volume Args - Volumes attached to the instance
- Auto
Backup InstanceAuto Backup Args - Create an autobackup workflow after instance start up.
- Availability
Zone string - The availability zone where the instance will be created
- Billing
Period string - Billing period - hourly or monthly
- Boot
From InstanceBoot From Args - Boot the instance from an image or a volume
- Bulk int
- Create multiple instances
- Flavor
Instance
Flavor Args - Flavor information
- Flavor
Id string - Flavor id
- Flavor
Name string - Flavor name
- Group
Instance
Group Args - Start instance in group
- Image
Id string - Image id
- Name string
- Instance name
- Network
Instance
Network Args - Create network interfaces
- Region string
- Instance region
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used - Ssh
Key InstanceSsh Key Args - Existing SSH Keypair
- Ssh
Key InstanceCreate Ssh Key Create Args - Add existing SSH Key pair into your Public Cloud project and link it to the instance
- Status string
- Instance status
- Task
State string - Instance task state
- User
Data string - Configuration information or scripts to use upon launch
- addresses
List<Instance
Address> - Instance IP addresses
- attached
Volumes List<InstanceAttached Volume> - Volumes attached to the instance
- auto
Backup InstanceAuto Backup - Create an autobackup workflow after instance start up.
- availability
Zone String - The availability zone where the instance will be created
- billing
Period String - Billing period - hourly or monthly
- boot
From InstanceBoot From - Boot the instance from an image or a volume
- bulk Integer
- Create multiple instances
- flavor
Instance
Flavor - Flavor information
- flavor
Id String - Flavor id
- flavor
Name String - Flavor name
- group
Instance
Group - Start instance in group
- image
Id String - Image id
- name String
- Instance name
- network
Instance
Network - Create network interfaces
- region String
- Instance region
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used - ssh
Key InstanceSsh Key - Existing SSH Keypair
- ssh
Key InstanceCreate Ssh Key Create - Add existing SSH Key pair into your Public Cloud project and link it to the instance
- status String
- Instance status
- task
State String - Instance task state
- user
Data String - Configuration information or scripts to use upon launch
- addresses
Instance
Address[] - Instance IP addresses
- attached
Volumes InstanceAttached Volume[] - Volumes attached to the instance
- auto
Backup InstanceAuto Backup - Create an autobackup workflow after instance start up.
- availability
Zone string - The availability zone where the instance will be created
- billing
Period string - Billing period - hourly or monthly
- boot
From InstanceBoot From - Boot the instance from an image or a volume
- bulk number
- Create multiple instances
- flavor
Instance
Flavor - Flavor information
- flavor
Id string - Flavor id
- flavor
Name string - Flavor name
- group
Instance
Group - Start instance in group
- image
Id string - Image id
- name string
- Instance name
- network
Instance
Network - Create network interfaces
- region string
- Instance region
- service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used - ssh
Key InstanceSsh Key - Existing SSH Keypair
- ssh
Key InstanceCreate Ssh Key Create - Add existing SSH Key pair into your Public Cloud project and link it to the instance
- status string
- Instance status
- task
State string - Instance task state
- user
Data string - Configuration information or scripts to use upon launch
- addresses
Sequence[Instance
Address Args] - Instance IP addresses
- attached_
volumes Sequence[InstanceAttached Volume Args] - Volumes attached to the instance
- auto_
backup InstanceAuto Backup Args - Create an autobackup workflow after instance start up.
- availability_
zone str - The availability zone where the instance will be created
- billing_
period str - Billing period - hourly or monthly
- boot_
from InstanceBoot From Args - Boot the instance from an image or a volume
- bulk int
- Create multiple instances
- flavor
Instance
Flavor Args - Flavor information
- flavor_
id str - Flavor id
- flavor_
name str - Flavor name
- group
Instance
Group Args - Start instance in group
- image_
id str - Image id
- name str
- Instance name
- network
Instance
Network Args - Create network interfaces
- region str
- Instance region
- service_
name str - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used - ssh_
key InstanceSsh Key Args - Existing SSH Keypair
- ssh_
key_ Instancecreate Ssh Key Create Args - Add existing SSH Key pair into your Public Cloud project and link it to the instance
- status str
- Instance status
- task_
state str - Instance task state
- user_
data str - Configuration information or scripts to use upon launch
- addresses List<Property Map>
- Instance IP addresses
- attached
Volumes List<Property Map> - Volumes attached to the instance
- auto
Backup Property Map - Create an autobackup workflow after instance start up.
- availability
Zone String - The availability zone where the instance will be created
- billing
Period String - Billing period - hourly or monthly
- boot
From Property Map - Boot the instance from an image or a volume
- bulk Number
- Create multiple instances
- flavor Property Map
- Flavor information
- flavor
Id String - Flavor id
- flavor
Name String - Flavor name
- group Property Map
- Start instance in group
- image
Id String - Image id
- name String
- Instance name
- network Property Map
- Create network interfaces
- region String
- Instance region
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used - ssh
Key Property Map - Existing SSH Keypair
- ssh
Key Property MapCreate - Add existing SSH Key pair into your Public Cloud project and link it to the instance
- status String
- Instance status
- task
State String - Instance task state
- user
Data String - Configuration information or scripts to use upon launch
Supporting Types
InstanceAddress, InstanceAddressArgs
InstanceAttachedVolume, InstanceAttachedVolumeArgs
- Id string
- Instance id
- Id string
- Instance id
- id String
- Instance id
- id string
- Instance id
- id str
- Instance id
- id String
- Instance id
InstanceAutoBackup, InstanceAutoBackupArgs
InstanceBootFrom, InstanceBootFromArgs
InstanceFlavor, InstanceFlavorArgs
- Flavor
Id string - Flavor ID. Flavors can be retrieved using
GET /cloud/project/{serviceName}/flavor
- Flavor
Id string - Flavor ID. Flavors can be retrieved using
GET /cloud/project/{serviceName}/flavor
- flavor
Id String - Flavor ID. Flavors can be retrieved using
GET /cloud/project/{serviceName}/flavor
- flavor
Id string - Flavor ID. Flavors can be retrieved using
GET /cloud/project/{serviceName}/flavor
- flavor_
id str - Flavor ID. Flavors can be retrieved using
GET /cloud/project/{serviceName}/flavor
- flavor
Id String - Flavor ID. Flavors can be retrieved using
GET /cloud/project/{serviceName}/flavor
InstanceGroup, InstanceGroupArgs
- Group
Id string - Group id
- Group
Id string - Group id
- group
Id String - Group id
- group
Id string - Group id
- group_
id str - Group id
- group
Id String - Group id
InstanceNetwork, InstanceNetworkArgs
- Private
Instance
Network Private - Private network information
- Public bool
- Set the new instance as public
- Private
Instance
Network Private - Private network information
- Public bool
- Set the new instance as public
- private_
Instance
Network Private - Private network information
- public_ Boolean
- Set the new instance as public
- private
Instance
Network Private - Private network information
- public boolean
- Set the new instance as public
- private
Instance
Network Private - Private network information
- public bool
- Set the new instance as public
- private Property Map
- Private network information
- public Boolean
- Set the new instance as public
InstanceNetworkPrivate, InstanceNetworkPrivateArgs
- Floating
Ip InstanceNetwork Private Floating Ip - Existing floating IP
- Floating
Ip InstanceCreate Network Private Floating Ip Create - Information to create a new floating IP
- Gateway
Instance
Network Private Gateway - Existing gateway
- Gateway
Create InstanceNetwork Private Gateway Create - Information to create a new gateway
- Ip string
- Instance IP in the private network
- Network
Instance
Network Private Network - Existing private network
- Network
Create InstanceNetwork Private Network Create - Information to create a new private network
- Floating
Ip InstanceNetwork Private Floating Ip - Existing floating IP
- Floating
Ip InstanceCreate Network Private Floating Ip Create - Information to create a new floating IP
- Gateway
Instance
Network Private Gateway - Existing gateway
- Gateway
Create InstanceNetwork Private Gateway Create - Information to create a new gateway
- Ip string
- Instance IP in the private network
- Network
Instance
Network Private Network - Existing private network
- Network
Create InstanceNetwork Private Network Create - Information to create a new private network
- floating
Ip InstanceNetwork Private Floating Ip - Existing floating IP
- floating
Ip InstanceCreate Network Private Floating Ip Create - Information to create a new floating IP
- gateway
Instance
Network Private Gateway - Existing gateway
- gateway
Create InstanceNetwork Private Gateway Create - Information to create a new gateway
- ip String
- Instance IP in the private network
- network
Instance
Network Private Network - Existing private network
- network
Create InstanceNetwork Private Network Create - Information to create a new private network
- floating
Ip InstanceNetwork Private Floating Ip - Existing floating IP
- floating
Ip InstanceCreate Network Private Floating Ip Create - Information to create a new floating IP
- gateway
Instance
Network Private Gateway - Existing gateway
- gateway
Create InstanceNetwork Private Gateway Create - Information to create a new gateway
- ip string
- Instance IP in the private network
- network
Instance
Network Private Network - Existing private network
- network
Create InstanceNetwork Private Network Create - Information to create a new private network
- floating_
ip InstanceNetwork Private Floating Ip - Existing floating IP
- floating_
ip_ Instancecreate Network Private Floating Ip Create - Information to create a new floating IP
- gateway
Instance
Network Private Gateway - Existing gateway
- gateway_
create InstanceNetwork Private Gateway Create - Information to create a new gateway
- ip str
- Instance IP in the private network
- network
Instance
Network Private Network - Existing private network
- network_
create InstanceNetwork Private Network Create - Information to create a new private network
- floating
Ip Property Map - Existing floating IP
- floating
Ip Property MapCreate - Information to create a new floating IP
- gateway Property Map
- Existing gateway
- gateway
Create Property Map - Information to create a new gateway
- ip String
- Instance IP in the private network
- network Property Map
- Existing private network
- network
Create Property Map - Information to create a new private network
InstanceNetworkPrivateFloatingIp, InstanceNetworkPrivateFloatingIpArgs
- Id string
- Floating IP ID
- Id string
- Floating IP ID
- id String
- Floating IP ID
- id string
- Floating IP ID
- id str
- Floating IP ID
- id String
- Floating IP ID
InstanceNetworkPrivateFloatingIpCreate, InstanceNetworkPrivateFloatingIpCreateArgs
- Description string
- Floating IP description
- Description string
- Floating IP description
- description String
- Floating IP description
- description string
- Floating IP description
- description str
- Floating IP description
- description String
- Floating IP description
InstanceNetworkPrivateGateway, InstanceNetworkPrivateGatewayArgs
- Id string
- Gateway ID
- Id string
- Gateway ID
- id String
- Gateway ID
- id string
- Gateway ID
- id str
- Gateway ID
- id String
- Gateway ID
InstanceNetworkPrivateGatewayCreate, InstanceNetworkPrivateGatewayCreateArgs
InstanceNetworkPrivateNetwork, InstanceNetworkPrivateNetworkArgs
InstanceNetworkPrivateNetworkCreate, InstanceNetworkPrivateNetworkCreateArgs
- Name string
- Instance name
- Subnet
Instance
Network Private Network Create Subnet - New subnet information
- Vlan
Id int - Network vlan ID
- Name string
- Instance name
- Subnet
Instance
Network Private Network Create Subnet - New subnet information
- Vlan
Id int - Network vlan ID
- name String
- Instance name
- subnet
Instance
Network Private Network Create Subnet - New subnet information
- vlan
Id Integer - Network vlan ID
- name string
- Instance name
- subnet
Instance
Network Private Network Create Subnet - New subnet information
- vlan
Id number - Network vlan ID
- name str
- Instance name
- subnet
Instance
Network Private Network Create Subnet - New subnet information
- vlan_
id int - Network vlan ID
- name String
- Instance name
- subnet Property Map
- New subnet information
- vlan
Id Number - Network vlan ID
InstanceNetworkPrivateNetworkCreateSubnet, InstanceNetworkPrivateNetworkCreateSubnetArgs
- Cidr string
- Subnet range in CIDR notation
- Enable
Dhcp bool - Whether to enable DHCP
- Ip
Version int - IP version
- Cidr string
- Subnet range in CIDR notation
- Enable
Dhcp bool - Whether to enable DHCP
- Ip
Version int - IP version
- cidr String
- Subnet range in CIDR notation
- enable
Dhcp Boolean - Whether to enable DHCP
- ip
Version Integer - IP version
- cidr string
- Subnet range in CIDR notation
- enable
Dhcp boolean - Whether to enable DHCP
- ip
Version number - IP version
- cidr str
- Subnet range in CIDR notation
- enable_
dhcp bool - Whether to enable DHCP
- ip_
version int - IP version
- cidr String
- Subnet range in CIDR notation
- enable
Dhcp Boolean - Whether to enable DHCP
- ip
Version Number - IP version
InstanceSshKey, InstanceSshKeyArgs
- Name string
- SSH Keypair name
- Name string
- SSH Keypair name
- name String
- SSH Keypair name
- name string
- SSH Keypair name
- name str
- SSH Keypair name
- name String
- SSH Keypair name
InstanceSshKeyCreate, InstanceSshKeyCreateArgs
- name str
- SSH Key pair name
- public_
key str - SSH Public key
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.