Skip to content

Latest commit

 

History

History

infra

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Terraform Cloud Project

This folder contains the Terraform configurations for our project's infrastructure, managed through Terraform Cloud. The infrastructure is divided into multiple workspaces to handle different environments and shared resources.

Directory Structure

The repository is organized into the following directories, each corresponding to a specific Terraform Cloud workspace:

  • /core - This directory contains the Terraform configurations for the global/shared resources used across all environments. These may include VPCs, shared databases, IAM roles, etc.

  • /server - Contains the Terraform configurations for the production web server. This workspace should be configured with production-grade settings, ensuring high availability and security.

  • /server-preview - This directory is for the preview web server, typically used for pull request reviews. It might contain configurations that are under testing or not yet approved for the testing environment.

  • /server-test - Holds the configurations for the testing/QA web server. This environment mirrors production closely and is used for final testing before deploying to production.

Usage

Prerequisites

Setting Up Workspaces in Terraform Cloud

  1. Log in to Terraform Cloud.
  2. Create a workspace for each directory/environment.
  3. Link each workspace to the corresponding directory in this repository.
  4. Save Terraform API token to the ../.terraformrc file.

Working with Terraform

To work with Terraform configurations:

  1. Navigate to the appropriate directory (e.g., cd server).
  2. Initialize Terraform: terraform init.
  3. Apply configurations: terraform apply.

Ensure that you are working in the correct workspace to avoid misconfigurations.

Contributions

Please follow our contribution guidelines for making changes or adding new configurations. Ensure you test configurations in the test and preview environments before applying them to production.

References

Support

For any issues or questions related to this Terraform setup, please contact @koistya on our Discord server.