Skip to content

Latest commit

 

History

History
73 lines (48 loc) · 1.67 KB

File metadata and controls

73 lines (48 loc) · 1.67 KB

OpenTofu/Terraform Infrastructure

This directory contains Terraform configurations for deploying the Axelar-Starknet relayer infrastructure across different environments.

Directory Structure

terraform/
├── environments/
│   ├── mainnet/     # Production mainnet configuration
│   └── testnet/     # Testnet environment configuration

Prerequisites

  • OpenTofu >= 1.0
  • Appropriate cloud provider credentials configured
  • Access to the target deployment environment

Usage

Initialize OpenTofu/Terraform

Navigate to the appropriate environment directory and initialize OpenTofu/Terraform:

cd environments/testnet  # or mainnet
tofu init

Plan Changes

Review the changes that will be applied:

tofu plan

Apply Configuration

Deploy the infrastructure:

tofu apply

Destroy Infrastructure

To tear down the infrastructure:

tofu destroy

Environment Configuration

Each environment directory contains its own main.tf file with environment-specific configurations. These configurations include:

  • Network settings
  • Resource allocations
  • Environment-specific variables
  • Service configurations

State Management

Opentofu state files should be stored remotely in a secure backend (e.g., GCS, S3) for production environments. Configure the backend in the main.tf file of each environment.

Security Considerations

  • Never commit sensitive values (API keys, passwords) to version control
  • Use OpenTofu/Terraform variables or secret management services for sensitive data
  • Ensure proper IAM roles and permissions are configured
  • Review and follow cloud provider security best practices