-
Notifications
You must be signed in to change notification settings - Fork 0
Add Event routing account settings variation #48
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
Changes from 8 commits
aa0a7aa
c035e88
75749be
0de1b3a
bdbd83d
80534db
a64925b
b852656
043c06a
fe20a45
3168e77
8ddb8a8
767b2a1
a46ff55
c4d711f
cee2482
398d97c
812cb3c
b11f762
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Cloud automation for Cloud Monitoring (Event Routing Account Settings) | ||
|
|
||
| :exclamation: **Important:** This solution is not intended to be called by other modules because it contains a provider configuration and is not compatible with the `for_each`, `count`, and `depends_on` arguments. For more information, see [Providers Within Modules](https://developer.hashicorp.com/terraform/language/modules/develop/providers). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "ibmcloud_api_key": $VALIDATION_APIKEY", | ||
| "metadata_region_primary": "eu-de" | ||
arya-girish-k marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ####################################################################################################################### | ||
| # IBM Cloud Activity Tracker Event Routing | ||
| ####################################################################################################################### | ||
|
|
||
| module "account_routing_settings" { | ||
| source = "../.." | ||
|
|
||
| global_event_routing_settings = { | ||
| default_targets = var.default_targets | ||
| metadata_region_primary = var.metadata_region_primary | ||
| metadata_region_backup = var.metadata_region_backup | ||
| permitted_target_regions = var.permitted_target_regions | ||
| private_api_endpoint_only = var.private_api_endpoint_only | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ############################################################################## | ||
| # Outputs | ||
| ############################################################################## |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| provider "ibm" { | ||
| ibmcloud_api_key = var.ibmcloud_api_key | ||
| visibility = var.provider_visibility | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| ######################################################################################################################## | ||
| # Common variables | ||
| ######################################################################################################################## | ||
|
|
||
| variable "ibmcloud_api_key" { | ||
| type = string | ||
| description = "The IBM Cloud API key with access to configure Activity Tracker Event Routing account settings." | ||
| sensitive = true | ||
| } | ||
|
|
||
| variable "provider_visibility" { | ||
| description = "Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints)." | ||
| type = string | ||
| default = "private" | ||
|
|
||
| validation { | ||
| condition = contains(["public", "private", "public-and-private"], var.provider_visibility) | ||
| error_message = "Invalid visibility option. Allowed values are 'public', 'private', or 'public-and-private'." | ||
| } | ||
| } | ||
| ######################################################################################################################## | ||
| # IBM Cloud Activity Tracker Event Routing | ||
| ######################################################################################################################## | ||
|
|
||
| variable "default_targets" { | ||
| description = "Where activity events that are not explicitly managed in the account's routing rules are routed.You can define up to 2 default targets per account. Consider defining a second default target when you want to collect the data in a backup location." | ||
arya-girish-k marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| type = list(string) | ||
| default = [] | ||
| } | ||
|
|
||
| variable "metadata_region_primary" { | ||
arya-girish-k marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| description = "Storage location for target, route, and settings metadata in your IBM Cloud account. To store all configuration metadata in a single region, set this value explicitly. For new accounts, creating targets and routes will fail until `metadata_region_primary` is set. If set to `null`, no change is made to the current value." | ||
|
||
| type = string | ||
| default = null | ||
| } | ||
|
|
||
| variable "metadata_region_backup" { | ||
arya-girish-k marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| description = "You can also configure a backup location where the metadata is stored for recovery purposes. The `metadata_region_backup` can't be the same as `metadata_region_primary`." | ||
| type = string | ||
| default = null | ||
arya-girish-k marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| variable "permitted_target_regions" { | ||
| description = "Control where targets collecting audit events can be located. To allow targets in any region (i.e., No restrictions), configure this field as an empty list `[]`." | ||
| type = list(string) | ||
| default = [] | ||
| } | ||
|
|
||
| variable "private_api_endpoint_only" { | ||
| description = "Public endpoints can be disabled for managing Activity Tracker Event Routing configuration via the CLI or REST API. When public endpoints are disabled, the Activity Tracker Event Routing UI will be inaccessible." | ||
| type = bool | ||
| default = false | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| terraform { | ||
| required_version = ">= 1.9.0" | ||
| required_providers { | ||
| # Lock DA into an exact provider version - renovate automation will keep it updated | ||
| ibm = { | ||
| source = "ibm-cloud/ibm" | ||
| version = "1.80.4" | ||
| } | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.