1. Packages
  2. Vultr
  3. API Docs
  4. StartupScript
Vultr v2.23.1 published on Tuesday, Dec 10, 2024 by dirien

vultr.StartupScript

Explore with Pulumi AI

Provides a Vultr Startup Script resource. This can be used to create, read, modify, and delete Startup Scripts.

Example Usage

Create a new Startup Script

import * as pulumi from "@pulumi/pulumi";
import * as vultr from "@ediri/vultr";

const myScript = new vultr.StartupScript("myScript", {script: "ZWNobyAkUEFUSAo="});
Copy
import pulumi
import ediri_vultr as vultr

my_script = vultr.StartupScript("myScript", script="ZWNobyAkUEFUSAo=")
Copy
package main

import (
	"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vultr.NewStartupScript(ctx, "myScript", &vultr.StartupScriptArgs{
			Script: pulumi.String("ZWNobyAkUEFUSAo="),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vultr = ediri.Vultr;

return await Deployment.RunAsync(() => 
{
    var myScript = new Vultr.StartupScript("myScript", new()
    {
        Script = "ZWNobyAkUEFUSAo=",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vultr.StartupScript;
import com.pulumi.vultr.StartupScriptArgs;
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 myScript = new StartupScript("myScript", StartupScriptArgs.builder()
            .script("ZWNobyAkUEFUSAo=")
            .build());

    }
}
Copy
resources:
  myScript:
    type: vultr:StartupScript
    properties:
      script: ZWNobyAkUEFUSAo=
Copy

Create StartupScript Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new StartupScript(name: string, args: StartupScriptArgs, opts?: CustomResourceOptions);
@overload
def StartupScript(resource_name: str,
                  args: StartupScriptArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def StartupScript(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  script: Optional[str] = None,
                  name: Optional[str] = None,
                  type: Optional[str] = None)
func NewStartupScript(ctx *Context, name string, args StartupScriptArgs, opts ...ResourceOption) (*StartupScript, error)
public StartupScript(string name, StartupScriptArgs args, CustomResourceOptions? opts = null)
public StartupScript(String name, StartupScriptArgs args)
public StartupScript(String name, StartupScriptArgs args, CustomResourceOptions options)
type: vultr:StartupScript
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. StartupScriptArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. StartupScriptArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. StartupScriptArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. StartupScriptArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. StartupScriptArgs
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 startupScriptResource = new Vultr.StartupScript("startupScriptResource", new()
{
    Script = "string",
    Name = "string",
    Type = "string",
});
Copy
example, err := vultr.NewStartupScript(ctx, "startupScriptResource", &vultr.StartupScriptArgs{
	Script: pulumi.String("string"),
	Name:   pulumi.String("string"),
	Type:   pulumi.String("string"),
})
Copy
var startupScriptResource = new StartupScript("startupScriptResource", StartupScriptArgs.builder()
    .script("string")
    .name("string")
    .type("string")
    .build());
Copy
startup_script_resource = vultr.StartupScript("startupScriptResource",
    script="string",
    name="string",
    type="string")
Copy
const startupScriptResource = new vultr.StartupScript("startupScriptResource", {
    script: "string",
    name: "string",
    type: "string",
});
Copy
type: vultr:StartupScript
properties:
    name: string
    script: string
    type: string
Copy

StartupScript 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 StartupScript resource accepts the following input properties:

Script This property is required. string
Contents of the startup script base64 encoded.
Name string
Name of the given script.
Type Changes to this property will trigger replacement. string
Type of startup script. Possible values are boot or pxe - default is boot.
Script This property is required. string
Contents of the startup script base64 encoded.
Name string
Name of the given script.
Type Changes to this property will trigger replacement. string
Type of startup script. Possible values are boot or pxe - default is boot.
script This property is required. String
Contents of the startup script base64 encoded.
name String
Name of the given script.
type Changes to this property will trigger replacement. String
Type of startup script. Possible values are boot or pxe - default is boot.
script This property is required. string
Contents of the startup script base64 encoded.
name string
Name of the given script.
type Changes to this property will trigger replacement. string
Type of startup script. Possible values are boot or pxe - default is boot.
script This property is required. str
Contents of the startup script base64 encoded.
name str
Name of the given script.
type Changes to this property will trigger replacement. str
Type of startup script. Possible values are boot or pxe - default is boot.
script This property is required. String
Contents of the startup script base64 encoded.
name String
Name of the given script.
type Changes to this property will trigger replacement. String
Type of startup script. Possible values are boot or pxe - default is boot.

Outputs

All input properties are implicitly available as output properties. Additionally, the StartupScript resource produces the following output properties:

DateCreated string
Date the script was created.
DateModified string
Date the script was last modified.
Id string
The provider-assigned unique ID for this managed resource.
DateCreated string
Date the script was created.
DateModified string
Date the script was last modified.
Id string
The provider-assigned unique ID for this managed resource.
dateCreated String
Date the script was created.
dateModified String
Date the script was last modified.
id String
The provider-assigned unique ID for this managed resource.
dateCreated string
Date the script was created.
dateModified string
Date the script was last modified.
id string
The provider-assigned unique ID for this managed resource.
date_created str
Date the script was created.
date_modified str
Date the script was last modified.
id str
The provider-assigned unique ID for this managed resource.
dateCreated String
Date the script was created.
dateModified String
Date the script was last modified.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing StartupScript Resource

Get an existing StartupScript 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?: StartupScriptState, opts?: CustomResourceOptions): StartupScript
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        date_created: Optional[str] = None,
        date_modified: Optional[str] = None,
        name: Optional[str] = None,
        script: Optional[str] = None,
        type: Optional[str] = None) -> StartupScript
func GetStartupScript(ctx *Context, name string, id IDInput, state *StartupScriptState, opts ...ResourceOption) (*StartupScript, error)
public static StartupScript Get(string name, Input<string> id, StartupScriptState? state, CustomResourceOptions? opts = null)
public static StartupScript get(String name, Output<String> id, StartupScriptState state, CustomResourceOptions options)
resources:  _:    type: vultr:StartupScript    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
DateCreated string
Date the script was created.
DateModified string
Date the script was last modified.
Name string
Name of the given script.
Script string
Contents of the startup script base64 encoded.
Type Changes to this property will trigger replacement. string
Type of startup script. Possible values are boot or pxe - default is boot.
DateCreated string
Date the script was created.
DateModified string
Date the script was last modified.
Name string
Name of the given script.
Script string
Contents of the startup script base64 encoded.
Type Changes to this property will trigger replacement. string
Type of startup script. Possible values are boot or pxe - default is boot.
dateCreated String
Date the script was created.
dateModified String
Date the script was last modified.
name String
Name of the given script.
script String
Contents of the startup script base64 encoded.
type Changes to this property will trigger replacement. String
Type of startup script. Possible values are boot or pxe - default is boot.
dateCreated string
Date the script was created.
dateModified string
Date the script was last modified.
name string
Name of the given script.
script string
Contents of the startup script base64 encoded.
type Changes to this property will trigger replacement. string
Type of startup script. Possible values are boot or pxe - default is boot.
date_created str
Date the script was created.
date_modified str
Date the script was last modified.
name str
Name of the given script.
script str
Contents of the startup script base64 encoded.
type Changes to this property will trigger replacement. str
Type of startup script. Possible values are boot or pxe - default is boot.
dateCreated String
Date the script was created.
dateModified String
Date the script was last modified.
name String
Name of the given script.
script String
Contents of the startup script base64 encoded.
type Changes to this property will trigger replacement. String
Type of startup script. Possible values are boot or pxe - default is boot.

Import

Startup Scripts can be imported using the Startup Scripts ID, e.g.

$ pulumi import vultr:index/startupScript:StartupScript my_script ff8f36a8-eb86-4b8d-8667-b9d5459b6390
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
vultr dirien/pulumi-vultr
License
Apache-2.0
Notes
This Pulumi package is based on the vultr Terraform Provider.