Skip to content

Commit

Permalink
Merge pull request #2 from TheIronRock95/task/firstrelease
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
- First release version virtual network
  • Loading branch information
TheIronRock95 authored Jan 19, 2023
2 parents 4c74f50 + 8872363 commit 91908d5
Show file tree
Hide file tree
Showing 14 changed files with 219 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ override.tf.json

# Ignore CLI configuration files
.terraformrc
terraform.rc
terraform.rc
*.lock.hcl
2 changes: 1 addition & 1 deletion .terraform-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ footer-from: "docs/footer-doc.tf"
content: |-
{{ .Header }}
# Examples
# Usage - Module
```hcl
{{ include "examples/virtual-network/main.tf" }}
Expand Down
7 changes: 3 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# V1.0.0 - 2023-01-18
# v1.0.0 - 2023-01-18

feat: first release
Added
* First release

BREAKING CHANGE:
- First Major Template release
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!-- BEGIN_TF_DOCS -->
# Azure Virtual Network
[![Changelog](https://img.shields.io/badge/changelog-release-green.svg)](CHANGELOG.md) [![Notice](https://img.shields.io/badge/notice-copyright-yellow.svg)](NOTICE) [![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-orange.svg)](LICENSE) [![TF Registry](https://img.shields.io/badge/terraform-registry-blue.svg)](https://registry.terraform.io/modules/TheIronRock95/virtualnetwork/azurerm/latest)

# Usage - Module

```hcl
module "virtual-network" {
source = "TheIronRock95/virtualnetwork/azurerm"
version = "x.x.x"
name = var.virtual_network_name
location = var.azure_location
resource_group_name = var.resource_group_name
address_space = var.virtual_network_cidr
}
```
## Providers

| Name | Version |
|------|---------|
| azurerm | n/a |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [azurerm_virtual_network.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network) | resource |

## Inputs

| Name | Description | Type | Required |
|------|-------------|------|:--------:|
| azure\_location | The location/region where the virtual network is created. Changing this forces a new resource to be created. | `string` | yes |
| resource\_group\_name | The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created. | `string` | yes |
| virtual\_network\_cidr | The address space that is used the virtual network. You can supply more than one address space. | `list(string)` | yes |
| virtual\_network\_name | The name of the virtual network. Changing this forces a new resource to be created. | `string` | yes |
| virtual\_network\_dns | List of IP addresses of DNS servers | `list(string)` | no |
| virtual\_network\_tags | A mapping of tags to assign to the resource. | `map(string)` | no |

## Outputs

| Name | Description |
|------|-------------|
| virtual\_network\_address\_space | The list of address spaces used by the virtual network. |
| virtual\_network\_guid | The GUID of the virtual network. |
| virtual\_network\_id | The virtual NetworkConfiguration ID. |
| virtual\_network\_location | The location/region where the virtual network is created. |
| virtual\_network\_name | The name of the virtual network |
| virtual\_network\_resource\_group\_name | The name of the resource group in which to create the virtual network. |

## Related documentation
<!-- END_TF_DOCS -->
4 changes: 2 additions & 2 deletions docs/header-doc.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* # Module Name
* [![Changelog](https://img.shields.io/badge/changelog-release-green.svg)](CHANGELOG.md) [![Notice](https://img.shields.io/badge/notice-copyright-yellow.svg)](NOTICE) [![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-orange.svg)](LICENSE) [![TF Registry](https://img.shields.io/badge/terraform-registry-blue.svg)](https://registry.terraform.io/)
* # Azure Virtual Network
* [![Changelog](https://img.shields.io/badge/changelog-release-green.svg)](CHANGELOG.md) [![Notice](https://img.shields.io/badge/notice-copyright-yellow.svg)](NOTICE) [![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-orange.svg)](LICENSE) [![TF Registry](https://img.shields.io/badge/terraform-registry-blue.svg)](https://registry.terraform.io/modules/TheIronRock95/virtualnetwork/azurerm/latest)
*
*
*
Expand Down
36 changes: 36 additions & 0 deletions examples/virtual-network/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Terraform module | AzureRM - Virtual Network

This Terraform module is designed to create a virtual network for Azure.

## Pre-requisites

Using the modules requires the following pre-requisites:
* Active Azure account and subscription

## Usage

`virtual-network`

```hcl
module "virtual-network" {
source = "TheIronRock95/virtualnetwork/azurerm"
version = "x.x.x"
name = var.virtual_network_name
location = var.azure_location
resource_group_name = var.resource_group_name
address_space = var.virtual_network_cidr
}
```

## Authors

The module is maintained by [Wouter Damman](https://github.com/TheIronRock95)

## Documentation

> product: https://azure.microsoft.com/en-us/
>
> Provider: https://registry.terraform.io/providers/hashicorp/azurerm/latest
>
> Documentation: https://learn.microsoft.com/en-us/azure/?product=popular
9 changes: 9 additions & 0 deletions examples/virtual-network/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module "virtual-network" {
source = "TheIronRock95/virtualnetwork/azurerm"
version = "x.x.x"

name = var.virtual_network_name
location = var.azure_location
resource_group_name = var.resource_group_name
address_space = var.virtual_network_cidr
}
25 changes: 25 additions & 0 deletions examples/virtual-network/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
variable "virtual_network_name" {
description = "The name of the virtual network. Changing this forces a new resource to be created."
type = string
sensitive = false
}

variable "azure_location" {
description = "The location/region where the virtual network is created. Changing this forces a new resource to be created."
type = string
sensitive = false
}

variable "resource_group_name" {
description = "The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created."
type = string
sensitive = false
}

variable "virtual_network_cidr" {
description = "The address space that is used the virtual network. You can supply more than one address space."
type = list(string)
sensitive = false
}


Empty file.
3 changes: 3 additions & 0 deletions locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
locals {

}
9 changes: 9 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
resource "azurerm_virtual_network" "this" {
name = var.virtual_network_name
location = var.azure_location
resource_group_name = var.resource_group_name
address_space = var.virtual_network_cidr
dns_servers = var.virtual_network_dns

tags = var.virtual_network_tags
}
35 changes: 35 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
output "virtual_network_name" {
description = "The name of the virtual network"
sensitive = false
value = try(azurerm_virtual_network.this.name)
}

output "virtual_network_id" {
description = "The virtual NetworkConfiguration ID."
sensitive = false
value = try(azurerm_virtual_network.this.id)
}

output "virtual_network_resource_group_name" {
description = "The name of the resource group in which to create the virtual network."
sensitive = false
value = try(azurerm_virtual_network.this.resource_group_name)
}

output "virtual_network_location" {
description = "The location/region where the virtual network is created."
sensitive = false
value = try(azurerm_virtual_network.this.location)
}

output "virtual_network_address_space" {
description = "The list of address spaces used by the virtual network."
sensitive = false
value = try(azurerm_virtual_network.this.address_space)
}

output "virtual_network_guid" {
description = "The GUID of the virtual network."
sensitive = false
value = try(azurerm_virtual_network.this.guid)
}
37 changes: 37 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
variable "virtual_network_name" {
description = "The name of the virtual network. Changing this forces a new resource to be created."
type = string
sensitive = false
}

variable "azure_location" {
description = "The location/region where the virtual network is created. Changing this forces a new resource to be created."
type = string
sensitive = false
}

variable "resource_group_name" {
description = "The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created."
type = string
sensitive = false
}

variable "virtual_network_cidr" {
description = "The address space that is used the virtual network. You can supply more than one address space."
type = list(string)
sensitive = false
}

variable "virtual_network_dns" {
description = "List of IP addresses of DNS servers"
type = list(string)
sensitive = false
default = []
}

variable "virtual_network_tags" {
description = "A mapping of tags to assign to the resource."
type = map(string)
sensitive = false
default = {}
}
Empty file removed versions.tf
Empty file.

0 comments on commit 91908d5

Please sign in to comment.