forked from open-policy-agent/conftest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterraform.tf
34 lines (30 loc) · 787 Bytes
/
terraform.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
data "consul_key_prefix" "environment" {
path = "apps/example/env"
}
resource "aws_elastic_beanstalk_environment" "example" {
name = "test_environment"
application = "testing"
setting {
namespace = "aws:autoscaling:asg"
name = "MinSize"
value = "1"
}
dynamic "setting" {
for_each = data.consul_key_prefix.environment.var
content {
namespace = "aws:elasticbeanstalk:application:environment"
name = setting.key
value = setting.value
}
}
}
output "environment" {
value = {
id = aws_elastic_beanstalk_environment.example.id
vpc_settings = {
for s in aws_elastic_beanstalk_environment.example.all_settings :
s.name => s.value
if s.namespace == "aws:ec2:vpc"
}
}
}