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

Sebastian Rone #5

Open
wants to merge 1 commit 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
Binary file added Frontend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Frontend2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added InsomniaBackend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,10 @@ ssh -i azure-tf-server azureadmin@<THE IP ADDRESS OF THE VM>
- Deploy a React or Angular frontend to the same VM configured so that it can talk to backend
- Screenshot the various parts of your stack in action and post the results here

## links

![alt text](Frontend.png)
![alt text](Frontend2.png)
![alt text](InsomniaBackend.png)
![alt text](VM.png)

Binary file added VM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ resource "azurerm_resource_group" "rg" {

# Create virtual network
resource "azurerm_virtual_network" "my_terraform_network" {
name = "myVnet"
name = "SebastianRoneVnet"
address_space = ["10.0.0.0/16"]
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
}

# Create subnet
resource "azurerm_subnet" "my_terraform_subnet" {
name = "mySubnet"
name = "SebastianRoneSubnet"
resource_group_name = azurerm_resource_group.rg.name
virtual_network_name = azurerm_virtual_network.my_terraform_network.name
address_prefixes = ["10.0.1.0/24"]
}

# Create public IPs
resource "azurerm_public_ip" "my_terraform_public_ip" {
name = "myPublicIP"
name = "SebastianRonePublicIP"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
allocation_method = "Dynamic"
}

# Create Network Security Group and rule
resource "azurerm_network_security_group" "my_terraform_nsg" {
name = "myNetworkSecurityGroup"
name = "SebastianRoneNetworkSecurityGroup"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name

Expand All @@ -52,7 +52,7 @@ resource "azurerm_network_security_group" "my_terraform_nsg" {

# Create network interface
resource "azurerm_network_interface" "my_terraform_nic" {
name = "myNIC"
name = "SebastianRoneNIC"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name

Expand Down Expand Up @@ -91,14 +91,14 @@ resource "azurerm_storage_account" "my_storage_account" {

# Create virtual machine
resource "azurerm_linux_virtual_machine" "my_terraform_vm" {
name = "myVM"
name = "SebastianRoneVM"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
network_interface_ids = [azurerm_network_interface.my_terraform_nic.id]
size = "Standard_DS1_v2"

os_disk {
name = "myOsDisk"
name = "SebastianRoneOsDisk"
caching = "ReadWrite"
storage_account_type = "Premium_LRS"
}
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variable "resource_group_location" {
type = string
default = "uksouth"
default = "swedencentral"
description = "Location of the resource group."
}

Expand Down