We recommend using Azure Native.
azure.compute.BastionHost
Explore with Pulumi AI
Manages a Bastion Host.
Example Usage
This example deploys an Azure Bastion Host Instance to a target virtual network.
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
name: "examplevnet",
addressSpaces: ["192.168.1.0/24"],
location: example.location,
resourceGroupName: example.name,
});
const exampleSubnet = new azure.network.Subnet("example", {
name: "AzureBastionSubnet",
resourceGroupName: example.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefixes: ["192.168.1.224/27"],
});
const examplePublicIp = new azure.network.PublicIp("example", {
name: "examplepip",
location: example.location,
resourceGroupName: example.name,
allocationMethod: "Static",
sku: "Standard",
});
const exampleBastionHost = new azure.compute.BastionHost("example", {
name: "examplebastion",
location: example.location,
resourceGroupName: example.name,
ipConfiguration: {
name: "configuration",
subnetId: exampleSubnet.id,
publicIpAddressId: examplePublicIp.id,
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("example",
name="examplevnet",
address_spaces=["192.168.1.0/24"],
location=example.location,
resource_group_name=example.name)
example_subnet = azure.network.Subnet("example",
name="AzureBastionSubnet",
resource_group_name=example.name,
virtual_network_name=example_virtual_network.name,
address_prefixes=["192.168.1.224/27"])
example_public_ip = azure.network.PublicIp("example",
name="examplepip",
location=example.location,
resource_group_name=example.name,
allocation_method="Static",
sku="Standard")
example_bastion_host = azure.compute.BastionHost("example",
name="examplebastion",
location=example.location,
resource_group_name=example.name,
ip_configuration={
"name": "configuration",
"subnet_id": example_subnet.id,
"public_ip_address_id": example_public_ip.id,
})
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
Name: pulumi.String("examplevnet"),
AddressSpaces: pulumi.StringArray{
pulumi.String("192.168.1.0/24"),
},
Location: example.Location,
ResourceGroupName: example.Name,
})
if err != nil {
return err
}
exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
Name: pulumi.String("AzureBastionSubnet"),
ResourceGroupName: example.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefixes: pulumi.StringArray{
pulumi.String("192.168.1.224/27"),
},
})
if err != nil {
return err
}
examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
Name: pulumi.String("examplepip"),
Location: example.Location,
ResourceGroupName: example.Name,
AllocationMethod: pulumi.String("Static"),
Sku: pulumi.String("Standard"),
})
if err != nil {
return err
}
_, err = compute.NewBastionHost(ctx, "example", &compute.BastionHostArgs{
Name: pulumi.String("examplebastion"),
Location: example.Location,
ResourceGroupName: example.Name,
IpConfiguration: &compute.BastionHostIpConfigurationArgs{
Name: pulumi.String("configuration"),
SubnetId: exampleSubnet.ID(),
PublicIpAddressId: examplePublicIp.ID(),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
{
Name = "examplevnet",
AddressSpaces = new[]
{
"192.168.1.0/24",
},
Location = example.Location,
ResourceGroupName = example.Name,
});
var exampleSubnet = new Azure.Network.Subnet("example", new()
{
Name = "AzureBastionSubnet",
ResourceGroupName = example.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefixes = new[]
{
"192.168.1.224/27",
},
});
var examplePublicIp = new Azure.Network.PublicIp("example", new()
{
Name = "examplepip",
Location = example.Location,
ResourceGroupName = example.Name,
AllocationMethod = "Static",
Sku = "Standard",
});
var exampleBastionHost = new Azure.Compute.BastionHost("example", new()
{
Name = "examplebastion",
Location = example.Location,
ResourceGroupName = example.Name,
IpConfiguration = new Azure.Compute.Inputs.BastionHostIpConfigurationArgs
{
Name = "configuration",
SubnetId = exampleSubnet.Id,
PublicIpAddressId = examplePublicIp.Id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.network.PublicIp;
import com.pulumi.azure.network.PublicIpArgs;
import com.pulumi.azure.compute.BastionHost;
import com.pulumi.azure.compute.BastionHostArgs;
import com.pulumi.azure.compute.inputs.BastionHostIpConfigurationArgs;
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) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.name("examplevnet")
.addressSpaces("192.168.1.0/24")
.location(example.location())
.resourceGroupName(example.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.name("AzureBastionSubnet")
.resourceGroupName(example.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("192.168.1.224/27")
.build());
var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
.name("examplepip")
.location(example.location())
.resourceGroupName(example.name())
.allocationMethod("Static")
.sku("Standard")
.build());
var exampleBastionHost = new BastionHost("exampleBastionHost", BastionHostArgs.builder()
.name("examplebastion")
.location(example.location())
.resourceGroupName(example.name())
.ipConfiguration(BastionHostIpConfigurationArgs.builder()
.name("configuration")
.subnetId(exampleSubnet.id())
.publicIpAddressId(examplePublicIp.id())
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleVirtualNetwork:
type: azure:network:VirtualNetwork
name: example
properties:
name: examplevnet
addressSpaces:
- 192.168.1.0/24
location: ${example.location}
resourceGroupName: ${example.name}
exampleSubnet:
type: azure:network:Subnet
name: example
properties:
name: AzureBastionSubnet
resourceGroupName: ${example.name}
virtualNetworkName: ${exampleVirtualNetwork.name}
addressPrefixes:
- 192.168.1.224/27
examplePublicIp:
type: azure:network:PublicIp
name: example
properties:
name: examplepip
location: ${example.location}
resourceGroupName: ${example.name}
allocationMethod: Static
sku: Standard
exampleBastionHost:
type: azure:compute:BastionHost
name: example
properties:
name: examplebastion
location: ${example.location}
resourceGroupName: ${example.name}
ipConfiguration:
name: configuration
subnetId: ${exampleSubnet.id}
publicIpAddressId: ${examplePublicIp.id}
Create BastionHost Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BastionHost(name: string, args: BastionHostArgs, opts?: CustomResourceOptions);
@overload
def BastionHost(resource_name: str,
args: BastionHostArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BastionHost(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
name: Optional[str] = None,
ip_configuration: Optional[BastionHostIpConfigurationArgs] = None,
ip_connect_enabled: Optional[bool] = None,
kerberos_enabled: Optional[bool] = None,
location: Optional[str] = None,
copy_paste_enabled: Optional[bool] = None,
file_copy_enabled: Optional[bool] = None,
scale_units: Optional[int] = None,
shareable_link_enabled: Optional[bool] = None,
sku: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tunneling_enabled: Optional[bool] = None,
virtual_network_id: Optional[str] = None)
func NewBastionHost(ctx *Context, name string, args BastionHostArgs, opts ...ResourceOption) (*BastionHost, error)
public BastionHost(string name, BastionHostArgs args, CustomResourceOptions? opts = null)
public BastionHost(String name, BastionHostArgs args)
public BastionHost(String name, BastionHostArgs args, CustomResourceOptions options)
type: azure:compute:BastionHost
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 BastionHostArgs
- 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 BastionHostArgs
- 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 BastionHostArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BastionHostArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BastionHostArgs
- 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 bastionHostResource = new Azure.Compute.BastionHost("bastionHostResource", new()
{
ResourceGroupName = "string",
Name = "string",
IpConfiguration = new Azure.Compute.Inputs.BastionHostIpConfigurationArgs
{
Name = "string",
PublicIpAddressId = "string",
SubnetId = "string",
},
IpConnectEnabled = false,
KerberosEnabled = false,
Location = "string",
CopyPasteEnabled = false,
FileCopyEnabled = false,
ScaleUnits = 0,
ShareableLinkEnabled = false,
Sku = "string",
Tags =
{
{ "string", "string" },
},
TunnelingEnabled = false,
VirtualNetworkId = "string",
});
example, err := compute.NewBastionHost(ctx, "bastionHostResource", &compute.BastionHostArgs{
ResourceGroupName: pulumi.String("string"),
Name: pulumi.String("string"),
IpConfiguration: &compute.BastionHostIpConfigurationArgs{
Name: pulumi.String("string"),
PublicIpAddressId: pulumi.String("string"),
SubnetId: pulumi.String("string"),
},
IpConnectEnabled: pulumi.Bool(false),
KerberosEnabled: pulumi.Bool(false),
Location: pulumi.String("string"),
CopyPasteEnabled: pulumi.Bool(false),
FileCopyEnabled: pulumi.Bool(false),
ScaleUnits: pulumi.Int(0),
ShareableLinkEnabled: pulumi.Bool(false),
Sku: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TunnelingEnabled: pulumi.Bool(false),
VirtualNetworkId: pulumi.String("string"),
})
var bastionHostResource = new BastionHost("bastionHostResource", BastionHostArgs.builder()
.resourceGroupName("string")
.name("string")
.ipConfiguration(BastionHostIpConfigurationArgs.builder()
.name("string")
.publicIpAddressId("string")
.subnetId("string")
.build())
.ipConnectEnabled(false)
.kerberosEnabled(false)
.location("string")
.copyPasteEnabled(false)
.fileCopyEnabled(false)
.scaleUnits(0)
.shareableLinkEnabled(false)
.sku("string")
.tags(Map.of("string", "string"))
.tunnelingEnabled(false)
.virtualNetworkId("string")
.build());
bastion_host_resource = azure.compute.BastionHost("bastionHostResource",
resource_group_name="string",
name="string",
ip_configuration={
"name": "string",
"publicIpAddressId": "string",
"subnetId": "string",
},
ip_connect_enabled=False,
kerberos_enabled=False,
location="string",
copy_paste_enabled=False,
file_copy_enabled=False,
scale_units=0,
shareable_link_enabled=False,
sku="string",
tags={
"string": "string",
},
tunneling_enabled=False,
virtual_network_id="string")
const bastionHostResource = new azure.compute.BastionHost("bastionHostResource", {
resourceGroupName: "string",
name: "string",
ipConfiguration: {
name: "string",
publicIpAddressId: "string",
subnetId: "string",
},
ipConnectEnabled: false,
kerberosEnabled: false,
location: "string",
copyPasteEnabled: false,
fileCopyEnabled: false,
scaleUnits: 0,
shareableLinkEnabled: false,
sku: "string",
tags: {
string: "string",
},
tunnelingEnabled: false,
virtualNetworkId: "string",
});
type: azure:compute:BastionHost
properties:
copyPasteEnabled: false
fileCopyEnabled: false
ipConfiguration:
name: string
publicIpAddressId: string
subnetId: string
ipConnectEnabled: false
kerberosEnabled: false
location: string
name: string
resourceGroupName: string
scaleUnits: 0
shareableLinkEnabled: false
sku: string
tags:
string: string
tunnelingEnabled: false
virtualNetworkId: string
BastionHost Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The BastionHost resource accepts the following input properties:
- Resource
Group stringName - The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created.
- Copy
Paste boolEnabled - Is Copy/Paste feature enabled for the Bastion Host. Defaults to
true
. - File
Copy boolEnabled Is File Copy feature enabled for the Bastion Host. Defaults to
false
.Note:
file_copy_enabled
is only supported whensku
isStandard
.- Ip
Configuration BastionHost Ip Configuration - A
ip_configuration
block as defined below. Changing this forces a new resource to be created. - Ip
Connect boolEnabled Is IP Connect feature enabled for the Bastion Host. Defaults to
false
.Note:
ip_connect_enabled
is only supported whensku
isStandard
.- Kerberos
Enabled bool Is Kerberos authentication feature enabled for the Bastion Host. Defaults to
false
.Note:
kerberos_enabled
is only supported whensku
isStandard
.- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review Azure Bastion Host FAQ for supported locations.
- Name string
- Specifies the name of the Bastion Host. Changing this forces a new resource to be created.
- Scale
Units int The number of scale units with which to provision the Bastion Host. Possible values are between
2
and50
. Defaults to2
.Note:
scale_units
only can be changed whensku
isStandard
.scale_units
is always2
whensku
isBasic
.- bool
Is Shareable Link feature enabled for the Bastion Host. Defaults to
false
.Note:
shareable_link_enabled
is only supported whensku
isStandard
.- Sku string
The SKU of the Bastion Host. Accepted values are
Developer
,Basic
andStandard
. Defaults toBasic
.Note Downgrading the SKU will force a new resource to be created.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Tunneling
Enabled bool Is Tunneling feature enabled for the Bastion Host. Defaults to
false
.Note:
tunneling_enabled
is only supported whensku
isStandard
.- Virtual
Network stringId - The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created.
- Copy
Paste boolEnabled - Is Copy/Paste feature enabled for the Bastion Host. Defaults to
true
. - File
Copy boolEnabled Is File Copy feature enabled for the Bastion Host. Defaults to
false
.Note:
file_copy_enabled
is only supported whensku
isStandard
.- Ip
Configuration BastionHost Ip Configuration Args - A
ip_configuration
block as defined below. Changing this forces a new resource to be created. - Ip
Connect boolEnabled Is IP Connect feature enabled for the Bastion Host. Defaults to
false
.Note:
ip_connect_enabled
is only supported whensku
isStandard
.- Kerberos
Enabled bool Is Kerberos authentication feature enabled for the Bastion Host. Defaults to
false
.Note:
kerberos_enabled
is only supported whensku
isStandard
.- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review Azure Bastion Host FAQ for supported locations.
- Name string
- Specifies the name of the Bastion Host. Changing this forces a new resource to be created.
- Scale
Units int The number of scale units with which to provision the Bastion Host. Possible values are between
2
and50
. Defaults to2
.Note:
scale_units
only can be changed whensku
isStandard
.scale_units
is always2
whensku
isBasic
.- bool
Is Shareable Link feature enabled for the Bastion Host. Defaults to
false
.Note:
shareable_link_enabled
is only supported whensku
isStandard
.- Sku string
The SKU of the Bastion Host. Accepted values are
Developer
,Basic
andStandard
. Defaults toBasic
.Note Downgrading the SKU will force a new resource to be created.
- map[string]string
- A mapping of tags to assign to the resource.
- Tunneling
Enabled bool Is Tunneling feature enabled for the Bastion Host. Defaults to
false
.Note:
tunneling_enabled
is only supported whensku
isStandard
.- Virtual
Network stringId - The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created.
- copy
Paste BooleanEnabled - Is Copy/Paste feature enabled for the Bastion Host. Defaults to
true
. - file
Copy BooleanEnabled Is File Copy feature enabled for the Bastion Host. Defaults to
false
.Note:
file_copy_enabled
is only supported whensku
isStandard
.- ip
Configuration BastionHost Ip Configuration - A
ip_configuration
block as defined below. Changing this forces a new resource to be created. - ip
Connect BooleanEnabled Is IP Connect feature enabled for the Bastion Host. Defaults to
false
.Note:
ip_connect_enabled
is only supported whensku
isStandard
.- kerberos
Enabled Boolean Is Kerberos authentication feature enabled for the Bastion Host. Defaults to
false
.Note:
kerberos_enabled
is only supported whensku
isStandard
.- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review Azure Bastion Host FAQ for supported locations.
- name String
- Specifies the name of the Bastion Host. Changing this forces a new resource to be created.
- scale
Units Integer The number of scale units with which to provision the Bastion Host. Possible values are between
2
and50
. Defaults to2
.Note:
scale_units
only can be changed whensku
isStandard
.scale_units
is always2
whensku
isBasic
.- Boolean
Is Shareable Link feature enabled for the Bastion Host. Defaults to
false
.Note:
shareable_link_enabled
is only supported whensku
isStandard
.- sku String
The SKU of the Bastion Host. Accepted values are
Developer
,Basic
andStandard
. Defaults toBasic
.Note Downgrading the SKU will force a new resource to be created.
- Map<String,String>
- A mapping of tags to assign to the resource.
- tunneling
Enabled Boolean Is Tunneling feature enabled for the Bastion Host. Defaults to
false
.Note:
tunneling_enabled
is only supported whensku
isStandard
.- virtual
Network StringId - The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created.
- copy
Paste booleanEnabled - Is Copy/Paste feature enabled for the Bastion Host. Defaults to
true
. - file
Copy booleanEnabled Is File Copy feature enabled for the Bastion Host. Defaults to
false
.Note:
file_copy_enabled
is only supported whensku
isStandard
.- ip
Configuration BastionHost Ip Configuration - A
ip_configuration
block as defined below. Changing this forces a new resource to be created. - ip
Connect booleanEnabled Is IP Connect feature enabled for the Bastion Host. Defaults to
false
.Note:
ip_connect_enabled
is only supported whensku
isStandard
.- kerberos
Enabled boolean Is Kerberos authentication feature enabled for the Bastion Host. Defaults to
false
.Note:
kerberos_enabled
is only supported whensku
isStandard
.- location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review Azure Bastion Host FAQ for supported locations.
- name string
- Specifies the name of the Bastion Host. Changing this forces a new resource to be created.
- scale
Units number The number of scale units with which to provision the Bastion Host. Possible values are between
2
and50
. Defaults to2
.Note:
scale_units
only can be changed whensku
isStandard
.scale_units
is always2
whensku
isBasic
.- boolean
Is Shareable Link feature enabled for the Bastion Host. Defaults to
false
.Note:
shareable_link_enabled
is only supported whensku
isStandard
.- sku string
The SKU of the Bastion Host. Accepted values are
Developer
,Basic
andStandard
. Defaults toBasic
.Note Downgrading the SKU will force a new resource to be created.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- tunneling
Enabled boolean Is Tunneling feature enabled for the Bastion Host. Defaults to
false
.Note:
tunneling_enabled
is only supported whensku
isStandard
.- virtual
Network stringId - The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created.
- copy_
paste_ boolenabled - Is Copy/Paste feature enabled for the Bastion Host. Defaults to
true
. - file_
copy_ boolenabled Is File Copy feature enabled for the Bastion Host. Defaults to
false
.Note:
file_copy_enabled
is only supported whensku
isStandard
.- ip_
configuration BastionHost Ip Configuration Args - A
ip_configuration
block as defined below. Changing this forces a new resource to be created. - ip_
connect_ boolenabled Is IP Connect feature enabled for the Bastion Host. Defaults to
false
.Note:
ip_connect_enabled
is only supported whensku
isStandard
.- kerberos_
enabled bool Is Kerberos authentication feature enabled for the Bastion Host. Defaults to
false
.Note:
kerberos_enabled
is only supported whensku
isStandard
.- location str
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review Azure Bastion Host FAQ for supported locations.
- name str
- Specifies the name of the Bastion Host. Changing this forces a new resource to be created.
- scale_
units int The number of scale units with which to provision the Bastion Host. Possible values are between
2
and50
. Defaults to2
.Note:
scale_units
only can be changed whensku
isStandard
.scale_units
is always2
whensku
isBasic
.- bool
Is Shareable Link feature enabled for the Bastion Host. Defaults to
false
.Note:
shareable_link_enabled
is only supported whensku
isStandard
.- sku str
The SKU of the Bastion Host. Accepted values are
Developer
,Basic
andStandard
. Defaults toBasic
.Note Downgrading the SKU will force a new resource to be created.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- tunneling_
enabled bool Is Tunneling feature enabled for the Bastion Host. Defaults to
false
.Note:
tunneling_enabled
is only supported whensku
isStandard
.- virtual_
network_ strid - The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created.
- copy
Paste BooleanEnabled - Is Copy/Paste feature enabled for the Bastion Host. Defaults to
true
. - file
Copy BooleanEnabled Is File Copy feature enabled for the Bastion Host. Defaults to
false
.Note:
file_copy_enabled
is only supported whensku
isStandard
.- ip
Configuration Property Map - A
ip_configuration
block as defined below. Changing this forces a new resource to be created. - ip
Connect BooleanEnabled Is IP Connect feature enabled for the Bastion Host. Defaults to
false
.Note:
ip_connect_enabled
is only supported whensku
isStandard
.- kerberos
Enabled Boolean Is Kerberos authentication feature enabled for the Bastion Host. Defaults to
false
.Note:
kerberos_enabled
is only supported whensku
isStandard
.- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review Azure Bastion Host FAQ for supported locations.
- name String
- Specifies the name of the Bastion Host. Changing this forces a new resource to be created.
- scale
Units Number The number of scale units with which to provision the Bastion Host. Possible values are between
2
and50
. Defaults to2
.Note:
scale_units
only can be changed whensku
isStandard
.scale_units
is always2
whensku
isBasic
.- Boolean
Is Shareable Link feature enabled for the Bastion Host. Defaults to
false
.Note:
shareable_link_enabled
is only supported whensku
isStandard
.- sku String
The SKU of the Bastion Host. Accepted values are
Developer
,Basic
andStandard
. Defaults toBasic
.Note Downgrading the SKU will force a new resource to be created.
- Map<String>
- A mapping of tags to assign to the resource.
- tunneling
Enabled Boolean Is Tunneling feature enabled for the Bastion Host. Defaults to
false
.Note:
tunneling_enabled
is only supported whensku
isStandard
.- virtual
Network StringId - The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the BastionHost resource produces the following output properties:
Look up Existing BastionHost Resource
Get an existing BastionHost 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?: BastionHostState, opts?: CustomResourceOptions): BastionHost
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
copy_paste_enabled: Optional[bool] = None,
dns_name: Optional[str] = None,
file_copy_enabled: Optional[bool] = None,
ip_configuration: Optional[BastionHostIpConfigurationArgs] = None,
ip_connect_enabled: Optional[bool] = None,
kerberos_enabled: Optional[bool] = None,
location: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
scale_units: Optional[int] = None,
shareable_link_enabled: Optional[bool] = None,
sku: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tunneling_enabled: Optional[bool] = None,
virtual_network_id: Optional[str] = None) -> BastionHost
func GetBastionHost(ctx *Context, name string, id IDInput, state *BastionHostState, opts ...ResourceOption) (*BastionHost, error)
public static BastionHost Get(string name, Input<string> id, BastionHostState? state, CustomResourceOptions? opts = null)
public static BastionHost get(String name, Output<String> id, BastionHostState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Copy
Paste boolEnabled - Is Copy/Paste feature enabled for the Bastion Host. Defaults to
true
. - Dns
Name string - The FQDN for the Bastion Host.
- File
Copy boolEnabled Is File Copy feature enabled for the Bastion Host. Defaults to
false
.Note:
file_copy_enabled
is only supported whensku
isStandard
.- Ip
Configuration BastionHost Ip Configuration - A
ip_configuration
block as defined below. Changing this forces a new resource to be created. - Ip
Connect boolEnabled Is IP Connect feature enabled for the Bastion Host. Defaults to
false
.Note:
ip_connect_enabled
is only supported whensku
isStandard
.- Kerberos
Enabled bool Is Kerberos authentication feature enabled for the Bastion Host. Defaults to
false
.Note:
kerberos_enabled
is only supported whensku
isStandard
.- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review Azure Bastion Host FAQ for supported locations.
- Name string
- Specifies the name of the Bastion Host. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created.
- Scale
Units int The number of scale units with which to provision the Bastion Host. Possible values are between
2
and50
. Defaults to2
.Note:
scale_units
only can be changed whensku
isStandard
.scale_units
is always2
whensku
isBasic
.- bool
Is Shareable Link feature enabled for the Bastion Host. Defaults to
false
.Note:
shareable_link_enabled
is only supported whensku
isStandard
.- Sku string
The SKU of the Bastion Host. Accepted values are
Developer
,Basic
andStandard
. Defaults toBasic
.Note Downgrading the SKU will force a new resource to be created.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Tunneling
Enabled bool Is Tunneling feature enabled for the Bastion Host. Defaults to
false
.Note:
tunneling_enabled
is only supported whensku
isStandard
.- Virtual
Network stringId - The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created.
- Copy
Paste boolEnabled - Is Copy/Paste feature enabled for the Bastion Host. Defaults to
true
. - Dns
Name string - The FQDN for the Bastion Host.
- File
Copy boolEnabled Is File Copy feature enabled for the Bastion Host. Defaults to
false
.Note:
file_copy_enabled
is only supported whensku
isStandard
.- Ip
Configuration BastionHost Ip Configuration Args - A
ip_configuration
block as defined below. Changing this forces a new resource to be created. - Ip
Connect boolEnabled Is IP Connect feature enabled for the Bastion Host. Defaults to
false
.Note:
ip_connect_enabled
is only supported whensku
isStandard
.- Kerberos
Enabled bool Is Kerberos authentication feature enabled for the Bastion Host. Defaults to
false
.Note:
kerberos_enabled
is only supported whensku
isStandard
.- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review Azure Bastion Host FAQ for supported locations.
- Name string
- Specifies the name of the Bastion Host. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created.
- Scale
Units int The number of scale units with which to provision the Bastion Host. Possible values are between
2
and50
. Defaults to2
.Note:
scale_units
only can be changed whensku
isStandard
.scale_units
is always2
whensku
isBasic
.- bool
Is Shareable Link feature enabled for the Bastion Host. Defaults to
false
.Note:
shareable_link_enabled
is only supported whensku
isStandard
.- Sku string
The SKU of the Bastion Host. Accepted values are
Developer
,Basic
andStandard
. Defaults toBasic
.Note Downgrading the SKU will force a new resource to be created.
- map[string]string
- A mapping of tags to assign to the resource.
- Tunneling
Enabled bool Is Tunneling feature enabled for the Bastion Host. Defaults to
false
.Note:
tunneling_enabled
is only supported whensku
isStandard
.- Virtual
Network stringId - The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created.
- copy
Paste BooleanEnabled - Is Copy/Paste feature enabled for the Bastion Host. Defaults to
true
. - dns
Name String - The FQDN for the Bastion Host.
- file
Copy BooleanEnabled Is File Copy feature enabled for the Bastion Host. Defaults to
false
.Note:
file_copy_enabled
is only supported whensku
isStandard
.- ip
Configuration BastionHost Ip Configuration - A
ip_configuration
block as defined below. Changing this forces a new resource to be created. - ip
Connect BooleanEnabled Is IP Connect feature enabled for the Bastion Host. Defaults to
false
.Note:
ip_connect_enabled
is only supported whensku
isStandard
.- kerberos
Enabled Boolean Is Kerberos authentication feature enabled for the Bastion Host. Defaults to
false
.Note:
kerberos_enabled
is only supported whensku
isStandard
.- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review Azure Bastion Host FAQ for supported locations.
- name String
- Specifies the name of the Bastion Host. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created.
- scale
Units Integer The number of scale units with which to provision the Bastion Host. Possible values are between
2
and50
. Defaults to2
.Note:
scale_units
only can be changed whensku
isStandard
.scale_units
is always2
whensku
isBasic
.- Boolean
Is Shareable Link feature enabled for the Bastion Host. Defaults to
false
.Note:
shareable_link_enabled
is only supported whensku
isStandard
.- sku String
The SKU of the Bastion Host. Accepted values are
Developer
,Basic
andStandard
. Defaults toBasic
.Note Downgrading the SKU will force a new resource to be created.
- Map<String,String>
- A mapping of tags to assign to the resource.
- tunneling
Enabled Boolean Is Tunneling feature enabled for the Bastion Host. Defaults to
false
.Note:
tunneling_enabled
is only supported whensku
isStandard
.- virtual
Network StringId - The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created.
- copy
Paste booleanEnabled - Is Copy/Paste feature enabled for the Bastion Host. Defaults to
true
. - dns
Name string - The FQDN for the Bastion Host.
- file
Copy booleanEnabled Is File Copy feature enabled for the Bastion Host. Defaults to
false
.Note:
file_copy_enabled
is only supported whensku
isStandard
.- ip
Configuration BastionHost Ip Configuration - A
ip_configuration
block as defined below. Changing this forces a new resource to be created. - ip
Connect booleanEnabled Is IP Connect feature enabled for the Bastion Host. Defaults to
false
.Note:
ip_connect_enabled
is only supported whensku
isStandard
.- kerberos
Enabled boolean Is Kerberos authentication feature enabled for the Bastion Host. Defaults to
false
.Note:
kerberos_enabled
is only supported whensku
isStandard
.- location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review Azure Bastion Host FAQ for supported locations.
- name string
- Specifies the name of the Bastion Host. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created.
- scale
Units number The number of scale units with which to provision the Bastion Host. Possible values are between
2
and50
. Defaults to2
.Note:
scale_units
only can be changed whensku
isStandard
.scale_units
is always2
whensku
isBasic
.- boolean
Is Shareable Link feature enabled for the Bastion Host. Defaults to
false
.Note:
shareable_link_enabled
is only supported whensku
isStandard
.- sku string
The SKU of the Bastion Host. Accepted values are
Developer
,Basic
andStandard
. Defaults toBasic
.Note Downgrading the SKU will force a new resource to be created.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- tunneling
Enabled boolean Is Tunneling feature enabled for the Bastion Host. Defaults to
false
.Note:
tunneling_enabled
is only supported whensku
isStandard
.- virtual
Network stringId - The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created.
- copy_
paste_ boolenabled - Is Copy/Paste feature enabled for the Bastion Host. Defaults to
true
. - dns_
name str - The FQDN for the Bastion Host.
- file_
copy_ boolenabled Is File Copy feature enabled for the Bastion Host. Defaults to
false
.Note:
file_copy_enabled
is only supported whensku
isStandard
.- ip_
configuration BastionHost Ip Configuration Args - A
ip_configuration
block as defined below. Changing this forces a new resource to be created. - ip_
connect_ boolenabled Is IP Connect feature enabled for the Bastion Host. Defaults to
false
.Note:
ip_connect_enabled
is only supported whensku
isStandard
.- kerberos_
enabled bool Is Kerberos authentication feature enabled for the Bastion Host. Defaults to
false
.Note:
kerberos_enabled
is only supported whensku
isStandard
.- location str
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review Azure Bastion Host FAQ for supported locations.
- name str
- Specifies the name of the Bastion Host. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created.
- scale_
units int The number of scale units with which to provision the Bastion Host. Possible values are between
2
and50
. Defaults to2
.Note:
scale_units
only can be changed whensku
isStandard
.scale_units
is always2
whensku
isBasic
.- bool
Is Shareable Link feature enabled for the Bastion Host. Defaults to
false
.Note:
shareable_link_enabled
is only supported whensku
isStandard
.- sku str
The SKU of the Bastion Host. Accepted values are
Developer
,Basic
andStandard
. Defaults toBasic
.Note Downgrading the SKU will force a new resource to be created.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- tunneling_
enabled bool Is Tunneling feature enabled for the Bastion Host. Defaults to
false
.Note:
tunneling_enabled
is only supported whensku
isStandard
.- virtual_
network_ strid - The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created.
- copy
Paste BooleanEnabled - Is Copy/Paste feature enabled for the Bastion Host. Defaults to
true
. - dns
Name String - The FQDN for the Bastion Host.
- file
Copy BooleanEnabled Is File Copy feature enabled for the Bastion Host. Defaults to
false
.Note:
file_copy_enabled
is only supported whensku
isStandard
.- ip
Configuration Property Map - A
ip_configuration
block as defined below. Changing this forces a new resource to be created. - ip
Connect BooleanEnabled Is IP Connect feature enabled for the Bastion Host. Defaults to
false
.Note:
ip_connect_enabled
is only supported whensku
isStandard
.- kerberos
Enabled Boolean Is Kerberos authentication feature enabled for the Bastion Host. Defaults to
false
.Note:
kerberos_enabled
is only supported whensku
isStandard
.- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review Azure Bastion Host FAQ for supported locations.
- name String
- Specifies the name of the Bastion Host. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created.
- scale
Units Number The number of scale units with which to provision the Bastion Host. Possible values are between
2
and50
. Defaults to2
.Note:
scale_units
only can be changed whensku
isStandard
.scale_units
is always2
whensku
isBasic
.- Boolean
Is Shareable Link feature enabled for the Bastion Host. Defaults to
false
.Note:
shareable_link_enabled
is only supported whensku
isStandard
.- sku String
The SKU of the Bastion Host. Accepted values are
Developer
,Basic
andStandard
. Defaults toBasic
.Note Downgrading the SKU will force a new resource to be created.
- Map<String>
- A mapping of tags to assign to the resource.
- tunneling
Enabled Boolean Is Tunneling feature enabled for the Bastion Host. Defaults to
false
.Note:
tunneling_enabled
is only supported whensku
isStandard
.- virtual
Network StringId - The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created.
Supporting Types
BastionHostIpConfiguration, BastionHostIpConfigurationArgs
- Name string
- The name of the IP configuration. Changing this forces a new resource to be created.
- Public
Ip stringAddress Id - Reference to a Public IP Address to associate with this Bastion Host. Changing this forces a new resource to be created.
- Subnet
Id string Reference to a subnet in which this Bastion Host has been created. Changing this forces a new resource to be created.
Note: The Subnet used for the Bastion Host must have the name
AzureBastionSubnet
and the subnet mask must be at least a/26
.
- Name string
- The name of the IP configuration. Changing this forces a new resource to be created.
- Public
Ip stringAddress Id - Reference to a Public IP Address to associate with this Bastion Host. Changing this forces a new resource to be created.
- Subnet
Id string Reference to a subnet in which this Bastion Host has been created. Changing this forces a new resource to be created.
Note: The Subnet used for the Bastion Host must have the name
AzureBastionSubnet
and the subnet mask must be at least a/26
.
- name String
- The name of the IP configuration. Changing this forces a new resource to be created.
- public
Ip StringAddress Id - Reference to a Public IP Address to associate with this Bastion Host. Changing this forces a new resource to be created.
- subnet
Id String Reference to a subnet in which this Bastion Host has been created. Changing this forces a new resource to be created.
Note: The Subnet used for the Bastion Host must have the name
AzureBastionSubnet
and the subnet mask must be at least a/26
.
- name string
- The name of the IP configuration. Changing this forces a new resource to be created.
- public
Ip stringAddress Id - Reference to a Public IP Address to associate with this Bastion Host. Changing this forces a new resource to be created.
- subnet
Id string Reference to a subnet in which this Bastion Host has been created. Changing this forces a new resource to be created.
Note: The Subnet used for the Bastion Host must have the name
AzureBastionSubnet
and the subnet mask must be at least a/26
.
- name str
- The name of the IP configuration. Changing this forces a new resource to be created.
- public_
ip_ straddress_ id - Reference to a Public IP Address to associate with this Bastion Host. Changing this forces a new resource to be created.
- subnet_
id str Reference to a subnet in which this Bastion Host has been created. Changing this forces a new resource to be created.
Note: The Subnet used for the Bastion Host must have the name
AzureBastionSubnet
and the subnet mask must be at least a/26
.
- name String
- The name of the IP configuration. Changing this forces a new resource to be created.
- public
Ip StringAddress Id - Reference to a Public IP Address to associate with this Bastion Host. Changing this forces a new resource to be created.
- subnet
Id String Reference to a subnet in which this Bastion Host has been created. Changing this forces a new resource to be created.
Note: The Subnet used for the Bastion Host must have the name
AzureBastionSubnet
and the subnet mask must be at least a/26
.
Import
Bastion Hosts can be imported using the resource id
, e.g.
$ pulumi import azure:compute/bastionHost:BastionHost example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/bastionHosts/instance1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.