Skip to content

A skeleton repo to get started on a Terraform AWS module development

License

Notifications You must be signed in to change notification settings

run-at-scale/terraform-aws-skeleton

Repository files navigation

terraform-aws-skeleton

A bare-bones Terraform module to be forked and turned into something useful.

Branch Build status
master build Status
dev build Status

Assumptions

Assumptions stated here.

Input Variables

  • aws_region - Region to deploy our resources. (Required)
  • tags - A mapping of tags to assign to the resource.

Outputs

  • some_output - description of output

Usage example:

A full example leveraging other community modules is contained in the examples/test_fixtures directory. Here's the gist of using it via the Terraform registry:

module "this" {
  source              = "terraform-aws-modules/foo/aws"
  vpc_id              = "${var.vpc_id}"

  tags {
    "Terraform" = "true"
    "Env"       = "${terraform.workspace}"
  }
}
  1. Always terraform plan to see your change before running terraform apply.
  2. Win the day!

Importing existing infra

Discuss the various terraform import commands that could be run to get this module close to owning a set of existing live infra.

Testing

This module has been packaged with awspec tests through test kitchen. To run them:

  1. Install the prerequisites of rvm and ruby 2.4.2 via homebrew.
  2. Install bundler and the gems from our Gemfile:
rvm install 2.4.2; gem install bundler; bundle install
  1. Test using kitchen test from the root of the repo.

Contributing

Report issues/questions/feature requests on in the Issues section.

Pull requests are welcome! Ideally create a feature branch and issue for every individual change made. These are the steps:

  1. Fork the repo to a personal space or org.
  2. Create your feature branch from master (git checkout -b my-new-feature).
  3. Commit your awesome changes (git commit -am 'Added some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create a new Pull Request and tell us about your changes.

Change log

The change log captures all important release notes.

Authors

Created and maintained by Brandon O'Connor - [email protected].

License

MIT Licensed. See LICENSE for full details.