-
Notifications
You must be signed in to change notification settings - Fork 1
CCM-16073 - Split clients infra into its own component #168
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
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9856bc9
CCM-16073 - Updated rate limiting behaviour
rhyscoxnhs 07410f7
CCM-16073 - Fixed perf runner permissions
rhyscoxnhs 6673cca
CCM-16073 - Updated rate limiting behaviour
rhyscoxnhs 9b0a511
CCM-16073 - Updated rate limiting behaviour
rhyscoxnhs be5d8bc
CCM-16073 - Updated rate limiting behaviour
rhyscoxnhs 5e671d0
CCM-16073 - Split clients infra into its own component
rhyscoxnhs 3d7a402
CCM-16073 - Fixed resource name lengths
rhyscoxnhs a2a519b
CCM-16073 - Fixed resource paths
rhyscoxnhs b743939
CCM-16073 - Fixed sqs permissions
rhyscoxnhs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
19 changes: 19 additions & 0 deletions
19
infrastructure/terraform/components/callbacks-clients/README.md
This file contains hidden or 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,19 @@ | ||
| <!-- BEGIN_TF_DOCS --> | ||
| <!-- markdownlint-disable --> | ||
| <!-- vale off --> | ||
|
|
||
| ## Requirements | ||
|
|
||
| No requirements. | ||
| ## Inputs | ||
|
|
||
| No inputs. | ||
| ## Modules | ||
|
|
||
| No modules. | ||
| ## Outputs | ||
|
|
||
| No outputs. | ||
| <!-- vale on --> | ||
| <!-- markdownlint-enable --> | ||
| <!-- END_TF_DOCS --> |
57 changes: 57 additions & 0 deletions
57
infrastructure/terraform/components/callbacks-clients/locals.tf
This file contains hidden or 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,57 @@ | ||
| locals { | ||
| aws_lambda_functions_dir_path = "../../../../lambdas" | ||
|
|
||
| clients_dir_path = "${path.module}/../../modules/clients" | ||
|
|
||
| config_clients = merge([ | ||
| for filename in fileset(local.clients_dir_path, "*.json") : { | ||
| (replace(filename, ".json", "")) = jsondecode(file("${local.clients_dir_path}/${filename}")) | ||
| } | ||
| ]...) | ||
|
|
||
| # When deploying mock clients, replace sentinel placeholder values with the mock webhook URL and API key. | ||
| # Only used for S3 object content — must not be used as a for_each source (contains apply-time values). | ||
| enriched_mock_config_clients = var.deploy_mock_clients ? { | ||
| for client_id, client in local.config_clients : | ||
| client_id => merge(client, { | ||
| targets = [ | ||
| for target in try(client.targets, []) : | ||
| merge(target, { | ||
| invocationEndpoint = "https://${local.callbacks.mock_webhook_alb_dns_name}/${target.targetId}" | ||
| apiKey = merge(target.apiKey, { headerValue = local.callbacks.mock_webhook_api_key }) | ||
| delivery = merge(try(target.delivery, {}), { | ||
| mtls = merge(try(target.delivery.mtls, {}), { | ||
| certPinning = merge(try(target.delivery.mtls.certPinning, {}), try(target.delivery.mtls.certPinning.enabled, false) ? { | ||
| spkiHash = local.callbacks.mock_server_spki_hash | ||
| } : {}) | ||
| }) | ||
| }) | ||
| }) | ||
| ] | ||
| }) | ||
| } : local.config_clients | ||
|
|
||
| client_subscriptions = { | ||
| for client_id, data in local.config_clients : | ||
| client_id => { | ||
| for subscription in try(data.subscriptions, []) : | ||
| subscription.subscriptionId => { | ||
| subscription_id = subscription.subscriptionId | ||
| target_ids = try(subscription.targetIds, []) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| client_subscription_targets = { | ||
| for client_id, data in local.config_clients : | ||
| client_id => merge([ | ||
| for subscription in try(data.subscriptions, []) : { | ||
| for target_id in try(subscription.targetIds, []) : | ||
| "${subscription.subscriptionId}-${target_id}" => { | ||
| subscription_id = subscription.subscriptionId | ||
| target_id = target_id | ||
| } | ||
| } | ||
| ]...) | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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
46 changes: 0 additions & 46 deletions
46
infrastructure/terraform/components/callbacks/module_client_delivery.tf
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was expecting this just to be changes not entirely new code?