linode.getStackScripts
Explore with Pulumi AI
Provides information about Linode StackScripts that match a set of filters. For more information, see the Linode APIv4 docs.
NOTICE: Due to the large number of public StackScripts, this data source may time out if is_public is not filtered on.
Example Usage
The following example shows how one might use this data source to access information about a Linode StackScript.
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const specific-stackscripts = linode.getStackScripts({
    filters: [
        {
            name: "label",
            values: ["my-cool-stackscript"],
        },
        {
            name: "is_public",
            values: ["false"],
        },
    ],
});
export const stackscriptId = specific_stackscripts.then(specific_stackscripts => specific_stackscripts.stackscripts?.[0]?.id);
import pulumi
import pulumi_linode as linode
specific_stackscripts = linode.get_stack_scripts(filters=[
    {
        "name": "label",
        "values": ["my-cool-stackscript"],
    },
    {
        "name": "is_public",
        "values": ["false"],
    },
])
pulumi.export("stackscriptId", specific_stackscripts.stackscripts[0].id)
package main
import (
	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		specific_stackscripts, err := linode.GetStackScripts(ctx, &linode.GetStackScriptsArgs{
			Filters: []linode.GetStackScriptsFilter{
				{
					Name: "label",
					Values: []string{
						"my-cool-stackscript",
					},
				},
				{
					Name: "is_public",
					Values: []string{
						"false",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("stackscriptId", specific_stackscripts.Stackscripts[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() => 
{
    var specific_stackscripts = Linode.GetStackScripts.Invoke(new()
    {
        Filters = new[]
        {
            new Linode.Inputs.GetStackScriptsFilterInputArgs
            {
                Name = "label",
                Values = new[]
                {
                    "my-cool-stackscript",
                },
            },
            new Linode.Inputs.GetStackScriptsFilterInputArgs
            {
                Name = "is_public",
                Values = new[]
                {
                    "false",
                },
            },
        },
    });
    return new Dictionary<string, object?>
    {
        ["stackscriptId"] = specific_stackscripts.Apply(specific_stackscripts => specific_stackscripts.Apply(getStackScriptsResult => getStackScriptsResult.Stackscripts[0]?.Id)),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetStackScriptsArgs;
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 specific-stackscripts = LinodeFunctions.getStackScripts(GetStackScriptsArgs.builder()
            .filters(            
                GetStackScriptsFilterArgs.builder()
                    .name("label")
                    .values("my-cool-stackscript")
                    .build(),
                GetStackScriptsFilterArgs.builder()
                    .name("is_public")
                    .values(false)
                    .build())
            .build());
        ctx.export("stackscriptId", specific_stackscripts.stackscripts()[0].id());
    }
}
variables:
  specific-stackscripts:
    fn::invoke:
      Function: linode:getStackScripts
      Arguments:
        filters:
          - name: label
            values:
              - my-cool-stackscript
          - name: is_public
            values:
              - false
outputs:
  stackscriptId: ${["specific-stackscripts"].stackscripts[0].id}
Filterable Fields
deployments_activedeployments_totaldescriptionimagesis_publiclabelminerev_noteusername
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,
                      stackscripts: Optional[Sequence[GetStackScriptsStackscript]] = 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,
                      stackscripts: Optional[pulumi.Input[Sequence[pulumi.Input[GetStackScriptsStackscriptArgs]]]] = 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)
}public static CompletableFuture<GetStackScriptsResult> getStackScripts(GetStackScriptsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: linode:index/getStackScripts:getStackScripts
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Filters
List<Get
Stack Scripts Filter>  - Latest bool
 - If true, only the latest StackScript will be returned. StackScripts without a valid 
createdfield are not included in the result.filter- (Optional) A set of filters used to select Linode StackScripts that meet certain requirements.
 - Order string
 - The order in which results should be returned. (
asc,desc; defaultasc) - Order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
 - Stackscripts
List<Get
Stack Scripts Stackscript>  
- Filters
[]Get
Stack Scripts Filter  - Latest bool
 - If true, only the latest StackScript will be returned. StackScripts without a valid 
createdfield are not included in the result.filter- (Optional) A set of filters used to select Linode StackScripts that meet certain requirements.
 - Order string
 - The order in which results should be returned. (
asc,desc; defaultasc) - Order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
 - Stackscripts
[]Get
Stack Scripts Stackscript  
- filters
List<Get
Stack Scripts Filter>  - latest Boolean
 - If true, only the latest StackScript will be returned. StackScripts without a valid 
createdfield are not included in the result.filter- (Optional) A set of filters used to select Linode StackScripts that meet certain requirements.
 - order String
 - The order in which results should be returned. (
asc,desc; defaultasc) - order
By String - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
 - stackscripts
List<Get
Stack Scripts Stackscript>  
- filters
Get
Stack Scripts Filter[]  - latest boolean
 - If true, only the latest StackScript will be returned. StackScripts without a valid 
createdfield are not included in the result.filter- (Optional) A set of filters used to select Linode StackScripts that meet certain requirements.
 - order string
 - The order in which results should be returned. (
asc,desc; defaultasc) - order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
 - stackscripts
Get
Stack Scripts Stackscript[]  
- filters
Sequence[Get
Stack Scripts Filter]  - latest bool
 - If true, only the latest StackScript will be returned. StackScripts without a valid 
createdfield are not included in the result.filter- (Optional) A set of filters used to select Linode StackScripts that meet certain requirements.
 - order str
 - The order in which results should be returned. (
asc,desc; defaultasc) - order_
by str - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
 - stackscripts
Sequence[Get
Stack Scripts Stackscript]  
- filters List<Property Map>
 - latest Boolean
 - If true, only the latest StackScript will be returned. StackScripts without a valid 
createdfield are not included in the result.filter- (Optional) A set of filters used to select Linode StackScripts that meet certain requirements.
 - order String
 - The order in which results should be returned. (
asc,desc; defaultasc) - order
By String - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
 - stackscripts List<Property Map>
 
getStackScripts Result
The following output properties are available:
- Id string
 - The unique ID of the StackScript.
 - Filters
List<Get
Stack Scripts Filter>  - Latest bool
 - Order string
 - Order
By string - Stackscripts
List<Get
Stack Scripts Stackscript>  
- Id string
 - The unique ID of the StackScript.
 - Filters
[]Get
Stack Scripts Filter  - Latest bool
 - Order string
 - Order
By string - Stackscripts
[]Get
Stack Scripts Stackscript  
- id String
 - The unique ID of the StackScript.
 - filters
List<Get
Stack Scripts Filter>  - latest Boolean
 - order String
 - order
By String - stackscripts
List<Get
Stack Scripts Stackscript>  
- id string
 - The unique ID of the StackScript.
 - filters
Get
Stack Scripts Filter[]  - latest boolean
 - order string
 - order
By string - stackscripts
Get
Stack Scripts Stackscript[]  
- id str
 - The unique ID of the StackScript.
 - filters
Sequence[Get
Stack Scripts Filter]  - latest bool
 - order str
 - order_
by str - stackscripts
Sequence[Get
Stack Scripts Stackscript]  
- id String
 - The unique ID of the StackScript.
 - filters List<Property Map>
 - latest Boolean
 - order String
 - order
By String - stackscripts List<Property Map>
 
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.
 - Match
By string - The method to match the field by. (
exact,regex,substring; defaultexact) 
- 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.
 - Match
By string - The method to match the field by. (
exact,regex,substring; defaultexact) 
- 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.
 - match
By String - The method to match the field by. (
exact,regex,substring; defaultexact) 
- 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.
 - match
By string - The method to match the field by. (
exact,regex,substring; defaultexact) 
- 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; defaultexact) 
- 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.
 - match
By String - The method to match the field by. (
exact,regex,substring; defaultexact) 
GetStackScriptsStackscript   
- Created string
 - The date this StackScript was created.
 - Deployments
Active int - Count of currently active, deployed Linodes created from this StackScript.
 - Deployments
Total int - The total number of times this StackScript has been deployed.
 - Description string
 - A description for the StackScript.
 - Id string
 - The unique ID of the StackScript.
 - Images List<string>
 - An array of Image IDs representing the Images that this StackScript is compatible for deploying with.
 - Is
Public bool - This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private.
 - Label string
 - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.
 - Rev
Note string - This field allows you to add notes for the set of revisions made to this StackScript.
 - Script string
 - The script to execute when provisioning a new Linode with this StackScript.
 - Updated string
 - The date this StackScript was updated.
 - User
Defined List<GetFields Stack Scripts Stackscript User Defined Field>  - This is a list of fields defined with a special syntax inside this StackScript that allow for supplying customized parameters during deployment.
 - User
Gravatar stringId  - The Gravatar ID for the User who created the StackScript.
 - Username string
 - The User who created the StackScript.
 
- Created string
 - The date this StackScript was created.
 - Deployments
Active int - Count of currently active, deployed Linodes created from this StackScript.
 - Deployments
Total int - The total number of times this StackScript has been deployed.
 - Description string
 - A description for the StackScript.
 - Id string
 - The unique ID of the StackScript.
 - Images []string
 - An array of Image IDs representing the Images that this StackScript is compatible for deploying with.
 - Is
Public bool - This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private.
 - Label string
 - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.
 - Rev
Note string - This field allows you to add notes for the set of revisions made to this StackScript.
 - Script string
 - The script to execute when provisioning a new Linode with this StackScript.
 - Updated string
 - The date this StackScript was updated.
 - User
Defined []GetFields Stack Scripts Stackscript User Defined Field  - This is a list of fields defined with a special syntax inside this StackScript that allow for supplying customized parameters during deployment.
 - User
Gravatar stringId  - The Gravatar ID for the User who created the StackScript.
 - Username string
 - The User who created the StackScript.
 
- created String
 - The date this StackScript was created.
 - deployments
Active Integer - Count of currently active, deployed Linodes created from this StackScript.
 - deployments
Total Integer - The total number of times this StackScript has been deployed.
 - description String
 - A description for the StackScript.
 - id String
 - The unique ID of the StackScript.
 - images List<String>
 - An array of Image IDs representing the Images that this StackScript is compatible for deploying with.
 - is
Public Boolean - This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private.
 - label String
 - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.
 - rev
Note String - This field allows you to add notes for the set of revisions made to this StackScript.
 - script String
 - The script to execute when provisioning a new Linode with this StackScript.
 - updated String
 - The date this StackScript was updated.
 - user
Defined List<GetFields Stack Scripts Stackscript User Defined Field>  - This is a list of fields defined with a special syntax inside this StackScript that allow for supplying customized parameters during deployment.
 - user
Gravatar StringId  - The Gravatar ID for the User who created the StackScript.
 - username String
 - The User who created the StackScript.
 
- created string
 - The date this StackScript was created.
 - deployments
Active number - Count of currently active, deployed Linodes created from this StackScript.
 - deployments
Total number - The total number of times this StackScript has been deployed.
 - description string
 - A description for the StackScript.
 - id string
 - The unique ID of the StackScript.
 - images string[]
 - An array of Image IDs representing the Images that this StackScript is compatible for deploying with.
 - is
Public boolean - This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private.
 - label string
 - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.
 - rev
Note string - This field allows you to add notes for the set of revisions made to this StackScript.
 - script string
 - The script to execute when provisioning a new Linode with this StackScript.
 - updated string
 - The date this StackScript was updated.
 - user
Defined GetFields Stack Scripts Stackscript User Defined Field[]  - This is a list of fields defined with a special syntax inside this StackScript that allow for supplying customized parameters during deployment.
 - user
Gravatar stringId  - The Gravatar ID for the User who created the StackScript.
 - username string
 - The User who created the StackScript.
 
- created str
 - The date this StackScript was created.
 - deployments_
active int - Count of currently active, deployed Linodes created from this StackScript.
 - deployments_
total int - The total number of times this StackScript has been deployed.
 - description str
 - A description for the StackScript.
 - id str
 - The unique ID of the StackScript.
 - images Sequence[str]
 - An array of Image IDs representing the Images that this StackScript is compatible for deploying with.
 - is_
public bool - This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private.
 - label str
 - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.
 - rev_
note str - This field allows you to add notes for the set of revisions made to this StackScript.
 - script str
 - The script to execute when provisioning a new Linode with this StackScript.
 - updated str
 - The date this StackScript was updated.
 - user_
defined_ Sequence[Getfields Stack Scripts Stackscript User Defined Field]  - This is a list of fields defined with a special syntax inside this StackScript that allow for supplying customized parameters during deployment.
 - user_
gravatar_ strid  - The Gravatar ID for the User who created the StackScript.
 - username str
 - The User who created the StackScript.
 
- created String
 - The date this StackScript was created.
 - deployments
Active Number - Count of currently active, deployed Linodes created from this StackScript.
 - deployments
Total Number - The total number of times this StackScript has been deployed.
 - description String
 - A description for the StackScript.
 - id String
 - The unique ID of the StackScript.
 - images List<String>
 - An array of Image IDs representing the Images that this StackScript is compatible for deploying with.
 - is
Public Boolean - This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private.
 - label String
 - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.
 - rev
Note String - This field allows you to add notes for the set of revisions made to this StackScript.
 - script String
 - The script to execute when provisioning a new Linode with this StackScript.
 - updated String
 - The date this StackScript was updated.
 - user
Defined List<Property Map>Fields  - This is a list of fields defined with a special syntax inside this StackScript that allow for supplying customized parameters during deployment.
 - user
Gravatar StringId  - The Gravatar ID for the User who created the StackScript.
 - username String
 - The User who created the StackScript.
 
GetStackScriptsStackscriptUserDefinedField      
- Default string
 - The default value. If not specified, this value will be used.
 - Example string
 - An example value for the field.
 - Label string
 - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.
 - Many
Of string - A list of acceptable values for the field in any quantity, combination or order.
 - Name string
 - The name of the field.
 - One
Of string - A list of acceptable single values for the field.
 
- Default string
 - The default value. If not specified, this value will be used.
 - Example string
 - An example value for the field.
 - Label string
 - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.
 - Many
Of string - A list of acceptable values for the field in any quantity, combination or order.
 - Name string
 - The name of the field.
 - One
Of string - A list of acceptable single values for the field.
 
- default_ String
 - The default value. If not specified, this value will be used.
 - example String
 - An example value for the field.
 - label String
 - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.
 - many
Of String - A list of acceptable values for the field in any quantity, combination or order.
 - name String
 - The name of the field.
 - one
Of String - A list of acceptable single values for the field.
 
- default string
 - The default value. If not specified, this value will be used.
 - example string
 - An example value for the field.
 - label string
 - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.
 - many
Of string - A list of acceptable values for the field in any quantity, combination or order.
 - name string
 - The name of the field.
 - one
Of string - A list of acceptable single values for the field.
 
- default str
 - The default value. If not specified, this value will be used.
 - example str
 - An example value for the field.
 - label str
 - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.
 - many_
of str - A list of acceptable values for the field in any quantity, combination or order.
 - name str
 - The name of the field.
 - one_
of str - A list of acceptable single values for the field.
 
- default String
 - The default value. If not specified, this value will be used.
 - example String
 - An example value for the field.
 - label String
 - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.
 - many
Of String - A list of acceptable values for the field in any quantity, combination or order.
 - name String
 - The name of the field.
 - one
Of String - A list of acceptable single values for the field.
 
Package Details
- Repository
 - Linode pulumi/pulumi-linode
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
linodeTerraform Provider.