octopusdeploy.Variable
Explore with Pulumi AI
This resource manages variables in Octopus Deploy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as octopusdeploy from "@pulumi/octopusdeploy";
// create an Amazon web services account variable
const amazonWebServicesAccountVariable = new octopusdeploy.Variable("amazonWebServicesAccountVariable", {
ownerId: "Projects-123",
type: "AmazonWebServicesAccount",
value: "Accounts-123",
});
// create an Azure service principal account variable
const azureServicePrincipalAccountVariable = new octopusdeploy.Variable("azureServicePrincipalAccountVariable", {
ownerId: "Projects-123",
type: "AzureAccount",
value: "Accounts-123",
});
// create a Google Cloud account variable
const googleCloudAccountVariable = new octopusdeploy.Variable("googleCloudAccountVariable", {
ownerId: "Projects-123",
type: "GoogleCloudAccount",
value: "Accounts-123",
});
// Create a UsernamePassword account variable
const usernamepasswordAccountVariable = new octopusdeploy.Variable("usernamepasswordAccountVariable", {
ownerId: "Projects-123",
type: "UsernamePasswordAccount",
value: octopusdeploy_username_password_account.account_user_pass.id,
});
// create a Certificate variable
const certificateVariable = new octopusdeploy.Variable("certificateVariable", {
ownerId: "Projects-123",
type: "Certificate",
value: "Certificates-123",
});
// create a Sensitive variable
const sensitiveVariable = new octopusdeploy.Variable("sensitiveVariable", {
ownerId: "Projects-123",
type: "Sensitive",
isSensitive: true,
sensitiveValue: "YourSecrets",
});
// create a String variable
const stringVariable = new octopusdeploy.Variable("stringVariable", {
ownerId: "Projects-123",
type: "String",
value: "PlainText",
});
// create a WorkerPool variable
const workerpoolVariable = new octopusdeploy.Variable("workerpoolVariable", {
ownerId: "Projects-123",
type: "WorkerPool",
value: "WorkerPools-123",
});
// create a prompted variable
const promptedVariable = new octopusdeploy.Variable("promptedVariable", {
ownerId: "Projects-123",
type: "String",
prompts: [{
description: "Variable Description",
isRequired: true,
label: "Variable Label",
}],
});
import pulumi
import pulumi_octopusdeploy as octopusdeploy
# create an Amazon web services account variable
amazon_web_services_account_variable = octopusdeploy.Variable("amazonWebServicesAccountVariable",
owner_id="Projects-123",
type="AmazonWebServicesAccount",
value="Accounts-123")
# create an Azure service principal account variable
azure_service_principal_account_variable = octopusdeploy.Variable("azureServicePrincipalAccountVariable",
owner_id="Projects-123",
type="AzureAccount",
value="Accounts-123")
# create a Google Cloud account variable
google_cloud_account_variable = octopusdeploy.Variable("googleCloudAccountVariable",
owner_id="Projects-123",
type="GoogleCloudAccount",
value="Accounts-123")
# Create a UsernamePassword account variable
usernamepassword_account_variable = octopusdeploy.Variable("usernamepasswordAccountVariable",
owner_id="Projects-123",
type="UsernamePasswordAccount",
value=octopusdeploy_username_password_account["account_user_pass"]["id"])
# create a Certificate variable
certificate_variable = octopusdeploy.Variable("certificateVariable",
owner_id="Projects-123",
type="Certificate",
value="Certificates-123")
# create a Sensitive variable
sensitive_variable = octopusdeploy.Variable("sensitiveVariable",
owner_id="Projects-123",
type="Sensitive",
is_sensitive=True,
sensitive_value="YourSecrets")
# create a String variable
string_variable = octopusdeploy.Variable("stringVariable",
owner_id="Projects-123",
type="String",
value="PlainText")
# create a WorkerPool variable
workerpool_variable = octopusdeploy.Variable("workerpoolVariable",
owner_id="Projects-123",
type="WorkerPool",
value="WorkerPools-123")
# create a prompted variable
prompted_variable = octopusdeploy.Variable("promptedVariable",
owner_id="Projects-123",
type="String",
prompts=[{
"description": "Variable Description",
"is_required": True,
"label": "Variable Label",
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/octopusdeploy/octopusdeploy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// create an Amazon web services account variable
_, err := octopusdeploy.NewVariable(ctx, "amazonWebServicesAccountVariable", &octopusdeploy.VariableArgs{
OwnerId: pulumi.String("Projects-123"),
Type: pulumi.String("AmazonWebServicesAccount"),
Value: pulumi.String("Accounts-123"),
})
if err != nil {
return err
}
// create an Azure service principal account variable
_, err = octopusdeploy.NewVariable(ctx, "azureServicePrincipalAccountVariable", &octopusdeploy.VariableArgs{
OwnerId: pulumi.String("Projects-123"),
Type: pulumi.String("AzureAccount"),
Value: pulumi.String("Accounts-123"),
})
if err != nil {
return err
}
// create a Google Cloud account variable
_, err = octopusdeploy.NewVariable(ctx, "googleCloudAccountVariable", &octopusdeploy.VariableArgs{
OwnerId: pulumi.String("Projects-123"),
Type: pulumi.String("GoogleCloudAccount"),
Value: pulumi.String("Accounts-123"),
})
if err != nil {
return err
}
// Create a UsernamePassword account variable
_, err = octopusdeploy.NewVariable(ctx, "usernamepasswordAccountVariable", &octopusdeploy.VariableArgs{
OwnerId: pulumi.String("Projects-123"),
Type: pulumi.String("UsernamePasswordAccount"),
Value: pulumi.Any(octopusdeploy_username_password_account.Account_user_pass.Id),
})
if err != nil {
return err
}
// create a Certificate variable
_, err = octopusdeploy.NewVariable(ctx, "certificateVariable", &octopusdeploy.VariableArgs{
OwnerId: pulumi.String("Projects-123"),
Type: pulumi.String("Certificate"),
Value: pulumi.String("Certificates-123"),
})
if err != nil {
return err
}
// create a Sensitive variable
_, err = octopusdeploy.NewVariable(ctx, "sensitiveVariable", &octopusdeploy.VariableArgs{
OwnerId: pulumi.String("Projects-123"),
Type: pulumi.String("Sensitive"),
IsSensitive: pulumi.Bool(true),
SensitiveValue: pulumi.String("YourSecrets"),
})
if err != nil {
return err
}
// create a String variable
_, err = octopusdeploy.NewVariable(ctx, "stringVariable", &octopusdeploy.VariableArgs{
OwnerId: pulumi.String("Projects-123"),
Type: pulumi.String("String"),
Value: pulumi.String("PlainText"),
})
if err != nil {
return err
}
// create a WorkerPool variable
_, err = octopusdeploy.NewVariable(ctx, "workerpoolVariable", &octopusdeploy.VariableArgs{
OwnerId: pulumi.String("Projects-123"),
Type: pulumi.String("WorkerPool"),
Value: pulumi.String("WorkerPools-123"),
})
if err != nil {
return err
}
// create a prompted variable
_, err = octopusdeploy.NewVariable(ctx, "promptedVariable", &octopusdeploy.VariableArgs{
OwnerId: pulumi.String("Projects-123"),
Type: pulumi.String("String"),
Prompts: octopusdeploy.VariablePromptArray{
&octopusdeploy.VariablePromptArgs{
Description: pulumi.String("Variable Description"),
IsRequired: pulumi.Bool(true),
Label: pulumi.String("Variable Label"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Octopusdeploy = Pulumi.Octopusdeploy;
return await Deployment.RunAsync(() =>
{
// create an Amazon web services account variable
var amazonWebServicesAccountVariable = new Octopusdeploy.Variable("amazonWebServicesAccountVariable", new()
{
OwnerId = "Projects-123",
Type = "AmazonWebServicesAccount",
Value = "Accounts-123",
});
// create an Azure service principal account variable
var azureServicePrincipalAccountVariable = new Octopusdeploy.Variable("azureServicePrincipalAccountVariable", new()
{
OwnerId = "Projects-123",
Type = "AzureAccount",
Value = "Accounts-123",
});
// create a Google Cloud account variable
var googleCloudAccountVariable = new Octopusdeploy.Variable("googleCloudAccountVariable", new()
{
OwnerId = "Projects-123",
Type = "GoogleCloudAccount",
Value = "Accounts-123",
});
// Create a UsernamePassword account variable
var usernamepasswordAccountVariable = new Octopusdeploy.Variable("usernamepasswordAccountVariable", new()
{
OwnerId = "Projects-123",
Type = "UsernamePasswordAccount",
Value = octopusdeploy_username_password_account.Account_user_pass.Id,
});
// create a Certificate variable
var certificateVariable = new Octopusdeploy.Variable("certificateVariable", new()
{
OwnerId = "Projects-123",
Type = "Certificate",
Value = "Certificates-123",
});
// create a Sensitive variable
var sensitiveVariable = new Octopusdeploy.Variable("sensitiveVariable", new()
{
OwnerId = "Projects-123",
Type = "Sensitive",
IsSensitive = true,
SensitiveValue = "YourSecrets",
});
// create a String variable
var stringVariable = new Octopusdeploy.Variable("stringVariable", new()
{
OwnerId = "Projects-123",
Type = "String",
Value = "PlainText",
});
// create a WorkerPool variable
var workerpoolVariable = new Octopusdeploy.Variable("workerpoolVariable", new()
{
OwnerId = "Projects-123",
Type = "WorkerPool",
Value = "WorkerPools-123",
});
// create a prompted variable
var promptedVariable = new Octopusdeploy.Variable("promptedVariable", new()
{
OwnerId = "Projects-123",
Type = "String",
Prompts = new[]
{
new Octopusdeploy.Inputs.VariablePromptArgs
{
Description = "Variable Description",
IsRequired = true,
Label = "Variable Label",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.octopusdeploy.Variable;
import com.pulumi.octopusdeploy.VariableArgs;
import com.pulumi.octopusdeploy.inputs.VariablePromptArgs;
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) {
// create an Amazon web services account variable
var amazonWebServicesAccountVariable = new Variable("amazonWebServicesAccountVariable", VariableArgs.builder()
.ownerId("Projects-123")
.type("AmazonWebServicesAccount")
.value("Accounts-123")
.build());
// create an Azure service principal account variable
var azureServicePrincipalAccountVariable = new Variable("azureServicePrincipalAccountVariable", VariableArgs.builder()
.ownerId("Projects-123")
.type("AzureAccount")
.value("Accounts-123")
.build());
// create a Google Cloud account variable
var googleCloudAccountVariable = new Variable("googleCloudAccountVariable", VariableArgs.builder()
.ownerId("Projects-123")
.type("GoogleCloudAccount")
.value("Accounts-123")
.build());
// Create a UsernamePassword account variable
var usernamepasswordAccountVariable = new Variable("usernamepasswordAccountVariable", VariableArgs.builder()
.ownerId("Projects-123")
.type("UsernamePasswordAccount")
.value(octopusdeploy_username_password_account.account_user_pass().id())
.build());
// create a Certificate variable
var certificateVariable = new Variable("certificateVariable", VariableArgs.builder()
.ownerId("Projects-123")
.type("Certificate")
.value("Certificates-123")
.build());
// create a Sensitive variable
var sensitiveVariable = new Variable("sensitiveVariable", VariableArgs.builder()
.ownerId("Projects-123")
.type("Sensitive")
.isSensitive(true)
.sensitiveValue("YourSecrets")
.build());
// create a String variable
var stringVariable = new Variable("stringVariable", VariableArgs.builder()
.ownerId("Projects-123")
.type("String")
.value("PlainText")
.build());
// create a WorkerPool variable
var workerpoolVariable = new Variable("workerpoolVariable", VariableArgs.builder()
.ownerId("Projects-123")
.type("WorkerPool")
.value("WorkerPools-123")
.build());
// create a prompted variable
var promptedVariable = new Variable("promptedVariable", VariableArgs.builder()
.ownerId("Projects-123")
.type("String")
.prompts(VariablePromptArgs.builder()
.description("Variable Description")
.isRequired(true)
.label("Variable Label")
.build())
.build());
}
}
resources:
# create an Amazon web services account variable
amazonWebServicesAccountVariable:
type: octopusdeploy:Variable
properties:
ownerId: Projects-123
type: AmazonWebServicesAccount
value: Accounts-123
# create an Azure service principal account variable
azureServicePrincipalAccountVariable:
type: octopusdeploy:Variable
properties:
ownerId: Projects-123
type: AzureAccount
value: Accounts-123
# create a Google Cloud account variable
googleCloudAccountVariable:
type: octopusdeploy:Variable
properties:
ownerId: Projects-123
type: GoogleCloudAccount
value: Accounts-123
# Create a UsernamePassword account variable
usernamepasswordAccountVariable:
type: octopusdeploy:Variable
properties:
ownerId: Projects-123
type: UsernamePasswordAccount
value: ${octopusdeploy_username_password_account.account_user_pass.id}
# create a Certificate variable
certificateVariable:
type: octopusdeploy:Variable
properties:
ownerId: Projects-123
type: Certificate
value: Certificates-123
# create a Sensitive variable
sensitiveVariable:
type: octopusdeploy:Variable
properties:
ownerId: Projects-123
type: Sensitive
isSensitive: true
sensitiveValue: YourSecrets
# create a String variable
stringVariable:
type: octopusdeploy:Variable
properties:
ownerId: Projects-123
type: String
value: PlainText
# create a WorkerPool variable
workerpoolVariable:
type: octopusdeploy:Variable
properties:
ownerId: Projects-123
type: WorkerPool
value: WorkerPools-123
# create a prompted variable
promptedVariable:
type: octopusdeploy:Variable
properties:
ownerId: Projects-123
type: String
prompts:
- description: Variable Description
isRequired: true
label: Variable Label
Create Variable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Variable(name: string, args: VariableArgs, opts?: CustomResourceOptions);
@overload
def Variable(resource_name: str,
args: VariableArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Variable(resource_name: str,
opts: Optional[ResourceOptions] = None,
type: Optional[str] = None,
description: Optional[str] = None,
is_editable: Optional[bool] = None,
is_sensitive: Optional[bool] = None,
name: Optional[str] = None,
owner_id: Optional[str] = None,
project_id: Optional[str] = None,
prompts: Optional[Sequence[VariablePromptArgs]] = None,
scopes: Optional[Sequence[VariableScopeArgs]] = None,
sensitive_value: Optional[str] = None,
space_id: Optional[str] = None,
value: Optional[str] = None)
func NewVariable(ctx *Context, name string, args VariableArgs, opts ...ResourceOption) (*Variable, error)
public Variable(string name, VariableArgs args, CustomResourceOptions? opts = null)
public Variable(String name, VariableArgs args)
public Variable(String name, VariableArgs args, CustomResourceOptions options)
type: octopusdeploy:Variable
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 VariableArgs
- 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 VariableArgs
- 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 VariableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VariableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VariableArgs
- 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 variableResource = new Octopusdeploy.Variable("variableResource", new()
{
Type = "string",
Description = "string",
IsSensitive = false,
Name = "string",
OwnerId = "string",
Prompts = new[]
{
new Octopusdeploy.Inputs.VariablePromptArgs
{
Description = "string",
DisplaySettings = new[]
{
new Octopusdeploy.Inputs.VariablePromptDisplaySettingArgs
{
ControlType = "string",
SelectOptions = new[]
{
new Octopusdeploy.Inputs.VariablePromptDisplaySettingSelectOptionArgs
{
DisplayName = "string",
Value = "string",
},
},
},
},
IsRequired = false,
Label = "string",
},
},
Scopes = new[]
{
new Octopusdeploy.Inputs.VariableScopeArgs
{
Actions = new[]
{
"string",
},
Channels = new[]
{
"string",
},
Environments = new[]
{
"string",
},
Machines = new[]
{
"string",
},
Processes = new[]
{
"string",
},
Roles = new[]
{
"string",
},
TenantTags = new[]
{
"string",
},
},
},
SensitiveValue = "string",
SpaceId = "string",
Value = "string",
});
example, err := octopusdeploy.NewVariable(ctx, "variableResource", &octopusdeploy.VariableArgs{
Type: pulumi.String("string"),
Description: pulumi.String("string"),
IsSensitive: pulumi.Bool(false),
Name: pulumi.String("string"),
OwnerId: pulumi.String("string"),
Prompts: octopusdeploy.VariablePromptArray{
&octopusdeploy.VariablePromptArgs{
Description: pulumi.String("string"),
DisplaySettings: octopusdeploy.VariablePromptDisplaySettingArray{
&octopusdeploy.VariablePromptDisplaySettingArgs{
ControlType: pulumi.String("string"),
SelectOptions: octopusdeploy.VariablePromptDisplaySettingSelectOptionArray{
&octopusdeploy.VariablePromptDisplaySettingSelectOptionArgs{
DisplayName: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
},
IsRequired: pulumi.Bool(false),
Label: pulumi.String("string"),
},
},
Scopes: octopusdeploy.VariableScopeArray{
&octopusdeploy.VariableScopeArgs{
Actions: pulumi.StringArray{
pulumi.String("string"),
},
Channels: pulumi.StringArray{
pulumi.String("string"),
},
Environments: pulumi.StringArray{
pulumi.String("string"),
},
Machines: pulumi.StringArray{
pulumi.String("string"),
},
Processes: pulumi.StringArray{
pulumi.String("string"),
},
Roles: pulumi.StringArray{
pulumi.String("string"),
},
TenantTags: pulumi.StringArray{
pulumi.String("string"),
},
},
},
SensitiveValue: pulumi.String("string"),
SpaceId: pulumi.String("string"),
Value: pulumi.String("string"),
})
var variableResource = new Variable("variableResource", VariableArgs.builder()
.type("string")
.description("string")
.isSensitive(false)
.name("string")
.ownerId("string")
.prompts(VariablePromptArgs.builder()
.description("string")
.displaySettings(VariablePromptDisplaySettingArgs.builder()
.controlType("string")
.selectOptions(VariablePromptDisplaySettingSelectOptionArgs.builder()
.displayName("string")
.value("string")
.build())
.build())
.isRequired(false)
.label("string")
.build())
.scopes(VariableScopeArgs.builder()
.actions("string")
.channels("string")
.environments("string")
.machines("string")
.processes("string")
.roles("string")
.tenantTags("string")
.build())
.sensitiveValue("string")
.spaceId("string")
.value("string")
.build());
variable_resource = octopusdeploy.Variable("variableResource",
type="string",
description="string",
is_sensitive=False,
name="string",
owner_id="string",
prompts=[{
"description": "string",
"display_settings": [{
"control_type": "string",
"select_options": [{
"display_name": "string",
"value": "string",
}],
}],
"is_required": False,
"label": "string",
}],
scopes=[{
"actions": ["string"],
"channels": ["string"],
"environments": ["string"],
"machines": ["string"],
"processes": ["string"],
"roles": ["string"],
"tenant_tags": ["string"],
}],
sensitive_value="string",
space_id="string",
value="string")
const variableResource = new octopusdeploy.Variable("variableResource", {
type: "string",
description: "string",
isSensitive: false,
name: "string",
ownerId: "string",
prompts: [{
description: "string",
displaySettings: [{
controlType: "string",
selectOptions: [{
displayName: "string",
value: "string",
}],
}],
isRequired: false,
label: "string",
}],
scopes: [{
actions: ["string"],
channels: ["string"],
environments: ["string"],
machines: ["string"],
processes: ["string"],
roles: ["string"],
tenantTags: ["string"],
}],
sensitiveValue: "string",
spaceId: "string",
value: "string",
});
type: octopusdeploy:Variable
properties:
description: string
isSensitive: false
name: string
ownerId: string
prompts:
- description: string
displaySettings:
- controlType: string
selectOptions:
- displayName: string
value: string
isRequired: false
label: string
scopes:
- actions:
- string
channels:
- string
environments:
- string
machines:
- string
processes:
- string
roles:
- string
tenantTags:
- string
sensitiveValue: string
spaceId: string
type: string
value: string
Variable 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 Variable resource accepts the following input properties:
- Type string
- The type of variable represented by this resource. Valid types are
AmazonWebServicesAccount
,AzureAccount
,GoogleCloudAccount
,UsernamePasswordAccount
,Certificate
,Sensitive
,String
,WorkerPool
. - Description string
- The description of this variable.
- Is
Editable bool - Indicates whether or not this variable is considered editable.
- Is
Sensitive bool - Indicates whether or not this resource is considered sensitive and should be kept secret.
- Name string
- The name of this resource.
- Owner
Id string - Project
Id string - Prompts
List<Variable
Prompt> - Scopes
List<Variable
Scope> - Sensitive
Value string - Space
Id string - The space ID associated with this variable.
- Value string
- Type string
- The type of variable represented by this resource. Valid types are
AmazonWebServicesAccount
,AzureAccount
,GoogleCloudAccount
,UsernamePasswordAccount
,Certificate
,Sensitive
,String
,WorkerPool
. - Description string
- The description of this variable.
- Is
Editable bool - Indicates whether or not this variable is considered editable.
- Is
Sensitive bool - Indicates whether or not this resource is considered sensitive and should be kept secret.
- Name string
- The name of this resource.
- Owner
Id string - Project
Id string - Prompts
[]Variable
Prompt Args - Scopes
[]Variable
Scope Args - Sensitive
Value string - Space
Id string - The space ID associated with this variable.
- Value string
- type String
- The type of variable represented by this resource. Valid types are
AmazonWebServicesAccount
,AzureAccount
,GoogleCloudAccount
,UsernamePasswordAccount
,Certificate
,Sensitive
,String
,WorkerPool
. - description String
- The description of this variable.
- is
Editable Boolean - Indicates whether or not this variable is considered editable.
- is
Sensitive Boolean - Indicates whether or not this resource is considered sensitive and should be kept secret.
- name String
- The name of this resource.
- owner
Id String - project
Id String - prompts
List<Variable
Prompt> - scopes
List<Variable
Scope> - sensitive
Value String - space
Id String - The space ID associated with this variable.
- value String
- type string
- The type of variable represented by this resource. Valid types are
AmazonWebServicesAccount
,AzureAccount
,GoogleCloudAccount
,UsernamePasswordAccount
,Certificate
,Sensitive
,String
,WorkerPool
. - description string
- The description of this variable.
- is
Editable boolean - Indicates whether or not this variable is considered editable.
- is
Sensitive boolean - Indicates whether or not this resource is considered sensitive and should be kept secret.
- name string
- The name of this resource.
- owner
Id string - project
Id string - prompts
Variable
Prompt[] - scopes
Variable
Scope[] - sensitive
Value string - space
Id string - The space ID associated with this variable.
- value string
- type str
- The type of variable represented by this resource. Valid types are
AmazonWebServicesAccount
,AzureAccount
,GoogleCloudAccount
,UsernamePasswordAccount
,Certificate
,Sensitive
,String
,WorkerPool
. - description str
- The description of this variable.
- is_
editable bool - Indicates whether or not this variable is considered editable.
- is_
sensitive bool - Indicates whether or not this resource is considered sensitive and should be kept secret.
- name str
- The name of this resource.
- owner_
id str - project_
id str - prompts
Sequence[Variable
Prompt Args] - scopes
Sequence[Variable
Scope Args] - sensitive_
value str - space_
id str - The space ID associated with this variable.
- value str
- type String
- The type of variable represented by this resource. Valid types are
AmazonWebServicesAccount
,AzureAccount
,GoogleCloudAccount
,UsernamePasswordAccount
,Certificate
,Sensitive
,String
,WorkerPool
. - description String
- The description of this variable.
- is
Editable Boolean - Indicates whether or not this variable is considered editable.
- is
Sensitive Boolean - Indicates whether or not this resource is considered sensitive and should be kept secret.
- name String
- The name of this resource.
- owner
Id String - project
Id String - prompts List<Property Map>
- scopes List<Property Map>
- sensitive
Value String - space
Id String - The space ID associated with this variable.
- value String
Outputs
All input properties are implicitly available as output properties. Additionally, the Variable resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Variable Resource
Get an existing Variable 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?: VariableState, opts?: CustomResourceOptions): Variable
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
is_editable: Optional[bool] = None,
is_sensitive: Optional[bool] = None,
name: Optional[str] = None,
owner_id: Optional[str] = None,
project_id: Optional[str] = None,
prompts: Optional[Sequence[VariablePromptArgs]] = None,
scopes: Optional[Sequence[VariableScopeArgs]] = None,
sensitive_value: Optional[str] = None,
space_id: Optional[str] = None,
type: Optional[str] = None,
value: Optional[str] = None) -> Variable
func GetVariable(ctx *Context, name string, id IDInput, state *VariableState, opts ...ResourceOption) (*Variable, error)
public static Variable Get(string name, Input<string> id, VariableState? state, CustomResourceOptions? opts = null)
public static Variable get(String name, Output<String> id, VariableState state, CustomResourceOptions options)
resources: _: type: octopusdeploy:Variable get: id: ${id}
- 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.
- Description string
- The description of this variable.
- Is
Editable bool - Indicates whether or not this variable is considered editable.
- Is
Sensitive bool - Indicates whether or not this resource is considered sensitive and should be kept secret.
- Name string
- The name of this resource.
- Owner
Id string - Project
Id string - Prompts
List<Variable
Prompt> - Scopes
List<Variable
Scope> - Sensitive
Value string - Space
Id string - The space ID associated with this variable.
- Type string
- The type of variable represented by this resource. Valid types are
AmazonWebServicesAccount
,AzureAccount
,GoogleCloudAccount
,UsernamePasswordAccount
,Certificate
,Sensitive
,String
,WorkerPool
. - Value string
- Description string
- The description of this variable.
- Is
Editable bool - Indicates whether or not this variable is considered editable.
- Is
Sensitive bool - Indicates whether or not this resource is considered sensitive and should be kept secret.
- Name string
- The name of this resource.
- Owner
Id string - Project
Id string - Prompts
[]Variable
Prompt Args - Scopes
[]Variable
Scope Args - Sensitive
Value string - Space
Id string - The space ID associated with this variable.
- Type string
- The type of variable represented by this resource. Valid types are
AmazonWebServicesAccount
,AzureAccount
,GoogleCloudAccount
,UsernamePasswordAccount
,Certificate
,Sensitive
,String
,WorkerPool
. - Value string
- description String
- The description of this variable.
- is
Editable Boolean - Indicates whether or not this variable is considered editable.
- is
Sensitive Boolean - Indicates whether or not this resource is considered sensitive and should be kept secret.
- name String
- The name of this resource.
- owner
Id String - project
Id String - prompts
List<Variable
Prompt> - scopes
List<Variable
Scope> - sensitive
Value String - space
Id String - The space ID associated with this variable.
- type String
- The type of variable represented by this resource. Valid types are
AmazonWebServicesAccount
,AzureAccount
,GoogleCloudAccount
,UsernamePasswordAccount
,Certificate
,Sensitive
,String
,WorkerPool
. - value String
- description string
- The description of this variable.
- is
Editable boolean - Indicates whether or not this variable is considered editable.
- is
Sensitive boolean - Indicates whether or not this resource is considered sensitive and should be kept secret.
- name string
- The name of this resource.
- owner
Id string - project
Id string - prompts
Variable
Prompt[] - scopes
Variable
Scope[] - sensitive
Value string - space
Id string - The space ID associated with this variable.
- type string
- The type of variable represented by this resource. Valid types are
AmazonWebServicesAccount
,AzureAccount
,GoogleCloudAccount
,UsernamePasswordAccount
,Certificate
,Sensitive
,String
,WorkerPool
. - value string
- description str
- The description of this variable.
- is_
editable bool - Indicates whether or not this variable is considered editable.
- is_
sensitive bool - Indicates whether or not this resource is considered sensitive and should be kept secret.
- name str
- The name of this resource.
- owner_
id str - project_
id str - prompts
Sequence[Variable
Prompt Args] - scopes
Sequence[Variable
Scope Args] - sensitive_
value str - space_
id str - The space ID associated with this variable.
- type str
- The type of variable represented by this resource. Valid types are
AmazonWebServicesAccount
,AzureAccount
,GoogleCloudAccount
,UsernamePasswordAccount
,Certificate
,Sensitive
,String
,WorkerPool
. - value str
- description String
- The description of this variable.
- is
Editable Boolean - Indicates whether or not this variable is considered editable.
- is
Sensitive Boolean - Indicates whether or not this resource is considered sensitive and should be kept secret.
- name String
- The name of this resource.
- owner
Id String - project
Id String - prompts List<Property Map>
- scopes List<Property Map>
- sensitive
Value String - space
Id String - The space ID associated with this variable.
- type String
- The type of variable represented by this resource. Valid types are
AmazonWebServicesAccount
,AzureAccount
,GoogleCloudAccount
,UsernamePasswordAccount
,Certificate
,Sensitive
,String
,WorkerPool
. - value String
Supporting Types
VariablePrompt, VariablePromptArgs
- Description string
- The description of this variable prompt option.
- Display
Settings List<VariablePrompt Display Setting> - Is
Required bool - Label string
- Description string
- The description of this variable prompt option.
- Display
Settings []VariablePrompt Display Setting - Is
Required bool - Label string
- description String
- The description of this variable prompt option.
- display
Settings List<VariablePrompt Display Setting> - is
Required Boolean - label String
- description string
- The description of this variable prompt option.
- display
Settings VariablePrompt Display Setting[] - is
Required boolean - label string
- description str
- The description of this variable prompt option.
- display_
settings Sequence[VariablePrompt Display Setting] - is_
required bool - label str
- description String
- The description of this variable prompt option.
- display
Settings List<Property Map> - is
Required Boolean - label String
VariablePromptDisplaySetting, VariablePromptDisplaySettingArgs
- Control
Type string - The type of control for rendering this prompted variable. Valid types are
SingleLineText
,MultiLineText
,Checkbox
,Select
. - Select
Options List<VariablePrompt Display Setting Select Option> - If the
control_type
isSelect
, then this value defines an option.
- Control
Type string - The type of control for rendering this prompted variable. Valid types are
SingleLineText
,MultiLineText
,Checkbox
,Select
. - Select
Options []VariablePrompt Display Setting Select Option - If the
control_type
isSelect
, then this value defines an option.
- control
Type String - The type of control for rendering this prompted variable. Valid types are
SingleLineText
,MultiLineText
,Checkbox
,Select
. - select
Options List<VariablePrompt Display Setting Select Option> - If the
control_type
isSelect
, then this value defines an option.
- control
Type string - The type of control for rendering this prompted variable. Valid types are
SingleLineText
,MultiLineText
,Checkbox
,Select
. - select
Options VariablePrompt Display Setting Select Option[] - If the
control_type
isSelect
, then this value defines an option.
- control_
type str - The type of control for rendering this prompted variable. Valid types are
SingleLineText
,MultiLineText
,Checkbox
,Select
. - select_
options Sequence[VariablePrompt Display Setting Select Option] - If the
control_type
isSelect
, then this value defines an option.
- control
Type String - The type of control for rendering this prompted variable. Valid types are
SingleLineText
,MultiLineText
,Checkbox
,Select
. - select
Options List<Property Map> - If the
control_type
isSelect
, then this value defines an option.
VariablePromptDisplaySettingSelectOption, VariablePromptDisplaySettingSelectOptionArgs
- Display
Name string - The display name for the select value
- Value string
- The select value
- Display
Name string - The display name for the select value
- Value string
- The select value
- display
Name String - The display name for the select value
- value String
- The select value
- display
Name string - The display name for the select value
- value string
- The select value
- display_
name str - The display name for the select value
- value str
- The select value
- display
Name String - The display name for the select value
- value String
- The select value
VariableScope, VariableScopeArgs
- Actions List<string>
- A list of actions that are scoped to this variable value.
- Channels List<string>
- A list of channels that are scoped to this variable value.
- Environments List<string>
- A list of environments that are scoped to this variable value.
- Machines List<string>
- A list of machines that are scoped to this variable value.
- Processes List<string>
- A list of processes that are scoped to this variable value.
- Roles List<string>
- A list of roles that are scoped to this variable value.
- List<string>
- A list of tenant tags that are scoped to this variable value.
- Actions []string
- A list of actions that are scoped to this variable value.
- Channels []string
- A list of channels that are scoped to this variable value.
- Environments []string
- A list of environments that are scoped to this variable value.
- Machines []string
- A list of machines that are scoped to this variable value.
- Processes []string
- A list of processes that are scoped to this variable value.
- Roles []string
- A list of roles that are scoped to this variable value.
- []string
- A list of tenant tags that are scoped to this variable value.
- actions List<String>
- A list of actions that are scoped to this variable value.
- channels List<String>
- A list of channels that are scoped to this variable value.
- environments List<String>
- A list of environments that are scoped to this variable value.
- machines List<String>
- A list of machines that are scoped to this variable value.
- processes List<String>
- A list of processes that are scoped to this variable value.
- roles List<String>
- A list of roles that are scoped to this variable value.
- List<String>
- A list of tenant tags that are scoped to this variable value.
- actions string[]
- A list of actions that are scoped to this variable value.
- channels string[]
- A list of channels that are scoped to this variable value.
- environments string[]
- A list of environments that are scoped to this variable value.
- machines string[]
- A list of machines that are scoped to this variable value.
- processes string[]
- A list of processes that are scoped to this variable value.
- roles string[]
- A list of roles that are scoped to this variable value.
- string[]
- A list of tenant tags that are scoped to this variable value.
- actions Sequence[str]
- A list of actions that are scoped to this variable value.
- channels Sequence[str]
- A list of channels that are scoped to this variable value.
- environments Sequence[str]
- A list of environments that are scoped to this variable value.
- machines Sequence[str]
- A list of machines that are scoped to this variable value.
- processes Sequence[str]
- A list of processes that are scoped to this variable value.
- roles Sequence[str]
- A list of roles that are scoped to this variable value.
- Sequence[str]
- A list of tenant tags that are scoped to this variable value.
- actions List<String>
- A list of actions that are scoped to this variable value.
- channels List<String>
- A list of channels that are scoped to this variable value.
- environments List<String>
- A list of environments that are scoped to this variable value.
- machines List<String>
- A list of machines that are scoped to this variable value.
- processes List<String>
- A list of processes that are scoped to this variable value.
- roles List<String>
- A list of roles that are scoped to this variable value.
- List<String>
- A list of tenant tags that are scoped to this variable value.
Import
$ pulumi import octopusdeploy:index/variable:Variable [options] octopusdeploy_variable.<name> <variable-id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- octopusdeploy octopusdeploylabs/terraform-provider-octopusdeploy
- License
- Notes
- This Pulumi package is based on the
octopusdeploy
Terraform Provider.