Mirtov Alexey 33d0bd4365 add english %!s(int64=2) %!d(string=hai) anos
..
README.md 33d0bd4365 add english %!s(int64=2) %!d(string=hai) anos
README_RU.md 33d0bd4365 add english %!s(int64=2) %!d(string=hai) anos
SG.tf 85a2471985 update %!s(int64=3) %!d(string=hai) anos
backend.tf 85a2471985 update %!s(int64=3) %!d(string=hai) anos
cloud-init.tpl.yaml 85a2471985 update %!s(int64=3) %!d(string=hai) anos
docker-compose.yaml 85a2471985 update %!s(int64=3) %!d(string=hai) anos
docker-declaration.yaml 85a2471985 update %!s(int64=3) %!d(string=hai) anos
frontend.tf 85a2471985 update %!s(int64=3) %!d(string=hai) anos
ipsec-init.tpl.yaml 85a2471985 update %!s(int64=3) %!d(string=hai) anos
output.tf 85a2471985 update %!s(int64=3) %!d(string=hai) anos
provider.tf 85a2471985 update %!s(int64=3) %!d(string=hai) anos
remote-init.tpl.yaml 85a2471985 update %!s(int64=3) %!d(string=hai) anos
remote.tf 85a2471985 update %!s(int64=3) %!d(string=hai) anos
sa.tf 85a2471985 update %!s(int64=3) %!d(string=hai) anos
terraform.tfvars.example 85a2471985 update %!s(int64=3) %!d(string=hai) anos
variables.tf 85a2471985 update %!s(int64=3) %!d(string=hai) anos
versions.tf 85a2471985 update %!s(int64=3) %!d(string=hai) anos
vpc.tf 85a2471985 update %!s(int64=3) %!d(string=hai) anos
vpn.tf 85a2471985 update %!s(int64=3) %!d(string=hai) anos

README.md

Terraform and Security Groups Example 1

Mock web-application environment with security groups to provide secure remote-access and isolation

Detailed analysis in the video

image

Preliminary setup

  • Fill out the terraform.tfvars_example file and rename it to terraform.tfvars.
  • To the file, add your values of cloud_id, folder_id, and the token.
  • In the variables.tf file, replace the value of the remote_whitelist_ip variable with your own list of public IP addresses from which it is allowed to connect to the network: each address in quotes, separated by a comma, for example: default = ["1.1.1.1/32", "2.2.2.2/32"].
  • In the same file, change the value of the ipsec_password to the desired password for the test IPsec connection.
  • Run terraform init.
  • Run terraform apply.