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

Added tags and changelog file. #4

Merged
merged 7 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
106 changes: 106 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Changelog
All notable changes to this module will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.1.0] - 2024-04-19

Tagging resources.

### Added

Variable Tags for tagging the resources that accept tags.

### Changed

### Removed

### Fixed

## [1.0.5] - 2023-03-29

All Azure Bastion options + new example.

### Added

This module is backwards compatible with v1.0.4 (only), and adds all the options actually available for Azure Bastion, plus a new example.

### Changed

### Removed

### Fixed

## [1.0.4] - 2023-03-28

Sku options.

### Added

This new release add compatibility for choosing between Azure Bastion tiers (Basic and Standard).

Warning:
This release it's not compatible with the old one "v1.0.3", because now the main resources are inside the module (Subnet and NSG).

### Changed

### Removed

### Fixed

## [1.0.3] - 2023-02-14

Update Nsg Rule in Main.tf.

### Added

### Changed

Changed nsg rule protocol from tcp -> Tcp, case sensitive.

### Removed

### Fixed

## [1.0.2] - 2023-02-14

Update azurerm constraint.

### Added

### Changed

### Removed

### Fixed

Error with constraint 3.7.0. Had to be updated back to 3.0.0.

## [1.0.1] - 2023-02-08

Update Outputs.

### Added

### Changed

Outputs.

### Removed

### Fixed

## [1.0.0] - 2023-02-08

Initial code that create Bastion.

### Added

### Changed

### Removed

### Fixed
77 changes: 41 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Azure Bastion
[![GitHub tag](https://img.shields.io/github/tag/qbeyond/terraform-azurerm-azure-bastion.svg)](https://registry.terraform.io/modules/qbeyond/azure-bastion/azurerm/latest)
[![License](https://img.shields.io/github/license/qbeyond/terraform-azurerm-azure-bastion.svg)](https://github.com/qbeyond/terraform-azurerm-azure-bastion/blob/main/LICENSE)
----
This module creates an Azure Bastion with all its possible options and also creates by itself the NSG and Subnets that would need.
# Azure Bastion
[![GitHub tag](https://img.shields.io/github/tag/qbeyond/terraform-azurerm-azure-bastion.svg)](https://registry.terraform.io/modules/qbeyond/azure-bastion/azurerm/latest)
[![License](https://img.shields.io/github/license/qbeyond/terraform-azurerm-azure-bastion.svg)](https://github.com/qbeyond/terraform-azurerm-azure-bastion/blob/main/LICENSE)

----

This module creates an Azure Bastion with all its possible options and also creates by itself the NSG and Subnets that would need.

<!-- BEGIN_TF_DOCS -->
## Usage

Expand Down Expand Up @@ -43,6 +43,9 @@ module "azureBastion" {
sku = "Basic"
# Following variables are optional
copy_paste_enabled = true
tags = {
"env" = "TST"
}
}
```

Expand All @@ -66,6 +69,7 @@ No requirements.
| <a name="input_scale_units"></a> [scale\_units](#input\_scale\_units) | Allows scale the number of 'backend instances/VMs' between 2-50 (default 2), <each unit/instance/VM allows 20 sessions>, by default is 2 (40 sessions) on Basic and Standard tier, but it can only be modified in the Standard tier | `number` | `null` | no |
| <a name="input_shareable_link_enabled"></a> [shareable\_link\_enabled](#input\_shareable\_link\_enabled) | Option in PREVIEW!!! Allow users connect to a target resource using Azure Bastion without accessing the Azure portal, only available in the Standard tier | `bool` | `null` | no |
| <a name="input_sku"></a> [sku](#input\_sku) | Bastion Tiers. (Basic, Standard) | `string` | `"Basic"` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | If specified, will set tags for all resources deployed by this module where supported. | `map(string)` | `{}` | no |
| <a name="input_tunneling_enabled"></a> [tunneling\_enabled](#input\_tunneling\_enabled) | The 'native client feature' <Name in Azure Portal, in Terraform is 'tunneling\_enabled'> lets you connect to your target VMs via Bastion using Azure CLI, only available in the Standard tier | `bool` | `null` | no |
## Outputs

Expand All @@ -75,42 +79,43 @@ No requirements.
| <a name="output_public_ip"></a> [public\_ip](#output\_public\_ip) | n/a |
| <a name="output_subnet_nsg_association"></a> [subnet\_nsg\_association](#output\_subnet\_nsg\_association) | n/a |

## Resource types

| Type | Used |
|------|-------|
| [azurerm_bastion_host](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/bastion_host) | 1 |
| [azurerm_network_security_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_group) | 1 |
| [azurerm_public_ip](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | 1 |
| [azurerm_subnet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet) | 1 |
| [azurerm_subnet_network_security_group_association](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet_network_security_group_association) | 1 |
## Resource types

**`Used` only includes resource blocks.** `for_each` and `count` meta arguments, as well as resource blocks of modules are not considered.
| Type | Used |
|------|-------|
| [azurerm_bastion_host](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/bastion_host) | 1 |
| [azurerm_network_security_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_group) | 1 |
| [azurerm_public_ip](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | 1 |
| [azurerm_subnet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet) | 1 |
| [azurerm_subnet_network_security_group_association](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet_network_security_group_association) | 1 |

**`Used` only includes resource blocks.** `for_each` and `count` meta arguments, as well as resource blocks of modules are not considered.

## Modules

No modules.

## Resources by Files
## Resources by Files

### main.tf
### main.tf

| Name | Type |
|------|------|
| [azurerm_bastion_host.landing_zone_bastion_service](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/bastion_host) | resource |
| [azurerm_public_ip.landing_zone_vnet_pip_bastion](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | resource |
| [azurerm_subnet.bastion](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet) | resource |
| [azurerm_subnet_network_security_group_association.landing_zone_nsg_association_bastion](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet_network_security_group_association) | resource |
| Name | Type |
|------|------|
| [azurerm_bastion_host.landing_zone_bastion_service](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/bastion_host) | resource |
| [azurerm_public_ip.landing_zone_vnet_pip_bastion](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | resource |
| [azurerm_subnet.bastion](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet) | resource |
| [azurerm_subnet_network_security_group_association.landing_zone_nsg_association_bastion](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet_network_security_group_association) | resource |

### rules.tf
### rules.tf

| Name | Type |
|------|------|
| [azurerm_network_security_group.bastion](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_group) | resource |

<!-- END_TF_DOCS -->

## Contribute

Please use Pull requests to contribute.

| Name | Type |
|------|------|
| [azurerm_network_security_group.bastion](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_group) | resource |
<!-- END_TF_DOCS -->

## Contribute

Please use Pull requests to contribute.

When a new Feature or Fix is ready to be released, create a new Github release and adhere to [Semantic Versioning 2.0.0](https://semver.org/lang/de/spec/v2.0.0.html).
3 changes: 3 additions & 0 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ module "azureBastion" {
sku = "Basic"
# Following variables are optional
copy_paste_enabled = true
tags = {
"env" = "TST"
}
}
3 changes: 3 additions & 0 deletions examples/standard/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ module "azureBastion" {
file_copy_enabled = true
tunneling_enabled = false
shareable_link_enabled = false
tags = {
"env" = "PRD"
}
}
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resource "azurerm_bastion_host" "landing_zone_bastion_service" {
file_copy_enabled = var.sku == "Standard" ? var.file_copy_enabled : null
tunneling_enabled = var.sku == "Standard" ? var.tunneling_enabled : null
shareable_link_enabled = var.sku == "Standard" ? var.shareable_link_enabled : null

tags = var.tags

ip_configuration {
name = "configuration"
Expand All @@ -26,6 +26,7 @@ resource "azurerm_public_ip" "landing_zone_vnet_pip_bastion" {
location = var.location
allocation_method = "Static"
sku = "Standard"
tags = var.tags
}

# Azure Bastion Subnet
Expand Down
1 change: 1 addition & 0 deletions rules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ resource "azurerm_network_security_group" "bastion" {
name = "nsg-${replace(replace(var.bastion_subnet_address, ".", "-"), "/", "-")}-Management-Bastion"
location = var.location
resource_group_name = azurerm_subnet.bastion.resource_group_name
tags = var.tags
### Rules # Mandatory Rules for Azure Bastion - DO NOT CHANGE!!!
#### Inbound Rules #####
#https://docs.microsoft.com/en-us/azure/bastion/bastion-nsg
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,10 @@ variable "shareable_link_enabled" {
description = "Option in PREVIEW!!! Allow users connect to a target resource using Azure Bastion without accessing the Azure portal, only available in the Standard tier"
type = bool
default = null
}

variable "tags" {
type = map(string)
description = "If specified, will set tags for all resources deployed by this module where supported."
default = {}
}