Skip to content
This repository has been archived by the owner on Aug 6, 2022. It is now read-only.

Fix bug with incorrect shared bucket name #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ Specific submodule docs can be found [in the submodule](secret-infrastructure/RE

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| application\_name | The application to fetch secrets for | string | - | yes |
| credentials\_file\_path | The path to the GCP credentials | string | - | yes |
| env | The environment to fetch secrets for | string | - | yes |
| secret | The name of the secret to fetch | string | - | yes |
| shared | Will we fetch the secret from the shared bucket instead of an application-specific bucket? | string | `false` | no |
| application\_name | The application to fetch secrets for | string | n/a | yes |
| credentials\_file\_path | The path to the GCP credentials | string | n/a | yes |
| env | The environment to fetch secrets for | string | n/a | yes |
| project\_name | The name of the project | string | n/a | yes |
| secret | The name of the secret to fetch | string | n/a | yes |
| shared | Will we fetch the secret from the shared bucket instead of an application-specific bucket? | string | `"false"` | no |

## Outputs

Expand Down
4 changes: 2 additions & 2 deletions examples/bucket_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Specific submodule docs can be found [in the submodule](../../modules/secret-inf
| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| application\_list | The list of application names that will store secrets | list | `<list>` | no |
| credentials\_file\_path | GCP credentials fils | string | - | yes |
| credentials\_file\_path | GCP credentials fils | string | n/a | yes |
| env\_list | The list of environments for secrets | list | `<list>` | no |
| project\_name | The name of the project this applies to | string | - | yes |
| project\_name | The name of the project this applies to | string | n/a | yes |

[^]: (autogen_docs_end)
8 changes: 4 additions & 4 deletions examples/fetch_secret/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Specific submodule docs can be found [in the submodule](../../modules/gcs-object

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| application\_name | The application to fetch secrets for | string | - | yes |
| credentials\_file\_path | GCP credentials fils | string | - | yes |
| env | The environment to fetch secrets for | string | - | yes |
| secret | The name of the secret to fetch | string | - | yes |
| application\_name | The application to fetch secrets for | string | n/a | yes |
| credentials\_file\_path | GCP credentials fils | string | n/a | yes |
| env | The environment to fetch secrets for | string | n/a | yes |
| secret | The name of the secret to fetch | string | n/a | yes |

## Outputs

Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ provider "google" {

locals {
// secret_project = "${var.project_name}"
shared_bucket = "shared-${var.env}-secrets"
shared_bucket = "shared-${var.project_name}-${var.env}-secrets"
app_bucket = "${var.application_name}-${var.env}-secrets"
bucket_name = "${var.shared == "true" ? local.shared_bucket : local.app_bucket}"
object_path = "${var.secret}.txt"
Expand Down
6 changes: 3 additions & 3 deletions modules/gcs-object/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ See the living [barebones](./examples/barebones-test-fixture) test fixture examp

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| bucket | The bucket to fetch the object from | string | - | yes |
| duration | The duration of the signed URL (defaults to 1m) | string | `1m` | no |
| path | The path to the desired object within the bucket | string | - | yes |
| bucket | The bucket to fetch the object from | string | n/a | yes |
| duration | The duration of the signed URL (defaults to 1m) | string | `"1m"` | no |
| path | The path to the desired object within the bucket | string | n/a | yes |

## Outputs

Expand Down
8 changes: 4 additions & 4 deletions modules/secret-infrastructure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ Along with the shared buckets per environment
| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| application\_list | The list of application names that will store secrets | list | `<list>` | no |
| credentials\_file\_path | GCP credentials fils | string | - | yes |
| credentials\_file\_path | GCP credentials fils | string | n/a | yes |
| env\_list | The list of environments for secrets | list | `<list>` | no |
| project\_name | The name of the project this applies to | string | - | yes |
| project\_name | The name of the project this applies to | string | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| app-buckets | - |
| shared-buckets | - |
| app-buckets | |
| shared-buckets | |

[^]: (autogen_docs_end)

Expand Down
4 changes: 4 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ variable "application_name" {
description = "The application to fetch secrets for"
}

variable "project_name" {
description = "The name of the project"
}

variable "env" {
description = "The environment to fetch secrets for"
}
Expand Down