Skip to content

Commit

Permalink
Extended README.md with another example
Browse files Browse the repository at this point in the history
  • Loading branch information
bebold-jhr committed Mar 18, 2023
1 parent bf9fc0d commit a0a653f
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,47 @@ Call the module using this provider:

```hcl
module "test" {
source = "be-bold/terraform-aws-account-lookup"
version = "#.#.#"
source = "be-bold/terraform-aws-account-lookup"
version = "#.#.#"
providers = {
aws.org_management_account = aws.org_management_account
}
}
```

Use one of the outputs:
Use one of the static outputs:

````hcl
output "show" {
value = module.test.all_accounts_tags_by_account_name
}
````

Or set input parameters to search for a specific set of accounts using `search_result`:

```hcl
module "test" {
source = "be-bold/terraform-aws-account-lookup"
version = "#.#.#"
providers = {
aws.org_management_account = aws.org_management_account
}
include_management_account = false
include = {
type = "development"
team = "my-team"
}
exclude = {
project = "project-a"
}
group_by = "project"
}
output "show" {
value = module.test.search_result
}
```

Except for `search_result` all outputs are static. All input parameters of this module only affect `search_result`.
Set multiple input parameters to further narrow down your results.

0 comments on commit a0a653f

Please sign in to comment.