We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.compute.getBastionHost
Explore with Pulumi AI
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.
- Resource
Group stringName - The name of the Resource Group where the Bastion Host exists.
- Name string
- The name of the Bastion Host.
- Resource
Group stringName - The name of the Resource Group where the Bastion Host exists.
- name String
- The name of the Bastion Host.
- resource
Group StringName - The name of the Resource Group where the Bastion Host exists.
- name string
- The name of the Bastion Host.
- resource
Group stringName - The name of the Resource Group where the Bastion Host exists.
- name str
- The name of the Bastion Host.
- resource_
group_ strname - The name of the Resource Group where the Bastion Host exists.
- name String
- The name of the Bastion Host.
- resource
Group StringName - The name of the Resource Group where the Bastion Host exists.
getBastionHost Result
The following output properties are available:
- Copy
Paste boolEnabled - Is Copy/Paste feature enabled for the Bastion Host.
- Dns
Name string - The FQDN for the Bastion Host.
- File
Copy boolEnabled - Is File Copy feature enabled for the Bastion Host.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Configurations List<GetBastion Host Ip Configuration> - A
ip_configuration
block as defined below. - Ip
Connect boolEnabled - 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.
- Resource
Group stringName - Scale
Units int - The number of scale units provisioned for the Bastion Host.
- Session
Recording boolEnabled - Is Session Recording feature enabled for the Bastion Host.
- bool
- Is Shareable Link feature enabled for the Bastion Host.
- Sku string
- The SKU of the Bastion Host.
- Dictionary<string, string>
- A mapping of tags assigned to the Bastion Host.
- Tunneling
Enabled bool - Is Tunneling feature enabled for the Bastion Host.
- Zones List<string>
- A list of Availability Zones in which this Bastion Host is located.
- Copy
Paste boolEnabled - Is Copy/Paste feature enabled for the Bastion Host.
- Dns
Name string - The FQDN for the Bastion Host.
- File
Copy boolEnabled - Is File Copy feature enabled for the Bastion Host.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Configurations []GetBastion Host Ip Configuration - A
ip_configuration
block as defined below. - Ip
Connect boolEnabled - 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.
- Resource
Group stringName - Scale
Units int - The number of scale units provisioned for the Bastion Host.
- Session
Recording boolEnabled - Is Session Recording feature enabled for the Bastion Host.
- bool
- Is Shareable Link feature enabled for the Bastion Host.
- Sku string
- The SKU of the Bastion Host.
- map[string]string
- A mapping of tags assigned to the Bastion Host.
- Tunneling
Enabled bool - Is Tunneling feature enabled for the Bastion Host.
- Zones []string
- A list of Availability Zones in which this Bastion Host is located.
- copy
Paste BooleanEnabled - Is Copy/Paste feature enabled for the Bastion Host.
- dns
Name String - The FQDN for the Bastion Host.
- file
Copy BooleanEnabled - Is File Copy feature enabled for the Bastion Host.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Configurations List<GetBastion Host Ip Configuration> - A
ip_configuration
block as defined below. - ip
Connect BooleanEnabled - 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.
- resource
Group StringName - scale
Units Integer - The number of scale units provisioned for the Bastion Host.
- session
Recording BooleanEnabled - Is Session Recording feature enabled for the Bastion Host.
- Boolean
- Is Shareable Link feature enabled for the Bastion Host.
- sku String
- The SKU of the Bastion Host.
- Map<String,String>
- A mapping of tags assigned to the Bastion Host.
- tunneling
Enabled Boolean - Is Tunneling feature enabled for the Bastion Host.
- zones List<String>
- A list of Availability Zones in which this Bastion Host is located.
- copy
Paste booleanEnabled - Is Copy/Paste feature enabled for the Bastion Host.
- dns
Name string - The FQDN for the Bastion Host.
- file
Copy booleanEnabled - Is File Copy feature enabled for the Bastion Host.
- id string
- The provider-assigned unique ID for this managed resource.
- ip
Configurations GetBastion Host Ip Configuration[] - A
ip_configuration
block as defined below. - ip
Connect booleanEnabled - 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.
- resource
Group stringName - scale
Units number - The number of scale units provisioned for the Bastion Host.
- session
Recording booleanEnabled - Is Session Recording feature enabled for the Bastion Host.
- boolean
- Is Shareable Link feature enabled for the Bastion Host.
- sku string
- The SKU of the Bastion Host.
- {[key: string]: string}
- A mapping of tags assigned to the Bastion Host.
- tunneling
Enabled 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_ boolenabled - Is Copy/Paste feature enabled for the Bastion Host.
- dns_
name str - The FQDN for the Bastion Host.
- file_
copy_ boolenabled - Is File Copy feature enabled for the Bastion Host.
- id str
- The provider-assigned unique ID for this managed resource.
- ip_
configurations Sequence[GetBastion Host Ip Configuration] - A
ip_configuration
block as defined below. - ip_
connect_ boolenabled - 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_ strname - scale_
units int - The number of scale units provisioned for the Bastion Host.
- session_
recording_ boolenabled - Is Session Recording feature enabled for the Bastion Host.
- bool
- Is Shareable Link feature enabled for the Bastion Host.
- sku str
- The SKU of the Bastion Host.
- 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.
- copy
Paste BooleanEnabled - Is Copy/Paste feature enabled for the Bastion Host.
- dns
Name String - The FQDN for the Bastion Host.
- file
Copy BooleanEnabled - Is File Copy feature enabled for the Bastion Host.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Configurations List<Property Map> - A
ip_configuration
block as defined below. - ip
Connect BooleanEnabled - 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.
- resource
Group StringName - scale
Units Number - The number of scale units provisioned for the Bastion Host.
- session
Recording BooleanEnabled - Is Session Recording feature enabled for the Bastion Host.
- Boolean
- Is Shareable Link feature enabled for the Bastion Host.
- sku String
- The SKU of the Bastion Host.
- Map<String>
- A mapping of tags assigned to the Bastion Host.
- tunneling
Enabled 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.
- Public
Ip stringAddress Id - Reference to a Public IP Address associated to this Bastion Host.
- Subnet
Id string - Reference to the subnet in which this Bastion Host has been created.
- Name string
- The name of the Bastion Host.
- Public
Ip stringAddress Id - Reference to a Public IP Address associated to this Bastion Host.
- Subnet
Id string - Reference to the subnet in which this Bastion Host has been created.
- name String
- The name of the Bastion Host.
- public
Ip StringAddress Id - Reference to a Public IP Address associated to this Bastion Host.
- subnet
Id String - Reference to the subnet in which this Bastion Host has been created.
- name string
- The name of the Bastion Host.
- public
Ip stringAddress Id - Reference to a Public IP Address associated to this Bastion Host.
- subnet
Id string - Reference to the subnet in which this Bastion Host has been created.
- name str
- The name of the Bastion Host.
- public_
ip_ straddress_ id - 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.
- public
Ip StringAddress Id - Reference to a Public IP Address associated to this Bastion Host.
- subnet
Id 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.