Expand description
Manages a Bastion Host.
§Example Usage
This example deploys an Azure Bastion Host Instance to a target virtual network.
ⓘ
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let example = resource_group::create(
"example",
ResourceGroupArgs::builder()
.location("West Europe")
.name("example-resources")
.build_struct(),
);
let exampleBastionHost = bastion_host::create(
"exampleBastionHost",
BastionHostArgs::builder()
.ip_configuration(
BastionHostIpConfiguration::builder()
.name("configuration")
.publicIpAddressId("${examplePublicIp.id}")
.subnetId("${exampleSubnet.id}")
.build_struct(),
)
.location("${example.location}")
.name("examplebastion")
.resource_group_name("${example.name}")
.build_struct(),
);
let examplePublicIp = public_ip::create(
"examplePublicIp",
PublicIpArgs::builder()
.allocation_method("Static")
.location("${example.location}")
.name("examplepip")
.resource_group_name("${example.name}")
.sku("Standard")
.build_struct(),
);
let exampleSubnet = subnet::create(
"exampleSubnet",
SubnetArgs::builder()
.address_prefixes(vec!["192.168.1.224/27",])
.name("AzureBastionSubnet")
.resource_group_name("${example.name}")
.virtual_network_name("${exampleVirtualNetwork.name}")
.build_struct(),
);
let exampleVirtualNetwork = virtual_network::create(
"exampleVirtualNetwork",
VirtualNetworkArgs::builder()
.address_spaces(vec!["192.168.1.0/24",])
.location("${example.location}")
.name("examplevnet")
.resource_group_name("${example.name}")
.build_struct(),
);
}
§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
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments