1. Packages
  2. Vultr
  3. API Docs
  4. StartupScript
Vultr v2.19.0 published on Friday, Jan 5, 2024 by dirien

vultr.StartupScript

Explore with Pulumi AI

vultr logo
Vultr v2.19.0 published on Friday, Jan 5, 2024 by dirien

    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

    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=",
        });
    
    });
    
    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
    	})
    }
    
    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());
    
        }
    }
    
    import pulumi
    import ediri_vultr as vultr
    
    my_script = vultr.StartupScript("myScript", script="ZWNobyAkUEFUSAo=")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@ediri/vultr";
    
    const myScript = new vultr.StartupScript("myScript", {script: "ZWNobyAkUEFUSAo="});
    
    resources:
      myScript:
        type: vultr:StartupScript
        properties:
          script: ZWNobyAkUEFUSAo=
    

    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 string
    The unique name of the resource.
    args StartupScriptArgs
    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 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 string
    The unique name of the resource.
    args StartupScriptArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StartupScriptArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StartupScriptArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    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",
    });
    
    example, err := vultr.NewStartupScript(ctx, "startupScriptResource", &vultr.StartupScriptArgs{
    	Script: pulumi.String("string"),
    	Name:   pulumi.String("string"),
    	Type:   pulumi.String("string"),
    })
    
    var startupScriptResource = new StartupScript("startupScriptResource", StartupScriptArgs.builder()        
        .script("string")
        .name("string")
        .type("string")
        .build());
    
    startup_script_resource = vultr.StartupScript("startupScriptResource",
        script="string",
        name="string",
        type="string")
    
    const startupScriptResource = new vultr.StartupScript("startupScriptResource", {
        script: "string",
        name: "string",
        type: "string",
    });
    
    type: vultr:StartupScript
    properties:
        name: string
        script: string
        type: string
    

    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

    The StartupScript resource accepts the following input properties:

    Script string
    Contents of the startup script base64 encoded.
    Name string
    Name of the given script.
    Type string
    Type of startup script. Possible values are boot or pxe - default is boot.
    Script string
    Contents of the startup script base64 encoded.
    Name string
    Name of the given script.
    Type string
    Type of startup script. Possible values are boot or pxe - default is boot.
    script String
    Contents of the startup script base64 encoded.
    name String
    Name of the given script.
    type String
    Type of startup script. Possible values are boot or pxe - default is boot.
    script string
    Contents of the startup script base64 encoded.
    name string
    Name of the given script.
    type string
    Type of startup script. Possible values are boot or pxe - default is boot.
    script str
    Contents of the startup script base64 encoded.
    name str
    Name of the given script.
    type str
    Type of startup script. Possible values are boot or pxe - default is boot.
    script String
    Contents of the startup script base64 encoded.
    name String
    Name of the given script.
    type 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)
    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.
    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 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 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 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 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 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 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
    

    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.
    vultr logo
    Vultr v2.19.0 published on Friday, Jan 5, 2024 by dirien