Skip to content

Latest commit

 

History

History
108 lines (78 loc) · 3.7 KB

README.md

File metadata and controls

108 lines (78 loc) · 3.7 KB

cyhy-tf-root

GitHub Build Status

This is a generic skeleton project that can be used to quickly get a new cisagov Terraform module GitHub repository started. This skeleton project contains licensing information, as well as pre-commit hooks and GitHub Actions configurations appropriate for the major languages that we use.

See here for more details on Terraform modules and the standard module structure.

Usage

module "example" {
  source = "github.com/cisagov/cyhy-tf-root"

  aws_region            = "us-west-1"
  aws_availability_zone = "b"
  subnet_id             = "subnet-0123456789abcdef0"
}

Examples

Requirements

Name Version
terraform >= 1.1
aws >= 4.9

Providers

Name Version
aws >= 4.9

Modules

No modules.

Resources

Name Type
aws_instance.example resource
aws_ami.example data source
aws_default_tags.default data source

Inputs

Name Description Type Default Required
ami_owner_account_id The ID of the AWS account that owns the Example AMI, or "self" if the AMI is owned by the same account as the provisioner. string "self" no
aws_availability_zone The AWS availability zone to deploy into (e.g. a, b, c, etc.). string "a" no
aws_region The AWS region to deploy into (e.g. us-east-1). string "us-east-1" no
subnet_id The ID of the AWS subnet to deploy into (e.g. subnet-0123456789abcdef0). string n/a yes

Outputs

Name Description
arn The EC2 instance ARN.
availability_zone The AZ where the EC2 instance is deployed.
id The EC2 instance ID.
private_ip The private IP of the EC2 instance.
subnet_id The ID of the subnet where the EC2 instance is deployed.

Notes

Running pre-commit requires running terraform init in every directory that contains Terraform code. In this repository, these are the main directory and every directory under examples/.

New Repositories from a Skeleton

Please see our Project Setup guide for step-by-step instructions on how to start a new repository from a skeleton. This will save you time and effort when configuring a new repository!

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

License

This project is in the worldwide public domain.

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.