Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated readme and example #3

Merged
merged 5 commits into from
Sep 13, 2024
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
26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
![Github Actions](../../actions/workflows/terraform.yml/badge.svg)

# Terraform <NAME>
# Terraform AWS Appvia Audit Role

## Description

Add a description of the module here
This module creates a federated AWS IAM role in one or more accounts for the purpose of providing remote audit access
for Appvia. The module should be deployed from the organization management account or a delegated administrator account.

The role is designed as such that it can only be consumed from a coresponding audit role within Appvia's infrastructure
and when an agreed external ID is in place. Once the audit is complete, this role should be removed, however it will automatically
block further access after 7 days.

## Usage

Add example usage here

```hcl
module "example" {
source = "appvia/<NAME>/aws"
version = "0.0.1"
source = "appvia/appvia-audit-role/aws"
version = "1.0.0"

external_id = "<random secure id>"

deployment_account_ids = [
"012345678910",
"102938475632",
]

# insert variables here
expiry_days = 7
}
```

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

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.0.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.58.0 |
| <a name="provider_time"></a> [time](#provider\_time) | >= 0.12.0 |

## Modules
Expand Down
54 changes: 37 additions & 17 deletions examples/basic/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.0.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.58.0 |

## Providers

No providers.

## Modules

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

## Resources

Expand Down
21 changes: 16 additions & 5 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#####################################################################################
# Terraform module examples are meant to show an _example_ on how to use a module
# per use-case. The code below should not be copied directly but referenced in order
# to build your own root module that invokes this module
#####################################################################################
module "example" {
source = "../../"

# A secure random string to be used as the role's external ID.
# This should only be shared between the client and Appvia.
external_id = "b03e124b514528288a38cb791de17bde"

# List of account IDs that the role should be deployed to
deployment_account_ids = [
"012345678910",
"102938475632",
]

# The number of days after which an account should expire
expiry_days = 7
}
1 change: 0 additions & 1 deletion examples/basic/providers.tf
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

provider "aws" {}
3 changes: 1 addition & 2 deletions examples/basic/terraform.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

terraform {
required_version = ">= 1.0.0"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0.0"
version = ">= 5.58.0"
}
}
}
2 changes: 1 addition & 1 deletion terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ terraform {
# tflint-ignore: terraform_unused_required_providers
aws = {
source = "hashicorp/aws"
version = ">= 5.0.0"
version = ">= 5.58.0"
}

time = {
Expand Down