https://github.com/verma-kunal/terraform-aws-apache-example
Terraform Module to provision an EC2 instance that is running Apache server - Example
https://github.com/verma-kunal/terraform-aws-apache-example
apache aws-ec2 example terraform-module
Last synced: 5 months ago
JSON representation
Terraform Module to provision an EC2 instance that is running Apache server - Example
- Host: GitHub
- URL: https://github.com/verma-kunal/terraform-aws-apache-example
- Owner: verma-kunal
- License: apache-2.0
- Created: 2022-12-27T05:45:19.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-27T06:01:20.000Z (about 3 years ago)
- Last Synced: 2025-08-29T08:42:15.799Z (6 months ago)
- Topics: apache, aws-ec2, example, terraform-module
- Language: HCL
- Homepage:
- Size: 19.5 KB
- Stars: 2
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Modules
- Create a module
- Publish a module
Task: Terraform Module to provision an EC2 instance that is running Apache server.
- Following the conventions used here: https://github.com/terraform-aws-modules/terraform-aws-rds
```hcl
terraform {}
# Provider info goes here:
provider "aws" {
region = "us-east-1"
}
# Importing the module here:
module "apache" {
source = ".//terraform-aws-apache-example"
# Giving the variable values here:
vpc_id = "vpc-0000000"
my_ip_with_cidr = "/32"
public_key = "ssh-rsa AAAAB......"
instance_type = "t2.nano"
server_name = "Apache-Example-Server"
}
# Outputs:
output "public_ip"{
value = module.apache.public_id
}
```