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

azure: support Hub/Spoke network architecture and add Fortinet deployment #763

Draft
wants to merge 162 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
c8fdf72
azure: Support Hub/Spoke architecture
yeoldegrove Sep 22, 2021
387bc8d
azure: add a tag "role" (matching the salt role) to every virtual mac…
yeoldegrove Sep 29, 2021
b511115
remove old comments and unneeded variables
yeoldegrove Oct 6, 2021
641d849
fix vnet_name variable
yeoldegrove Oct 6, 2021
e37aa0d
azure: be able to use different resource group for hub network
yeoldegrove Oct 6, 2021
c90b3b5
update variable descriptions
yeoldegrove Oct 6, 2021
9a3a198
terraform fmt
yeoldegrove Oct 6, 2021
90d28e9
azure: move hub+spoke examples to terraform.tfvars
yeoldegrove Oct 12, 2021
d9d369c
azure: fix hana role tag
yeoldegrove Oct 12, 2021
45d0fee
fortinet fortigate initial commit
movinalot Oct 16, 2021
581b441
azure: add initial ANF (Azure Netapp Files) shared storage support
yeoldegrove Aug 25, 2021
431b24f
add hana_scale_out_enabled variable to be able to disable shared storage
yeoldegrove Sep 9, 2021
0d21a7a
forward port latest changes from SUSE:develop
yeoldegrove Oct 18, 2021
045f76b
terraform fmt
yeoldegrove Oct 18, 2021
ef66c9d
azure: add possibility to use remote state
yeoldegrove Oct 18, 2021
e4b4cb6
added fortigate networking and lb
movinalot Oct 18, 2021
b4832a0
add fortigate vm deployment
movinalot Oct 19, 2021
30315ff
variable additions and fortiadc vm initial setup
movinalot Oct 25, 2021
c7b3832
fortiadc updates
movinalot Oct 25, 2021
061d5ac
add route tables, routes and subnet associations
movinalot Oct 27, 2021
951d36e
change from list to maps for subnets
movinalot Oct 29, 2021
ea433c6
add internal trusted subnet
movinalot Oct 30, 2021
95d2c8b
make resources more generic
movinalot Nov 2, 2021
ef5b4ee
update fgt and fadc configs
movinalot Nov 3, 2021
de51a78
added fe ip for bastion host
movinalot Nov 4, 2021
dc67fc7
add fe_ip and fw policy for bastion host
movinalot Nov 5, 2021
f1b4d65
initial fortiadc cloud int setup
movinalot Nov 9, 2021
bda4865
use public bastion IP from fortinet module for fortinet deployments
yeoldegrove Nov 10, 2021
7c03d68
use public bastion IP from fortinet module for fortinet deployments
yeoldegrove Nov 10, 2021
0d9f867
fix for bastion provisioner
yeoldegrove Nov 11, 2021
21ea6ed
on fortinet, a default timeout of 5m is not enough to bootstrap every…
yeoldegrove Nov 11, 2021
cfe69d4
define default variables for fortinet
yeoldegrove Nov 11, 2021
3fbf730
network_hub: create own subnet for monitoring
yeoldegrove Nov 11, 2021
cdf664e
azure: add a tag "role" (matching the salt role) to every tagable res…
yeoldegrove Nov 11, 2021
32119ec
stash apply
movinalot Nov 11, 2021
ea0f1b6
added FortiADC cloudinit, Fortinet tfvars examples
movinalot Nov 11, 2021
940ba80
fix things from latest development rebase
yeoldegrove Nov 12, 2021
601cabd
fix for disabled fortinet
yeoldegrove Nov 12, 2021
db55f9a
remove fadc lb, add secondary IPs for fadc AA
movinalot Nov 15, 2021
37021e0
azure: fix bastion and monitoring for plain network setup
yeoldegrove Nov 15, 2021
a04db2f
update fortinet components and configuration
movinalot Nov 18, 2021
9f998ef
identity role, fw addresses, policies and VIPs
movinalot Nov 23, 2021
2d77b80
add routes for subnets, fix label drbd_node
movinalot Nov 24, 2021
44db168
split rt into hub and spoke
movinalot Nov 28, 2021
cbab07a
add support for FGT and FADC PAYG licenses
movinalot Dec 14, 2021
50c2c90
set defaults for all Fortinet variables
movinalot Jan 11, 2022
521706b
fix filename to match others of same type
movinalot Jan 12, 2022
44793d3
add fgt and fadc public and mgmt IP output
movinalot Jan 12, 2022
fdbf190
fix bastion ip output and conditional null -> ""
movinalot Jan 13, 2022
d003bd5
prevent timeouts on subnets due to long gateway provisioning
yeoldegrove Jan 21, 2022
298c634
fix rebase errors
yeoldegrove Jan 24, 2022
5ce5d67
fix deprecated syntax
yeoldegrove Jan 24, 2022
71dd29b
move outputs to dedicated file
yeoldegrove Jan 24, 2022
a877fba
only provision bastion after fortigate VMs are created
yeoldegrove Jan 24, 2022
cba93b8
only provision SAP hosts after bastion is provisioned in hub/spoke setup
yeoldegrove Jan 24, 2022
21ec4ed
terraform fmt
yeoldegrove Jan 24, 2022
a51e521
rename fortinet outputs and move to seperate file
yeoldegrove Jan 24, 2022
b7e46e1
cleaned up fortigate variables and set sane defaults
yeoldegrove Jan 25, 2022
045b2f4
use os_image_reference module for fortigate
yeoldegrove Jan 25, 2022
6ce430d
fix bastion private/public IPs in non-fortinet case
yeoldegrove Jan 25, 2022
d97e316
remove deprecated network settings - moved to own section
yeoldegrove Jan 25, 2022
414302b
*.txt to gitignore
yeoldegrove Jan 25, 2022
93fb11f
move bastion public_ip handling to bastion module and remove "count" …
yeoldegrove Jan 26, 2022
2070ace
do not wait until bastion is completely provisioned; start when salt-…
yeoldegrove Jan 26, 2022
4b0794e
add monitoring lb rule and policy components
movinalot Jan 31, 2022
018b3d6
allow provisioning new spoke with existing hub and bastion
yeoldegrove Feb 1, 2022
55cbb84
allow provisioning new spoke with existing hub and bastion
yeoldegrove Feb 1, 2022
12aac60
Merge branch 'develop-mayerhofen' of ssh://github.com/Project-Mayerho…
yeoldegrove Feb 7, 2022
f405236
added fortigate networking and lb
movinalot Oct 18, 2021
139cba7
add fortigate vm deployment
movinalot Oct 19, 2021
5e86df8
variable additions and fortiadc vm initial setup
movinalot Oct 25, 2021
35f4f28
fortiadc updates
movinalot Oct 25, 2021
394adef
add route tables, routes and subnet associations
movinalot Oct 27, 2021
60091d3
change from list to maps for subnets
movinalot Oct 29, 2021
c1643a6
add internal trusted subnet
movinalot Oct 30, 2021
3c203c3
make resources more generic
movinalot Nov 2, 2021
45e76d5
update fgt and fadc configs
movinalot Nov 3, 2021
532844d
added fe ip for bastion host
movinalot Nov 4, 2021
98e8e2f
add fe_ip and fw policy for bastion host
movinalot Nov 5, 2021
d025c58
initial fortiadc cloud int setup
movinalot Nov 9, 2021
2456a3c
use public bastion IP from fortinet module for fortinet deployments
yeoldegrove Nov 10, 2021
e29f9a9
use public bastion IP from fortinet module for fortinet deployments
yeoldegrove Nov 10, 2021
b4ba14d
fix for bastion provisioner
yeoldegrove Nov 11, 2021
0e63aa0
on fortinet, a default timeout of 5m is not enough to bootstrap every…
yeoldegrove Nov 11, 2021
e6243ca
define default variables for fortinet
yeoldegrove Nov 11, 2021
1575238
network_hub: create own subnet for monitoring
yeoldegrove Nov 11, 2021
d60e71c
azure: add a tag "role" (matching the salt role) to every tagable res…
yeoldegrove Nov 11, 2021
e1db105
stash apply
movinalot Nov 11, 2021
896b173
added FortiADC cloudinit, Fortinet tfvars examples
movinalot Nov 11, 2021
f86803f
fix things from latest development rebase
yeoldegrove Nov 12, 2021
a18ecf6
fix for disabled fortinet
yeoldegrove Nov 12, 2021
f4218fd
remove fadc lb, add secondary IPs for fadc AA
movinalot Nov 15, 2021
206a6ec
azure: fix bastion and monitoring for plain network setup
yeoldegrove Nov 15, 2021
6136eb5
update fortinet components and configuration
movinalot Nov 18, 2021
952a65c
identity role, fw addresses, policies and VIPs
movinalot Nov 23, 2021
ab53122
add routes for subnets, fix label drbd_node
movinalot Nov 24, 2021
871220f
split rt into hub and spoke
movinalot Nov 28, 2021
e80aa63
add support for FGT and FADC PAYG licenses
movinalot Dec 14, 2021
d310cac
set defaults for all Fortinet variables
movinalot Jan 11, 2022
12301cb
fix filename to match others of same type
movinalot Jan 12, 2022
ff428d1
add fgt and fadc public and mgmt IP output
movinalot Jan 12, 2022
e9d8916
fix bastion ip output and conditional null -> ""
movinalot Jan 13, 2022
348fd2a
prevent timeouts on subnets due to long gateway provisioning
yeoldegrove Jan 21, 2022
c30b59c
fix rebase errors
yeoldegrove Jan 24, 2022
3744b6e
fix deprecated syntax
yeoldegrove Jan 24, 2022
f5188bc
move outputs to dedicated file
yeoldegrove Jan 24, 2022
cb9b587
only provision bastion after fortigate VMs are created
yeoldegrove Jan 24, 2022
8ad468e
only provision SAP hosts after bastion is provisioned in hub/spoke setup
yeoldegrove Jan 24, 2022
c92a4f0
terraform fmt
yeoldegrove Jan 24, 2022
490a430
rename fortinet outputs and move to seperate file
yeoldegrove Jan 24, 2022
2fcf752
cleaned up fortigate variables and set sane defaults
yeoldegrove Jan 25, 2022
1667721
use os_image_reference module for fortigate
yeoldegrove Jan 25, 2022
4e22184
fix bastion private/public IPs in non-fortinet case
yeoldegrove Jan 25, 2022
c8feffb
remove deprecated network settings - moved to own section
yeoldegrove Jan 25, 2022
fd83a5e
*.txt to gitignore
yeoldegrove Jan 25, 2022
2c9faad
move bastion public_ip handling to bastion module and remove "count" …
yeoldegrove Jan 26, 2022
9447fd6
do not wait until bastion is completely provisioned; start when salt-…
yeoldegrove Jan 26, 2022
c6fa732
add monitoring lb rule and policy components
movinalot Jan 31, 2022
7ebe3ac
allow provisioning new spoke with existing hub and bastion
yeoldegrove Feb 1, 2022
a62b387
allow provisioning new spoke with existing hub and bastion
yeoldegrove Feb 1, 2022
1a00417
remove .terraform.lock.hcl
yeoldegrove Feb 8, 2022
47e8c1d
remove bastion "provisioned" output
yeoldegrove Feb 8, 2022
94569db
add comment about bastion_provision dependency
yeoldegrove Feb 8, 2022
31a087a
unitize bastion_public_ip
yeoldegrove Feb 8, 2022
7bd0427
remove commented out subnet_spoke_mgmt
yeoldegrove Feb 8, 2022
635f7e1
Merge branch 'develop-mayerhofen' of ssh://github.com/Project-Mayerho…
yeoldegrove Feb 8, 2022
a1e9dda
fix typos found by spellcheck
yeoldegrove Feb 8, 2022
db80d1a
fix typos found by spellcheck
yeoldegrove Feb 8, 2022
ee894c9
Merge branch 'develop' of ssh://github.com/Project-Mayerhofen/ha-sap-…
yeoldegrove Feb 9, 2022
196f895
Merge branch 'develop' of ssh://github.com/Project-Mayerhofen/ha-sap-…
yeoldegrove Feb 9, 2022
33f2b4e
Merge branch 'develop-mayerhofen' of ssh://github.com/Project-Mayerho…
yeoldegrove Feb 9, 2022
901ac06
update bastion_host description
yeoldegrove Feb 9, 2022
13da683
remove "my" resources prefix
yeoldegrove Feb 9, 2022
03b280c
rename *.tf files to match naming convention
yeoldegrove Feb 9, 2022
c530015
remove unneeded number in resource name
yeoldegrove Feb 9, 2022
37e46fe
remove useless count
yeoldegrove Feb 9, 2022
f31fd06
corrections to descriptions
yeoldegrove Feb 9, 2022
91cb883
Merge branch 'develop-mayerhofen' of ssh://github.com/Project-Mayerho…
yeoldegrove Feb 9, 2022
354786b
Merge branch 'develop-mayerhofen' of ssh://github.com/Project-Mayerho…
yeoldegrove Feb 9, 2022
5c3b4f7
Merge branch 'develop' of ssh://github.com/Project-Mayerhofen/ha-sap-…
yeoldegrove Feb 17, 2022
a6be735
Merge branch 'develop' of ssh://github.com/Project-Mayerhofen/ha-sap-…
yeoldegrove Feb 17, 2022
bdd458e
azure: update default os_image to SLES15-SP3
yeoldegrove Feb 21, 2022
f28ae36
azure: change fortigate deployment to be byol by default
yeoldegrove Feb 21, 2022
caee0ad
azure: update default os_image to SLES15-SP3
yeoldegrove Feb 21, 2022
75ff989
azure: change fortigate deployment to be byol by default
yeoldegrove Feb 21, 2022
ab2a76c
set fortigate payg defaults
movinalot Feb 21, 2022
73280ff
Merge branch 'develop-mayerhofen' of ssh://github.com/Project-Mayerho…
yeoldegrove Feb 21, 2022
754e778
raise registercloudguest/SUSEConnect retries
yeoldegrove Mar 1, 2022
49b65e7
Merge branch 'develop-mayerhofen' into mayerhofen
yeoldegrove Mar 1, 2022
a574b42
Merge branch 'develop' of ssh://github.com/Project-Mayerhofen/ha-sap-…
yeoldegrove Mar 1, 2022
cd1e543
update azure/.terraform.lock.hcl
yeoldegrove Mar 2, 2022
c384249
terraform fmt
yeoldegrove Mar 2, 2022
946d9bd
Merge branch 'develop-mayerhofen' into mayerhofen
yeoldegrove Mar 2, 2022
2318f16
update deprecated load balacing rule attribute
movinalot Mar 3, 2022
40e7482
more granular firewall policies
movinalot Mar 21, 2022
d302e24
update availability_set name to match SUSE style
movinalot Mar 22, 2022
a0745b9
fix terraform formatting and spelling error
movinalot Mar 25, 2022
90cd277
remove deprecated attributes
movinalot Mar 28, 2022
8acf55b
terraform fmt
movinalot Mar 28, 2022
00c761a
add support for sap gui policy and service
movinalot Apr 4, 2022
4bd7d8e
add support for sap gui policy and service
movinalot Apr 4, 2022
bb1fa55
Merge pull request #3 from Project-Mayerhofen/develop-mayerhofen
yeoldegrove Apr 14, 2022
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**/.terraform
**/.terraform*
**/terraform.tfstate*
**/.terraform.tfstate*
**/terraform*.tfvars
Expand Down Expand Up @@ -26,3 +26,7 @@ shell.nix
venv
**/.envrc
**/.direnv

# Misc files
**/*.lic
**/*.txt
64 changes: 62 additions & 2 deletions azure/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions azure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,12 @@ drbd_cluster_fencing_mechanism = "native"
netweaver_cluster_fencing_mechanism = "native"
```

## Use Hub/Spoke network architecture

First of all, please get familiar with [Microsoft Azure's Hub/Spoke Architecture](https://docs.microsoft.com/en-us/azure/developer/terraform/hub-spoke-introduction).

See `terraform.tfvars` for examples of different deployment scenarios.

## Extra info
More info in [Azure's Terraform Create Complete VM Document](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-create-complete-vm).

Expand Down
23 changes: 23 additions & 0 deletions azure/create_remote_state/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Store Terraform state in Azure Storage

Please read the [Microsoft documentation how to store terraform state in azure storage](https://docs.microsoft.com/en-us/azure/developer/terraform/store-state-in-azure-storage) to get a general understanding about remote state.

## Example implementation

- You might want to use `create_remote_state/create_container.sh` (change variables first) to create:
- resource group
- storage account
- storage container

- Copy `remote_state/credentials.tfvars.example` to `remote_state/credentials.tfvars` and change the variables.
- Lookup your "key1" in the storage account "Access keys" tab and use it as "key".

- Add this block to `infrastructure.tf`

``` terraform
terraform {
backend "azurerm" {}
}
```

- Initialize the remote state by run `terraform init -backend-config=create_remote_state/credentials.tfvars`.
15 changes: 15 additions & 0 deletions azure/create_remote_state/create_container.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

LOCATION=westeurope
RESOURCE_GROUP_NAME=fortinet0
STORAGE_ACCOUNT_NAME="${RESOURCE_GROUP_NAME}tfstate${RANDOM}"
CONTAINER_NAME=tfstate

# Create resource group
az group create --name "${RESOURCE_GROUP_NAME}" --location "${LOCATION}"

# Create storage account
az storage account create --resource-group "${RESOURCE_GROUP_NAME}" --name "${STORAGE_ACCOUNT_NAME}" --sku Standard_LRS --encryption-services blob

# Create blob container
az storage container create --name "${CONTAINER_NAME}" --account-name "${STORAGE_ACCOUNT_NAME}"
4 changes: 4 additions & 0 deletions azure/create_remote_state/credentials.tfvars.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource_group_name = "resource group name"
storage_account_name = "storage account name"
container_name = "container name"
key = "storage key"
Loading