-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Flaconi/plt-1057
PLT-1057 - Setup module
- Loading branch information
Showing
8 changed files
with
64 additions
and
17 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @Flaconi/devops | ||
* @Flaconi/devops @Flaconi/platform @Flaconi/ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,4 +47,4 @@ jobs: | |
} | ||
retry make test | ||
env: | ||
RETRIES: 20 | ||
RETRIES: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
resource "algolia_api_key" "this" { | ||
for_each = var.api_keys | ||
acl = each.value.acl | ||
description = each.value.description | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
output "api_keys" { | ||
description = "Created API Keys through terraform" | ||
value = algolia_api_key.this | ||
sensitive = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
variable "api_keys" { | ||
type = map(object({ | ||
description = string, | ||
acl = set(string) | ||
})) | ||
default = {} | ||
description = "Map of API Keys" | ||
validation { | ||
condition = alltrue(flatten([for key in var.api_keys : [for p in key.acl : contains(["search", "browse", "addObject", "deleteObject", "listIndexes", "deleteIndex", "settings", "analytics", "recommendation", "usage", "nluReadAnswers", "logs", "seeUnretrievableAttributes"], p)]])) | ||
error_message = "Only the following permissions are allowed: search, browse, addObject, deleteObject, listIndexes, deleteIndex, settings, analytics, recommendation, usage, nluReadAnswers, logs, seeUnretrievableAttributes" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
terraform { | ||
required_version = "~> 1.3" | ||
required_providers { | ||
algolia = { | ||
source = "k-yomo/algolia" | ||
version = "0.6.0" | ||
} | ||
} | ||
required_version = ">= 1.5" | ||
} |