Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/bastiondevelopercreate #646

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Commands/network/bastion/_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ Create the specified Bastion Host.
```bash
network bastion create --location westus2 --name MyBastionHost --public-ip-address MyPublicIpAddress --resource-group MyResourceGroup --vnet-name MyVnet --zones 1 2 3 --sku Premium --session-recording
```

- Create Developer SKU Bastion
```bash
network bastion create --name MyBastion --resource-group MyResourceGroup --sku Developer --vnet-name MyVnet
```

- Create Developer SKU Bastion with Network ACLs IP rules
```bash
network bastion create --name MyBastion --resource-group MyResourceGroup --sku Developer --vnet-name MyVnet --network-acls-ips "1.1.1.1/16 100.64.0.0/10"
```
12 changes: 12 additions & 0 deletions Commands/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -107640,6 +107640,18 @@
"network bastion create --location westus2 --name MyBastionHost --public-ip-address MyPublicIpAddress --resource-group MyResourceGroup --vnet-name MyVnet --zones 1 2 3 --sku Premium --session-recording"
],
"name": "Create Bastion Host with Session Recording."
},
{
"commands": [
"network bastion create --name MyBastion --resource-group MyResourceGroup --sku Developer --vnet-name MyVnet"
],
"name": "Create Developer SKU Bastion"
},
{
"commands": [
"network bastion create --name MyBastion --resource-group MyResourceGroup --sku Developer --vnet-name MyVnet --network-acls-ips \"1.1.1.1/16 100.64.0.0/10\""
],
"name": "Create Developer SKU Bastion with Network ACLs IP rules"
}
],
"name": "2024-01-01",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
</http>
</operation>
</command>
<command name="create" version="2024-01-01">
<command name="create" version="2024-01-01" confirmation="">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/bastionhosts/{}" version="2024-01-01" swagger="mgmt-plane/network/ResourceProviders/Microsoft.Network/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9iYXN0aW9uSG9zdHMve2Jhc3Rpb25Ib3N0TmFtZX0=/V/MjAyNC0wMS0wMQ=="/>
<argGroup name="">
<arg type="string" var="$Path.bastionHostName" options="bastion-host-name name n" required="True" idPart="name">
Expand All @@ -198,6 +198,16 @@
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" group="" idPart="subscription">
<help short="Subscription Id where the Bastion host is present."/>
</arg>
<arg type="string" var="$parameters.sku.name" options="sku" group="">
<help short="The name of the sku of this Bastion Host."/>
<default value="&quot;Standard&quot;"/>
<enum>
<item name="Basic" value="&quot;Basic&quot;"/>
<item name="Developer" value="&quot;Developer&quot;"/>
<item name="Premium" value="&quot;Premium&quot;"/>
<item name="Standard" value="&quot;Standard&quot;"/>
</enum>
</arg>
</argGroup>
<argGroup name="Parameters">
<arg type="ResourceId" var="$parameters.id" options="id" hide="True" group="Parameters">
Expand All @@ -207,21 +217,9 @@
<arg type="ResourceLocation" var="$parameters.location" options="location l" group="Parameters">
<help short="Resource location."/>
</arg>
<arg type="object" var="$parameters.sku" options="sku" group="Parameters">
<help short="The sku of this Bastion Host."/>
<arg type="string" var="$parameters.sku.name" options="name">
<help short="The name of the sku of this Bastion Host."/>
<default value="&quot;Standard&quot;"/>
<enum>
<item name="Basic" value="&quot;Basic&quot;"/>
<item name="Developer" value="&quot;Developer&quot;"/>
<item name="Premium" value="&quot;Premium&quot;"/>
<item name="Standard" value="&quot;Standard&quot;"/>
</enum>
</arg>
</arg>
<arg type="object" var="$parameters.tags" options="tags" group="Parameters">
<help short="Resource tags."/>
<default value="{}"/>
<additionalProp>
<item type="string"/>
</additionalProp>
Expand Down Expand Up @@ -290,19 +288,17 @@
</arg>
</item>
</arg>
<arg type="object" var="$parameters.properties.networkAcls" options="network-acls" hide="True" group="Properties">
<help short="ACL rules for Developer Bastion Host."/>
<arg type="array<object>" var="$parameters.properties.networkAcls.ipRules" options="ip-rules">
<help short="Sets the IP ACL rules for Developer Bastion Host."/>
<item type="object">
<arg type="string" var="$parameters.properties.networkAcls.ipRules[].addressPrefix" options="address-prefix">
<help short="Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed."/>
</arg>
</item>
</arg>
<arg type="array<object>" var="$parameters.properties.networkAcls.ipRules" options="network-acls" group="Properties">
<help short="[Supported in Developer SKU only] The Network ACLs IP rules."/>
<item type="object">
<arg type="string" var="$parameters.properties.networkAcls.ipRules[].addressPrefix" options="address-prefix">
<help short="Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed."/>
</arg>
</item>
</arg>
<arg type="integer32" var="$parameters.properties.scaleUnits" options="scale-units" group="Properties">
<help short="The scale units for the Bastion Host resource."/>
<default value="2"/>
<format maximum="50" minimum="2"/>
</arg>
<arg type="@SubResource_create" var="$parameters.properties.virtualNetwork" options="virtual-network" group="Properties">
Expand Down Expand Up @@ -371,7 +367,7 @@
</prop>
</item>
</prop>
<prop type="object" name="networkAcls" arg="$parameters.properties.networkAcls">
<prop type="object" name="networkAcls">
<prop type="array<object>" name="ipRules" arg="$parameters.properties.networkAcls.ipRules">
<item type="object">
<prop type="string" name="addressPrefix" arg="$parameters.properties.networkAcls.ipRules[].addressPrefix"/>
Expand All @@ -383,7 +379,7 @@
</prop>
<prop type="@SubResource_create" name="virtualNetwork" arg="$parameters.properties.virtualNetwork"/>
</prop>
<prop type="object" name="sku" arg="$parameters.sku">
<prop type="object" name="sku">
<prop type="string" name="name" arg="$parameters.sku.name">
<default value="&quot;Standard&quot;"/>
<enum>
Expand Down