Provisions a simple nginx webserver with sample HashiCafe website in AWS EC2, using a base AMI registered in HCP Packer.
Default Packer bucket name matches the Ubuntu 22.04 Nginx image built with my Packer example.
Name | Version |
---|---|
terraform | >= 1.5 |
aws | ~> 5.0 |
hcp | ~> 0.82 |
null | ~> 3.2 |
random | ~> 3.4 |
tls | ~> 4.0 |
Name | Version |
---|---|
aws | ~> 5.0 |
hcp | ~> 0.82 |
null | ~> 3.2 |
random | ~> 3.4 |
tls | ~> 4.0 |
No modules.
Name | Type |
---|---|
aws_eip.hashicafe | resource |
aws_eip_association.hashicafe | resource |
aws_instance.hashicafe | resource |
aws_internet_gateway.hashicafe | resource |
aws_key_pair.hashicafe | resource |
aws_route_table.hashicafe | resource |
aws_route_table_association.hashicafe | resource |
aws_security_group.hashicafe | resource |
aws_security_group_rule.ingress | resource |
aws_subnet.hashicafe | resource |
aws_vpc.hashicafe | resource |
null_resource.configure-web-app | resource |
random_integer.product | resource |
tls_private_key.hashicafe | resource |
hcp_packer_artifact.ubuntu-webserver | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
address_space | The address space that is used by the virtual network. You can supply more than one address space. Changing this forces a new resource to be created. | string |
"10.0.0.0/16" |
no |
department | Value for the department tag. | string |
"WebDev" |
no |
env | Value for the environment tag. | string |
n/a | yes |
hashi_products | n/a | list(object({ |
[ |
no |
instance_type | Specifies the AWS instance type. | string |
"t3.micro" |
no |
owner | Value for the owner tag. | string |
"web.developer" |
no |
packer_bucket | HCP Packer bucket name containing the source image. | string |
"ubuntu22-nginx" |
no |
packer_channel | HCP Packer image channel. | string |
"production" |
no |
prefix | This prefix will be included in the name of most resources. | string |
n/a | yes |
region | The region where the resources are created. | string |
"us-east-2" |
no |
subnet_prefix | The address prefix to use for the subnet. | string |
"10.0.10.0/24" |
no |
Name | Description |
---|---|
ami_id | ID of the AMI resolved from HCP Packer. |
app_url | URL of the deployed webapp. |
product | The product which was randomly selected. |