Provisions an AWS VPC containing an EC2 webserver with a sample HashiCafe website, using a base AMI registered in HCP Packer.
Enabled for Terraform Cloud no-code provisioning.
For no-code provisioning, AWS credentials must be supplied to the workspace via environment variables (e.g. AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
) or using dynamic provider credentials.
Also requires environment variables containing an HCP service principal credential (HCP_CLIENT_ID
and HCP_CLIENT_SECRET
). It is recommende to attach these globally or to projects where no-code workspaces will be provisioned.
Name | Version |
---|---|
terraform | >= 1.2 |
aws | ~> 5.0 |
hcp | ~> 0.82 |
null | ~> 3.1 |
random | ~> 3.4 |
tls | ~> 4.0 |
Name | Version |
---|---|
aws | ~> 5.0 |
hcp | ~> 0.82 |
null | ~> 3.1 |
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_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 |
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 |
n/a | yes |
subnet_prefix | The address prefix to use for the subnet. | string |
"10.0.10.0/24" |
no |
Name | Description |
---|---|
ami_id | n/a |
app_url | n/a |
product | The product which was randomly selected. |