This project allows you to deploy infrastructure across multiple cloud providers (AWS, Azure, and GCP) using Terraform. You can deploy all providers or selectively deploy specific providers based on a variable input.
- Terraform installed on your local machine.
- Valid configurations in the environment-specific variable files (
env/aws.tfvars
,env/azure.tfvars
,env/gcp.tfvars
).
selected_providers
: A list of cloud providers to deploy (e.g.,['aws', 'azure', 'gcp']
).
To deploy infrastructure for AWS, Azure, and GCP:
terraform apply -var-file=env/aws.tfvars -var-file=env/azure.tfvars -var-file=env/gcp.tfvars -auto-approve
To deploy only Azure infrastructure:
terraform apply -var-file=env/azure.tfvars -var="selected_providers=['azure']" -auto-approve
To deploy both AWS and Azure infrastructure:
terraform apply -var-file=env/aws.tfvars -var-file=env/azure.tfvars -var="selected_providers=['aws', 'azure']" -auto-approve
To deploy only GCP infrastructure:
terraform apply -var-file=env/gcp.tfvars -var="selected_providers=['gcp']" -auto-approve
- Ensure that your environment-specific variable files (e.g.,
env/aws.tfvars
,env/azure.tfvars
,env/gcp.tfvars
) are correctly configured with the required variables for each provider. - Use the appropriate
-var-file
arguments to load the necessary configurations for the selected providers. - Use
-auto-approve
to skip the manual approval step duringterraform apply
.
If you have any questions or encounter issues, please refer to the Terraform documentation or raise an issue in this repository.