[jest@starfury terraform]$ tree
.
├── aws
│ ├── terraform.tfstate
│ ├── terraform.tfstate.backup
│ ├── terraform.tfvars
├── coreos
├── environment
└── LICENSE
[jest@starfury coreos]$ pwd
/home/jest/scm/github/terraform/coreos
[jest@starfury coreos]$ head
main.tf
module "aws" {
source = "../aws"
resource "aws_security_group" "coreos" {
name = "coreos"
description = "The default security group for coreos boxes"
... etc etc
A terraform plan in the aws folder works; I *assumed* that by imported the aws module in the coreos (aws provider, vars etc) I would be able to use the 'aws_security_group' and more .. i.e the pattern being aws modules sets up the common requirements and providers, coreos module imports functionality / providers and adds on top of it with it's own specifics ...
Unfortunately, I get;
[jest@starfury coreos] terraform plan
There are warnings and/or errors related to your configuration. Please
fix these before continuing.
Errors:
* module root: module aws: required variable aws_key not set
* Provider 'aws' error: access_key: required field is not set
* Provider 'aws' error: secret_key: required field is not set
* Provider 'aws' error: region: required field is not set
What is the design pattern for using module if inheritance isn't supported? ... would I have to pass the details down through the modules ... i.e. place the aws{secret|key|region} var and provider coreos and pass down the vars to aws? ... that would seem somewhat strange to me