ovh.Dedicated.ServerInstallTask
Explore with Pulumi AI
Example Usage
Using a custom template based on an OVHCloud template
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
import * as ovh from "@pulumi/ovh";
const rescue = ovh.Dedicated.getServerBoots({
serviceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
bootType: "rescue",
});
const debian = new ovh.me.InstallationTemplate("debian", {
baseTemplateName: "debian12_64",
templateName: "mydebian12",
customization: {
customHostname: "mytest",
},
});
const serverInstall = new ovh.dedicated.ServerInstallTask("serverInstall", {
serviceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
templateName: debian.templateName,
bootidOnDestroy: rescue.then(rescue => rescue.results?.[0]),
details: {
customHostname: "mytest",
},
userMetadatas: [
{
key: "sshKey",
value: "ssh-ed25519 AAAAC3...",
},
{
key: "postInstallationScript",
value: `#!/bin/bash
echo "coucou postInstallationScript" > /opt/coucou
cat /etc/machine-id >> /opt/coucou
date "+%Y-%m-%d %H:%M:%S" --utc >> /opt/coucou
`,
},
],
});
import pulumi
import pulumi_ovh as ovh
rescue = ovh.Dedicated.get_server_boots(service_name="nsxxxxxxx.ip-xx-xx-xx.eu",
boot_type="rescue")
debian = ovh.me.InstallationTemplate("debian",
base_template_name="debian12_64",
template_name="mydebian12",
customization={
"custom_hostname": "mytest",
})
server_install = ovh.dedicated.ServerInstallTask("serverInstall",
service_name="nsxxxxxxx.ip-xx-xx-xx.eu",
template_name=debian.template_name,
bootid_on_destroy=rescue.results[0],
details={
"custom_hostname": "mytest",
},
user_metadatas=[
{
"key": "sshKey",
"value": "ssh-ed25519 AAAAC3...",
},
{
"key": "postInstallationScript",
"value": """#!/bin/bash
echo "coucou postInstallationScript" > /opt/coucou
cat /etc/machine-id >> /opt/coucou
date "+%Y-%m-%d %H:%M:%S" --utc >> /opt/coucou
""",
},
])
package main
import (
"github.com/ovh/pulumi-ovh/sdk/go/ovh/Dedicated"
"github.com/ovh/pulumi-ovh/sdk/go/ovh/Me"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
rescue, err := Dedicated.GetServerBoots(ctx, &dedicated.GetServerBootsArgs{
ServiceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
BootType: pulumi.StringRef("rescue"),
}, nil)
if err != nil {
return err
}
debian, err := Me.NewInstallationTemplate(ctx, "debian", &Me.InstallationTemplateArgs{
BaseTemplateName: pulumi.String("debian12_64"),
TemplateName: pulumi.String("mydebian12"),
Customization: &me.InstallationTemplateCustomizationArgs{
CustomHostname: pulumi.String("mytest"),
},
})
if err != nil {
return err
}
_, err = Dedicated.NewServerInstallTask(ctx, "serverInstall", &Dedicated.ServerInstallTaskArgs{
ServiceName: pulumi.String("nsxxxxxxx.ip-xx-xx-xx.eu"),
TemplateName: debian.TemplateName,
BootidOnDestroy: pulumi.Int(rescue.Results[0]),
Details: &dedicated.ServerInstallTaskDetailsArgs{
CustomHostname: pulumi.String("mytest"),
},
UserMetadatas: dedicated.ServerInstallTaskUserMetadataArray{
&dedicated.ServerInstallTaskUserMetadataArgs{
Key: pulumi.String("sshKey"),
Value: pulumi.String("ssh-ed25519 AAAAC3..."),
},
&dedicated.ServerInstallTaskUserMetadataArgs{
Key: pulumi.String("postInstallationScript"),
Value: pulumi.String("#!/bin/bash\n echo \"coucou postInstallationScript\" > /opt/coucou\n cat /etc/machine-id >> /opt/coucou\n date \"+%Y-%m-%d %H:%M:%S\" --utc >> /opt/coucou\n"),
},
},
})
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 rescue = Ovh.Dedicated.GetServerBoots.Invoke(new()
{
ServiceName = "nsxxxxxxx.ip-xx-xx-xx.eu",
BootType = "rescue",
});
var debian = new Ovh.Me.InstallationTemplate("debian", new()
{
BaseTemplateName = "debian12_64",
TemplateName = "mydebian12",
Customization = new Ovh.Me.Inputs.InstallationTemplateCustomizationArgs
{
CustomHostname = "mytest",
},
});
var serverInstall = new Ovh.Dedicated.ServerInstallTask("serverInstall", new()
{
ServiceName = "nsxxxxxxx.ip-xx-xx-xx.eu",
TemplateName = debian.TemplateName,
BootidOnDestroy = rescue.Apply(getServerBootsResult => getServerBootsResult.Results[0]),
Details = new Ovh.Dedicated.Inputs.ServerInstallTaskDetailsArgs
{
CustomHostname = "mytest",
},
UserMetadatas = new[]
{
new Ovh.Dedicated.Inputs.ServerInstallTaskUserMetadataArgs
{
Key = "sshKey",
Value = "ssh-ed25519 AAAAC3...",
},
new Ovh.Dedicated.Inputs.ServerInstallTaskUserMetadataArgs
{
Key = "postInstallationScript",
Value = @"#!/bin/bash
echo ""coucou postInstallationScript"" > /opt/coucou
cat /etc/machine-id >> /opt/coucou
date ""+%Y-%m-%d %H:%M:%S"" --utc >> /opt/coucou
",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Dedicated.DedicatedFunctions;
import com.pulumi.ovh.Dedicated.inputs.GetServerBootsArgs;
import com.pulumi.ovh.Me.InstallationTemplate;
import com.pulumi.ovh.Me.InstallationTemplateArgs;
import com.pulumi.ovh.Me.inputs.InstallationTemplateCustomizationArgs;
import com.pulumi.ovh.Dedicated.ServerInstallTask;
import com.pulumi.ovh.Dedicated.ServerInstallTaskArgs;
import com.pulumi.ovh.Dedicated.inputs.ServerInstallTaskDetailsArgs;
import com.pulumi.ovh.Dedicated.inputs.ServerInstallTaskUserMetadataArgs;
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 rescue = DedicatedFunctions.getServerBoots(GetServerBootsArgs.builder()
.serviceName("nsxxxxxxx.ip-xx-xx-xx.eu")
.bootType("rescue")
.build());
var debian = new InstallationTemplate("debian", InstallationTemplateArgs.builder()
.baseTemplateName("debian12_64")
.templateName("mydebian12")
.customization(InstallationTemplateCustomizationArgs.builder()
.customHostname("mytest")
.build())
.build());
var serverInstall = new ServerInstallTask("serverInstall", ServerInstallTaskArgs.builder()
.serviceName("nsxxxxxxx.ip-xx-xx-xx.eu")
.templateName(debian.templateName())
.bootidOnDestroy(rescue.applyValue(getServerBootsResult -> getServerBootsResult.results()[0]))
.details(ServerInstallTaskDetailsArgs.builder()
.customHostname("mytest")
.build())
.userMetadatas(
ServerInstallTaskUserMetadataArgs.builder()
.key("sshKey")
.value("ssh-ed25519 AAAAC3...")
.build(),
ServerInstallTaskUserMetadataArgs.builder()
.key("postInstallationScript")
.value("""
#!/bin/bash
echo "coucou postInstallationScript" > /opt/coucou
cat /etc/machine-id >> /opt/coucou
date "+%Y-%m-%d %H:%M:%S" --utc >> /opt/coucou
""")
.build())
.build());
}
}
resources:
debian:
type: ovh:Me:InstallationTemplate
properties:
baseTemplateName: debian12_64
templateName: mydebian12
customization:
customHostname: mytest
serverInstall:
type: ovh:Dedicated:ServerInstallTask
properties:
serviceName: nsxxxxxxx.ip-xx-xx-xx.eu
templateName: ${debian.templateName}
bootidOnDestroy: ${rescue.results[0]}
details:
customHostname: mytest
userMetadatas:
- key: sshKey
value: ssh-ed25519 AAAAC3...
- key: postInstallationScript
value: |
#!/bin/bash
echo "coucou postInstallationScript" > /opt/coucou
cat /etc/machine-id >> /opt/coucou
date "+%Y-%m-%d %H:%M:%S" --utc >> /opt/coucou
variables:
rescue:
fn::invoke:
Function: ovh:Dedicated:getServerBoots
Arguments:
serviceName: nsxxxxxxx.ip-xx-xx-xx.eu
bootType: rescue
Using a BringYourOwnLinux (BYOLinux) template (with userMetadata)
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
import * as ovh from "@pulumi/ovh";
const server = ovh.getServer({
serviceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
});
const rescue = ovh.Dedicated.getServerBoots({
serviceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
bootType: "rescue",
});
const serverInstall = new ovh.dedicated.ServerInstallTask("serverInstall", {
serviceName: server.then(server => server.serviceName),
templateName: "byolinux_64",
bootidOnDestroy: rescue.then(rescue => rescue.results?.[0]),
details: {
customHostname: "mytest",
},
userMetadatas: [
{
key: "imageURL",
value: "https://myimage.qcow2",
},
{
key: "imageType",
value: "qcow2",
},
{
key: "httpHeaders0Key",
value: "Authorization",
},
{
key: "httpHeaders0Value",
value: "Basic bG9naW46xxxxxxx=",
},
{
key: "imageChecksumType",
value: "sha512",
},
{
key: "imageCheckSum",
value: "047122c9ff4d2a69512212104b06c678f5a9cdb22b75467353613ff87ccd03b57b38967e56d810e61366f9d22d6bd39ac0addf4e00a4c6445112a2416af8f225",
},
{
key: "configDriveUserData",
value: `#cloud-config
ssh_authorized_keys:
- ${data.ovh_me_ssh_key.mykey.key}
users:
- name: patient0
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users, sudo
shell: /bin/bash
lock_passwd: false
ssh_authorized_keys:
- ${data.ovh_me_ssh_key.mykey.key}
disable_root: false
packages:
- vim
- tree
final_message: The system is finally up, after $UPTIME seconds
`,
},
],
});
import pulumi
import pulumi_ovh as ovh
server = ovh.get_server(service_name="nsxxxxxxx.ip-xx-xx-xx.eu")
rescue = ovh.Dedicated.get_server_boots(service_name="nsxxxxxxx.ip-xx-xx-xx.eu",
boot_type="rescue")
server_install = ovh.dedicated.ServerInstallTask("serverInstall",
service_name=server.service_name,
template_name="byolinux_64",
bootid_on_destroy=rescue.results[0],
details={
"custom_hostname": "mytest",
},
user_metadatas=[
{
"key": "imageURL",
"value": "https://myimage.qcow2",
},
{
"key": "imageType",
"value": "qcow2",
},
{
"key": "httpHeaders0Key",
"value": "Authorization",
},
{
"key": "httpHeaders0Value",
"value": "Basic bG9naW46xxxxxxx=",
},
{
"key": "imageChecksumType",
"value": "sha512",
},
{
"key": "imageCheckSum",
"value": "047122c9ff4d2a69512212104b06c678f5a9cdb22b75467353613ff87ccd03b57b38967e56d810e61366f9d22d6bd39ac0addf4e00a4c6445112a2416af8f225",
},
{
"key": "configDriveUserData",
"value": f"""#cloud-config
ssh_authorized_keys:
- {data["ovh_me_ssh_key"]["mykey"]["key"]}
users:
- name: patient0
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users, sudo
shell: /bin/bash
lock_passwd: false
ssh_authorized_keys:
- {data["ovh_me_ssh_key"]["mykey"]["key"]}
disable_root: false
packages:
- vim
- tree
final_message: The system is finally up, after $UPTIME seconds
""",
},
])
package main
import (
"fmt"
"github.com/ovh/pulumi-ovh/sdk/go/ovh"
"github.com/ovh/pulumi-ovh/sdk/go/ovh/Dedicated"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
server, err := ovh.GetServer(ctx, &ovh.GetServerArgs{
ServiceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
}, nil)
if err != nil {
return err
}
rescue, err := Dedicated.GetServerBoots(ctx, &dedicated.GetServerBootsArgs{
ServiceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
BootType: pulumi.StringRef("rescue"),
}, nil)
if err != nil {
return err
}
_, err = Dedicated.NewServerInstallTask(ctx, "serverInstall", &Dedicated.ServerInstallTaskArgs{
ServiceName: pulumi.String(server.ServiceName),
TemplateName: pulumi.String("byolinux_64"),
BootidOnDestroy: pulumi.Int(rescue.Results[0]),
Details: &dedicated.ServerInstallTaskDetailsArgs{
CustomHostname: pulumi.String("mytest"),
},
UserMetadatas: dedicated.ServerInstallTaskUserMetadataArray{
&dedicated.ServerInstallTaskUserMetadataArgs{
Key: pulumi.String("imageURL"),
Value: pulumi.String("https://myimage.qcow2"),
},
&dedicated.ServerInstallTaskUserMetadataArgs{
Key: pulumi.String("imageType"),
Value: pulumi.String("qcow2"),
},
&dedicated.ServerInstallTaskUserMetadataArgs{
Key: pulumi.String("httpHeaders0Key"),
Value: pulumi.String("Authorization"),
},
&dedicated.ServerInstallTaskUserMetadataArgs{
Key: pulumi.String("httpHeaders0Value"),
Value: pulumi.String("Basic bG9naW46xxxxxxx="),
},
&dedicated.ServerInstallTaskUserMetadataArgs{
Key: pulumi.String("imageChecksumType"),
Value: pulumi.String("sha512"),
},
&dedicated.ServerInstallTaskUserMetadataArgs{
Key: pulumi.String("imageCheckSum"),
Value: pulumi.String("047122c9ff4d2a69512212104b06c678f5a9cdb22b75467353613ff87ccd03b57b38967e56d810e61366f9d22d6bd39ac0addf4e00a4c6445112a2416af8f225"),
},
&dedicated.ServerInstallTaskUserMetadataArgs{
Key: pulumi.String("configDriveUserData"),
Value: pulumi.Sprintf(`#cloud-config
ssh_authorized_keys:
- %v
users:
- name: patient0
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users, sudo
shell: /bin/bash
lock_passwd: false
ssh_authorized_keys:
- %v
disable_root: false
packages:
- vim
- tree
final_message: The system is finally up, after $UPTIME seconds
`, data.Ovh_me_ssh_key.Mykey.Key, data.Ovh_me_ssh_key.Mykey.Key),
},
},
})
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 server = Ovh.GetServer.Invoke(new()
{
ServiceName = "nsxxxxxxx.ip-xx-xx-xx.eu",
});
var rescue = Ovh.Dedicated.GetServerBoots.Invoke(new()
{
ServiceName = "nsxxxxxxx.ip-xx-xx-xx.eu",
BootType = "rescue",
});
var serverInstall = new Ovh.Dedicated.ServerInstallTask("serverInstall", new()
{
ServiceName = server.Apply(getServerResult => getServerResult.ServiceName),
TemplateName = "byolinux_64",
BootidOnDestroy = rescue.Apply(getServerBootsResult => getServerBootsResult.Results[0]),
Details = new Ovh.Dedicated.Inputs.ServerInstallTaskDetailsArgs
{
CustomHostname = "mytest",
},
UserMetadatas = new[]
{
new Ovh.Dedicated.Inputs.ServerInstallTaskUserMetadataArgs
{
Key = "imageURL",
Value = "https://myimage.qcow2",
},
new Ovh.Dedicated.Inputs.ServerInstallTaskUserMetadataArgs
{
Key = "imageType",
Value = "qcow2",
},
new Ovh.Dedicated.Inputs.ServerInstallTaskUserMetadataArgs
{
Key = "httpHeaders0Key",
Value = "Authorization",
},
new Ovh.Dedicated.Inputs.ServerInstallTaskUserMetadataArgs
{
Key = "httpHeaders0Value",
Value = "Basic bG9naW46xxxxxxx=",
},
new Ovh.Dedicated.Inputs.ServerInstallTaskUserMetadataArgs
{
Key = "imageChecksumType",
Value = "sha512",
},
new Ovh.Dedicated.Inputs.ServerInstallTaskUserMetadataArgs
{
Key = "imageCheckSum",
Value = "047122c9ff4d2a69512212104b06c678f5a9cdb22b75467353613ff87ccd03b57b38967e56d810e61366f9d22d6bd39ac0addf4e00a4c6445112a2416af8f225",
},
new Ovh.Dedicated.Inputs.ServerInstallTaskUserMetadataArgs
{
Key = "configDriveUserData",
Value = @$"#cloud-config
ssh_authorized_keys:
- {data.Ovh_me_ssh_key.Mykey.Key}
users:
- name: patient0
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users, sudo
shell: /bin/bash
lock_passwd: false
ssh_authorized_keys:
- {data.Ovh_me_ssh_key.Mykey.Key}
disable_root: false
packages:
- vim
- tree
final_message: The system is finally up, after $UPTIME seconds
",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.OvhFunctions;
import com.pulumi.ovh.inputs.GetServerArgs;
import com.pulumi.ovh.Dedicated.DedicatedFunctions;
import com.pulumi.ovh.Dedicated.inputs.GetServerBootsArgs;
import com.pulumi.ovh.Dedicated.ServerInstallTask;
import com.pulumi.ovh.Dedicated.ServerInstallTaskArgs;
import com.pulumi.ovh.Dedicated.inputs.ServerInstallTaskDetailsArgs;
import com.pulumi.ovh.Dedicated.inputs.ServerInstallTaskUserMetadataArgs;
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 server = OvhFunctions.getServer(GetServerArgs.builder()
.serviceName("nsxxxxxxx.ip-xx-xx-xx.eu")
.build());
final var rescue = DedicatedFunctions.getServerBoots(GetServerBootsArgs.builder()
.serviceName("nsxxxxxxx.ip-xx-xx-xx.eu")
.bootType("rescue")
.build());
var serverInstall = new ServerInstallTask("serverInstall", ServerInstallTaskArgs.builder()
.serviceName(server.applyValue(getServerResult -> getServerResult.serviceName()))
.templateName("byolinux_64")
.bootidOnDestroy(rescue.applyValue(getServerBootsResult -> getServerBootsResult.results()[0]))
.details(ServerInstallTaskDetailsArgs.builder()
.customHostname("mytest")
.build())
.userMetadatas(
ServerInstallTaskUserMetadataArgs.builder()
.key("imageURL")
.value("https://myimage.qcow2")
.build(),
ServerInstallTaskUserMetadataArgs.builder()
.key("imageType")
.value("qcow2")
.build(),
ServerInstallTaskUserMetadataArgs.builder()
.key("httpHeaders0Key")
.value("Authorization")
.build(),
ServerInstallTaskUserMetadataArgs.builder()
.key("httpHeaders0Value")
.value("Basic bG9naW46xxxxxxx=")
.build(),
ServerInstallTaskUserMetadataArgs.builder()
.key("imageChecksumType")
.value("sha512")
.build(),
ServerInstallTaskUserMetadataArgs.builder()
.key("imageCheckSum")
.value("047122c9ff4d2a69512212104b06c678f5a9cdb22b75467353613ff87ccd03b57b38967e56d810e61366f9d22d6bd39ac0addf4e00a4c6445112a2416af8f225")
.build(),
ServerInstallTaskUserMetadataArgs.builder()
.key("configDriveUserData")
.value("""
#cloud-config
ssh_authorized_keys:
- %s
users:
- name: patient0
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users, sudo
shell: /bin/bash
lock_passwd: false
ssh_authorized_keys:
- %s
disable_root: false
packages:
- vim
- tree
final_message: The system is finally up, after $UPTIME seconds
", data.ovh_me_ssh_key().mykey().key(),data.ovh_me_ssh_key().mykey().key()))
.build())
.build());
}
}
resources:
serverInstall:
type: ovh:Dedicated:ServerInstallTask
properties:
serviceName: ${server.serviceName}
templateName: byolinux_64
bootidOnDestroy: ${rescue.results[0]}
details:
customHostname: mytest
userMetadatas:
- key: imageURL
value: https://myimage.qcow2
- key: imageType
value: qcow2
- key: httpHeaders0Key
value: Authorization
- key: httpHeaders0Value
value: Basic bG9naW46xxxxxxx=
- key: imageChecksumType
value: sha512
- key: imageCheckSum
value: 047122c9ff4d2a69512212104b06c678f5a9cdb22b75467353613ff87ccd03b57b38967e56d810e61366f9d22d6bd39ac0addf4e00a4c6445112a2416af8f225
- key: configDriveUserData
value: |
#cloud-config
ssh_authorized_keys:
- ${data.ovh_me_ssh_key.mykey.key}
users:
- name: patient0
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users, sudo
shell: /bin/bash
lock_passwd: false
ssh_authorized_keys:
- ${data.ovh_me_ssh_key.mykey.key}
disable_root: false
packages:
- vim
- tree
final_message: The system is finally up, after $UPTIME seconds
variables:
server:
fn::invoke:
Function: ovh:getServer
Arguments:
serviceName: nsxxxxxxx.ip-xx-xx-xx.eu
rescue:
fn::invoke:
Function: ovh:Dedicated:getServerBoots
Arguments:
serviceName: nsxxxxxxx.ip-xx-xx-xx.eu
bootType: rescue
Using a Microsoft Windows server OVHcloud template with a specific language
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
import * as ovh from "@pulumi/ovh";
const server = ovh.getServer({
serviceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
});
const rescue = ovh.Dedicated.getServerBoots({
serviceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
bootType: "rescue",
});
const serverInstall = new ovh.dedicated.ServerInstallTask("serverInstall", {
serviceName: server.then(server => server.serviceName),
templateName: "win2019-std_64",
bootidOnDestroy: rescue.then(rescue => rescue.results?.[0]),
details: {
customHostname: "mytest",
},
userMetadatas: [
{
key: "language",
value: "fr-fr",
},
{
key: "postInstallationScript",
value: `coucou postInstallationScriptPowerShell" | Out-File -FilePath "c:\\ovhupd\\script\\coucou.txt"
(Get-ItemProperty -LiteralPath "Registry::HKLM\\SOFTWARE\\Microsoft\\Cryptography" -Name "MachineGuid").MachineGuid | Out-File -FilePath "c:\\ovhupd\\script\\coucou.txt" -Append
(Get-Date).ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss") | Out-File -FilePath "c:\\ovhupd\\script\\coucou.txt" -Append
`,
},
],
});
import pulumi
import pulumi_ovh as ovh
server = ovh.get_server(service_name="nsxxxxxxx.ip-xx-xx-xx.eu")
rescue = ovh.Dedicated.get_server_boots(service_name="nsxxxxxxx.ip-xx-xx-xx.eu",
boot_type="rescue")
server_install = ovh.dedicated.ServerInstallTask("serverInstall",
service_name=server.service_name,
template_name="win2019-std_64",
bootid_on_destroy=rescue.results[0],
details={
"custom_hostname": "mytest",
},
user_metadatas=[
{
"key": "language",
"value": "fr-fr",
},
{
"key": "postInstallationScript",
"value": """coucou postInstallationScriptPowerShell" | Out-File -FilePath "c:\ovhupd\script\coucou.txt"
(Get-ItemProperty -LiteralPath "Registry::HKLM\SOFTWARE\Microsoft\Cryptography" -Name "MachineGuid").MachineGuid | Out-File -FilePath "c:\ovhupd\script\coucou.txt" -Append
(Get-Date).ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss") | Out-File -FilePath "c:\ovhupd\script\coucou.txt" -Append
""",
},
])
package main
import (
"github.com/ovh/pulumi-ovh/sdk/go/ovh"
"github.com/ovh/pulumi-ovh/sdk/go/ovh/Dedicated"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
server, err := ovh.GetServer(ctx, &ovh.GetServerArgs{
ServiceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
}, nil)
if err != nil {
return err
}
rescue, err := Dedicated.GetServerBoots(ctx, &dedicated.GetServerBootsArgs{
ServiceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
BootType: pulumi.StringRef("rescue"),
}, nil)
if err != nil {
return err
}
_, err = Dedicated.NewServerInstallTask(ctx, "serverInstall", &Dedicated.ServerInstallTaskArgs{
ServiceName: pulumi.String(server.ServiceName),
TemplateName: pulumi.String("win2019-std_64"),
BootidOnDestroy: pulumi.Int(rescue.Results[0]),
Details: &dedicated.ServerInstallTaskDetailsArgs{
CustomHostname: pulumi.String("mytest"),
},
UserMetadatas: dedicated.ServerInstallTaskUserMetadataArray{
&dedicated.ServerInstallTaskUserMetadataArgs{
Key: pulumi.String("language"),
Value: pulumi.String("fr-fr"),
},
&dedicated.ServerInstallTaskUserMetadataArgs{
Key: pulumi.String("postInstallationScript"),
Value: pulumi.String("coucou postInstallationScriptPowerShell\" | Out-File -FilePath \"c:\\ovhupd\\script\\coucou.txt\"\n (Get-ItemProperty -LiteralPath \"Registry::HKLM\\SOFTWARE\\Microsoft\\Cryptography\" -Name \"MachineGuid\").MachineGuid | Out-File -FilePath \"c:\\ovhupd\\script\\coucou.txt\" -Append\n (Get-Date).ToUniversalTime().ToString(\"yyyy-MM-dd HH:mm:ss\") | Out-File -FilePath \"c:\\ovhupd\\script\\coucou.txt\" -Append\n"),
},
},
})
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 server = Ovh.GetServer.Invoke(new()
{
ServiceName = "nsxxxxxxx.ip-xx-xx-xx.eu",
});
var rescue = Ovh.Dedicated.GetServerBoots.Invoke(new()
{
ServiceName = "nsxxxxxxx.ip-xx-xx-xx.eu",
BootType = "rescue",
});
var serverInstall = new Ovh.Dedicated.ServerInstallTask("serverInstall", new()
{
ServiceName = server.Apply(getServerResult => getServerResult.ServiceName),
TemplateName = "win2019-std_64",
BootidOnDestroy = rescue.Apply(getServerBootsResult => getServerBootsResult.Results[0]),
Details = new Ovh.Dedicated.Inputs.ServerInstallTaskDetailsArgs
{
CustomHostname = "mytest",
},
UserMetadatas = new[]
{
new Ovh.Dedicated.Inputs.ServerInstallTaskUserMetadataArgs
{
Key = "language",
Value = "fr-fr",
},
new Ovh.Dedicated.Inputs.ServerInstallTaskUserMetadataArgs
{
Key = "postInstallationScript",
Value = @"coucou postInstallationScriptPowerShell"" | Out-File -FilePath ""c:\ovhupd\script\coucou.txt""
(Get-ItemProperty -LiteralPath ""Registry::HKLM\SOFTWARE\Microsoft\Cryptography"" -Name ""MachineGuid"").MachineGuid | Out-File -FilePath ""c:\ovhupd\script\coucou.txt"" -Append
(Get-Date).ToUniversalTime().ToString(""yyyy-MM-dd HH:mm:ss"") | Out-File -FilePath ""c:\ovhupd\script\coucou.txt"" -Append
",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.OvhFunctions;
import com.pulumi.ovh.inputs.GetServerArgs;
import com.pulumi.ovh.Dedicated.DedicatedFunctions;
import com.pulumi.ovh.Dedicated.inputs.GetServerBootsArgs;
import com.pulumi.ovh.Dedicated.ServerInstallTask;
import com.pulumi.ovh.Dedicated.ServerInstallTaskArgs;
import com.pulumi.ovh.Dedicated.inputs.ServerInstallTaskDetailsArgs;
import com.pulumi.ovh.Dedicated.inputs.ServerInstallTaskUserMetadataArgs;
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 server = OvhFunctions.getServer(GetServerArgs.builder()
.serviceName("nsxxxxxxx.ip-xx-xx-xx.eu")
.build());
final var rescue = DedicatedFunctions.getServerBoots(GetServerBootsArgs.builder()
.serviceName("nsxxxxxxx.ip-xx-xx-xx.eu")
.bootType("rescue")
.build());
var serverInstall = new ServerInstallTask("serverInstall", ServerInstallTaskArgs.builder()
.serviceName(server.applyValue(getServerResult -> getServerResult.serviceName()))
.templateName("win2019-std_64")
.bootidOnDestroy(rescue.applyValue(getServerBootsResult -> getServerBootsResult.results()[0]))
.details(ServerInstallTaskDetailsArgs.builder()
.customHostname("mytest")
.build())
.userMetadatas(
ServerInstallTaskUserMetadataArgs.builder()
.key("language")
.value("fr-fr")
.build(),
ServerInstallTaskUserMetadataArgs.builder()
.key("postInstallationScript")
.value("""
coucou postInstallationScriptPowerShell" | Out-File -FilePath "c:\ovhupd\script\coucou.txt"
(Get-ItemProperty -LiteralPath "Registry::HKLM\SOFTWARE\Microsoft\Cryptography" -Name "MachineGuid").MachineGuid | Out-File -FilePath "c:\ovhupd\script\coucou.txt" -Append
(Get-Date).ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss") | Out-File -FilePath "c:\ovhupd\script\coucou.txt" -Append
""")
.build())
.build());
}
}
resources:
serverInstall:
type: ovh:Dedicated:ServerInstallTask
properties:
serviceName: ${server.serviceName}
templateName: win2019-std_64
bootidOnDestroy: ${rescue.results[0]}
details:
customHostname: mytest
userMetadatas:
- key: language
value: fr-fr
- key: postInstallationScript
value: |
coucou postInstallationScriptPowerShell" | Out-File -FilePath "c:\ovhupd\script\coucou.txt"
(Get-ItemProperty -LiteralPath "Registry::HKLM\SOFTWARE\Microsoft\Cryptography" -Name "MachineGuid").MachineGuid | Out-File -FilePath "c:\ovhupd\script\coucou.txt" -Append
(Get-Date).ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss") | Out-File -FilePath "c:\ovhupd\script\coucou.txt" -Append
variables:
server:
fn::invoke:
Function: ovh:getServer
Arguments:
serviceName: nsxxxxxxx.ip-xx-xx-xx.eu
rescue:
fn::invoke:
Function: ovh:Dedicated:getServerBoots
Arguments:
serviceName: nsxxxxxxx.ip-xx-xx-xx.eu
bootType: rescue
Create ServerInstallTask Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerInstallTask(name: string, args: ServerInstallTaskArgs, opts?: CustomResourceOptions);
@overload
def ServerInstallTask(resource_name: str,
args: ServerInstallTaskArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServerInstallTask(resource_name: str,
opts: Optional[ResourceOptions] = None,
service_name: Optional[str] = None,
template_name: Optional[str] = None,
bootid_on_destroy: Optional[int] = None,
details: Optional[_dedicated.ServerInstallTaskDetailsArgs] = None,
partition_scheme_name: Optional[str] = None,
user_metadatas: Optional[Sequence[_dedicated.ServerInstallTaskUserMetadataArgs]] = None)
func NewServerInstallTask(ctx *Context, name string, args ServerInstallTaskArgs, opts ...ResourceOption) (*ServerInstallTask, error)
public ServerInstallTask(string name, ServerInstallTaskArgs args, CustomResourceOptions? opts = null)
public ServerInstallTask(String name, ServerInstallTaskArgs args)
public ServerInstallTask(String name, ServerInstallTaskArgs args, CustomResourceOptions options)
type: ovh:Dedicated:ServerInstallTask
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 ServerInstallTaskArgs
- 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 ServerInstallTaskArgs
- 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 ServerInstallTaskArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerInstallTaskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerInstallTaskArgs
- 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 serverInstallTaskResource = new Ovh.Dedicated.ServerInstallTask("serverInstallTaskResource", new()
{
ServiceName = "string",
TemplateName = "string",
BootidOnDestroy = 0,
Details = new Ovh.Dedicated.Inputs.ServerInstallTaskDetailsArgs
{
CustomHostname = "string",
DiskGroupId = 0,
NoRaid = false,
SoftRaidDevices = 0,
},
PartitionSchemeName = "string",
UserMetadatas = new[]
{
new Ovh.Dedicated.Inputs.ServerInstallTaskUserMetadataArgs
{
Key = "string",
Value = "string",
},
},
});
example, err := Dedicated.NewServerInstallTask(ctx, "serverInstallTaskResource", &Dedicated.ServerInstallTaskArgs{
ServiceName: pulumi.String("string"),
TemplateName: pulumi.String("string"),
BootidOnDestroy: pulumi.Int(0),
Details: &dedicated.ServerInstallTaskDetailsArgs{
CustomHostname: pulumi.String("string"),
DiskGroupId: pulumi.Int(0),
NoRaid: pulumi.Bool(false),
SoftRaidDevices: pulumi.Int(0),
},
PartitionSchemeName: pulumi.String("string"),
UserMetadatas: dedicated.ServerInstallTaskUserMetadataArray{
&dedicated.ServerInstallTaskUserMetadataArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
var serverInstallTaskResource = new ServerInstallTask("serverInstallTaskResource", ServerInstallTaskArgs.builder()
.serviceName("string")
.templateName("string")
.bootidOnDestroy(0)
.details(ServerInstallTaskDetailsArgs.builder()
.customHostname("string")
.diskGroupId(0)
.noRaid(false)
.softRaidDevices(0)
.build())
.partitionSchemeName("string")
.userMetadatas(ServerInstallTaskUserMetadataArgs.builder()
.key("string")
.value("string")
.build())
.build());
server_install_task_resource = ovh.dedicated.ServerInstallTask("serverInstallTaskResource",
service_name="string",
template_name="string",
bootid_on_destroy=0,
details=ovh.dedicated.ServerInstallTaskDetailsArgs(
custom_hostname="string",
disk_group_id=0,
no_raid=False,
soft_raid_devices=0,
),
partition_scheme_name="string",
user_metadatas=[ovh.dedicated.ServerInstallTaskUserMetadataArgs(
key="string",
value="string",
)])
const serverInstallTaskResource = new ovh.dedicated.ServerInstallTask("serverInstallTaskResource", {
serviceName: "string",
templateName: "string",
bootidOnDestroy: 0,
details: {
customHostname: "string",
diskGroupId: 0,
noRaid: false,
softRaidDevices: 0,
},
partitionSchemeName: "string",
userMetadatas: [{
key: "string",
value: "string",
}],
});
type: ovh:Dedicated:ServerInstallTask
properties:
bootidOnDestroy: 0
details:
customHostname: string
diskGroupId: 0
noRaid: false
softRaidDevices: 0
partitionSchemeName: string
serviceName: string
templateName: string
userMetadatas:
- key: string
value: string
ServerInstallTask Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ServerInstallTask resource accepts the following input properties:
- Service
Name string - The service_name of your dedicated server.
- Template
Name string - Template name.
- Bootid
On intDestroy - If set, reboot the server on the specified boot id during destroy phase.
- Details
Server
Install Task Details - see
details
block below. - Partition
Scheme stringName - Partition scheme name.
- User
Metadatas List<ServerInstall Task User Metadata> - see
user_metadata
block below.
- Service
Name string - The service_name of your dedicated server.
- Template
Name string - Template name.
- Bootid
On intDestroy - If set, reboot the server on the specified boot id during destroy phase.
- Details
Server
Install Task Details Args - see
details
block below. - Partition
Scheme stringName - Partition scheme name.
- User
Metadatas []ServerInstall Task User Metadata Args - see
user_metadata
block below.
- service
Name String - The service_name of your dedicated server.
- template
Name String - Template name.
- bootid
On IntegerDestroy - If set, reboot the server on the specified boot id during destroy phase.
- details
Server
Install Task Details - see
details
block below. - partition
Scheme StringName - Partition scheme name.
- user
Metadatas List<ServerInstall Task User Metadata> - see
user_metadata
block below.
- service
Name string - The service_name of your dedicated server.
- template
Name string - Template name.
- bootid
On numberDestroy - If set, reboot the server on the specified boot id during destroy phase.
- details
Server
Install Task Details - see
details
block below. - partition
Scheme stringName - Partition scheme name.
- user
Metadatas ServerInstall Task User Metadata[] - see
user_metadata
block below.
- service_
name str - The service_name of your dedicated server.
- template_
name str - Template name.
- bootid_
on_ intdestroy - If set, reboot the server on the specified boot id during destroy phase.
- details
dedicated.
Server Install Task Details Args - see
details
block below. - partition_
scheme_ strname - Partition scheme name.
- user_
metadatas Sequence[dedicated.Server Install Task User Metadata Args] - see
user_metadata
block below.
- service
Name String - The service_name of your dedicated server.
- template
Name String - Template name.
- bootid
On NumberDestroy - If set, reboot the server on the specified boot id during destroy phase.
- details Property Map
- see
details
block below. - partition
Scheme StringName - Partition scheme name.
- user
Metadatas List<Property Map> - see
user_metadata
block below.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerInstallTask resource produces the following output properties:
- Comment string
- Details of this task. (should be
Install asked
) - Done
Date string - Completion date in RFC3339 format.
- Function string
- Function name (should be
hardInstall
). - Id string
- The provider-assigned unique ID for this managed resource.
- Last
Update string - Last update in RFC3339 format.
- Start
Date string - Task creation date in RFC3339 format.
- Status string
- Task status (should be
done
)
- Comment string
- Details of this task. (should be
Install asked
) - Done
Date string - Completion date in RFC3339 format.
- Function string
- Function name (should be
hardInstall
). - Id string
- The provider-assigned unique ID for this managed resource.
- Last
Update string - Last update in RFC3339 format.
- Start
Date string - Task creation date in RFC3339 format.
- Status string
- Task status (should be
done
)
- comment String
- Details of this task. (should be
Install asked
) - done
Date String - Completion date in RFC3339 format.
- function String
- Function name (should be
hardInstall
). - id String
- The provider-assigned unique ID for this managed resource.
- last
Update String - Last update in RFC3339 format.
- start
Date String - Task creation date in RFC3339 format.
- status String
- Task status (should be
done
)
- comment string
- Details of this task. (should be
Install asked
) - done
Date string - Completion date in RFC3339 format.
- function string
- Function name (should be
hardInstall
). - id string
- The provider-assigned unique ID for this managed resource.
- last
Update string - Last update in RFC3339 format.
- start
Date string - Task creation date in RFC3339 format.
- status string
- Task status (should be
done
)
- comment str
- Details of this task. (should be
Install asked
) - done_
date str - Completion date in RFC3339 format.
- function str
- Function name (should be
hardInstall
). - id str
- The provider-assigned unique ID for this managed resource.
- last_
update str - Last update in RFC3339 format.
- start_
date str - Task creation date in RFC3339 format.
- status str
- Task status (should be
done
)
- comment String
- Details of this task. (should be
Install asked
) - done
Date String - Completion date in RFC3339 format.
- function String
- Function name (should be
hardInstall
). - id String
- The provider-assigned unique ID for this managed resource.
- last
Update String - Last update in RFC3339 format.
- start
Date String - Task creation date in RFC3339 format.
- status String
- Task status (should be
done
)
Look up Existing ServerInstallTask Resource
Get an existing ServerInstallTask 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?: ServerInstallTaskState, opts?: CustomResourceOptions): ServerInstallTask
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bootid_on_destroy: Optional[int] = None,
comment: Optional[str] = None,
details: Optional[_dedicated.ServerInstallTaskDetailsArgs] = None,
done_date: Optional[str] = None,
function: Optional[str] = None,
last_update: Optional[str] = None,
partition_scheme_name: Optional[str] = None,
service_name: Optional[str] = None,
start_date: Optional[str] = None,
status: Optional[str] = None,
template_name: Optional[str] = None,
user_metadatas: Optional[Sequence[_dedicated.ServerInstallTaskUserMetadataArgs]] = None) -> ServerInstallTask
func GetServerInstallTask(ctx *Context, name string, id IDInput, state *ServerInstallTaskState, opts ...ResourceOption) (*ServerInstallTask, error)
public static ServerInstallTask Get(string name, Input<string> id, ServerInstallTaskState? state, CustomResourceOptions? opts = null)
public static ServerInstallTask get(String name, Output<String> id, ServerInstallTaskState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Bootid
On intDestroy - If set, reboot the server on the specified boot id during destroy phase.
- Comment string
- Details of this task. (should be
Install asked
) - Details
Server
Install Task Details - see
details
block below. - Done
Date string - Completion date in RFC3339 format.
- Function string
- Function name (should be
hardInstall
). - Last
Update string - Last update in RFC3339 format.
- Partition
Scheme stringName - Partition scheme name.
- Service
Name string - The service_name of your dedicated server.
- Start
Date string - Task creation date in RFC3339 format.
- Status string
- Task status (should be
done
) - Template
Name string - Template name.
- User
Metadatas List<ServerInstall Task User Metadata> - see
user_metadata
block below.
- Bootid
On intDestroy - If set, reboot the server on the specified boot id during destroy phase.
- Comment string
- Details of this task. (should be
Install asked
) - Details
Server
Install Task Details Args - see
details
block below. - Done
Date string - Completion date in RFC3339 format.
- Function string
- Function name (should be
hardInstall
). - Last
Update string - Last update in RFC3339 format.
- Partition
Scheme stringName - Partition scheme name.
- Service
Name string - The service_name of your dedicated server.
- Start
Date string - Task creation date in RFC3339 format.
- Status string
- Task status (should be
done
) - Template
Name string - Template name.
- User
Metadatas []ServerInstall Task User Metadata Args - see
user_metadata
block below.
- bootid
On IntegerDestroy - If set, reboot the server on the specified boot id during destroy phase.
- comment String
- Details of this task. (should be
Install asked
) - details
Server
Install Task Details - see
details
block below. - done
Date String - Completion date in RFC3339 format.
- function String
- Function name (should be
hardInstall
). - last
Update String - Last update in RFC3339 format.
- partition
Scheme StringName - Partition scheme name.
- service
Name String - The service_name of your dedicated server.
- start
Date String - Task creation date in RFC3339 format.
- status String
- Task status (should be
done
) - template
Name String - Template name.
- user
Metadatas List<ServerInstall Task User Metadata> - see
user_metadata
block below.
- bootid
On numberDestroy - If set, reboot the server on the specified boot id during destroy phase.
- comment string
- Details of this task. (should be
Install asked
) - details
Server
Install Task Details - see
details
block below. - done
Date string - Completion date in RFC3339 format.
- function string
- Function name (should be
hardInstall
). - last
Update string - Last update in RFC3339 format.
- partition
Scheme stringName - Partition scheme name.
- service
Name string - The service_name of your dedicated server.
- start
Date string - Task creation date in RFC3339 format.
- status string
- Task status (should be
done
) - template
Name string - Template name.
- user
Metadatas ServerInstall Task User Metadata[] - see
user_metadata
block below.
- bootid_
on_ intdestroy - If set, reboot the server on the specified boot id during destroy phase.
- comment str
- Details of this task. (should be
Install asked
) - details
dedicated.
Server Install Task Details Args - see
details
block below. - done_
date str - Completion date in RFC3339 format.
- function str
- Function name (should be
hardInstall
). - last_
update str - Last update in RFC3339 format.
- partition_
scheme_ strname - Partition scheme name.
- service_
name str - The service_name of your dedicated server.
- start_
date str - Task creation date in RFC3339 format.
- status str
- Task status (should be
done
) - template_
name str - Template name.
- user_
metadatas Sequence[dedicated.Server Install Task User Metadata Args] - see
user_metadata
block below.
- bootid
On NumberDestroy - If set, reboot the server on the specified boot id during destroy phase.
- comment String
- Details of this task. (should be
Install asked
) - details Property Map
- see
details
block below. - done
Date String - Completion date in RFC3339 format.
- function String
- Function name (should be
hardInstall
). - last
Update String - Last update in RFC3339 format.
- partition
Scheme StringName - Partition scheme name.
- service
Name String - The service_name of your dedicated server.
- start
Date String - Task creation date in RFC3339 format.
- status String
- Task status (should be
done
) - template
Name String - Template name.
- user
Metadatas List<Property Map> - see
user_metadata
block below.
Supporting Types
ServerInstallTaskDetails, ServerInstallTaskDetailsArgs
- Custom
Hostname string - Set up the server using the provided hostname instead of the default hostname.
- Disk
Group intId - Disk group id.
- No
Raid bool - Set to true to disable RAID.
- Soft
Raid intDevices - soft raid devices.
- Custom
Hostname string - Set up the server using the provided hostname instead of the default hostname.
- Disk
Group intId - Disk group id.
- No
Raid bool - Set to true to disable RAID.
- Soft
Raid intDevices - soft raid devices.
- custom
Hostname String - Set up the server using the provided hostname instead of the default hostname.
- disk
Group IntegerId - Disk group id.
- no
Raid Boolean - Set to true to disable RAID.
- soft
Raid IntegerDevices - soft raid devices.
- custom
Hostname string - Set up the server using the provided hostname instead of the default hostname.
- disk
Group numberId - Disk group id.
- no
Raid boolean - Set to true to disable RAID.
- soft
Raid numberDevices - soft raid devices.
- custom_
hostname str - Set up the server using the provided hostname instead of the default hostname.
- disk_
group_ intid - Disk group id.
- no_
raid bool - Set to true to disable RAID.
- soft_
raid_ intdevices - soft raid devices.
- custom
Hostname String - Set up the server using the provided hostname instead of the default hostname.
- disk
Group NumberId - Disk group id.
- no
Raid Boolean - Set to true to disable RAID.
- soft
Raid NumberDevices - soft raid devices.
ServerInstallTaskUserMetadata, ServerInstallTaskUserMetadataArgs
Import
Installation task can be imported using the service_name
(nsXXXX.ip...
) of the baremetal server, the template_name
used and ths task_id
, separated by “/” E.g.,
bash
$ pulumi import ovh:Dedicated/serverInstallTask:ServerInstallTask ovh_dedicated_server_install_task nsXXXX.ipXXXX/template_name/12345
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.