1. Packages
  2. Azure Native v1
  3. API Docs
  4. network
  5. BastionHost
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.network.BastionHost

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    Bastion Host resource. API Version: 2020-11-01.

    Example Usage

    Create Bastion Host

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var bastionHost = new AzureNative.Network.BastionHost("bastionHost", new()
        {
            BastionHostName = "bastionhosttenant'",
            IpConfigurations = new[]
            {
                new AzureNative.Network.Inputs.BastionHostIPConfigurationArgs
                {
                    Name = "bastionHostIpConfiguration",
                    PublicIPAddress = new AzureNative.Network.Inputs.SubResourceArgs
                    {
                        Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName",
                    },
                    Subnet = new AzureNative.Network.Inputs.SubResourceArgs
                    {
                        Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet",
                    },
                },
            },
            ResourceGroupName = "rg1",
        });
    
    });
    
    package main
    
    import (
    	network "github.com/pulumi/pulumi-azure-native-sdk/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := network.NewBastionHost(ctx, "bastionHost", &network.BastionHostArgs{
    			BastionHostName: pulumi.String("bastionhosttenant'"),
    			IpConfigurations: []network.BastionHostIPConfigurationArgs{
    				{
    					Name: pulumi.String("bastionHostIpConfiguration"),
    					PublicIPAddress: {
    						Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"),
    					},
    					Subnet: {
    						Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet"),
    					},
    				},
    			},
    			ResourceGroupName: pulumi.String("rg1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.network.BastionHost;
    import com.pulumi.azurenative.network.BastionHostArgs;
    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 bastionHost = new BastionHost("bastionHost", BastionHostArgs.builder()        
                .bastionHostName("bastionhosttenant'")
                .ipConfigurations(Map.ofEntries(
                    Map.entry("name", "bastionHostIpConfiguration"),
                    Map.entry("publicIPAddress", Map.of("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName")),
                    Map.entry("subnet", Map.of("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet"))
                ))
                .resourceGroupName("rg1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    bastion_host = azure_native.network.BastionHost("bastionHost",
        bastion_host_name="bastionhosttenant'",
        ip_configurations=[{
            "name": "bastionHostIpConfiguration",
            "publicIPAddress": azure_native.network.SubResourceArgs(
                id="/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName",
            ),
            "subnet": azure_native.network.SubResourceArgs(
                id="/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet",
            ),
        }],
        resource_group_name="rg1")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const bastionHost = new azure_native.network.BastionHost("bastionHost", {
        bastionHostName: "bastionhosttenant'",
        ipConfigurations: [{
            name: "bastionHostIpConfiguration",
            publicIPAddress: {
                id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName",
            },
            subnet: {
                id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet",
            },
        }],
        resourceGroupName: "rg1",
    });
    
    resources:
      bastionHost:
        type: azure-native:network:BastionHost
        properties:
          bastionHostName: bastionhosttenant'
          ipConfigurations:
            - name: bastionHostIpConfiguration
              publicIPAddress:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName
              subnet:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet
          resourceGroupName: rg1
    

    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,
                    bastion_host_name: Optional[str] = None,
                    dns_name: Optional[str] = None,
                    id: Optional[str] = None,
                    ip_configurations: Optional[Sequence[BastionHostIPConfigurationArgs]] = None,
                    location: Optional[str] = None,
                    tags: Optional[Mapping[str, 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-native:network: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 AzureNative.Network.BastionHost("bastionHostResource", new()
    {
        ResourceGroupName = "string",
        BastionHostName = "string",
        DnsName = "string",
        Id = "string",
        IpConfigurations = new[]
        {
            
            {
                { "publicIPAddress", 
                {
                    { "id", "string" },
                } },
                { "subnet", 
                {
                    { "id", "string" },
                } },
                { "id", "string" },
                { "name", "string" },
                { "privateIPAllocationMethod", "string" },
            },
        },
        Location = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := network.NewBastionHost(ctx, "bastionHostResource", &network.BastionHostArgs{
    	ResourceGroupName: "string",
    	BastionHostName:   "string",
    	DnsName:           "string",
    	Id:                "string",
    	IpConfigurations: []map[string]interface{}{
    		map[string]interface{}{
    			"publicIPAddress": map[string]interface{}{
    				"id": "string",
    			},
    			"subnet": map[string]interface{}{
    				"id": "string",
    			},
    			"id":                        "string",
    			"name":                      "string",
    			"privateIPAllocationMethod": "string",
    		},
    	},
    	Location: "string",
    	Tags: map[string]interface{}{
    		"string": "string",
    	},
    })
    
    var bastionHostResource = new BastionHost("bastionHostResource", BastionHostArgs.builder()
        .resourceGroupName("string")
        .bastionHostName("string")
        .dnsName("string")
        .id("string")
        .ipConfigurations(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .location("string")
        .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .build());
    
    bastion_host_resource = azure_native.network.BastionHost("bastionHostResource",
        resource_group_name=string,
        bastion_host_name=string,
        dns_name=string,
        id=string,
        ip_configurations=[{
            publicIPAddress: {
                id: string,
            },
            subnet: {
                id: string,
            },
            id: string,
            name: string,
            privateIPAllocationMethod: string,
        }],
        location=string,
        tags={
            string: string,
        })
    
    const bastionHostResource = new azure_native.network.BastionHost("bastionHostResource", {
        resourceGroupName: "string",
        bastionHostName: "string",
        dnsName: "string",
        id: "string",
        ipConfigurations: [{
            publicIPAddress: {
                id: "string",
            },
            subnet: {
                id: "string",
            },
            id: "string",
            name: "string",
            privateIPAllocationMethod: "string",
        }],
        location: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure-native:network:BastionHost
    properties:
        bastionHostName: string
        dnsName: string
        id: string
        ipConfigurations:
            - id: string
              name: string
              privateIPAllocationMethod: string
              publicIPAddress:
                id: string
              subnet:
                id: string
        location: string
        resourceGroupName: string
        tags:
            string: 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:

    ResourceGroupName string
    The name of the resource group.
    BastionHostName string
    The name of the Bastion Host.
    DnsName string
    FQDN for the endpoint on which bastion host is accessible.
    Id string
    Resource ID.
    IpConfigurations List<Pulumi.AzureNative.Network.Inputs.BastionHostIPConfiguration>
    IP configuration of the Bastion Host resource.
    Location string
    Resource location.
    Tags Dictionary<string, string>
    Resource tags.
    ResourceGroupName string
    The name of the resource group.
    BastionHostName string
    The name of the Bastion Host.
    DnsName string
    FQDN for the endpoint on which bastion host is accessible.
    Id string
    Resource ID.
    IpConfigurations []BastionHostIPConfigurationArgs
    IP configuration of the Bastion Host resource.
    Location string
    Resource location.
    Tags map[string]string
    Resource tags.
    resourceGroupName String
    The name of the resource group.
    bastionHostName String
    The name of the Bastion Host.
    dnsName String
    FQDN for the endpoint on which bastion host is accessible.
    id String
    Resource ID.
    ipConfigurations List<BastionHostIPConfiguration>
    IP configuration of the Bastion Host resource.
    location String
    Resource location.
    tags Map<String,String>
    Resource tags.
    resourceGroupName string
    The name of the resource group.
    bastionHostName string
    The name of the Bastion Host.
    dnsName string
    FQDN for the endpoint on which bastion host is accessible.
    id string
    Resource ID.
    ipConfigurations BastionHostIPConfiguration[]
    IP configuration of the Bastion Host resource.
    location string
    Resource location.
    tags {[key: string]: string}
    Resource tags.
    resource_group_name str
    The name of the resource group.
    bastion_host_name str
    The name of the Bastion Host.
    dns_name str
    FQDN for the endpoint on which bastion host is accessible.
    id str
    Resource ID.
    ip_configurations Sequence[BastionHostIPConfigurationArgs]
    IP configuration of the Bastion Host resource.
    location str
    Resource location.
    tags Mapping[str, str]
    Resource tags.
    resourceGroupName String
    The name of the resource group.
    bastionHostName String
    The name of the Bastion Host.
    dnsName String
    FQDN for the endpoint on which bastion host is accessible.
    id String
    Resource ID.
    ipConfigurations List<Property Map>
    IP configuration of the Bastion Host resource.
    location String
    Resource location.
    tags Map<String>
    Resource tags.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BastionHost resource produces the following output properties:

    Etag string
    A unique read-only string that changes whenever the resource is updated.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name.
    ProvisioningState string
    The provisioning state of the bastion host resource.
    Type string
    Resource type.
    Etag string
    A unique read-only string that changes whenever the resource is updated.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name.
    ProvisioningState string
    The provisioning state of the bastion host resource.
    Type string
    Resource type.
    etag String
    A unique read-only string that changes whenever the resource is updated.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name.
    provisioningState String
    The provisioning state of the bastion host resource.
    type String
    Resource type.
    etag string
    A unique read-only string that changes whenever the resource is updated.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Resource name.
    provisioningState string
    The provisioning state of the bastion host resource.
    type string
    Resource type.
    etag str
    A unique read-only string that changes whenever the resource is updated.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Resource name.
    provisioning_state str
    The provisioning state of the bastion host resource.
    type str
    Resource type.
    etag String
    A unique read-only string that changes whenever the resource is updated.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name.
    provisioningState String
    The provisioning state of the bastion host resource.
    type String
    Resource type.

    Supporting Types

    BastionHostIPConfiguration, BastionHostIPConfigurationArgs

    PublicIPAddress Pulumi.AzureNative.Network.Inputs.SubResource
    Reference of the PublicIP resource.
    Subnet Pulumi.AzureNative.Network.Inputs.SubResource
    Reference of the subnet resource.
    Id string
    Resource ID.
    Name string
    Name of the resource that is unique within a resource group. This name can be used to access the resource.
    PrivateIPAllocationMethod string | Pulumi.AzureNative.Network.IPAllocationMethod
    Private IP allocation method.
    PublicIPAddress SubResource
    Reference of the PublicIP resource.
    Subnet SubResource
    Reference of the subnet resource.
    Id string
    Resource ID.
    Name string
    Name of the resource that is unique within a resource group. This name can be used to access the resource.
    PrivateIPAllocationMethod string | IPAllocationMethod
    Private IP allocation method.
    publicIPAddress SubResource
    Reference of the PublicIP resource.
    subnet SubResource
    Reference of the subnet resource.
    id String
    Resource ID.
    name String
    Name of the resource that is unique within a resource group. This name can be used to access the resource.
    privateIPAllocationMethod String | IPAllocationMethod
    Private IP allocation method.
    publicIPAddress SubResource
    Reference of the PublicIP resource.
    subnet SubResource
    Reference of the subnet resource.
    id string
    Resource ID.
    name string
    Name of the resource that is unique within a resource group. This name can be used to access the resource.
    privateIPAllocationMethod string | IPAllocationMethod
    Private IP allocation method.
    public_ip_address SubResource
    Reference of the PublicIP resource.
    subnet SubResource
    Reference of the subnet resource.
    id str
    Resource ID.
    name str
    Name of the resource that is unique within a resource group. This name can be used to access the resource.
    private_ip_allocation_method str | IPAllocationMethod
    Private IP allocation method.
    publicIPAddress Property Map
    Reference of the PublicIP resource.
    subnet Property Map
    Reference of the subnet resource.
    id String
    Resource ID.
    name String
    Name of the resource that is unique within a resource group. This name can be used to access the resource.
    privateIPAllocationMethod String | "Static" | "Dynamic"
    Private IP allocation method.

    BastionHostIPConfigurationResponse, BastionHostIPConfigurationResponseArgs

    Etag string
    A unique read-only string that changes whenever the resource is updated.
    ProvisioningState string
    The provisioning state of the bastion host IP configuration resource.
    PublicIPAddress Pulumi.AzureNative.Network.Inputs.SubResourceResponse
    Reference of the PublicIP resource.
    Subnet Pulumi.AzureNative.Network.Inputs.SubResourceResponse
    Reference of the subnet resource.
    Type string
    Ip configuration type.
    Id string
    Resource ID.
    Name string
    Name of the resource that is unique within a resource group. This name can be used to access the resource.
    PrivateIPAllocationMethod string
    Private IP allocation method.
    Etag string
    A unique read-only string that changes whenever the resource is updated.
    ProvisioningState string
    The provisioning state of the bastion host IP configuration resource.
    PublicIPAddress SubResourceResponse
    Reference of the PublicIP resource.
    Subnet SubResourceResponse
    Reference of the subnet resource.
    Type string
    Ip configuration type.
    Id string
    Resource ID.
    Name string
    Name of the resource that is unique within a resource group. This name can be used to access the resource.
    PrivateIPAllocationMethod string
    Private IP allocation method.
    etag String
    A unique read-only string that changes whenever the resource is updated.
    provisioningState String
    The provisioning state of the bastion host IP configuration resource.
    publicIPAddress SubResourceResponse
    Reference of the PublicIP resource.
    subnet SubResourceResponse
    Reference of the subnet resource.
    type String
    Ip configuration type.
    id String
    Resource ID.
    name String
    Name of the resource that is unique within a resource group. This name can be used to access the resource.
    privateIPAllocationMethod String
    Private IP allocation method.
    etag string
    A unique read-only string that changes whenever the resource is updated.
    provisioningState string
    The provisioning state of the bastion host IP configuration resource.
    publicIPAddress SubResourceResponse
    Reference of the PublicIP resource.
    subnet SubResourceResponse
    Reference of the subnet resource.
    type string
    Ip configuration type.
    id string
    Resource ID.
    name string
    Name of the resource that is unique within a resource group. This name can be used to access the resource.
    privateIPAllocationMethod string
    Private IP allocation method.
    etag str
    A unique read-only string that changes whenever the resource is updated.
    provisioning_state str
    The provisioning state of the bastion host IP configuration resource.
    public_ip_address SubResourceResponse
    Reference of the PublicIP resource.
    subnet SubResourceResponse
    Reference of the subnet resource.
    type str
    Ip configuration type.
    id str
    Resource ID.
    name str
    Name of the resource that is unique within a resource group. This name can be used to access the resource.
    private_ip_allocation_method str
    Private IP allocation method.
    etag String
    A unique read-only string that changes whenever the resource is updated.
    provisioningState String
    The provisioning state of the bastion host IP configuration resource.
    publicIPAddress Property Map
    Reference of the PublicIP resource.
    subnet Property Map
    Reference of the subnet resource.
    type String
    Ip configuration type.
    id String
    Resource ID.
    name String
    Name of the resource that is unique within a resource group. This name can be used to access the resource.
    privateIPAllocationMethod String
    Private IP allocation method.

    IPAllocationMethod, IPAllocationMethodArgs

    Static
    Static
    Dynamic
    Dynamic
    IPAllocationMethodStatic
    Static
    IPAllocationMethodDynamic
    Dynamic
    Static
    Static
    Dynamic
    Dynamic
    Static
    Static
    Dynamic
    Dynamic
    STATIC
    Static
    DYNAMIC
    Dynamic
    "Static"
    Static
    "Dynamic"
    Dynamic

    SubResource, SubResourceArgs

    Id string
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    Id string
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    id String
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    id string
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    id str
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    id String
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.

    SubResourceResponse, SubResourceResponseArgs

    Id string
    Resource ID.
    Id string
    Resource ID.
    id String
    Resource ID.
    id string
    Resource ID.
    id str
    Resource ID.
    id String
    Resource ID.

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:network:BastionHost bastionhost' /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhosttenant' 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi