1. Packages
  2. Azure Classic
  3. API Docs
  4. compute
  5. getBastionHost

We recommend using Azure Native.

Azure v6.12.0 published on Monday, Dec 2, 2024 by Pulumi

azure.compute.getBastionHost

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.12.0 published on Monday, Dec 2, 2024 by Pulumi

    Use this data source to access information about an existing Bastion Host.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.compute.getBastionHost({
        name: "existing-bastion",
        resourceGroupName: "existing-resources",
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.compute.get_bastion_host(name="existing-bastion",
        resource_group_name="existing-resources")
    pulumi.export("id", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := compute.LookupBastionHost(ctx, &compute.LookupBastionHostArgs{
    			Name:              "existing-bastion",
    			ResourceGroupName: "existing-resources",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Compute.GetBastionHost.Invoke(new()
        {
            Name = "existing-bastion",
            ResourceGroupName = "existing-resources",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getBastionHostResult => getBastionHostResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.compute.ComputeFunctions;
    import com.pulumi.azure.compute.inputs.GetBastionHostArgs;
    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 example = ComputeFunctions.getBastionHost(GetBastionHostArgs.builder()
                .name("existing-bastion")
                .resourceGroupName("existing-resources")
                .build());
    
            ctx.export("id", example.applyValue(getBastionHostResult -> getBastionHostResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:compute:getBastionHost
          Arguments:
            name: existing-bastion
            resourceGroupName: existing-resources
    outputs:
      id: ${example.id}
    

    Using getBastionHost

    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 getBastionHost(args: GetBastionHostArgs, opts?: InvokeOptions): Promise<GetBastionHostResult>
    function getBastionHostOutput(args: GetBastionHostOutputArgs, opts?: InvokeOptions): Output<GetBastionHostResult>
    def get_bastion_host(name: Optional[str] = None,
                         resource_group_name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetBastionHostResult
    def get_bastion_host_output(name: Optional[pulumi.Input[str]] = None,
                         resource_group_name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetBastionHostResult]
    func LookupBastionHost(ctx *Context, args *LookupBastionHostArgs, opts ...InvokeOption) (*LookupBastionHostResult, error)
    func LookupBastionHostOutput(ctx *Context, args *LookupBastionHostOutputArgs, opts ...InvokeOption) LookupBastionHostResultOutput

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

    public static class GetBastionHost 
    {
        public static Task<GetBastionHostResult> InvokeAsync(GetBastionHostArgs args, InvokeOptions? opts = null)
        public static Output<GetBastionHostResult> Invoke(GetBastionHostInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBastionHostResult> getBastionHost(GetBastionHostArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:compute/getBastionHost:getBastionHost
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Bastion Host.
    ResourceGroupName string
    The name of the Resource Group where the Bastion Host exists.
    Name string
    The name of the Bastion Host.
    ResourceGroupName string
    The name of the Resource Group where the Bastion Host exists.
    name String
    The name of the Bastion Host.
    resourceGroupName String
    The name of the Resource Group where the Bastion Host exists.
    name string
    The name of the Bastion Host.
    resourceGroupName string
    The name of the Resource Group where the Bastion Host exists.
    name str
    The name of the Bastion Host.
    resource_group_name str
    The name of the Resource Group where the Bastion Host exists.
    name String
    The name of the Bastion Host.
    resourceGroupName String
    The name of the Resource Group where the Bastion Host exists.

    getBastionHost Result

    The following output properties are available:

    CopyPasteEnabled bool
    Is Copy/Paste feature enabled for the Bastion Host.
    DnsName string
    The FQDN for the Bastion Host.
    FileCopyEnabled bool
    Is File Copy feature enabled for the Bastion Host.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpConfigurations List<GetBastionHostIpConfiguration>
    A ip_configuration block as defined below.
    IpConnectEnabled bool
    Is IP Connect feature enabled for the Bastion Host.
    Location string
    The Azure Region where the Bastion Host exists.
    Name string
    The name of the IP configuration.
    ResourceGroupName string
    ScaleUnits int
    The number of scale units provisioned for the Bastion Host.
    SessionRecordingEnabled bool
    Is Session Recording feature enabled for the Bastion Host.
    ShareableLinkEnabled bool
    Is Shareable Link feature enabled for the Bastion Host.
    Sku string
    The SKU of the Bastion Host.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Bastion Host.
    TunnelingEnabled bool
    Is Tunneling feature enabled for the Bastion Host.
    Zones List<string>
    A list of Availability Zones in which this Bastion Host is located.
    CopyPasteEnabled bool
    Is Copy/Paste feature enabled for the Bastion Host.
    DnsName string
    The FQDN for the Bastion Host.
    FileCopyEnabled bool
    Is File Copy feature enabled for the Bastion Host.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpConfigurations []GetBastionHostIpConfiguration
    A ip_configuration block as defined below.
    IpConnectEnabled bool
    Is IP Connect feature enabled for the Bastion Host.
    Location string
    The Azure Region where the Bastion Host exists.
    Name string
    The name of the IP configuration.
    ResourceGroupName string
    ScaleUnits int
    The number of scale units provisioned for the Bastion Host.
    SessionRecordingEnabled bool
    Is Session Recording feature enabled for the Bastion Host.
    ShareableLinkEnabled bool
    Is Shareable Link feature enabled for the Bastion Host.
    Sku string
    The SKU of the Bastion Host.
    Tags map[string]string
    A mapping of tags assigned to the Bastion Host.
    TunnelingEnabled bool
    Is Tunneling feature enabled for the Bastion Host.
    Zones []string
    A list of Availability Zones in which this Bastion Host is located.
    copyPasteEnabled Boolean
    Is Copy/Paste feature enabled for the Bastion Host.
    dnsName String
    The FQDN for the Bastion Host.
    fileCopyEnabled Boolean
    Is File Copy feature enabled for the Bastion Host.
    id String
    The provider-assigned unique ID for this managed resource.
    ipConfigurations List<GetBastionHostIpConfiguration>
    A ip_configuration block as defined below.
    ipConnectEnabled Boolean
    Is IP Connect feature enabled for the Bastion Host.
    location String
    The Azure Region where the Bastion Host exists.
    name String
    The name of the IP configuration.
    resourceGroupName String
    scaleUnits Integer
    The number of scale units provisioned for the Bastion Host.
    sessionRecordingEnabled Boolean
    Is Session Recording feature enabled for the Bastion Host.
    shareableLinkEnabled Boolean
    Is Shareable Link feature enabled for the Bastion Host.
    sku String
    The SKU of the Bastion Host.
    tags Map<String,String>
    A mapping of tags assigned to the Bastion Host.
    tunnelingEnabled Boolean
    Is Tunneling feature enabled for the Bastion Host.
    zones List<String>
    A list of Availability Zones in which this Bastion Host is located.
    copyPasteEnabled boolean
    Is Copy/Paste feature enabled for the Bastion Host.
    dnsName string
    The FQDN for the Bastion Host.
    fileCopyEnabled boolean
    Is File Copy feature enabled for the Bastion Host.
    id string
    The provider-assigned unique ID for this managed resource.
    ipConfigurations GetBastionHostIpConfiguration[]
    A ip_configuration block as defined below.
    ipConnectEnabled boolean
    Is IP Connect feature enabled for the Bastion Host.
    location string
    The Azure Region where the Bastion Host exists.
    name string
    The name of the IP configuration.
    resourceGroupName string
    scaleUnits number
    The number of scale units provisioned for the Bastion Host.
    sessionRecordingEnabled boolean
    Is Session Recording feature enabled for the Bastion Host.
    shareableLinkEnabled boolean
    Is Shareable Link feature enabled for the Bastion Host.
    sku string
    The SKU of the Bastion Host.
    tags {[key: string]: string}
    A mapping of tags assigned to the Bastion Host.
    tunnelingEnabled boolean
    Is Tunneling feature enabled for the Bastion Host.
    zones string[]
    A list of Availability Zones in which this Bastion Host is located.
    copy_paste_enabled bool
    Is Copy/Paste feature enabled for the Bastion Host.
    dns_name str
    The FQDN for the Bastion Host.
    file_copy_enabled bool
    Is File Copy feature enabled for the Bastion Host.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_configurations Sequence[GetBastionHostIpConfiguration]
    A ip_configuration block as defined below.
    ip_connect_enabled bool
    Is IP Connect feature enabled for the Bastion Host.
    location str
    The Azure Region where the Bastion Host exists.
    name str
    The name of the IP configuration.
    resource_group_name str
    scale_units int
    The number of scale units provisioned for the Bastion Host.
    session_recording_enabled bool
    Is Session Recording feature enabled for the Bastion Host.
    shareable_link_enabled bool
    Is Shareable Link feature enabled for the Bastion Host.
    sku str
    The SKU of the Bastion Host.
    tags Mapping[str, str]
    A mapping of tags assigned to the Bastion Host.
    tunneling_enabled bool
    Is Tunneling feature enabled for the Bastion Host.
    zones Sequence[str]
    A list of Availability Zones in which this Bastion Host is located.
    copyPasteEnabled Boolean
    Is Copy/Paste feature enabled for the Bastion Host.
    dnsName String
    The FQDN for the Bastion Host.
    fileCopyEnabled Boolean
    Is File Copy feature enabled for the Bastion Host.
    id String
    The provider-assigned unique ID for this managed resource.
    ipConfigurations List<Property Map>
    A ip_configuration block as defined below.
    ipConnectEnabled Boolean
    Is IP Connect feature enabled for the Bastion Host.
    location String
    The Azure Region where the Bastion Host exists.
    name String
    The name of the IP configuration.
    resourceGroupName String
    scaleUnits Number
    The number of scale units provisioned for the Bastion Host.
    sessionRecordingEnabled Boolean
    Is Session Recording feature enabled for the Bastion Host.
    shareableLinkEnabled Boolean
    Is Shareable Link feature enabled for the Bastion Host.
    sku String
    The SKU of the Bastion Host.
    tags Map<String>
    A mapping of tags assigned to the Bastion Host.
    tunnelingEnabled Boolean
    Is Tunneling feature enabled for the Bastion Host.
    zones List<String>
    A list of Availability Zones in which this Bastion Host is located.

    Supporting Types

    GetBastionHostIpConfiguration

    Name string
    The name of the Bastion Host.
    PublicIpAddressId string
    Reference to a Public IP Address associated to this Bastion Host.
    SubnetId string
    Reference to the subnet in which this Bastion Host has been created.
    Name string
    The name of the Bastion Host.
    PublicIpAddressId string
    Reference to a Public IP Address associated to this Bastion Host.
    SubnetId string
    Reference to the subnet in which this Bastion Host has been created.
    name String
    The name of the Bastion Host.
    publicIpAddressId String
    Reference to a Public IP Address associated to this Bastion Host.
    subnetId String
    Reference to the subnet in which this Bastion Host has been created.
    name string
    The name of the Bastion Host.
    publicIpAddressId string
    Reference to a Public IP Address associated to this Bastion Host.
    subnetId string
    Reference to the subnet in which this Bastion Host has been created.
    name str
    The name of the Bastion Host.
    public_ip_address_id str
    Reference to a Public IP Address associated to this Bastion Host.
    subnet_id str
    Reference to the subnet in which this Bastion Host has been created.
    name String
    The name of the Bastion Host.
    publicIpAddressId String
    Reference to a Public IP Address associated to this Bastion Host.
    subnetId String
    Reference to the subnet in which this Bastion Host has been created.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.12.0 published on Monday, Dec 2, 2024 by Pulumi