generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 3
App config Gaps fixed - Config aggregator module added #204
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
13 commits
Select commit
Hold shift + click to select a range
794fc62
service config gap first step correction
RiadhJouini e7c2137
service config working with central account cspm aggregation
RiadhJouini 8a8a3d7
add repo appconfig module
RiadhJouini 4a9663a
corrected the appconfig crn output
RiadhJouini 59d700f
corrected the appconfig crn output in the root module
RiadhJouini 2b958db
output templateID generated correclty
RiadhJouini 91af9ba
corrected the enterprise_id issue
RiadhJouini c14aff8
trusted profile general correction
RiadhJouini bd88369
cleaning and adjusting
RiadhJouini abc6bdd
adjusting as per IBM standards
RiadhJouini 551a8df
added README.md
RiadhJouini 03b82d6
Update README.md
RiadhJouini 823d4c5
deleting the appconfig folder
RiadhJouini 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
|
|
||
| # Config Aggregator Submodule for IBM Cloud App Configuration | ||
|
|
||
| This submodule provisions an IBM Cloud Config Aggregator that collects and centralizes configuration data across an enterprise. It integrates with App Configuration and uses IBM IAM trusted profiles and templates to enable secure, scoped access to configuration insights across regions and accounts. | ||
|
|
||
| ## Purpose | ||
|
|
||
| The `config_aggregator` module is designed to set up a configuration aggregator for your App Configuration instance, scoped either to a single account or to an IBM Cloud Enterprise. It helps consolidate resources and enforce policies across a multi-account environment by leveraging IAM Trusted Profiles and Templates. | ||
|
|
||
| ## Use Case | ||
|
|
||
| Use this module when you want to: | ||
|
|
||
| - Enable centralized collection of resource metadata. | ||
| - Apply IAM templates and trusted profiles to configure access. | ||
| - Scope configuration insights to your enterprise. | ||
| - Automatically enable resource collection across all regions. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```hcl | ||
| module "config_aggregator" { | ||
| source = "../../modules/config_aggregator" | ||
|
|
||
| app_config_instance_guid = module.app_config.app_config_guid | ||
| region = var.region | ||
| enterprise_id = var.enterprise_id | ||
| general_trusted_profile_id = module.trusted_profiles.trusted_profile_app_config_general.profile_id | ||
| enterprise_trusted_profile_id = module.trusted_profiles.trusted_profile_app_config_enterprise.profile_id | ||
| trusted_profile_template_id = module.trusted_profiles.trusted_profile_template_id | ||
| } | ||
| ``` | ||
|
|
||
| ## Inputs | ||
|
|
||
| | Name | Description | Type | Required | | ||
| |------------------------------|-----------------------------------------------------------------------------|--------|----------| | ||
| | `app_config_instance_guid` | GUID of the IBM App Configuration instance | string | yes | | ||
| | `region` | IBM Cloud region where the App Config and aggregator are deployed | string | yes | | ||
| | `enterprise_id` | Enterprise ID used to scope the aggregator and profile templates | string | yes | | ||
| | `general_trusted_profile_id`| Trusted profile ID for general collection access | string | yes | | ||
| | `enterprise_trusted_profile_id` | Trusted profile ID used for enterprise-level scoped access | string | yes | | ||
| | `trusted_profile_template_id`| Template ID used to assign profiles to account groups | string | yes | | ||
|
|
||
| ## Outputs | ||
|
|
||
| None currently. | ||
|
|
||
| ## Resources Created | ||
|
|
||
| - `ibm_config_aggregator_settings` — The main resource that defines configuration aggregation settings. | ||
|
|
||
| ## Behavior | ||
|
|
||
| This submodule enables the following behavior: | ||
|
|
||
| - **Resource collection** is enabled by default. | ||
| - **All regions** are included in the resource collection. | ||
| - **Enterprise scope** is configured through `additional_scope`, using the provided `enterprise_id`, `trusted_profile_template_id`, and `enterprise_trusted_profile_id`. | ||
|
|
||
| ## Related Documentation | ||
|
|
||
| - [IBM Cloud App Configuration Documentation](https://cloud.ibm.com/docs/app-configuration) | ||
| - [Terraform IBM Provider](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/resources/config_aggregator_settings) | ||
|
|
||
| ## Notes | ||
|
|
||
| - Ensure that the `trusted_profile_template_id` and both trusted profile IDs are correctly created and propagated before using this module. | ||
| - This submodule should be used as part of a larger stack that includes trusted profile and App Configuration provisioning. | ||
|
|
||
| --- | ||
|
|
||
| © IBM Corporation 2024 |
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 @@ | ||
|
|
||
| resource "ibm_config_aggregator_settings" "scc_wp_aggregator" { | ||
| instance_id = var.app_config_instance_guid | ||
| region = var.region | ||
| resource_collection_enabled = true | ||
| resource_collection_regions = ["all"] | ||
| trusted_profile_id = var.general_trusted_profile_id | ||
|
|
||
| additional_scope { | ||
| type = "Enterprise" | ||
| enterprise_id = var.enterprise_id | ||
|
|
||
| profile_template { | ||
| id = var.trusted_profile_template_id | ||
| trusted_profile_id = var.enterprise_trusted_profile_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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| output "config_aggregator_instance_id" { | ||
| description = "App Config instance ID used for aggregation" | ||
| value = var.app_config_instance_guid | ||
| } | ||
| output "scc_wp_config_aggregator_id" { | ||
| description = "ID of the SCC-WP Config Aggregator" | ||
| value = ibm_config_aggregator_settings.scc_wp_aggregator.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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| variable "app_config_instance_guid" { | ||
| type = string | ||
| description = "GUID of the App Configuration instance" | ||
| } | ||
|
|
||
| variable "region" { | ||
| type = string | ||
| description = "Region where the Config Aggregator will be deployed" | ||
| } | ||
|
|
||
| variable "enterprise_id" { | ||
| type = string | ||
| description = "Enterprise ID to scope the Config Aggregator" | ||
| } | ||
|
|
||
| variable "trusted_profile_template_id" { | ||
| type = string | ||
| description = "Trusted Profile Template ID used for additional scope" | ||
| } | ||
|
|
||
| variable "enterprise_trusted_profile_id" { | ||
| type = string | ||
| description = "Trusted Profile ID used to authorize resource collection scoping" | ||
| } | ||
|
|
||
| variable "general_trusted_profile_id" { | ||
| type = string | ||
| description = "Trusted Profile ID used to authorize resource collection" | ||
| } |
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,9 @@ | ||
| terraform { | ||
| required_providers { | ||
| ibm = { | ||
| source = "ibm-cloud/ibm" | ||
| version = ">= 1.65.0, < 2.0.0" | ||
| } | ||
| } | ||
| } | ||
|
|
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
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.
Uh oh!
There was an error while loading. Please reload this page.