This repository contains a collection of Terraform modules for provisioning and managing cloud resources across various platforms including AWS, GCP, and Cloudflare.
- AWS Configurations: Modules for EKS, VPC, ALB, ASG, EFS, and more, tailored for AWS.
- GCP Configurations: Setups for GKE, GCE, Cloud Armor, Global IP, and more in Google Cloud Platform.
- Cloudflare DNS: Terraform configurations for managing DNS records in Cloudflare.
- Terraform installed on your machine.
- Access credentials for AWS, GCP, and Cloudflare.
Clone the repository to your local machine:
git clone https://github.com/sz9751210/terraform.git
Navigate to the desired module directory:
make up-eks # Example for AWS EKS module
Each module directory contains a main.tf
file which you can customize according to your needs. Refer to the README.md
files within each module directory for specific instructions.
Name | Version |
---|---|
AWS | >= 3.0 |
GCP | >= 3.0 |
Cloudflare | >= 2.0 |
Atlas | >= 2.0 |
Kubernetes | >= 2.0 |
Helm | >= 2.0 |
Null | >= 3.0 |
Resource | Link |
---|---|
VPC | aws_vpc |
Internet Gateway | aws_internet_gateway |
EIP | aws_eip |
NAT Gateway | aws_nat_gateway |
Subnet (Public, Private) | aws_subnet |
Route Table (Public, Private) | aws_route_table |
Route Table Association (Public, Private) | aws_route_table_association |
Module | Resource |
---|---|
EKS Cluster | aws_eks_cluster |
EKS Addon (kube-proxy, vpc-cni, coredns) | aws_eks_addon |
IAM Role (EKS Cluster) | aws_iam_role |
IAM Role Policy Attachment | aws_iam_role_policy_attachment |
Security Group (EKS Control Plane) | aws_security_group |
EKS Node Group | aws_eks_node_group |
IAM OpenID Connect Provider | aws_iam_openid_connect_provider |
Module | Resource |
---|---|
IAM Role (ALB) | aws_iam_role |
IAM Role Policy Attachment | aws_iam_role_policy_attachment |
Kubernetes Service Account | kubernetes_service_account |
Helm Release (AWS Load Balancer Controller) | helm_release |
Module | Resource |
---|---|
IAM Role (Cluster Autoscaler) | aws_iam_role |
IAM Role Policy Attachment | aws_iam_role_policy_attachment |
Local File | local_file |
Null Resource | null_resource |
Module | Resource |
---|---|
EFS File System | aws_efs_file_system |
Security Group (EFS) | aws_security_group |
EFS Mount Target | aws_efs_mount_target |
IAM Role (EFS) | aws_iam_role |
IAM Role Policy Attachment | aws_iam_role_policy_attachment |
Kubernetes Service Account | kubernetes_service_account |
Helm Release (AWS EFS CSI Driver) | helm_release |
Kubernetes Storage Class | kubernetes_storage_class |
Module | Resource |
---|---|
IAM Policy (ALB, ASG) | aws_iam_policy |
Module | Resource |
---|---|
S3 Bucket | aws_s3_bucket |
S3 Bucket Server Side Encryption | aws_s3_bucket_server_side_encryption_configuration |
S3 Bucket Versioning | aws_s3_bucket_versioning |
S3 Bucket Public Access Block | aws_s3_bucket_public_access_block |
DynamoDB Table (Terraform Locks) | aws_dynamodb_table |
Module | Resource |
---|---|
Cloud Armor | google_compute_security_policy |
Firewall | google_compute_firewall |
GCE | google_compute_instance |
GCS | google_storage_bucket |
GKE (Cluster) | google_container_cluster |
GKE (Node Pool) | google_container_node_pool |
Global IP | google_compute_global_address |
Region IP | google_compute_address |
Module | Resource |
---|---|
DNS | cloudflare_record |
Module | Resource |
---|---|
Database Deployment | mongodbatlas_advanced_cluster |
IP Access List | mongodbatlas_project_ip_access_list |
Docs Link | Description |
---|---|
terraform-cloudflare | 使用 terraform 結合 cloudflare 管理網域 DNS 記錄 |
Contributions are welcome and I will review and consider pull requests. Feel free to open issues if you find missing configuration or customisation options.
Please use the issue tracker to report any bugs or file feature requests.
This project is licensed under the MIT License.
E-mail: [email protected]