Skip to content

Commit c6b295d

Browse files
committed
chore: updating a few things in the module
1 parent b338fee commit c6b295d

File tree

9 files changed

+273
-11
lines changed

9 files changed

+273
-11
lines changed

.github/workflows/terraform.yml

+15-5
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,20 @@ on:
99
- main
1010

1111
jobs:
12-
module-validation:
12+
role-validation:
1313
uses: appvia/appvia-cicd-workflows/.github/workflows/terraform-module-validation.yml@main
14-
name: Module Validation
15-
secrets:
16-
infracost-api-key: ${{ secrets.ORG_INFRACOST_API_KEY }}
14+
name: OIDC Role Module
1715
with:
18-
working-directory: .
16+
working-directory: modules/role
17+
18+
remote-state-validation:
19+
uses: appvia/appvia-cicd-workflows/.github/workflows/terraform-module-validation.yml@main
20+
name: Remote State Module
21+
with:
22+
working-directory: modules/remote-state
23+
24+
provider-validation:
25+
uses: appvia/appvia-cicd-workflows/.github/workflows/terraform-module-validation.yml@main
26+
name: Provider Module
27+
with:
28+
working-directory: modules/provider

.gitignore

+32-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,32 @@
1-
.terraform/
2-
.terraform.lock.hcl
1+
# Local .terraform directories
2+
**/.terraform/*
3+
4+
# .tfstate files
5+
*.tfstate
6+
*.tfstate.*
7+
8+
# Crash log files
9+
crash.log
10+
crash.*.log
11+
12+
# Ignore override files as they are usually used to override resources locally and so
13+
# are not checked in
14+
override.tf
15+
override.tf.json
16+
*_override.tf
17+
*_override.tf.json
18+
19+
# Include override files you do wish to add to version control using negated pattern
20+
# !example_override.tf
21+
22+
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
23+
# example: *tfplan*
24+
25+
# Ignore CLI configuration files
26+
.terraformrc
27+
terraform.rc
28+
29+
# Other
30+
.DS_Store
31+
todo.md
32+

.terraform.lock.hcl

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

modules/provider/.terraform.lock.hcl

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

modules/provider/README.md

+43-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,46 @@
22

33
## Requirements
44

5+
| Name | Version |
6+
| ------------------------------------------------------------------------ | ------- |
7+
| <a name="requirement_terraform"></a> [terraform](#requirement_terraform) | >= 1.0 |
8+
9+
## Providers
10+
11+
| Name | Version |
12+
| ------------------------------------------------ | ------- |
13+
| <a name="provider_aws"></a> [aws](#provider_aws) | n/a |
14+
| <a name="provider_tls"></a> [tls](#provider_tls) | n/a |
15+
16+
## Modules
17+
18+
No modules.
19+
20+
## Resources
21+
22+
| Name | Type |
23+
| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
24+
| [aws_iam_openid_connect_provider.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_openid_connect_provider) | resource |
25+
| [tls_certificate.thumbprint](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/data-sources/certificate) | data source |
26+
27+
## Inputs
28+
29+
| Name | Description | Type | Default | Required |
30+
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | :------: |
31+
| <a name="input_common_providers"></a> [common_providers](#input_common_providers) | List of common well-known providers to enable, such as github, gitlab | `list(string)` | `[]` | no |
32+
| <a name="input_custom_providers"></a> [custom_providers](#input_custom_providers) | Map of custom provider configurations | <pre>map(object({<br> name = optional(string, null)<br> url = string<br> client_id_list = list(string)<br> thumbprint_list = optional(list(string), [])<br> lookup_thumbprint = optional(bool, true)<br> }))</pre> | `{}` | no |
33+
| <a name="input_provider_tags"></a> [provider_tags](#input_provider_tags) | Nested map of tags to apply to specific providers. Top level keys should match provider names | `map(map(string))` | `{}` | no |
34+
| <a name="input_tags"></a> [tags](#input_tags) | Map of tags to apply to all resources | `map(string)` | `{}` | no |
35+
36+
## Outputs
37+
38+
| Name | Description |
39+
| -------------------------------------------------------------- | ----------- |
40+
| <a name="output_providers"></a> [providers](#output_providers) | n/a |
41+
42+
<!-- BEGIN_TF_DOCS -->
43+
## Requirements
44+
545
| Name | Version |
646
|------|---------|
747
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
@@ -10,8 +50,8 @@
1050

1151
| Name | Version |
1252
|------|---------|
13-
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a |
14-
| <a name="provider_tls"></a> [tls](#provider\_tls) | n/a |
53+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.43.0 |
54+
| <a name="provider_tls"></a> [tls](#provider\_tls) | 4.0.5 |
1555

1656
## Modules
1757

@@ -38,3 +78,4 @@ No modules.
3878
| Name | Description |
3979
|------|-------------|
4080
| <a name="output_providers"></a> [providers](#output\_providers) | n/a |
81+
<!-- END_TF_DOCS -->

modules/remote_state/.terraform.lock.hcl

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

modules/remote_state/README.md

+46-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,47 @@
11
# AWS OIDC Remote State Reader
2+
3+
## Requirements
4+
5+
| Name | Version |
6+
| ------------------------------------------------------------------------ | ------- |
7+
| <a name="requirement_terraform"></a> [terraform](#requirement_terraform) | >= 1.0 |
8+
9+
## Providers
10+
11+
| Name | Version |
12+
| ------------------------------------------------------------------ | ------- |
13+
| <a name="provider_aws"></a> [aws](#provider_aws) | 5.41.0 |
14+
| <a name="provider_terraform"></a> [terraform](#provider_terraform) | n/a |
15+
16+
## Modules
17+
18+
No modules.
19+
20+
## Resources
21+
22+
| Name | Type |
23+
| -------------------------------------------------------------------------------------------------------------------------------- | ----------- |
24+
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
25+
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
26+
| [terraform_remote_state.this](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/data-sources/remote_state) | data source |
27+
28+
## Inputs
29+
30+
| Name | Description | Type | Default | Required |
31+
| ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- | -------- | ------- | :------: |
32+
| <a name="input_account_id"></a> [account_id](#input_account_id) | Account ID where the remote state bucket is located | `string` | `null` | no |
33+
| <a name="input_reader_role_arn"></a> [reader_role_arn](#input_reader_role_arn) | The ARN of the reader role to assume in order to read the remote state | `string` | n/a | yes |
34+
| <a name="input_region"></a> [region](#input_region) | The region name where the destination resources have been created | `string` | `null` | no |
35+
| <a name="input_repository"></a> [repository](#input_repository) | The name of the repository to lookup remote state for | `string` | n/a | yes |
36+
| <a name="input_web_identity_token_file"></a> [web_identity_token_file](#input_web_identity_token_file) | Path to the web identity token file | `string` | n/a | yes |
37+
38+
## Outputs
39+
40+
| Name | Description |
41+
| -------------------------------------------------------- | ----------- |
42+
| <a name="output_outputs"></a> [outputs](#output_outputs) | n/a |
43+
44+
<!-- BEGIN_TF_DOCS -->
245
## Requirements
346

447
| Name | Version |
@@ -9,7 +52,7 @@
952

1053
| Name | Version |
1154
|------|---------|
12-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.41.0 |
55+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.43.0 |
1356
| <a name="provider_terraform"></a> [terraform](#provider\_terraform) | n/a |
1457

1558
## Modules
@@ -39,3 +82,5 @@ No modules.
3982
| Name | Description |
4083
|------|-------------|
4184
| <a name="output_outputs"></a> [outputs](#output\_outputs) | n/a |
85+
<!-- END_TF_DOCS -->
86+

modules/remote_state/main.tf

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ locals {
44

55
// Use provided region or default to the current region
66
region = coalesce(var.region, data.aws_region.current.name)
7+
}
78

9+
locals {
810
// Terraform state bucket name
9-
tf_state_bucket = format("%s-%s", var.account_id, local.region)
11+
tf_state_bucket = format("%s-%s", local.account, local.region)
1012
}
1113

1214
data "terraform_remote_state" "this" {

modules/role/.terraform.lock.hcl

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

0 commit comments

Comments
 (0)