terraform/examples/aws-count
Sathiya Shunmugasundaram 5bdd430720 README enhancement 2015-06-01 02:45:01 -04:00
..
README.md README enhancement 2015-06-01 02:45:01 -04:00
main.tf website: move all examples into the GitHub repo 2014-10-13 22:18:45 -07:00
outputs.tf Fix for outputs. 2015-01-28 21:19:52 -08:00
variables.tf fix invalid mixing of hcl and json 2015-01-09 11:43:29 +11:00

README.md

Count Example

The count parameter on resources can simplify configurations and let you scale resources by simply incrementing a number.

Additionally, variables can be used to expand a list of resources for use elsewhere.

To run, set the environment variables as below with correct values

export AWS_ACCESS_KEY_ID="..." export AWS_SECRET_ACCESS_KEY="..." export AWS_DEFAULT_REGION="..."

Alternatively, you can configure the provider configuration where you invoke the module.

For example, you can use section similar to below.

Specify the provider and access details

provider "aws" { region = "${var.aws_region}" access_key = "${var.access_key}" secret_key = "${var.secret_key}" }

Running the example

run terraform apply to see it work.