Skip to content

Commit 4c0e236

Browse files
committed
Added more stuff
1 parent 1eb8225 commit 4c0e236

File tree

12 files changed

+210
-68
lines changed

12 files changed

+210
-68
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.idea
2-
vendor
2+
3+
.terragrunt-cache

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ See `examples` for some basics.
5757
6. make it much faster, less verbose
5858
7. Proposed syntax:
5959

60+
- `@tfvars:terragrunt_output`
61+
6062
- `@modulestf:terragrunt_output.security-group_5.this_security_group_id.to_list`
6163

6264
- `@modulestf:terragrunt_output.["eu-west-1/security-group_5"].this_security_group_id.to_list`

examples/project1-terragrunt/eu-west-1/app/.terragrunt-cache/zeG_zjs3hFlERLTSSOGADBcQIxQ/AoKn_3NNiOJEg4PmxaP5wYFi3M8/.terraform/main.tf

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/project1-terragrunt/eu-west-1/app/.terragrunt-cache/zeG_zjs3hFlERLTSSOGADBcQIxQ/AoKn_3NNiOJEg4PmxaP5wYFi3M8/.terraform/terraform.tfvars

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
terragrunt = {
2+
terraform = {
3+
source = "."
4+
}
5+
}
6+
7+
################
8+
# Static values
9+
################
10+
11+
title = "This value is not going to be changed by tfvars-annotations"
12+
13+
#################
14+
# Dynamic values
15+
#################
16+
17+
name = "Anton Babenko" # @tfvars:terragrunt_output.core.name
18+
19+
score = "37" # @tfvars:terragrunt_output.core.score
20+
21+
love_sailing = "true" # @tfvars:terragrunt_output.core.love_sailing
22+
23+
understand_how_to_use_twitter = "false" # @tfvars:terragrunt_output.core.understand_how_to_use_twitter
24+
25+
languages = ["ukrainian", "russian", "english", "norwegian", "spanish"] # @tfvars:terragrunt_output.core.languages
26+
27+
list_of_properties = "" # @tfvars:terragrunt_output.core.list_of_properties
28+
29+
map_of_properties = "" # @tfvars:terragrunt_output.core.map_of_properties
30+
31+
mixed_value = "" # @tfvars:terragrunt_output.core.mixed_value
32+
33+
###############
34+
# Compositions
35+
###############
36+
37+
custom_map = {
38+
Score = "37" # @tfvars:terragrunt_output.core.score
39+
Name = "Anton Babenko" # @tfvars:terragrunt_output.core.name
40+
MixedValue = "" # @tfvars:terragrunt_output.core.mixed_value
41+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Content of Terraform module
Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,40 @@
1-
# @ modulestf:disable_values_updates
1+
terragrunt = {
2+
terraform = {
3+
source = "."
4+
}
5+
}
26

3-
vpc_id = "vpc-443a8116aae25c7e9" # @modulestf:terraform_output.vpc.vpc_id
7+
################
8+
# Static values
9+
################
410

5-
public_subnets = ["subnet-297e8b509d8aeebfe","subnet-3f831847e5802071c","subnet-6c6f959a9063d32b2"] # @modulestf:terraform_output.vpc.public_subnets
11+
title = "This value is not going to be changed by tfvars-annotations"
612

7-
something = "" # @modulestf:terraform_output.something.id
13+
#################
14+
# Dynamic values
15+
#################
816

9-
vpc4_id = "vpc-443a8116aae25c7e9" # @modulestf:terraform_output.vpc.vpc_id
17+
name = "Anton Babenko" # @tfvars:terragrunt_output.core.name
1018

11-
the end!
19+
score = "37" # @tfvars:terragrunt_output.core.score
20+
21+
love_sailing = "true" # @tfvars:terragrunt_output.core.love_sailing
22+
23+
understand_how_to_use_twitter = "false" # @tfvars:terragrunt_output.core.understand_how_to_use_twitter
24+
25+
languages = [
26+
"ukrainian",
27+
"russian",
28+
"english",
29+
"norwegian",
30+
"spanish",
31+
] # @tfvars:terragrunt_output.core.languages
32+
33+
######
34+
# These don't work because there are "=" in values. Changed annotation
35+
######
36+
list_of_properties = "" # @ tfvars:terragrunt_output.core.list_of_properties
37+
38+
map_of_properties = "" # @ tfvars:terragrunt_output.core.map_of_properties
39+
40+
mixed_value = "" # @ tfvars:terragrunt_output.core.mixed_value
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
output "name" {
2+
value = "Anton Babenko"
3+
}
4+
5+
output "score" {
6+
value = "37"
7+
}
8+
9+
output "love_sailing" {
10+
value = "true"
11+
}
12+
13+
output "understand_how_to_use_twitter" {
14+
value = "false"
15+
}
16+
17+
output "languages" {
18+
value = ["ukrainian", "russian", "english", "norwegian", "spanish"]
19+
}
20+
21+
output "map_of_properties" {
22+
value = {
23+
Name = "Anton Babenko"
24+
Age = 34
25+
LoveSailing = true
26+
}
27+
}
28+
29+
output "list_of_properties" {
30+
value = [
31+
{
32+
Name = "Anton Babenko"
33+
Age = 34
34+
LoveSailing = true
35+
UnderstandHowToUseTwitter = false
36+
},
37+
{
38+
Name = "Kapitoshka"
39+
Age = 123
40+
LoveSailing = false
41+
},
42+
]
43+
}
44+
45+
output "mixed_value" {
46+
value = [
47+
"This is just a string",
48+
[
49+
{
50+
Name = "Anton Babenko"
51+
Age = 34
52+
LoveSailing = true
53+
UnderstandHowToUseTwitter = false
54+
},
55+
],
56+
{
57+
Github = "antonbabenko"
58+
Twitter = "antonbabenko"
59+
},
60+
]
61+
}
62+
63+
// Failing values ("=" inside values):
64+
output "failing_values_list" {
65+
value = ["ukrainian = 100", "english", "unknown"]
66+
}
67+
68+
output "failing_values_map" {
69+
value = {
70+
Name = "Anton Babenko"
71+
Age = 34
72+
}
73+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
terragrunt = {
2+
terraform = {
3+
source = "."
4+
}
5+
}
6+
7+
name = "test"

examples/project1-terragrunt/eu-west-1/vpc/public_subnets

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)