getStackScripts

Provides information about Linode StackScripts that match a set of filters.

Attributes

Each Linode StackScript will be stored in the stackscripts attribute and will export the following attributes:

  • id - The unique ID of the StackScript.

  • label - The StackScript’s label is for display purposes only.

  • script - The script to execute when provisioning a new Linode with this StackScript.

  • description - A description for the StackScript.

  • rev_note - This field allows you to add notes for the set of revisions made to this StackScript.

  • is_public - This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private.

  • images - An array of Image IDs representing the Images that this StackScript is compatible for deploying with.

  • deployments_active - Count of currently active, deployed Linodes created from this StackScript.

  • user_gravatar_id - The Gravatar ID for the User who created the StackScript.

  • deployments_total - The total number of times this StackScript has been deployed.

  • username - The User who created the StackScript.

  • created - The date this StackScript was created.

  • updated - The date this StackScript was updated.

  • user_defined_fields - This is a list of fields defined with a special syntax inside this StackScript that allow for supplying customized parameters during deployment.

    • label - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.

    • name - The name of the field.

    • example - An example value for the field.

    • one_of - A list of acceptable single values for the field.

    • many_of - A list of acceptable values for the field in any quantity, combination or order.

    • default - The default value. If not specified, this value will be used.

Filterable Fields

  • deployments_total

  • description

  • is_public

  • label

  • mine

  • rev_note

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
    public MyStack()
    {
        var specific_stackscripts = Output.Create(Linode.GetStackScripts.InvokeAsync(new Linode.GetStackScriptsArgs
        {
            Filters = 
            {
                new Linode.Inputs.GetStackScriptsFilterArgs
                {
                    Name = "label",
                    Values = 
                    {
                        "my-cool-stackscript",
                    },
                },
                new Linode.Inputs.GetStackScriptsFilterArgs
                {
                    Name = "is_public",
                    Values = 
                    {
                        "false",
                    },
                },
            },
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v3/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := linode.GetStackScripts(ctx, &GetStackScriptsArgs{
			Filters: []GetStackScriptsFilter{
				GetStackScriptsFilter{
					Name: "label",
					Values: []string{
						"my-cool-stackscript",
					},
				},
				GetStackScriptsFilter{
					Name: "is_public",
					Values: []string{
						"false",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_linode as linode

specific_stackscripts = linode.get_stack_scripts(filters=[
    linode.GetStackScriptsFilterArgs(
        name="label",
        values=["my-cool-stackscript"],
    ),
    linode.GetStackScriptsFilterArgs(
        name="is_public",
        values=["false"],
    ),
])
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const specific_stackscripts = pulumi.output(linode.getStackScripts({
    filters: [
        {
            name: "label",
            values: ["my-cool-stackscript"],
        },
        {
            name: "is_public",
            values: ["false"],
        },
    ],
}));

Using getStackScripts

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getStackScripts(args: GetStackScriptsArgs, opts?: InvokeOptions): Promise<GetStackScriptsResult>
function getStackScriptsOutput(args: GetStackScriptsOutputArgs, opts?: InvokeOptions): Output<GetStackScriptsResult>
def get_stack_scripts(filters: Optional[Sequence[GetStackScriptsFilter]] = None,
                      latest: Optional[bool] = None,
                      order: Optional[str] = None,
                      order_by: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetStackScriptsResult
def get_stack_scripts_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetStackScriptsFilterArgs]]]] = None,
                      latest: Optional[pulumi.Input[bool]] = None,
                      order: Optional[pulumi.Input[str]] = None,
                      order_by: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetStackScriptsResult]
func GetStackScripts(ctx *Context, args *GetStackScriptsArgs, opts ...InvokeOption) (*GetStackScriptsResult, error)
func GetStackScriptsOutput(ctx *Context, args *GetStackScriptsOutputArgs, opts ...InvokeOption) GetStackScriptsResultOutput

> Note: This function is named GetStackScripts in the Go SDK.

public static class GetStackScripts 
{
    public static Task<GetStackScriptsResult> InvokeAsync(GetStackScriptsArgs args, InvokeOptions? opts = null)
    public static Output<GetStackScriptsResult> Invoke(GetStackScriptsInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetStackScriptsFilter>
Latest bool
If true, only the latest StackScript will be returned. StackScripts without a valid created field are not included in the result.
Order string
The order in which results should be returned. (asc, desc; default asc)
OrderBy string
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
Filters []GetStackScriptsFilter
Latest bool
If true, only the latest StackScript will be returned. StackScripts without a valid created field are not included in the result.
Order string
The order in which results should be returned. (asc, desc; default asc)
OrderBy string
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
filters GetStackScriptsFilter[]
latest boolean
If true, only the latest StackScript will be returned. StackScripts without a valid created field are not included in the result.
order string
The order in which results should be returned. (asc, desc; default asc)
orderBy string
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
filters Sequence[GetStackScriptsFilter]
latest bool
If true, only the latest StackScript will be returned. StackScripts without a valid created field are not included in the result.
order str
The order in which results should be returned. (asc, desc; default asc)
order_by str
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.

getStackScripts Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Stackscripts List<GetStackScriptsStackscript>
Filters List<GetStackScriptsFilter>
Latest bool
Order string
OrderBy string
Id string
The provider-assigned unique ID for this managed resource.
Stackscripts []GetStackScriptsStackscript
Filters []GetStackScriptsFilter
Latest bool
Order string
OrderBy string
id string
The provider-assigned unique ID for this managed resource.
stackscripts GetStackScriptsStackscript[]
filters GetStackScriptsFilter[]
latest boolean
order string
orderBy string
id str
The provider-assigned unique ID for this managed resource.
stackscripts Sequence[GetStackScriptsStackscript]
filters Sequence[GetStackScriptsFilter]
latest bool
order str
order_by str

Supporting Types

GetStackScriptsFilter

Name string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
Values List<string>
A list of values for the filter to allow. These values should all be in string form.
MatchBy string
The method to match the field by. (exact, regex, substring; default exact)
Name string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
Values []string
A list of values for the filter to allow. These values should all be in string form.
MatchBy string
The method to match the field by. (exact, regex, substring; default exact)
name string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
values string[]
A list of values for the filter to allow. These values should all be in string form.
matchBy string
The method to match the field by. (exact, regex, substring; default exact)
name str
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
values Sequence[str]
A list of values for the filter to allow. These values should all be in string form.
match_by str
The method to match the field by. (exact, regex, substring; default exact)

GetStackScriptsStackscript

GetStackScriptsStackscriptUserDefinedField

Default string
Example string
Label string
ManyOf string
Name string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
OneOf string
Default string
Example string
Label string
ManyOf string
Name string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
OneOf string
default string
example string
label string
manyOf string
name string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
oneOf string
default str
example str
label str
many_of str
name str
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
one_of str

Package Details

Repository
https://github.com/pulumi/pulumi-linode
License
Apache-2.0
Notes
This Pulumi package is based on the linode Terraform Provider.