Skip to content

Instantly share code, notes, and snippets.

@jamtur01
Created October 28, 2016 00:42
Show Gist options
  • Save jamtur01/e07ffe760521024c8ee9120eb3a3fa0b to your computer and use it in GitHub Desktop.
Save jamtur01/e07ffe760521024c8ee9120eb3a3fa0b to your computer and use it in GitHub Desktop.

S3 Bucket

Terraform can also store modules in an S3 bucket. To access the bucket you must have appropriate AWS credentials in your configuration or available via shared credentials or environment variables.

There are a variety of S3 bucket addressing schemes, most are documented in the S3 configuration. Here are a couple of examples:

module "consul" {
  source = "s3::https://s3-eu-west-1.amazonaws.com/consulbucket/consul.zip"
}

Or directly using the bucket's URL.

module "consul" {
  source = "consulbucket.s3-eu-west-1.amazonaws.com/consul.zip"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment