/terraform-azure-rookout-deployment

A Terraform module for deployment of Rookout on-premise controller and datastore on Azure cloud.

Primary LanguageHCLMIT LicenseMIT

Terraform Azure - Rookout Deployment

This Terraform deploys Rookout Controller and Rookout Datastore using App Service on Azure cloud.

The module implements the following architectures (public/private deployments):

Prerequisites

  1. Install Terraform.
  2. Configure Terraform for your Azure account.
  3. Create a provider block as specified in the guide chosen above (for example in the Azure Cloud Shell/Bash guide).
  4. Get your organization's Rookout token from the Rookout web application. The token must be passed as a variable to the module you will be creating.
    rookout_token = "..."
    

Usage - Public

In this deployment, both the component controller and the datastore will be internet-facing. A public domain and Azure public hosted zone should be used for public deployments.

module "rookout" {
   source  = "Rookout/rookout-deployment/azure"
   # version = x.y.z
   
   domain_name = "YOUR_DOMAIN"
   domain_resource_group = "DOMAIN'S_RESOUCRE_GROUP"

   rookout_token = "YOUR_TOKEN"
}

Usage - Private (internal)

In this deployment, both the component controller and datastore are reachable only from virtual network. A private hosted zone will be created (for deployment to an existing virtual network, see the next section).

The output of this module is the components url.

module "rookout" {
   source  = "Rookout/rookout-deployment/azure"
   # version = x.y.z
   
   rookout_token = "YOUR_TOKEN"
   internal = true
   }

Existing virtual network

To use an existing virtual network, the following variables should be passed for both public and private deployments.

module "rookout" {
 ....
 
   create_vnet = false
   existing_vnet_name = "..."
   existing_resource_group_name = "..."

   subnet_app_service_cidr = "x.y.z.0/28"
   private_endpoint_subnet_cidr ="x.y.z.64/28"
}

Requirements

Name Version
azurerm 3.17.0

Providers

Name Version
azurerm 3.17.0

Modules

No modules.

Resources

Name Type
azurerm_app_service_certificate_binding.controller resource
azurerm_app_service_certificate_binding.datastore resource
azurerm_app_service_custom_hostname_binding.controller resource
azurerm_app_service_custom_hostname_binding.datastore resource
azurerm_app_service_managed_certificate.controller resource
azurerm_app_service_managed_certificate.datastore resource
azurerm_app_service_virtual_network_swift_connection.controller resource
azurerm_dns_cname_record.controller resource
azurerm_dns_cname_record.datastore resource
azurerm_dns_ns_record.rookout resource
azurerm_dns_txt_record.controller resource
azurerm_dns_txt_record.datastore resource
azurerm_dns_zone.sub_domain resource
azurerm_linux_web_app.controller resource
azurerm_linux_web_app.datastore resource
azurerm_private_dns_zone.private_zone resource
azurerm_private_dns_zone_virtual_network_link.dnszonelink resource
azurerm_private_endpoint.controller resource
azurerm_private_endpoint.datastore resource
azurerm_public_ip.vpn resource
azurerm_resource_group.rookout resource
azurerm_service_plan.controller resource
azurerm_subnet.app_service resource
azurerm_subnet.gateway resource
azurerm_subnet.private_endpoint_subnet resource
azurerm_virtual_network.rookout resource
azurerm_virtual_network_gateway.vpn resource
azurerm_client_config.current data source
azurerm_dns_zone.selected data source
azurerm_resource_group.domain data source
azurerm_resource_group.selected data source
azurerm_subnet.app_service_selected data source
azurerm_subnet.private_endpoint_selected data source
azurerm_virtual_network.selected data source

Inputs

Name Description Type Default Required
create_private_endpoint Flag to turn off creation of private endpoints, relevent for internal=true bool true no
create_vnet Flag of creation of virtual network bool true no
domain_name Domain of your applicaiton string "" no
domain_resource_group Resource group of domain hosted zone string "" no
environment This variable used for namespacing and renaming resources string "test" no
existing_resource_group_name Resource group of rookout deployment, if not existing, will create one that named 'ENV-rookout-ResourceGroup' string "" no
existing_vnet_name Provided virtual network name, where rookout app service will be deployed string "" no
existing_vnet_resource_group_name Resource group of provided virtual network string "" no
internal Flag to switch the deployment to be internal bool false no
location Location of resources string "northeurope" no
private_endpoint_subnet_cidr CIDR of private endpoint, for internal deployment string "10.10.0.64/26" no
private_endpoint_subnet_name Private endpoints subnet, used for internal deployment, Minimum CIDR mask is 26 bits, should be in existing vnet resource group string "" no
rookout_token Rookout's org token string n/a yes
subnet_app_service_cidr vnet subnets string "10.10.0.0/26" no
subnet_app_service_name App Service delegated subnet, Minimum CIDR mask is 26 bits, should be in existing vnet resource group string "" no
vnet_cidr CIDR of vnet resource to be created string "10.10.0.0/16" no

Outputs

Name Description
controller_deafult_hostname n/a
controller_dns n/a
datastore_deafult_hostname n/a
datastore_dns n/a
resource_group_name n/a

Developers

We're using Release Please for releasing the module. Please make sure you follow the guidelines for commit messages