Skip to content

Commit e6b0004

Browse files
committed
fix the structure
1 parent 7180cc8 commit e6b0004

File tree

8 files changed

+91
-92
lines changed

8 files changed

+91
-92
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Your output should be similar to the one below:
7070
```
7171
Usage: terrahub [command] [options]
7272
73-
terrahub@0.0.28 (built: 2018-10-11T12:33:57.775Z)
73+
terrahub@0.1.28 (built: 2019-02-08T17:17:41.912Z)
7474
```
7575

7676
> NOTE: If you don't have TerraHub CLI, check out
@@ -129,8 +129,8 @@ Project: demo-terraform-aws
129129

130130
Run the following command in terminal:
131131
```shell
132-
terrahub configure -c terraform.var.account_id="${AWS_ACCOUNT_ID}"
133-
terrahub configure -c terraform.var.region="${AWS_DEFAULT_REGION}"
132+
terrahub configure -c template.locals.account_id="${AWS_ACCOUNT_ID}"
133+
terrahub configure -c template.locals.region="${AWS_DEFAULT_REGION}"
134134
```
135135

136136
Your output should be similar to the one below:

iam_group/.terrahub.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,27 @@ component:
66
template:
77
resource:
88
aws_iam_group:
9-
iam_group:
10-
name: ${var.iam_group_name}
11-
path: ${var.iam_group_path}
9+
iam_group:
10+
name: ${var.iam_group_name}
11+
path: ${var.iam_group_path}
1212
output:
1313
id:
14-
value: ${aws_iam_group.iam_group.id}
14+
value: ${aws_iam_group.iam_group.id}
1515
thub_id:
16-
value: ${aws_iam_group.iam_group.id}
16+
value: ${aws_iam_group.iam_group.id}
1717
arn:
18-
value: ${aws_iam_group.iam_group.arn}
18+
value: ${aws_iam_group.iam_group.arn}
1919
name:
20-
value: ${aws_iam_group.iam_group.name}
20+
value: ${aws_iam_group.iam_group.name}
2121
path:
22-
value: ${aws_iam_group.iam_group.path}
22+
value: ${aws_iam_group.iam_group.path}
2323
unique_id:
24-
value: ${aws_iam_group.iam_group.unique_id}
24+
value: ${aws_iam_group.iam_group.unique_id}
2525
variable:
2626
iam_group_name:
27-
type: string
27+
type: string
2828
iam_group_path:
29-
type: string
29+
type: string
3030
tfvars:
3131
iam_group_name: iam_group
3232
iam_group_path: /

iam_policy/.terrahub.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,44 @@ component:
66
template:
77
data:
88
aws_iam_policy_document:
9-
iam_policy:
10-
statement:
11-
- sid: ${var.iam_policy_sid}
12-
actions: ${split(",",var.iam_policy_actions)}
13-
resources: ${split(",",var.iam_policy_resources)}
9+
iam_policy:
10+
statement:
11+
- sid: ${var.iam_policy_sid}
12+
actions: ${split(",",var.iam_policy_actions)}
13+
resources: ${split(",",var.iam_policy_resources)}
1414
resource:
1515
aws_iam_policy:
16-
iam_policy:
17-
description: ${var.iam_policy_description}
18-
name: ${var.iam_policy_name}
19-
path: ${var.iam_policy_path}
20-
policy: ${data.aws_iam_policy_document.iam_policy.json}
16+
iam_policy:
17+
description: ${var.iam_policy_description}
18+
name: ${var.iam_policy_name}
19+
path: ${var.iam_policy_path}
20+
policy: ${data.aws_iam_policy_document.iam_policy.json}
2121
output:
2222
id:
23-
value: ${aws_iam_policy.iam_policy.id}
23+
value: ${aws_iam_policy.iam_policy.id}
2424
thub_id:
25-
value: ${aws_iam_policy.iam_policy.id}
25+
value: ${aws_iam_policy.iam_policy.id}
2626
arn:
27-
value: ${aws_iam_policy.iam_policy.arn}
27+
value: ${aws_iam_policy.iam_policy.arn}
2828
name:
29-
value: ${aws_iam_policy.iam_policy.name}
29+
value: ${aws_iam_policy.iam_policy.name}
3030
path:
31-
value: ${aws_iam_policy.iam_policy.path}
31+
value: ${aws_iam_policy.iam_policy.path}
3232
policy:
33-
value: ${aws_iam_policy.iam_policy.policy}
33+
value: ${aws_iam_policy.iam_policy.policy}
3434
variable:
3535
iam_policy_name:
36-
type: string
36+
type: string
3737
iam_policy_description:
38-
type: string
38+
type: string
3939
iam_policy_path:
40-
type: string
40+
type: string
4141
iam_policy_sid:
42-
type: string
42+
type: string
4343
iam_policy_actions:
44-
type: string
44+
type: string
4545
iam_policy_resources:
46-
type: string
46+
type: string
4747
tfvars:
4848
iam_policy_actions: lambda:*
4949
iam_policy_description: Managed by TerraHub

iam_role/.terrahub.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,52 @@ component:
55
template:
66
data:
77
aws_iam_policy_document:
8-
iam_role:
9-
statement:
10-
- sid: ${var.iam_role_policy_sid}
11-
actions: ${var.iam_role_policy_actions}
12-
effect: ${var.iam_role_policy_effect}
13-
principals:
14-
identifiers: ${var.iam_role_policy_principals_identifiers}
15-
type: ${var.iam_role_policy_principals_type}
8+
iam_role:
9+
statement:
10+
- sid: ${var.iam_role_policy_sid}
11+
actions: ${var.iam_role_policy_actions}
12+
effect: ${var.iam_role_policy_effect}
13+
principals:
14+
identifiers: ${var.iam_role_policy_principals_identifiers}
15+
type: ${var.iam_role_policy_principals_type}
1616
resource:
1717
aws_iam_role:
18-
iam_role:
19-
assume_role_policy: ${data.aws_iam_policy_document.iam_role.json}
20-
description: ${var.iam_role_description}
21-
force_detach_policies: ${var.iam_role_force_detach_policies}
22-
name: ${var.iam_role_name}
23-
path: ${var.iam_role_path}
18+
iam_role:
19+
assume_role_policy: ${data.aws_iam_policy_document.iam_role.json}
20+
description: ${var.iam_role_description}
21+
force_detach_policies: ${var.iam_role_force_detach_policies}
22+
name: ${var.iam_role_name}
23+
path: ${var.iam_role_path}
2424
output:
2525
arn:
26-
value: ${aws_iam_role.iam_role.arn}
26+
value: ${aws_iam_role.iam_role.arn}
2727
create_date:
28-
value: ${aws_iam_role.iam_role.create_date}
28+
value: ${aws_iam_role.iam_role.create_date}
2929
unique_id:
30-
value: ${aws_iam_role.iam_role.unique_id}
30+
value: ${aws_iam_role.iam_role.unique_id}
3131
name:
32-
value: ${aws_iam_role.iam_role.name}
32+
value: ${aws_iam_role.iam_role.name}
3333
description:
34-
value: ${aws_iam_role.iam_role.description}
34+
value: ${aws_iam_role.iam_role.description}
3535
variable:
3636
iam_role_name:
37-
type: string
37+
type: string
3838
iam_role_description:
39-
type: string
39+
type: string
4040
iam_role_path:
41-
type: string
41+
type: string
4242
iam_role_force_detach_policies:
43-
type: string
43+
type: string
4444
iam_role_policy_sid:
45-
type: string
45+
type: string
4646
iam_role_policy_actions:
47-
type: list
47+
type: list
4848
iam_role_policy_effect:
49-
type: string
49+
type: string
5050
iam_role_policy_principals_type:
51-
type: string
51+
type: string
5252
iam_role_policy_principals_identifiers:
53-
type: list
53+
type: list
5454
tfvars:
5555
iam_role_description: Managed by TerraHub
5656
iam_role_force_detach_policies: false

iam_role_policy_attachment_to_group/.terrahub.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ component:
66
template:
77
resource:
88
aws_iam_group_policy_attachment:
9-
iam_role_policy_attachment_to_group:
10-
group: ${var.iam_group_name}
11-
policy_arn: arn:aws:iam::${local.account_id}:policy/${var.iam_policy_name} {}
9+
iam_role_policy_attachment_to_group:
10+
group: ${var.iam_group_name}
11+
policy_arn: arn:aws:iam::${local.account_id}:policy/${var.iam_policy_name}
1212
variable:
1313
iam_group_name:
14-
type: string
14+
type: string
1515
iam_policy_name:
16-
type: string
16+
type: string
1717
tfvars:
1818
iam_group_name: iam_role_policy_attachment_to_group
1919
iam_policy_name: iam_role_policy_attachment_to_group

iam_role_policy_attachment_to_role/.terrahub.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ component:
66
template:
77
resource:
88
aws_iam_role_policy_attachment:
9-
iam_role_policy_attachment_to_role:
10-
policy_arn: arn:aws:iam::${local.account_id}:policy/${var.iam_policy_name}
11-
role: ${var.iam_role_name} {}
9+
iam_role_policy_attachment_to_role:
10+
role: ${var.iam_role_name}
11+
policy_arn: arn:aws:iam::${local.account_id}:policy/${var.iam_policy_name}
1212
variable:
1313
iam_role_name:
14-
type: string
14+
type: string
1515
iam_policy_name:
16-
type: string
16+
type: string
1717
tfvars:
1818
iam_policy_name: iam_role_policy_attachment_to_role
1919
iam_role_name: iam_role_policy_attachment_to_role

iam_user/.terrahub.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ component:
66
template:
77
resource:
88
aws_iam_user:
9-
iam_user:
10-
force_destroy: ${var.iam_user_force_destroy}
11-
name: ${var.iam_user_name}
12-
path: ${var.iam_user_path}
9+
iam_user:
10+
force_destroy: ${var.iam_user_force_destroy}
11+
name: ${var.iam_user_name}
12+
path: ${var.iam_user_path}
1313
output:
1414
arn:
15-
value: ${aws_iam_user.iam_user.arn}
15+
value: ${aws_iam_user.iam_user.arn}
1616
name:
17-
value: ${aws_iam_user.iam_user.name}
17+
value: ${aws_iam_user.iam_user.name}
1818
unique_id:
19-
value: ${aws_iam_user.iam_user.unique_id}
19+
value: ${aws_iam_user.iam_user.unique_id}
2020
variable:
2121
iam_user_name:
22-
type: string
22+
type: string
2323
iam_user_path:
24-
type: string
24+
type: string
2525
iam_user_force_destroy:
26-
type: string
26+
type: string
2727
tfvars:
2828
iam_user_force_destroy: "false"
2929
iam_user_name: iam_user

iam_user_group_membership/.terrahub.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ component:
66
template:
77
resource:
88
aws_iam_user_group_membership:
9-
iam_user_group_membership:
10-
groups:
11-
${var.iam_groups_name}
12-
user: ${var.iam_user_name}
9+
iam_user_group_membership:
10+
groups: ${var.iam_groups_name}
11+
user: ${var.iam_user_name}
1312
output:
1413
user:
15-
value: ${aws_iam_user_group_membership.iam_user_group_membership.user}
14+
value: ${aws_iam_user_group_membership.iam_user_group_membership.user}
1615
groups:
17-
value: ${aws_iam_user_group_membership.iam_user_group_membership.groups}
16+
value: ${aws_iam_user_group_membership.iam_user_group_membership.groups}
1817
variable:
1918
iam_user_name:
20-
type: string
19+
type: string
2120
iam_groups_name:
22-
type: list
21+
type: list
2322
tfvars:
2423
iam_groups_name: [iam_user_group_membership]
2524
iam_user_name: iam_user_group_membership

0 commit comments

Comments
 (0)