Giter VIP home page Giter VIP logo

terraform-rdgateway-aws's Introduction

terraform-rdgateway-aws

This repository contains Terraform configurations that deploy an Remote Desktop Gateway solution in an AWS account.

While AWS have published a Quick Start that uses CloudFormation to deploy the RD Gateway in various scenarios, they do not provide a solution for the SSL certificates that are required for each RD Gateway instance.

The solution presented here uses certbot running as a Lambda function that gets a Letsencrypt SSL certificate that is good for 90 days. The certbot Lambda function runs on a schedule and gets a new SSL certificate every 60 days and saves the certificate in an S3 bucket. Upon receiving a new SSL certificate, the S3 bucket notifies an SQS queue so that the RD Gateway that listenes to that SQS queue every day is able to download the new certificate from S3 and install it on the RD Gateway server. This workflow ensures that the RD Gateway instance has a valid SSL certificate that is renenwed forever.

Please check the wiki page for a step-by-step tutorial on this solution.

Pre-requisites

Quick start

  1. Configure your AWS access keys as environment variables:
$ export AWS_ACCESS_KEY_ID=(your access key id)
$ export AWS_SECRET_ACCESS_KEY=(your secret access key)
  1. Clone this repository:
$ git clone https://github.com/RaduLupan/terraform-rdgateway-aws.git
$ cd terraform-rdgateway-aws
  1. Optional: create a Virtual Private Cloud (VPC):
$ cd vpc
$ terraform init
$ terraform apply
  1. Optional: create a Simple AD or Microsoft AD directory:
$ cd ad
$ terraform init
$ terraform apply
  1. Create the letsencrypt-tls layer:
$ cd letsencrypt-tls
$ terraform init
$ terraform apply
  1. Create the rd-gateway layer:
$ cd rd-gateway
$ terraform init
$ terraform apply

Credits

Thank you kingsoftgames for your certbot-lambda implementation! I have found your code back in 2018 and have been running it at work ever since. Instead of manually renewing and installing the SSL certificates on a dozen RD Gateways we have in AWS, we have been receiving email notifications advising that the certificates have been renewed!

terraform-rdgateway-aws's People

Contributors

radulupan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.