Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .terrahub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@
project:
name: demo-terraform-automation-aws
code: 7356626c
include:
- '.'
exclude:
- '**/.terraform/*'
- '**/node_modules/*'
include: ['.']
exclude: ['**/.terraform/*', '**/node_modules/*']

## terraform config
terraform:
varFile:
- default.tfvars
var:
## template config
template:
locals:
account_id: 123456789012
region: us-east-1
provider:
aws:
region: '${local.region}'
allowed_account_ids: ['${local.account_id}']

## terraform config
terraform:
varFile: ['default.tfvars']
version: 0.11.7
36 changes: 29 additions & 7 deletions iam_group/.terrahub.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
## local config
component:
name: 'iam_group'
dependsOn:
- '../iam_policy'

## ci config
ci:
mapping:
- '.'
mapping: ['.']
dependsOn: ['../iam_policy']
template:
resource:
aws_iam_group:
iam_group:
name: ${var.iam_group_name}
path: ${var.iam_group_path}
output:
id:
value: ${aws_iam_group.iam_group.id}
thub_id:
value: ${aws_iam_group.iam_group.id}
arn:
value: ${aws_iam_group.iam_group.arn}
name:
value: ${aws_iam_group.iam_group.name}
path:
value: ${aws_iam_group.iam_group.path}
unique_id:
value: ${aws_iam_group.iam_group.unique_id}
variable:
iam_group_name:
type: string
iam_group_path:
type: string
tfvars:
iam_group_name: iam_group
iam_group_path: /
25 changes: 0 additions & 25 deletions iam_group/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions iam_group/default.tfvars

This file was deleted.

4 changes: 0 additions & 4 deletions iam_group/main.tf

This file was deleted.

25 changes: 0 additions & 25 deletions iam_group/output.tf

This file was deleted.

6 changes: 0 additions & 6 deletions iam_group/provider.tf

This file was deleted.

23 changes: 0 additions & 23 deletions iam_group/variables.tf

This file was deleted.

57 changes: 50 additions & 7 deletions iam_policy/.terrahub.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,53 @@
## local config
component:
name: 'iam_policy'
dependsOn:
- '../iam_role'

## ci config
ci:
mapping:
- '.'
mapping: ['.']
dependsOn: ['../iam_role']
template:
data:
aws_iam_policy_document:
iam_policy:
statement:
- sid: ${var.iam_policy_sid}
actions: ${split(",",var.iam_policy_actions)}
resources: ${split(",",var.iam_policy_resources)}
resource:
aws_iam_policy:
iam_policy:
description: ${var.iam_policy_description}
name: ${var.iam_policy_name}
path: ${var.iam_policy_path}
policy: ${data.aws_iam_policy_document.iam_policy.json}
output:
id:
value: ${aws_iam_policy.iam_policy.id}
thub_id:
value: ${aws_iam_policy.iam_policy.id}
arn:
value: ${aws_iam_policy.iam_policy.arn}
name:
value: ${aws_iam_policy.iam_policy.name}
path:
value: ${aws_iam_policy.iam_policy.path}
policy:
value: ${aws_iam_policy.iam_policy.policy}
variable:
iam_policy_name:
type: string
iam_policy_description:
type: string
iam_policy_path:
type: string
iam_policy_sid:
type: string
iam_policy_actions:
type: string
iam_policy_resources:
type: string
tfvars:
iam_policy_actions: lambda:*
iam_policy_description: Managed by TerraHub
iam_policy_name: iam_policy
iam_policy_path: /
iam_policy_resources: '*'
iam_policy_sid: default
27 changes: 0 additions & 27 deletions iam_policy/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions iam_policy/data.tf

This file was deleted.

21 changes: 0 additions & 21 deletions iam_policy/default.tfvars

This file was deleted.

6 changes: 0 additions & 6 deletions iam_policy/main.tf

This file was deleted.

25 changes: 0 additions & 25 deletions iam_policy/output.tf

This file was deleted.

6 changes: 0 additions & 6 deletions iam_policy/provider.tf

This file was deleted.

45 changes: 0 additions & 45 deletions iam_policy/variables.tf

This file was deleted.

Loading