Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.6.0 published on Friday, May 20, 2022 by Pulumi

getBoolVariable

Use this data source to access information about an existing Automation Bool Variable.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Automation.GetBoolVariable.InvokeAsync(new Azure.Automation.GetBoolVariableArgs
        {
            Name = "tfex-example-var",
            ResourceGroupName = "tfex-example-rg",
            AutomationAccountName = "tfex-example-account",
        }));
        this.VariableId = example.Apply(example => example.Id);
    }

    [Output("variableId")]
    public Output<string> VariableId { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/automation"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := automation.LookupBoolVariable(ctx, &automation.LookupBoolVariableArgs{
			Name:                  "tfex-example-var",
			ResourceGroupName:     "tfex-example-rg",
			AutomationAccountName: "tfex-example-account",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("variableId", example.Id)
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(AutomationFunctions.getBoolVariable(GetBoolVariableArgs.builder()
            .name("tfex-example-var")
            .resourceGroupName("tfex-example-rg")
            .automationAccountName("tfex-example-account")
            .build()));

        ctx.export("variableId", example.apply(getBoolVariableResult -> getBoolVariableResult.getId()));
        }
}
import pulumi
import pulumi_azure as azure

example = azure.automation.get_bool_variable(name="tfex-example-var",
    resource_group_name="tfex-example-rg",
    automation_account_name="tfex-example-account")
pulumi.export("variableId", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.automation.getBoolVariable({
    name: "tfex-example-var",
    resourceGroupName: "tfex-example-rg",
    automationAccountName: "tfex-example-account",
});
export const variableId = example.then(example => example.id);
variables:
  example:
    Fn::Invoke:
      Function: azure:automation:getBoolVariable
      Arguments:
        name: tfex-example-var
        resourceGroupName: tfex-example-rg
        automationAccountName: tfex-example-account
outputs:
  variableId: ${example.id}

Using getBoolVariable

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 getBoolVariable(args: GetBoolVariableArgs, opts?: InvokeOptions): Promise<GetBoolVariableResult>
function getBoolVariableOutput(args: GetBoolVariableOutputArgs, opts?: InvokeOptions): Output<GetBoolVariableResult>
def get_bool_variable(automation_account_name: Optional[str] = None,
                      name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetBoolVariableResult
def get_bool_variable_output(automation_account_name: Optional[pulumi.Input[str]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      resource_group_name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetBoolVariableResult]
func LookupBoolVariable(ctx *Context, args *LookupBoolVariableArgs, opts ...InvokeOption) (*LookupBoolVariableResult, error)
func LookupBoolVariableOutput(ctx *Context, args *LookupBoolVariableOutputArgs, opts ...InvokeOption) LookupBoolVariableResultOutput

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

public static class GetBoolVariable 
{
    public static Task<GetBoolVariableResult> InvokeAsync(GetBoolVariableArgs args, InvokeOptions? opts = null)
    public static Output<GetBoolVariableResult> Invoke(GetBoolVariableInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBoolVariableResult> getBoolVariable(GetBoolVariableArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azure:automation/getBoolVariable:getBoolVariable
  Arguments:
    # Arguments dictionary

The following arguments are supported:

AutomationAccountName string

The name of the automation account in which the Automation Variable exists.

Name string

The name of the Automation Variable.

ResourceGroupName string

The Name of the Resource Group where the automation account exists.

AutomationAccountName string

The name of the automation account in which the Automation Variable exists.

Name string

The name of the Automation Variable.

ResourceGroupName string

The Name of the Resource Group where the automation account exists.

automationAccountName String

The name of the automation account in which the Automation Variable exists.

name String

The name of the Automation Variable.

resourceGroupName String

The Name of the Resource Group where the automation account exists.

automationAccountName string

The name of the automation account in which the Automation Variable exists.

name string

The name of the Automation Variable.

resourceGroupName string

The Name of the Resource Group where the automation account exists.

automation_account_name str

The name of the automation account in which the Automation Variable exists.

name str

The name of the Automation Variable.

resource_group_name str

The Name of the Resource Group where the automation account exists.

automationAccountName String

The name of the automation account in which the Automation Variable exists.

name String

The name of the Automation Variable.

resourceGroupName String

The Name of the Resource Group where the automation account exists.

getBoolVariable Result

The following output properties are available:

AutomationAccountName string
Description string

The description of the Automation Variable.

Encrypted bool

Specifies if the Automation Variable is encrypted. Defaults to false.

Id string

The provider-assigned unique ID for this managed resource.

Name string
ResourceGroupName string
Value bool

The value of the Automation Variable as a boolean.

AutomationAccountName string
Description string

The description of the Automation Variable.

Encrypted bool

Specifies if the Automation Variable is encrypted. Defaults to false.

Id string

The provider-assigned unique ID for this managed resource.

Name string
ResourceGroupName string
Value bool

The value of the Automation Variable as a boolean.

automationAccountName String
description String

The description of the Automation Variable.

encrypted Boolean

Specifies if the Automation Variable is encrypted. Defaults to false.

id String

The provider-assigned unique ID for this managed resource.

name String
resourceGroupName String
value Boolean

The value of the Automation Variable as a boolean.

automationAccountName string
description string

The description of the Automation Variable.

encrypted boolean

Specifies if the Automation Variable is encrypted. Defaults to false.

id string

The provider-assigned unique ID for this managed resource.

name string
resourceGroupName string
value boolean

The value of the Automation Variable as a boolean.

automation_account_name str
description str

The description of the Automation Variable.

encrypted bool

Specifies if the Automation Variable is encrypted. Defaults to false.

id str

The provider-assigned unique ID for this managed resource.

name str
resource_group_name str
value bool

The value of the Automation Variable as a boolean.

automationAccountName String
description String

The description of the Automation Variable.

encrypted Boolean

Specifies if the Automation Variable is encrypted. Defaults to false.

id String

The provider-assigned unique ID for this managed resource.

name String
resourceGroupName String
value Boolean

The value of the Automation Variable as a boolean.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.