This repository contains reusable Terraform modules for AWS infrastructure.
instance_type
: The type of EC2 instance (default:t2.micro
)ami_id
: The AMI ID to use for the instancesubnet_id
: The ID of the subnet where the instance will be launchedsecurity_group_ids
: A list of security group IDs to associate with the instance
instance_id
: The ID of the created EC2 instance
module "ec2" {
source = "github.com/OpsVerseIO/opsverse-tf-modules//modules/ec2?ref=main"
# Required parameters
name_prefix = "test-app-server"
instance_type = "t3.medium" # Only t3.small or t3.medium allowed
application_name = "inventory-system"
owner = "platform-team"
}
bucket_name
: The name of the S3 bucketversioning_enabled
: Whether to enable versioning (default:false
)
bucket_arn
: The ARN of the created S3 bucket
module "s3" {
source = "github.com/OpsVerseIO/opsverse-tf-modules//modules/s3?ref=main"
# Required parameters
bucket_name = "opsverse-test-bucket"
application_name = "crm-system"
owner = "data-team"
}
To use these modules in your Terraform configuration, reference them directly from this repository:
module "ec2" {
source = "github.com/OpsVerseIO/opsverse-tf-modules//modules/ec2?ref=main"
}
module "s3" {
source = "github.com/OpsVerseIO/opsverse-tf-modules//modules/s3?ref=main"
}
Use S3 for remote state management as below:
terraform {
backend "s3" {
bucket = "devopsnow-us-east-1-tfstate"
key = "<your repo name>/envs/dev/terraform.tfstate"
region = "us-east-1"
encrypt = true
}
}