Skip to content

Commit a0b3a24

Browse files
authored
Merge pull request #3 from appvia/create-role
updated readme and example
2 parents 5eb5b89 + f3eca1b commit a0b3a24

File tree

7 files changed

+78
-35
lines changed

7 files changed

+78
-35
lines changed

README.md

+19-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
![Github Actions](../../actions/workflows/terraform.yml/badge.svg)
22

3-
# Terraform <NAME>
3+
# Terraform AWS Appvia Audit Role
44

55
## Description
66

7-
Add a description of the module here
7+
This module creates a federated AWS IAM role in one or more accounts for the purpose of providing remote audit access
8+
for Appvia. The module should be deployed from the organization management account or a delegated administrator account.
9+
10+
The role is designed as such that it can only be consumed from a coresponding audit role within Appvia's infrastructure
11+
and when an agreed external ID is in place. Once the audit is complete, this role should be removed, however it will automatically
12+
block further access after 7 days.
813

914
## Usage
1015

1116
Add example usage here
1217

1318
```hcl
1419
module "example" {
15-
source = "appvia/<NAME>/aws"
16-
version = "0.0.1"
20+
source = "appvia/appvia-audit-role/aws"
21+
version = "1.0.0"
22+
23+
external_id = "<random secure id>"
24+
25+
deployment_account_ids = [
26+
"012345678910",
27+
"102938475632",
28+
]
1729
18-
# insert variables here
30+
expiry_days = 7
1931
}
2032
```
2133

@@ -33,14 +45,14 @@ The `terraform-docs` utility is used to generate this README. Follow the below s
3345
| Name | Version |
3446
|------|---------|
3547
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.7 |
36-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.0.0 |
48+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.58.0 |
3749
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.12.0 |
3850

3951
## Providers
4052

4153
| Name | Version |
4254
|------|---------|
43-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.0.0 |
55+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.58.0 |
4456
| <a name="provider_time"></a> [time](#provider\_time) | >= 0.12.0 |
4557

4658
## Modules

examples/basic/.terraform.lock.hcl

+37-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/basic/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44
| Name | Version |
55
|------|---------|
66
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
7-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.0.0 |
7+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.58.0 |
88

99
## Providers
1010

1111
No providers.
1212

1313
## Modules
1414

15-
No modules.
15+
| Name | Source | Version |
16+
|------|--------|---------|
17+
| <a name="module_example"></a> [example](#module\_example) | ../../ | n/a |
1618

1719
## Resources
1820

examples/basic/main.tf

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
#####################################################################################
2-
# Terraform module examples are meant to show an _example_ on how to use a module
3-
# per use-case. The code below should not be copied directly but referenced in order
4-
# to build your own root module that invokes this module
5-
#####################################################################################
1+
module "example" {
2+
source = "../../"
3+
4+
# A secure random string to be used as the role's external ID.
5+
# This should only be shared between the client and Appvia.
6+
external_id = "b03e124b514528288a38cb791de17bde"
7+
8+
# List of account IDs that the role should be deployed to
9+
deployment_account_ids = [
10+
"012345678910",
11+
"102938475632",
12+
]
13+
14+
# The number of days after which an account should expire
15+
expiry_days = 7
16+
}

examples/basic/providers.tf

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
21
provider "aws" {}

examples/basic/terraform.tf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
21
terraform {
32
required_version = ">= 1.0.0"
43

54
required_providers {
65
aws = {
76
source = "hashicorp/aws"
8-
version = ">= 5.0.0"
7+
version = ">= 5.58.0"
98
}
109
}
1110
}

terraform.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ terraform {
55
# tflint-ignore: terraform_unused_required_providers
66
aws = {
77
source = "hashicorp/aws"
8-
version = ">= 5.0.0"
8+
version = ">= 5.58.0"
99
}
1010

1111
time = {

0 commit comments

Comments
 (0)