config: fix error message in validation
This commit is contained in:
parent
f9e6754763
commit
b10b678326
|
@ -213,8 +213,8 @@ func (c *Config) Validate() error {
|
|||
// are valid in the Validate step.
|
||||
func (c *Config) allVariables() map[string][]InterpolatedVariable {
|
||||
result := make(map[string][]InterpolatedVariable)
|
||||
for n, pc := range c.ProviderConfigs {
|
||||
source := fmt.Sprintf("provider config '%s'", n)
|
||||
for _, pc := range c.ProviderConfigs {
|
||||
source := fmt.Sprintf("provider config '%s'", pc.Name)
|
||||
for _, v := range pc.RawConfig.Variables {
|
||||
result[source] = append(result[source], v)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,12 @@ variable "foo" {
|
|||
description = "bar";
|
||||
}
|
||||
|
||||
variable "amis" {
|
||||
default = {
|
||||
"east": "foo",
|
||||
}
|
||||
}
|
||||
|
||||
provider "aws" {
|
||||
access_key = "foo";
|
||||
secret_key = "bar";
|
||||
|
@ -16,7 +22,7 @@ resource "aws_security_group" "firewall" {
|
|||
}
|
||||
|
||||
resource aws_instance "web" {
|
||||
ami = "${var.foo}"
|
||||
ami = "${var.amis.east}"
|
||||
security_groups = [
|
||||
"foo",
|
||||
"${aws_security_group.firewall.foo}"
|
||||
|
|
Loading…
Reference in New Issue