From 03a8a265df7c6d777d99c594ee36d770b13df4b5 Mon Sep 17 00:00:00 2001 From: umarali-nagoor Date: Wed, 5 Jan 2022 16:48:20 +0530 Subject: [PATCH] Input variables Naming convention --- .github/workflows/test.yml | 1 + .pre-commit-config.yaml | 6 +- .secrets.baseline | 4 +- README.md | 196 +++++++++--------- .../activity-tracker-atr-instance/README.md | 3 +- .../activity-tracker-atr-instance/main.tf | 30 +-- .../variables.tf | 9 +- .../activity-tracker-ats-instance/README.md | 6 +- .../activity-tracker-ats-instance/main.tf | 70 +++---- .../variables.tf | 56 ++--- .../logging-logdna-hippa-instance/README.md | 8 +- .../logging-logdna-hippa-instance/main.tf | 32 +-- .../variables.tf | 10 +- examples/logging-str-instance/README.md | 9 +- examples/logging-str-instance/main.tf | 32 +-- examples/logging-str-instance/variables.tf | 8 +- examples/logging-sts-instance/README.md | 5 +- examples/logging-sts-instance/main.tf | 36 ++-- examples/logging-sts-instance/variables.tf | 12 +- examples/monitoring-instance/README.md | 5 +- examples/monitoring-instance/main.tf | 30 +-- examples/monitoring-instance/variables.tf | 10 +- examples/obervability-complete/main.tf | 91 -------- .../README.md | 0 .../input.tfvars | 0 examples/observability-complete/main.tf | 92 ++++++++ .../variables.tf | 102 ++++----- .../versions.tf | 0 main.tf | 154 +++++++------- metadata.yaml | 146 ++++++------- modules/activity-tracker-instance/main.tf | 24 +-- modules/activity-tracker-instance/output.tf | 14 +- .../activity-tracker-instance/variables.tf | 10 +- modules/logging-instance/README.md | 16 +- modules/logging-instance/main.tf | 22 +- modules/logging-instance/output.tf | 14 +- modules/logging-instance/variables.tf | 8 +- modules/monitoring-sysdig/README.md | 5 +- modules/monitoring-sysdig/main.tf | 14 +- modules/monitoring-sysdig/output.tf | 16 +- modules/monitoring-sysdig/variables.tf | 8 +- output.tf | 74 +++---- test/ob_e2e_test.go | 2 +- variables.tf | 94 +++++---- 44 files changed, 757 insertions(+), 727 deletions(-) delete mode 100644 examples/obervability-complete/main.tf rename examples/{obervability-complete => observability-complete}/README.md (100%) rename examples/{obervability-complete => observability-complete}/input.tfvars (100%) create mode 100644 examples/observability-complete/main.tf rename examples/{obervability-complete => observability-complete}/variables.tf (82%) rename examples/{obervability-complete => observability-complete}/versions.tf (100%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c13360b..db3d212 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,5 +53,6 @@ jobs: status: ${{ job.status }} author_name: Integration Test # default: 8398a7@action-slack env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # optional SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required if: always() # Pick up events even if the job fails or is canceled. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 54431c3..ee8eaf1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,11 +6,11 @@ default_stages: [commit] # Terraform Validate : Validates the configuration files in a directory, referring only to the configuration and not accessing any remote services such as remote state, provider APIs, etc repos: - repo: git://github.com/antonbabenko/pre-commit-terraform - rev: v1.45.0 + rev: v1.62.3 hooks: - id: terraform_fmt - repo: git://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v4.1.0 hooks: - id: check-merge-conflict - id: trailing-whitespace @@ -20,7 +20,7 @@ repos: # You are encouraged to use static refs such as tags, instead of branch name # # Running "pre-commit autoupdate" would automatically updates rev to latest tag - rev: 0.13.1+ibm.46.dss + rev: 0.13.1+ibm.47.dss hooks: - id: detect-secrets # pragma: whitelist secret # Add options for detect-secrets-hook binary. You can run `detect-secrets-hook --help` to list out all possible options. diff --git a/.secrets.baseline b/.secrets.baseline index 4fc59f0..7f6e25c 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "^.secrets.baseline$", "lines": null }, - "generated_at": "2021-10-20T11:29:50Z", + "generated_at": "2022-01-05T11:20:40Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -77,7 +77,7 @@ } ], "results": {}, - "version": "0.13.1+ibm.46.dss", + "version": "0.13.1+ibm.47.dss", "word_list": { "file": null, "hash": null diff --git a/README.md b/README.md index bfc51ba..946c6b6 100644 --- a/README.md +++ b/README.md @@ -36,19 +36,19 @@ The following diagram illustrates the deployment architecture used by this autom ## Provision ATS activity tracker instance by creating logging STS insatnce ``` - ats_provision = true + is_provision_supertenant_activity_tracker = true ats_service_supertenant = - ats_provision_key = - ats_associated_logging_crn = + supertenant_activity_tracker_provision_key = + supertenant_activity_tracker_associated_logging_crn = ``` ## Provision ATS instance with existing logging STS instance CRN then configure ``` - ats_provision = true + is_provision_supertenant_activity_tracker = true ats_service_supertenant = - ats_provision_key = - use_existing_sts_crn = true + supertenant_activity_tracker_provision_key = + is_attach_existing_supertenant_logging_crn = true ``` ## Provision Logging STR instance @@ -58,9 +58,9 @@ The following diagram illustrates the deployment architecture used by this autom ``` ## Provision Logging STS instance ``` - sts_provision = true + is_provision_supertenant_logging = true sts_service_supertenant = - sts_provision_key = + supertenant_logging_provision_key = ``` ## Monitoring @@ -68,7 +68,7 @@ The following diagram illustrates the deployment architecture used by this autom To provision monitoring instance ``` -`monitoring_provision` = true +`is_provision_monitoring` = true ``` ## Example Usage @@ -80,6 +80,11 @@ To provision monitoring instance ```hcl +##################################################### +# Observability +# Copyright 2020 IBM +##################################################### + provider "ibm" { } @@ -93,81 +98,84 @@ module "observability" { ################# Logging Super Tenant Receiver (STR) instance ####################### - str_provision = var.str_provision - str_logging_bind_key = var.str_logging_bind_key - str_logging_plan = var.str_logging_plan - str_logging_region = var.str_logging_region - str_logging_service_endpoints = var.str_logging_service_endpoints - str_logging_tags = var.str_logging_tags - str_logging_key_name = var.str_logging_key_name - str_logging_key_tags = var.str_logging_key_tags + is_provision_logging = var.is_provision_logging + is_bind_key_to_logging = var.is_bind_key_to_logging + enable_platform_logs = var.enable_platform_logs + logging_plan = var.logging_plan + logging_region = var.logging_region + logging_visbility = var.logging_visbility + logging_tags = var.logging_tags + logging_key_name = var.logging_key_name + logging_key_tags = var.logging_key_tags ################## Logging Super Tenant Sender (STS) Instance ######################## //STS - sts_provision = var.sts_provision - sts_service_supertenant = var.sts_service_supertenant - sts_provision_key = var.sts_provision_key + is_provision_supertenant_logging = var.is_provision_supertenant_logging + sts_service_supertenant = var.sts_service_supertenant + supertenant_logging_provision_key = var.supertenant_logging_provision_key //Logging - sts_logging_bind_key = var.sts_logging_bind_key - sts_logging_plan = var.sts_logging_plan - sts_logging_region = var.sts_logging_region - sts_logging_service_endpoints = var.sts_logging_service_endpoints - sts_logging_tags = var.sts_logging_tags - sts_logging_key_name = var.sts_logging_key_name - sts_logging_key_tags = var.sts_logging_key_tags + is_bind_key_to_supertenant_logging = var.is_bind_key_to_supertenant_logging + supertenant_logging_plan = var.supertenant_logging_plan + supertenant_logging_region = var.supertenant_logging_region + supertenant_logging_visibility = var.supertenant_logging_visibility + supertenant_logging_tags = var.supertenant_logging_tags + supertenant_logging_key_name = var.supertenant_logging_key_name + supertenant_logging_key_tags = var.supertenant_logging_key_tags ################# Activity Tracker ATR instance ########## - atr_provision = var.atr_provision - atr_plan = var.atr_plan - atr_region = var.atr_region - atr_bind_key = var.atr_bind_key - atr_key_name = var.atr_key_name - atr_key_tags = var.atr_key_tags - atr_tags = var.atr_tags + is_provision_activity_tracker = var.is_provision_activity_tracker + activity_tracker_plan = var.activity_tracker_plan + activity_tracker_region = var.activity_tracker_region + is_bind_key_to_activity_tracker = var.is_bind_key_to_activity_tracker + is_activity_tracker_the_default_receiver = var.is_activity_tracker_the_default_receiver + activity_tracker_key_name = var.activity_tracker_key_name + activity_tracker_key_tags = var.activity_tracker_key_tags + activity_tracker_tags = var.activity_tracker_tags ################# Activity Tracker ATS instance ########## //ATS - ats_provision = var.ats_provision - ats_service_supertenant = var.ats_service_supertenant - ats_provision_key = var.ats_provision_key - ats_associated_logging_crn = var.ats_associated_logging_crn - use_existing_sts_crn = var.use_existing_sts_crn + is_provision_supertenant_activity_tracker = var.is_provision_supertenant_activity_tracker + supertenant_activity_tracker_name = var.supertenant_activity_tracker_name + supertenant_activity_tracker_provision_key = var.supertenant_activity_tracker_provision_key + is_attach_existing_supertenant_logging_crn = var.is_attach_existing_supertenant_logging_crn //Activity tracker - ats_plan = var.ats_plan - ats_region = var.ats_region - ats_bind_key = var.ats_bind_key - ats_key_name = var.ats_key_name - ats_key_tags = var.ats_key_tags - ats_tags = var.ats_tags + supertenant_activity_tracker_plan = var.supertenant_activity_tracker_plan + supertenant_activity_tracker_region = var.supertenant_activity_tracker_region + is_bind_key_to_supertenant_activity_tracker = var.is_bind_key_to_supertenant_activity_tracker + supertenant_activity_tracker_key_name = var.supertenant_activity_tracker_key_name + supertenant_activity_tracker_key_tags = var.supertenant_activity_tracker_key_tags + supertenant_activity_tracker_tags = var.supertenant_activity_tracker_tags ################# Monitoring ############################ - monitoring_provision = var.monitoring_provision - monitoring_bind_key = var.monitoring_bind_key + is_provision_monitoring = var.is_provision_monitoring + is_bind_key_to_monitoring = var.is_bind_key_to_monitoring monitoring_name = var.monitoring_name monitoring_plan = var.monitoring_plan monitoring_region = var.monitoring_region - monitoring_service_endpoints = var.monitoring_service_endpoints - monitoring_enable_platform_metrics = var.monitoring_enable_platform_metrics + monitoring_visibility = var.monitoring_visibility + is_enable_platform_metrics = var.is_enable_platform_metrics monitoring_tags = var.monitoring_tags monitoring_key_name = var.monitoring_key_name monitoring_key_tags = var.monitoring_key_tags ################ Generic Parameters ###################### - logging_name = var.logging_name // common for STS and STR + logging_name = var.logging_name // common for STS and STR activity_tracker_name = var.activity_tracker_name //common for ATS and ATR - resource_group_id = data.ibm_resource_group.rg.id - create_timeout = var.create_timeout - update_timeout = var.update_timeout - delete_timeout = var.delete_timeout + resource_group_id = data.ibm_resource_group.rg.id + create_timeout = var.create_timeout + update_timeout = var.update_timeout + delete_timeout = var.delete_timeout } + + ``` @@ -176,76 +184,76 @@ module "observability" { | Name | Description | Type | Default | Required | |---------------------------|------------------------------------------------------------------|:-------------|:------- |:---------| -| atr_provision | Set this to true to provion Activity tracker ATR instance | bool | true | yes | +| is_provision_activity_tracker | Set this to true to provion Activity tracker ATR instance | bool | true | yes | | activity_tracker_name | Name of the activity tracker instance | string | true | yes | -| atr_plan | Plan type | string | n/a | yes | -| atr_region | Location to create the activity tracker instance. | string | n/a | yes | -| atr_bind_key | Indicating that key should be bind to activity tracker instance | bool | false | no | -| atr_key_name | Name used to identify activity tracker resource key | string | empty | no | -| atr_tags | Tags that should be applied to the activity tracker | list(string) | n/a | no | -| atr_key_tags | Tags that should be applied to the activity tracker key | list(string) | n/a | no | -| atr_make_default_receiver | Enable this to make this instance as default receiver | bool | true | no | +| activity_tracker_plan | Plan type | string | n/a | yes | +| activity_tracker_region | Location to create the activity tracker instance. | string | n/a | yes | +| is_bind_key_to_activity_tracker | Indicating that key should be bind to activity tracker instance | bool | false | no | +| activity_tracker_key_name | Name used to identify activity tracker resource key | string | empty | no | +| activity_tracker_tags | Tags that should be applied to the activity tracker | list(string) | n/a | no | +| activity_tracker_key_tags | Tags that should be applied to the activity tracker key | list(string) | n/a | no | +| is_activity_tracker_the_default_receiver | Enable this to make this instance as default receiver | bool | true | no | ## Activity Tracker ATS Inputs | Name | Description | Type | Default | Required | |---------------------------|------------------------------------------------------------------|:-------------|:------- |:---------| -| ats_provision | Set this to true to provion Activity tracker ATS instance | bool | true | no | -| ats_service_supertenant | Name of service supertenant | string | Empty | no | -| ats_provision_key | Service Provision key | string | Empty | no | -| use_existing_sts_crn | Make true to use existing logging STS crn to attach to ATS instance| string | Empty | no | -| ats_associated_logging_crn| CRN of STS logging instance | string | Empty | no | -| activity_tracker_name | Used as prefix to observability instances | string | n/a | yes | -| ats_plan | Plan type | string | n/a | yes | -| ats_region | Location to create the activity tracker instance. | string | n/a | yes | +| is_provision_supertenant_activity_tracker | Set this to true to provion Activity tracker ATS instance | bool | true | no | +| supertenant_activity_tracker_name | Name of service supertenant | string | Empty | no | +| supertenant_activity_tracker_provision_key | Service Provision key | string | Empty | no | +| is_attach_existing_supertenant_logging_crn | Make true to use existing logging STS crn to attach to ATS instance| string | Empty | no | +| supertenant_activity_tracker_associated_logging_crn| CRN of STS logging instance | string | Empty | no | +| supertenant_activity_tracker_name | Used as prefix to observability instances | string | n/a | yes | +| supertenant_activity_tracker_plan | Plan type | string | n/a | yes | +| supertenant_activity_tracker_region | Location to create the activity tracker instance. | string | n/a | yes | | resource_group_id | ID of the resource group | string | n/a | yes | -| ats_bind_key | Indicating that instance key should be bind to activity tracker | bool | false | no | -|ats_key_name | Name used to identify activity tracker resource key | string | empty | no | -| ats_tags | Tags that should be applied to the activity tracker | list(string) | n/a | no | -|ats_key_tags | Tags that should be applied to the activity tracker key | list(string) | n/a | no | +| is_bind_key_to_supertenant_activity_tracker | Indicating that instance key should be bind to activity tracker | bool | false | no | +|supertenant_activity_tracker_key_name | Name used to identify activity tracker resource key | string | empty | no | +| supertenant_activity_tracker_tags | Tags that should be applied to the activity tracker | list(string) | n/a | no | +|supertenant_activity_tracker_key_tags | Tags that should be applied to the activity tracker key | list(string) | n/a | no | ## Logging STR Inputs | Name | Description | Type | Default | Required | |---------------------------|------------------------------------------------------------------|:-------------|:------- |:---------| -| str_provision | Set this to true to provion logging STR instance | bool | true | no | +| is_provision_logging | Set this to true to provion logging STR instance | bool | true | no | | logging_name | Name of the logging instance | string | n/a | yes | -| str_logging_plan | The name of the plan type supported by logdna. | string | n/a | yes | -| str_logging_region | Location to create the logdna instance. | string | n/a | yes | -| str_logging_bind_key | Indicating that instance key should be bind to logdna | bool | false | no | -| str_logging_service_endpoints| Type of service endpoint | string | n/a | no | -| str_logging_key_name | Name used to identify logdna resource key | string | empty | no | -| str_logging_tags | Tags that should be applied to the logdna | list(string) | n/a | no | -| str_logging_key_tags | Tags that should be applied to the logdna key | list(string) | n/a | no | +| logging_plan | The name of the plan type supported by logdna. | string | n/a | yes | +| logging_region | Location to create the logdna instance. | string | n/a | yes | +| is_bind_key_to_logging | Indicating that instance key should be bind to logdna | bool | false | no | +| logging_visbility| Type of service endpoint | string | n/a | no | +| logging_key_name | Name used to identify logdna resource key | string | empty | no | +| logging_tags | Tags that should be applied to the logdna | list(string) | n/a | no | +| logging_key_tags | Tags that should be applied to the logdna key | list(string) | n/a | no | | enable_platform_logs | Enable this to make this instace as default receiver | bool | true | no | ## Logging STS Inputs | Name | Description | Type | Default | Required | |-------------------------------|------------------------------------------------------------------|:-------------|:------- |:---------| -| sts_provision | Set this to true to provion logging STS instance | bool | false | no | +| is_provision_supertenant_logging | Set this to true to provion logging STS instance | bool | false | no | | sts_service_supertenant | Name of service supertenant | string | Empty | no | -| sts_provision_key | Service Provision key | string | Empty | no | +| supertenant_logging_provision_key | Service Provision key | string | Empty | no | | logging_name | Name of the logging instance | string | n/a | yes | -| sts_logging_plan | The name of the plan type supported by logdna. | string | n/a | yes | -| sts_logging_region | Location to create the logdna instance. | string | n/a | yes | -| sts_logging_bind_key | Indicating that instance key should be bind to logdna | bool | false | no | -| sts_logging_service_endpoints | Type of service endpoint | string | n/a | no | -| sts_logging_key_name | Name used to identify logdna resource key | string | empty | no | +| supertenant_logging_plan | The name of the plan type supported by logdna. | string | n/a | yes | +| supertenant_logging_region | Location to create the logdna instance. | string | n/a | yes | +| is_bind_key_to_supertenant_logging | Indicating that instance key should be bind to logdna | bool | false | no | +| supertenant_logging_visibility | Type of service endpoint | string | n/a | no | +| supertenant_logging_key_name | Name used to identify logdna resource key | string | empty | no | | sts_logging_role | Name of the user role for logdna key. | string | empty | no | -| sts_logging_tags | Tags that should be applied to the logdna | list(string) | n/a | no | -| sts_logging_key_tags | Tags that should be applied to the logdna key | list(string) | n/a | no | +| supertenant_logging_tags | Tags that should be applied to the logdna | list(string) | n/a | no | +| supertenant_logging_key_tags | Tags that should be applied to the logdna key | list(string) | n/a | no | ## Monitoring Inputs | Name | Description | Type | Default | Required | |---------------------------|------------------------------------------------------------------|:-------------|:------- |:---------| -| monitoring_provision | Set this to true to provion monitoring instance | bool | true | no | -| name | Used as prefix to observability instances | string | n/a | yes | +| is_provision_monitoring | Set this to true to provion monitoring instance | bool | true | no | +| monitoring_name | Used as prefix to observability instances | string | n/a | yes | | monitoring_plan | The name of the plan type supported by sysdig. | string | n/a | yes | | monitoring_region | Location to create the sysdig instance. | string | n/a | yes | -| monitoring_bind_key | Indicating that instance key should be bind to sysdig | bool | false | no | +| is_bind_key_to_monitoring | Indicating that instance key should be bind to sysdig | bool | false | no | | monitoring_key_name | Name used to identify sysdig resource key | string | empty | no | | monitoring_tags | Tags that should be applied to the sysdig | list(string) | n/a | no | | monitoring_key_tags | Tags that should be applied to the sysdig key | list(string) | n/a | no | diff --git a/examples/activity-tracker-atr-instance/README.md b/examples/activity-tracker-atr-instance/README.md index 3cead90..4b05c9f 100644 --- a/examples/activity-tracker-atr-instance/README.md +++ b/examples/activity-tracker-atr-instance/README.md @@ -48,6 +48,7 @@ module "activity_tracker_instance" { | Name | Description | Type | Default | Required | |----------------------|------------------------------------------------------------------|:-------------|---------|----------| | name | Name of the service | string | n/a | yes | +| is_provision_activity_tracker | Disable this to read the existing activity tracker instance | bool | true | no | | plan | Type of plan the service instance should run under | string | n/a | yes | | region | Location of the resource | string | n/a | yes | | tags | Tags that should be applied to the service | list(string) | n/a | no | @@ -55,7 +56,7 @@ module "activity_tracker_instance" { | create_timeout | Timeout duration for create | string | n/a | no | | update_timeout | Timeout duration for update | string | n/a | no | | delete_timeout | Timeout duration for delete | string | n/a | no | -| bind_key | Set this to attach key to instance | bool | false | no | +| is_bind_key | Set this to attach key to instance | bool | false | no | | key_name | Name of the key | string | n/a | no | | key_tags | Tags that should be applied to the key | list(string) | n/a | no | diff --git a/examples/activity-tracker-atr-instance/main.tf b/examples/activity-tracker-atr-instance/main.tf index 9570987..8736597 100644 --- a/examples/activity-tracker-atr-instance/main.tf +++ b/examples/activity-tracker-atr-instance/main.tf @@ -16,20 +16,20 @@ data "ibm_resource_group" "res_group" { module "activity_tracker_instance" { - source = "./../../modules/activity-tracker-instance" - provision = var.provision - is_ats_instance = false - name = var.name - plan = var.plan - region = var.region - bind_key = var.bind_key - key_name = var.key_name - key_tags = var.key_tags - resource_group_id = data.ibm_resource_group.res_group.id - tags = var.tags - make_default_receiver = var.make_default_receiver - create_timeout = var.create_timeout - update_timeout = var.update_timeout - delete_timeout = var.delete_timeout + source = "./../../modules/activity-tracker-instance" + is_provision_activity_tracker = var.is_provision_activity_tracker + is_supertenant_activity_tracker = false + name = var.name + plan = var.plan + region = var.region + is_bind_key = var.is_bind_key + key_name = var.key_name + key_tags = var.key_tags + resource_group_id = data.ibm_resource_group.res_group.id + tags = var.tags + is_activity_tracker_the_default_receiver = var.is_activity_tracker_the_default_receiver + create_timeout = var.create_timeout + update_timeout = var.update_timeout + delete_timeout = var.delete_timeout } diff --git a/examples/activity-tracker-atr-instance/variables.tf b/examples/activity-tracker-atr-instance/variables.tf index 80fee78..a1bc80f 100644 --- a/examples/activity-tracker-atr-instance/variables.tf +++ b/examples/activity-tracker-atr-instance/variables.tf @@ -14,14 +14,13 @@ variable "plan" { default = "7-day" } -variable "make_default_receiver" { +variable "is_activity_tracker_the_default_receiver" { type = bool - description = "Enable this to make this instance as default receiver" + description = "Enable this to make this instance a sdefault receiver" default = true } - -variable "provision" { +variable "is_provision_activity_tracker" { type = bool description = "Disable this to read the existing activity tracker instance" default = true @@ -62,7 +61,7 @@ variable "tags" { default = null } -variable "bind_key" { +variable "is_bind_key" { description = "Enable this to bind key to instance (true/false)" type = bool default = false diff --git a/examples/activity-tracker-ats-instance/README.md b/examples/activity-tracker-ats-instance/README.md index 7710785..ea29054 100644 --- a/examples/activity-tracker-ats-instance/README.md +++ b/examples/activity-tracker-ats-instance/README.md @@ -52,7 +52,7 @@ data "ibm_resource_group" "res_group" { module "logging_sts_instance" { //Uncomment the following line to point the source to registry level //source = "terraform-ibm-modules/observability/ibm//modules/logging-logdna" - count = (var.is_ats_instance && var.use_existing_sts_crn == false) ? 1 : 0 + count = (var.is_supertenant_activity_tracker && var.use_existing_sts_crn == false) ? 1 : 0 source = "./../../modules/logging-instance" provision = var.sts_provision is_sts_instance = true //logging sts is required only if ATS instance is provisioned @@ -81,7 +81,7 @@ module "activity_tracker_ats_instance" { //source = "terraform-ibm-modules/observability/ibm//modules/activity-tracker-logdna" source = "./../../modules/activity-tracker-instance" - provision = var.ats_provision + provision = var.is_supertenant_activity_tracker is_ats_instance = var.is_ats_instance name = var.ats_name plan = var.ats_plan @@ -106,7 +106,7 @@ module "activity_tracker_ats_instance" { | Name | Description | Type | Default | Required | |---------------------------|------------------------------------------------------------------|:-------------|:------- |:---------| -| is_ats_instance | Set this to true to provision Activity tracker ATS instance | bool | false | no | +| is_supertenant_activity_tracker | Set this to true to provision Activity tracker ATS instance | bool | false | no | | use_existing_sts_crn | Set this to true to use existing logging STS crn | string | Empty | no | | ats_service_supertenant | Name of service supertenant | string | Empty | no | | ats_provision_key | Service provision key | string | Empty | no | diff --git a/examples/activity-tracker-ats-instance/main.tf b/examples/activity-tracker-ats-instance/main.tf index befc876..12f6b5a 100644 --- a/examples/activity-tracker-ats-instance/main.tf +++ b/examples/activity-tracker-ats-instance/main.tf @@ -17,24 +17,24 @@ data "ibm_resource_group" "res_group" { module "logging_sts_instance" { //Uncomment the following line to point the source to registry level //source = "terraform-ibm-modules/observability/ibm//modules/logging-logdna" - count = (var.is_ats_instance && var.use_existing_sts_crn == false) ? 1 : 0 - source = "./../../modules/logging-instance" - provision = var.sts_provision - is_sts_instance = true //logging sts is required only if ATS instance is provisioned - bind_key = var.sts_bind_key - name = var.sts_name - resource_group_id = data.ibm_resource_group.res_group.id - plan = var.sts_plan - region = var.sts_region - service_endpoints = var.sts_service_endpoints - service_supertenant = var.sts_service_supertenant - provision_key = var.sts_provision_key - tags = var.sts_tags - create_timeout = var.create_timeout - update_timeout = var.update_timeout - delete_timeout = var.delete_timeout - key_name = var.sts_key_name - key_tags = var.sts_key_tags + count = (var.is_supertenant_activity_tracker && var.is_attach_existing_supertenant_logging_crn == false) ? 1 : 0 + source = "./../../modules/logging-instance" + is_provision_logging = var.is_provision_logging + is_supertenant_logging = true //logging sts is required only if ATS instance is provisioned + is_bind_key = var.is_bind_key_to_logging_instance + name = var.logging_name + resource_group_id = data.ibm_resource_group.res_group.id + plan = var.logging_plan + region = var.logging_region + visibility = var.logging_visibility + service_supertenant = var.logging_service_supertenant + provision_key = var.logging_provision_key + tags = var.logging_tags + create_timeout = var.create_timeout + update_timeout = var.update_timeout + delete_timeout = var.delete_timeout + key_name = var.logging_key_name + key_tags = var.logging_key_tags } ################################################################### @@ -43,21 +43,21 @@ module "logging_sts_instance" { module "activity_tracker_ats_instance" { - source = "./../../modules/activity-tracker-instance" - provision = var.ats_provision - is_ats_instance = true - name = var.ats_name - plan = var.ats_plan - region = var.ats_region - bind_key = var.ats_bind_key - key_name = var.ats_key_name - key_tags = var.ats_key_tags - resource_group_id = data.ibm_resource_group.res_group.id - service_supertenant = var.ats_service_supertenant - associated_logging_crn = var.is_ats_instance ? (var.use_existing_sts_crn ? var.ats_associated_logging_crn : module.logging_sts_instance[0].id) : "" - provision_key = var.ats_provision_key - tags = var.ats_tags - create_timeout = var.create_timeout - update_timeout = var.update_timeout - delete_timeout = var.delete_timeout + source = "./../../modules/activity-tracker-instance" + is_provision_activity_tracker = var.is_provision_activity_tracker + is_supertenant_activity_tracker = true + name = var.supertenant_activity_tracker_name + plan = var.supertenant_activity_tracker_plan + region = var.supertenant_activity_tracker_region + is_bind_key = var.is_bind_key_to_supertenant_activity_tracker + key_name = var.supertenant_activity_tracker_key_name + key_tags = var.supertenant_activity_tracker_key_tags + resource_group_id = data.ibm_resource_group.res_group.id + service_supertenant = var.ats_service_supertenant + associated_logging_crn = var.is_supertenant_activity_tracker ? (var.is_attach_existing_supertenant_logging_crn ? var.supertenant_activity_tracker_associated_logging_crn : module.logging_sts_instance[0].id) : "" + provision_key = var.supertenant_activity_tracker_provision_key + tags = var.supertenant_activity_tracker_tags + create_timeout = var.create_timeout + update_timeout = var.update_timeout + delete_timeout = var.delete_timeout } diff --git a/examples/activity-tracker-ats-instance/variables.tf b/examples/activity-tracker-ats-instance/variables.tf index 47f46cd..337c74b 100644 --- a/examples/activity-tracker-ats-instance/variables.tf +++ b/examples/activity-tracker-ats-instance/variables.tf @@ -3,7 +3,7 @@ # Copyright 2020 IBM ##################################################### -variable "ats_provision" { +variable "is_provision_activity_tracker" { type = bool description = "Disable this to read the existing activity tracker instance" default = true @@ -17,25 +17,19 @@ variable "ats_service_supertenant" { default = "" //provide valid values here } -variable "ats_provision_key" { +variable "supertenant_activity_tracker_provision_key" { type = string description = "ATS: activity_tracker Provision key" default = "" //provide valid values here } -variable "ats_associated_logging_crn" { - type = string - description = "Logging: Enter the associated logging crn" - default = "" //provide valid value here -} - -variable "is_ats_instance" { +variable "is_supertenant_activity_tracker" { type = bool description = "Set this to provison ATS instance" default = true } -variable "use_existing_sts_crn" { +variable "is_attach_existing_supertenant_logging_crn" { type = bool description = "Enable this to attach existing logging STS instance to activity tracket ATS instance" default = false @@ -43,18 +37,18 @@ variable "use_existing_sts_crn" { ############# ATS specific parameters end #################### -variable "ats_name" { +variable "supertenant_activity_tracker_name" { type = string description = "Enter The name of the activity tracker ATS instance" } -variable "ats_plan" { +variable "supertenant_activity_tracker_plan" { type = string description = "The type of plan the service instance should run under (lite, 7-day, 14-day, or 30-day)" default = "7-day" } -variable "ats_region" { +variable "supertenant_activity_tracker_region" { type = string description = "Geographic location of the resource (e.g. us-south, us-east)" default = "us-south" @@ -78,25 +72,25 @@ variable "delete_timeout" { default = null } -variable "ats_tags" { +variable "supertenant_activity_tracker_tags" { type = list(string) description = "activity_tracker Tags that should be applied to the service" default = null } -variable "ats_bind_key" { +variable "is_bind_key_to_supertenant_activity_tracker" { description = "activity_tracker Enable this to bind key to instance (true/false)" type = bool default = false } -variable "ats_key_name" { +variable "supertenant_activity_tracker_key_name" { description = "activity_tracker Name of the instance key" type = string default = null } -variable "ats_key_tags" { +variable "supertenant_activity_tracker_key_tags" { type = list(string) description = "Tags that should be applied to the key" default = null @@ -106,7 +100,7 @@ variable "ats_key_tags" { # Logging STS instance ############################################### -variable "sts_provision" { +variable "is_provision_logging" { type = bool description = "Disable this to read the existing activity tracker instance" default = true @@ -114,13 +108,19 @@ variable "sts_provision" { ############### STS Specific parameters start ################## -variable "sts_service_supertenant" { +variable "logging_service_supertenant" { type = string description = "Logging: Name of your supertenant service" default = "" //provide valid value here } -variable "sts_provision_key" { +variable "supertenant_activity_tracker_associated_logging_crn" { + type = string + description = "Logging: Enter the associated logging crn" + default = null //provide valid value here +} + +variable "logging_provision_key" { type = string description = "Logging: Provision key" default = "" //provide valid value here @@ -128,48 +128,48 @@ variable "sts_provision_key" { ############### STS Specific parameters end ##################### -variable "sts_bind_key" { +variable "is_bind_key_to_logging_instance" { description = "Flag indicating that key should be bind to logdna hippa instance" type = bool default = false } -variable "sts_name" { +variable "logging_name" { description = "Name of the STS instance" type = string } -variable "sts_plan" { +variable "logging_plan" { description = "plan type (14-day, 30-day, 7-day, hipaa-30-day and lite)" type = string default = "7-day" } -variable "sts_region" { +variable "logging_region" { description = "Provisioning Region" type = string default = "us-south" } -variable "sts_service_endpoints" { +variable "logging_visibility" { description = "Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." type = string default = null } -variable "sts_tags" { +variable "logging_tags" { type = list(string) description = "Tags that should be applied to the service" default = null } -variable "sts_key_tags" { +variable "logging_key_tags" { type = list(string) description = "Tags that should be applied to the key" default = null } -variable "sts_key_name" { +variable "logging_key_name" { description = "Name of the instance key" type = string default = null diff --git a/examples/logging-logdna-hippa-instance/README.md b/examples/logging-logdna-hippa-instance/README.md index b9733fe..e085717 100644 --- a/examples/logging-logdna-hippa-instance/README.md +++ b/examples/logging-logdna-hippa-instance/README.md @@ -16,8 +16,8 @@ module "logging_instance" { //source = "terraform-ibm-modules/observability/ibm//modules/logging-logdna" source = "./../../modules/logging-instance" - provision = var.provision - is_sts_instance = false + is_provision_logging = var.is_provision_logging + is_supertenant_logging = false bind_key = var.bind_key name = var.name resource_group_id = data.ibm_resource_group.logdna.id @@ -42,8 +42,10 @@ module "logging_instance" { | Name | Description | Type | Default | Required | |----------------------|------------------------------------------------------------------|:-------------|:------- |:---------| +| is_provision_logging | Disable this to read the existing logging instance | bool | true | no | +| is_supertenant_logging | Set this to provision (STS) logging instance | bool | false | no | | name | A descriptive name used to identify the resource instance | string | n/a | yes | -| bind_key | Indicating that instance key should be bind to logging instance | bool | n/a | no | +| is_bind_key | Indicating that instance key should be bind to logging instance | bool | n/a | no | | key_name | A descriptive name used to identify the resource key | string | n/a | yes | | plan | The name of the plan type supported by service. | string | n/a | yes | | region | Target location or environment to create the resource instance. | string | n/a | yes | diff --git a/examples/logging-logdna-hippa-instance/main.tf b/examples/logging-logdna-hippa-instance/main.tf index cb2ad99..83e145b 100644 --- a/examples/logging-logdna-hippa-instance/main.tf +++ b/examples/logging-logdna-hippa-instance/main.tf @@ -12,20 +12,20 @@ data "ibm_resource_group" "logdna" { module "logging_instance" { - source = "./../../modules/logging-instance" - provision = var.provision - is_sts_instance = false - bind_key = var.bind_key - name = var.name - resource_group_id = data.ibm_resource_group.logdna.id - plan = "hipaa-30-day" - region = var.region - service_endpoints = var.service_endpoints - enable_platform_logs = var.enable_platform_logs - tags = var.tags - create_timeout = var.create_timeout - update_timeout = var.update_timeout - delete_timeout = var.delete_timeout - key_name = var.key_name - key_tags = var.key_tags + source = "./../../modules/logging-instance" + is_provision_logging = var.is_provision_logging + is_supertenant_logging = false + is_bind_key = var.is_bind_key + name = var.name + resource_group_id = data.ibm_resource_group.logdna.id + plan = "hipaa-30-day" + region = var.region + visibility = var.visibility + enable_platform_logs = var.enable_platform_logs + tags = var.tags + create_timeout = var.create_timeout + update_timeout = var.update_timeout + delete_timeout = var.delete_timeout + key_name = var.key_name + key_tags = var.key_tags } \ No newline at end of file diff --git a/examples/logging-logdna-hippa-instance/variables.tf b/examples/logging-logdna-hippa-instance/variables.tf index 7bfdcfd..15669c0 100644 --- a/examples/logging-logdna-hippa-instance/variables.tf +++ b/examples/logging-logdna-hippa-instance/variables.tf @@ -3,19 +3,19 @@ # Copyright 2020 IBM ##################################################### -variable "provision" { +variable "is_provision_logging" { type = bool - description = "Disable this to read the existing activity tracker instance" + description = "Disable this to read the existing logging instance" default = true } -variable "bind_key" { +variable "is_bind_key" { description = "Flag indicating that key should be bind to logdna hippa instance" type = bool default = false } -variable "is_sts_instance" { +variable "is_supertenant_logging" { description = "Set this to provision (STS) logging instance" type = bool default = false @@ -62,7 +62,7 @@ variable "delete_timeout" { default = null } -variable "service_endpoints" { +variable "visibility" { description = "Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." type = string default = null diff --git a/examples/logging-str-instance/README.md b/examples/logging-str-instance/README.md index 3d60638..ab663a8 100644 --- a/examples/logging-str-instance/README.md +++ b/examples/logging-str-instance/README.md @@ -16,9 +16,9 @@ module "logging_instance" { //source = "terraform-ibm-modules/observability/ibm//modules/logging-logdna" source = "./../../modules/logging-instance" - provision = var.provision + is_provision_logging = var.is_provision_logging is_sts_instance = false - bind_key = var.bind_key + is_bind_key = var.is_bind_key name = var.name resource_group_id = data.ibm_resource_group.logdna.id plan = var.plan @@ -42,13 +42,14 @@ module "logging_instance" { | Name | Description | Type | Default | Required | |--------------------|------------------------------------------------------------------|:-------------|:------- |:---------| +| is_provision_logging | Disable this to read the existing logging instance | bool | true | no | | name | A descriptive name used to identify the resource instance | string | n/a | yes | -| bind_key | Indicating that instance key should be bind to logging instance | bool | n/a | no | +| is_bind_key | Indicating that instance key should be bind to logging instance | bool | n/a | no | | key\_name | A descriptive name used to identify the resource key | string | n/a | yes | | plan | The name of the plan type supported by service. | string | n/a | yes | | region | Target location or environment to create the resource instance. | string | n/a | yes | | resource\_group | Name of the resource group | string | n/a | yes | -| service\_endpoints | Possible values are 'public', 'private', 'public-and-private'. | string | n/a | no | +| visibility | Possible values are 'public', 'private', 'public-and-private'. | string | n/a | no | | tags | Tags that should be applied to the service | list(string) | n/a | no | | key_tags | Tags that should be applied to the resource key | list(string) | n/a | no | | create_timeout | Timeout duration for create | string | n/a | no | diff --git a/examples/logging-str-instance/main.tf b/examples/logging-str-instance/main.tf index 8869896..020f1a0 100644 --- a/examples/logging-str-instance/main.tf +++ b/examples/logging-str-instance/main.tf @@ -12,20 +12,20 @@ data "ibm_resource_group" "logdna" { module "logging_instance" { - source = "./../../modules/logging-instance" - provision = var.provision - is_sts_instance = false - bind_key = var.bind_key - name = var.name - resource_group_id = data.ibm_resource_group.logdna.id - plan = var.plan - region = var.region - service_endpoints = var.service_endpoints - enable_platform_logs = var.enable_platform_logs - tags = var.tags - create_timeout = var.create_timeout - update_timeout = var.update_timeout - delete_timeout = var.delete_timeout - key_name = var.key_name - key_tags = var.key_tags + source = "./../../modules/logging-instance" + is_provision_logging = var.is_provision_logging + is_supertenant_logging = false + is_bind_key = var.is_bind_key + name = var.name + resource_group_id = data.ibm_resource_group.logdna.id + plan = var.plan + region = var.region + visibility = var.visibility + enable_platform_logs = var.enable_platform_logs + tags = var.tags + create_timeout = var.create_timeout + update_timeout = var.update_timeout + delete_timeout = var.delete_timeout + key_name = var.key_name + key_tags = var.key_tags } \ No newline at end of file diff --git a/examples/logging-str-instance/variables.tf b/examples/logging-str-instance/variables.tf index 7673915..224e2f7 100644 --- a/examples/logging-str-instance/variables.tf +++ b/examples/logging-str-instance/variables.tf @@ -3,13 +3,13 @@ # Copyright 2020 IBM ##################################################### -variable "provision" { +variable "is_provision_logging" { type = bool - description = "Disable this to read the existing activity tracker instance" + description = "Disable this to read the existing logging instance" default = true } -variable "bind_key" { +variable "is_bind_key" { description = "Flag indicating that key should be bind to logdna hippa instance" type = bool default = false @@ -56,7 +56,7 @@ variable "delete_timeout" { default = null } -variable "service_endpoints" { +variable "visibility" { description = "Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." type = string default = null diff --git a/examples/logging-sts-instance/README.md b/examples/logging-sts-instance/README.md index a7becb3..ed3c7de 100644 --- a/examples/logging-sts-instance/README.md +++ b/examples/logging-sts-instance/README.md @@ -59,13 +59,14 @@ module "logging_sts_instance" { | Name | Description | Type | Default | Required | |--------------------|------------------------------------------------------------------|:-------------|:------- |:---------| | service\_name | A descriptive name used to identify the resource instance | string | n/a | yes | -| bind_key | Indicating that instance key should be bind to logdna instance | bool | n/a | no | +| is_provision_logging | Disable this to read the existing logging sts instance | bool | true | no | +| is_bind_key | Indicating that instance key should be bind to logdna instance | bool | n/a | no | | resource\_key\_name| A descriptive name used to identify the resource key | string | n/a | yes | | role | Name of the user role. | string | n/a | yes | | plan | The name of the plan type supported by service. | string | n/a | yes | | region | Target location or environment to create the resource instance. | string | n/a | yes | | resource\_group | Name of the resource group | string | n/a | yes | -| service\_endpoints | Possible values are 'public', 'private', 'public-and-private'. | string | n/a | no | +| visibility | Possible values are 'public', 'private', 'public-and-private'. | string | n/a | no | | tags | Tags that should be applied to the service | list(string) | n/a | no | | resource_key_tags | Tags that should be applied to the resource key | list(string) | n/a | no | | parameters | Arbitrary parameters to pass | map(string) | n/a | no | diff --git a/examples/logging-sts-instance/main.tf b/examples/logging-sts-instance/main.tf index 850f1b5..686b65f 100644 --- a/examples/logging-sts-instance/main.tf +++ b/examples/logging-sts-instance/main.tf @@ -12,22 +12,22 @@ data "ibm_resource_group" "logdna" { module "logging_sts_instance" { - source = "./../../modules/logging-instance" - provision = var.provision - is_sts_instance = true - bind_key = var.bind_key - name = var.name - resource_group_id = data.ibm_resource_group.logdna.id - plan = var.plan - region = var.region - service_endpoints = var.service_endpoints - service_supertenant = var.service_supertenant - provision_key = var.provision_key - enable_platform_logs = var.enable_platform_logs - tags = var.tags - create_timeout = var.create_timeout - update_timeout = var.update_timeout - delete_timeout = var.delete_timeout - key_name = var.key_name - key_tags = var.key_tags + source = "./../../modules/logging-instance" + is_provision_logging = var.is_provision_logging + is_supertenant_logging = true + is_bind_key = var.is_bind_key + name = var.name + resource_group_id = data.ibm_resource_group.logdna.id + plan = var.plan + region = var.region + visibility = var.visibility + service_supertenant = var.service_supertenant + provision_key = var.provision_key + enable_platform_logs = var.enable_platform_logs + tags = var.tags + create_timeout = var.create_timeout + update_timeout = var.update_timeout + delete_timeout = var.delete_timeout + key_name = var.key_name + key_tags = var.key_tags } \ No newline at end of file diff --git a/examples/logging-sts-instance/variables.tf b/examples/logging-sts-instance/variables.tf index 5ef89c8..bc42a55 100644 --- a/examples/logging-sts-instance/variables.tf +++ b/examples/logging-sts-instance/variables.tf @@ -3,19 +3,19 @@ # Copyright 2020 IBM ##################################################### -variable "provision" { +variable "is_provision_logging" { type = bool description = "Disable this to read the existing logging sts instance" default = true } -variable "bind_key" { +variable "is_bind_key" { description = "Flag indicating that key should be bind to logdna hippa instance" type = bool default = false } -variable "is_sts_instance" { +variable "is_supertenant_logging" { description = "Set this to provision (STS) logging instance" type = bool default = true @@ -46,8 +46,8 @@ variable "provision_key" { variable "enable_platform_logs" { type = bool - description = "Receive platform logs in LogDNA" - default = true + description = "Enable this to make it default receiver of logs" + default = false } variable "region" { @@ -74,7 +74,7 @@ variable "delete_timeout" { default = null } -variable "service_endpoints" { +variable "visibility" { description = "Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." type = string default = null diff --git a/examples/monitoring-instance/README.md b/examples/monitoring-instance/README.md index 7950424..9c9ba6b 100644 --- a/examples/monitoring-instance/README.md +++ b/examples/monitoring-instance/README.md @@ -41,13 +41,14 @@ module "monitoring_instance" { | Name | Description | Type | Default | Required | |--------------------|------------------------------------------------------------------|:-------------|:------- |:---------| | service\_name | A descriptive name used to identify the resource instance | string | n/a | yes | -| bind_resource_key | Indicating that instance key should be bind to logdna instance | bool | n/a | no | +| is_provision_monitoring | Disable this to read the existing activity tracker instance | bool | true | no | +| is_bind_key | Indicating that instance key should be bind to logdna instance | bool | n/a | no | | resource\_key\_name| A descriptive name used to identify the resource key | string | n/a | yes | | role | Name of the user role. | string | n/a | yes | | plan | The name of the plan type supported by service. | string | n/a | yes | | region | Target location or environment to create the resource instance. | string | n/a | yes | | resource\_group | Name of the resource group | string | n/a | yes | -| service\_endpoints | Possible values are 'public', 'private', 'public-and-private'. | string | n/a | no | +| visibility | Possible values are 'public', 'private', 'public-and-private'. | string | n/a | no | | tags | Tags that should be applied to the service | list(string) | n/a | no | | resource_key_tags | Tags that should be applied to the service key | list(string) | n/a | no | | create_timeout | Timeout duration for create | string | n/a | no | diff --git a/examples/monitoring-instance/main.tf b/examples/monitoring-instance/main.tf index 710f29b..8b5c9a4 100644 --- a/examples/monitoring-instance/main.tf +++ b/examples/monitoring-instance/main.tf @@ -12,19 +12,19 @@ data "ibm_resource_group" "sysdig" { module "monitoring_instance" { - source = "../../modules/monitoring-sysdig" - provision = var.provision - bind_key = var.bind_key - name = var.name - resource_group_id = data.ibm_resource_group.sysdig.id - plan = var.plan - region = var.region - service_endpoints = var.service_endpoints - enable_platform_metrics = var.enable_platform_metrics - tags = var.tags - create_timeout = var.create_timeout - update_timeout = var.update_timeout - delete_timeout = var.delete_timeout - key_name = var.key_name - key_tags = var.key_tags + source = "../../modules/monitoring-sysdig" + is_provision_monitoring = var.is_provision_monitoring + is_bind_key = var.is_bind_key + name = var.name + resource_group_id = data.ibm_resource_group.sysdig.id + plan = var.plan + region = var.region + visibility = var.visibility + is_enable_platform_metrics = var.is_enable_platform_metrics + tags = var.tags + create_timeout = var.create_timeout + update_timeout = var.update_timeout + delete_timeout = var.delete_timeout + key_name = var.key_name + key_tags = var.key_tags } diff --git a/examples/monitoring-instance/variables.tf b/examples/monitoring-instance/variables.tf index ed5bf00..03dd504 100644 --- a/examples/monitoring-instance/variables.tf +++ b/examples/monitoring-instance/variables.tf @@ -3,13 +3,13 @@ # Copyright 2020 IBM ##################################################### -variable "provision" { +variable "is_provision_monitoring" { type = bool description = "Disable this to read the existing activity tracker instance" default = true } -variable "bind_key" { +variable "is_bind_key" { description = "Flag indicating that key should be bind to logdna hippa instance" type = bool default = false @@ -44,10 +44,10 @@ variable "delete_timeout" { default = null } -variable "enable_platform_metrics" { +variable "is_enable_platform_metrics" { type = bool description = "Receive platform metrics in Sysdig" - default = true + default = false } variable "resource_group" { @@ -62,7 +62,7 @@ variable "region" { } -variable "service_endpoints" { +variable "visibility" { description = "Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." type = string default = null diff --git a/examples/obervability-complete/main.tf b/examples/obervability-complete/main.tf deleted file mode 100644 index c92252a..0000000 --- a/examples/obervability-complete/main.tf +++ /dev/null @@ -1,91 +0,0 @@ -##################################################### -# Observability -# Copyright 2020 IBM -##################################################### - -provider "ibm" { -} - -data "ibm_resource_group" "rg" { - name = var.resource_group -} - -module "observability" { - - source = "../../" - - ################# Logging Super Tenant Receiver (STR) instance ####################### - - str_provision = var.str_provision - str_logging_bind_key = var.str_logging_bind_key - str_logging_plan = var.str_logging_plan - str_logging_region = var.str_logging_region - str_logging_service_endpoints = var.str_logging_service_endpoints - str_logging_tags = var.str_logging_tags - str_logging_key_name = var.str_logging_key_name - str_logging_key_tags = var.str_logging_key_tags - - ################## Logging Super Tenant Sender (STS) Instance ######################## - //STS - sts_provision = var.sts_provision - sts_service_supertenant = var.sts_service_supertenant - sts_provision_key = var.sts_provision_key - - //Logging - sts_logging_bind_key = var.sts_logging_bind_key - sts_logging_plan = var.sts_logging_plan - sts_logging_region = var.sts_logging_region - sts_logging_service_endpoints = var.sts_logging_service_endpoints - sts_logging_tags = var.sts_logging_tags - sts_logging_key_name = var.sts_logging_key_name - sts_logging_key_tags = var.sts_logging_key_tags - - ################# Activity Tracker ATR instance ########## - - atr_provision = var.atr_provision - atr_plan = var.atr_plan - atr_region = var.atr_region - atr_bind_key = var.atr_bind_key - atr_key_name = var.atr_key_name - atr_key_tags = var.atr_key_tags - atr_tags = var.atr_tags - - ################# Activity Tracker ATS instance ########## - - //ATS - ats_provision = var.ats_provision - ats_service_supertenant = var.ats_service_supertenant - ats_provision_key = var.ats_provision_key - ats_associated_logging_crn = var.ats_associated_logging_crn - use_existing_sts_crn = var.use_existing_sts_crn - - //Activity tracker - ats_plan = var.ats_plan - ats_region = var.ats_region - ats_bind_key = var.ats_bind_key - ats_key_name = var.ats_key_name - ats_key_tags = var.ats_key_tags - ats_tags = var.ats_tags - - ################# Monitoring ############################ - monitoring_provision = var.monitoring_provision - monitoring_bind_key = var.monitoring_bind_key - monitoring_name = var.monitoring_name - monitoring_plan = var.monitoring_plan - monitoring_region = var.monitoring_region - monitoring_service_endpoints = var.monitoring_service_endpoints - monitoring_enable_platform_metrics = var.monitoring_enable_platform_metrics - monitoring_tags = var.monitoring_tags - monitoring_key_name = var.monitoring_key_name - monitoring_key_tags = var.monitoring_key_tags - - - ################ Generic Parameters ###################### - logging_name = var.logging_name // common for STS and STR - activity_tracker_name = var.activity_tracker_name //common for ATS and ATR - resource_group_id = data.ibm_resource_group.rg.id - create_timeout = var.create_timeout - update_timeout = var.update_timeout - delete_timeout = var.delete_timeout -} - diff --git a/examples/obervability-complete/README.md b/examples/observability-complete/README.md similarity index 100% rename from examples/obervability-complete/README.md rename to examples/observability-complete/README.md diff --git a/examples/obervability-complete/input.tfvars b/examples/observability-complete/input.tfvars similarity index 100% rename from examples/obervability-complete/input.tfvars rename to examples/observability-complete/input.tfvars diff --git a/examples/observability-complete/main.tf b/examples/observability-complete/main.tf new file mode 100644 index 0000000..632849d --- /dev/null +++ b/examples/observability-complete/main.tf @@ -0,0 +1,92 @@ +##################################################### +# Observability +# Copyright 2020 IBM +##################################################### + +provider "ibm" { +} + +data "ibm_resource_group" "rg" { + name = var.resource_group +} + +module "observability" { + + source = "../../" + + ################# Logging Super Tenant Receiver (STR) instance ####################### + + is_provision_logging = var.is_provision_logging + is_bind_key_to_logging = var.is_bind_key_to_logging + enable_platform_logs = var.enable_platform_logs + logging_plan = var.logging_plan + logging_region = var.logging_region + logging_visbility = var.logging_visbility + logging_tags = var.logging_tags + logging_key_name = var.logging_key_name + logging_key_tags = var.logging_key_tags + + ################## Logging Super Tenant Sender (STS) Instance ######################## + //STS + is_provision_supertenant_logging = var.is_provision_supertenant_logging + sts_service_supertenant = var.sts_service_supertenant + supertenant_logging_provision_key = var.supertenant_logging_provision_key + + //Logging + is_bind_key_to_supertenant_logging = var.is_bind_key_to_supertenant_logging + supertenant_logging_plan = var.supertenant_logging_plan + supertenant_logging_region = var.supertenant_logging_region + supertenant_logging_visibility = var.supertenant_logging_visibility + supertenant_logging_tags = var.supertenant_logging_tags + supertenant_logging_key_name = var.supertenant_logging_key_name + supertenant_logging_key_tags = var.supertenant_logging_key_tags + + ################# Activity Tracker ATR instance ########## + + is_provision_activity_tracker = var.is_provision_activity_tracker + activity_tracker_plan = var.activity_tracker_plan + activity_tracker_region = var.activity_tracker_region + is_bind_key_to_activity_tracker = var.is_bind_key_to_activity_tracker + is_activity_tracker_the_default_receiver = var.is_activity_tracker_the_default_receiver + activity_tracker_key_name = var.activity_tracker_key_name + activity_tracker_key_tags = var.activity_tracker_key_tags + activity_tracker_tags = var.activity_tracker_tags + + ################# Activity Tracker ATS instance ########## + + //ATS + is_provision_supertenant_activity_tracker = var.is_provision_supertenant_activity_tracker + supertenant_activity_tracker_name = var.supertenant_activity_tracker_name + supertenant_activity_tracker_provision_key = var.supertenant_activity_tracker_provision_key + is_attach_existing_supertenant_logging_crn = var.is_attach_existing_supertenant_logging_crn + + //Activity tracker + supertenant_activity_tracker_plan = var.supertenant_activity_tracker_plan + supertenant_activity_tracker_region = var.supertenant_activity_tracker_region + is_bind_key_to_supertenant_activity_tracker = var.is_bind_key_to_supertenant_activity_tracker + supertenant_activity_tracker_key_name = var.supertenant_activity_tracker_key_name + supertenant_activity_tracker_key_tags = var.supertenant_activity_tracker_key_tags + supertenant_activity_tracker_tags = var.supertenant_activity_tracker_tags + + ################# Monitoring ############################ + is_provision_monitoring = var.is_provision_monitoring + is_bind_key_to_monitoring = var.is_bind_key_to_monitoring + monitoring_name = var.monitoring_name + monitoring_plan = var.monitoring_plan + monitoring_region = var.monitoring_region + monitoring_visibility = var.monitoring_visibility + is_enable_platform_metrics = var.is_enable_platform_metrics + monitoring_tags = var.monitoring_tags + monitoring_key_name = var.monitoring_key_name + monitoring_key_tags = var.monitoring_key_tags + + + ################ Generic Parameters ###################### + logging_name = var.logging_name // common for STS and STR + activity_tracker_name = var.activity_tracker_name //common for ATS and ATR + resource_group_id = data.ibm_resource_group.rg.id + create_timeout = var.create_timeout + update_timeout = var.update_timeout + delete_timeout = var.delete_timeout +} + diff --git a/examples/obervability-complete/variables.tf b/examples/observability-complete/variables.tf similarity index 82% rename from examples/obervability-complete/variables.tf rename to examples/observability-complete/variables.tf index 43f4cec..39d26d2 100644 --- a/examples/obervability-complete/variables.tf +++ b/examples/observability-complete/variables.tf @@ -30,19 +30,25 @@ variable "monitoring_name" { # Copyright 2020 IBM ##################################################### -variable "str_provision" { +variable "is_provision_logging" { type = bool description = "Logging STR: Disable this, not to provision logging STR instance" default = true } -variable "str_logging_bind_key" { +variable "enable_platform_logs" { + type = bool + description = "Receive platform logs in LogDNA" + default = true +} + +variable "is_bind_key_to_logging" { description = "Logging STR: Enable this flag to attach a key to STR instance." type = bool default = false } -variable "str_logging_plan" { +variable "logging_plan" { description = "Logging STR: plan type (14-day, 30-day, 7-day, hipaa-30-day and lite)" type = string default = "7-day" @@ -55,36 +61,36 @@ variable "str_logging_plan" { "7-day", "hipaa-30-day", "lite" - ], var.str_logging_plan) + ], var.logging_plan) ) } } -variable "str_logging_region" { +variable "logging_region" { description = "Logging STR: Provisioning Region" type = string default = "us-south" } -variable "str_logging_service_endpoints" { +variable "logging_visbility" { description = "Logging STR: Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." type = string default = null } -variable "str_logging_tags" { +variable "logging_tags" { type = list(string) description = "Logging STR: Tags that should be applied to the service" default = null } -variable "str_logging_key_tags" { +variable "logging_key_tags" { type = list(string) description = "Logging STR: Tags that should be applied to the key" default = null } -variable "str_logging_key_name" { +variable "logging_key_name" { description = "Logging STR: Name of the instance key" type = string default = null @@ -95,13 +101,13 @@ variable "str_logging_key_name" { # Copyright 2020 IBM ##################################################### -variable "sts_logging_provision" { +variable "is_provision_supertenant_logging" { type = bool description = "Logging STS: Disable this to read the existing logging sts instance" default = true } -variable "sts_logging_bind_key" { +variable "is_bind_key_to_supertenant_logging" { description = "Logging STS: Flag indicating that key should be bind to logdna sts instance" type = bool default = false @@ -109,19 +115,13 @@ variable "sts_logging_bind_key" { ############## STS Parameters start ###################### -variable "sts_provision" { - type = bool - description = "Activity Tracker ATS: Disable this to read the existing activity tracker instance" - default = true -} - variable "sts_service_supertenant" { type = string description = "Logging STS: Name of your supertenant service" default = "" //provide valid value here } -variable "sts_provision_key" { +variable "supertenant_logging_provision_key" { type = string description = "Logging STS: Provision key" default = "" //provide valid value here @@ -129,38 +129,38 @@ variable "sts_provision_key" { ############## STS Parameters End ###################### -variable "sts_logging_plan" { +variable "supertenant_logging_plan" { description = "Logging STS: plan type (14-day, 30-day, 7-day, hipaa-30-day and lite)" type = string default = "7-day" } -variable "sts_logging_region" { +variable "supertenant_logging_region" { description = "Logging STS: Provisioning Region" type = string default = "us-south" } -variable "sts_logging_service_endpoints" { +variable "supertenant_logging_visibility" { description = "Logging STS: Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." type = string default = null } -variable "sts_logging_tags" { +variable "supertenant_logging_tags" { type = list(string) description = "Logging STS: Tags that should be applied to the service" default = null } -variable "sts_logging_key_tags" { +variable "supertenant_logging_key_tags" { type = list(string) description = "Logging STS: Tags that should be applied to the key" default = null } -variable "sts_logging_key_name" { +variable "supertenant_logging_key_name" { description = "Logging STS: Name of the instance key" type = string default = null @@ -170,19 +170,25 @@ variable "sts_logging_key_name" { # Set up Activity Tracker Super Tenant Receiver (ATR) instance ##################################################### -variable "atr_provision" { +variable "is_provision_activity_tracker" { type = bool description = "Activity Tracker ATR: Disable this not provision ATR instance" default = true } -variable "atr_region" { +variable "is_activity_tracker_the_default_receiver" { + type = bool + description = "Enable this to make this instance a sdefault receiver" + default = true +} + +variable "activity_tracker_region" { type = string description = "Activity Tracker ATS: Geographic location of the resource (e.g. us-south, us-east)" default = "us-south" } -variable "atr_plan" { +variable "activity_tracker_plan" { type = string description = "Activity Tracker ATS: The type of plan the service instance should run under (lite, 7-day, 14-day, or 30-day)" default = "7-day" @@ -195,30 +201,30 @@ variable "atr_plan" { "7-day", "hipaa-30-day", "lite" - ], var.atr_plan) + ], var.activity_tracker_plan) ) } } -variable "atr_tags" { +variable "activity_tracker_tags" { type = list(string) description = "Activity Tracker ATS: Tags that should be applied to the service" default = null } -variable "atr_bind_key" { +variable "is_bind_key_to_activity_tracker" { description = "Activity Tracker ATS: Enable this to bind key to instance (true/false)" type = bool default = false } -variable "atr_key_name" { +variable "activity_tracker_key_name" { description = "Activity Tracker ATS: Name of the instance key" type = string default = null } -variable "atr_key_tags" { +variable "activity_tracker_key_tags" { type = list(string) description = "Activity Tracker ATS: Tags that should be applied to the key" default = null @@ -230,31 +236,31 @@ variable "atr_key_tags" { ############## ATS Parameters Start ###################### -variable "use_existing_sts_crn" { +variable "is_attach_existing_supertenant_logging_crn" { type = bool description = "Enable this to attach existing logging STS instance to activity tracket ATS instance" default = false } -variable "ats_provision" { +variable "is_provision_supertenant_activity_tracker" { type = bool description = "Activity Tracker ATS: Disable this to read the existing activity tracker instance" default = true } -variable "ats_service_supertenant" { +variable "supertenant_activity_tracker_name" { type = string description = "Activity Tracker ATS: Name of your supertenant service" default = "" //provide valid values here } -variable "ats_provision_key" { +variable "supertenant_activity_tracker_provision_key" { type = string description = "Activity Tracker ATS: Provision key" default = "" //provide valid values here } -variable "ats_associated_logging_crn" { +variable "supertenant_activity_tracker_associated_logging_crn" { type = string description = "Logging: Enter the associated logging crn" default = "" //provide valid value here @@ -262,37 +268,37 @@ variable "ats_associated_logging_crn" { ############## ATS Parameters End ###################### -variable "ats_region" { +variable "supertenant_activity_tracker_region" { type = string description = "Activity Tracker ATS: Geographic location of the resource (e.g. us-south, us-east)" default = "us-east" } -variable "ats_plan" { +variable "supertenant_activity_tracker_plan" { type = string description = "Activity Tracker ATS: The type of plan the service instance should run under (lite, 7-day, 14-day, or 30-day)" default = "7-day" } -variable "ats_tags" { +variable "supertenant_activity_tracker_tags" { type = list(string) description = "Activity Tracker ATS: Tags that should be applied to the service" default = null } -variable "ats_bind_key" { +variable "is_bind_key_to_supertenant_activity_tracker" { description = "Activity Tracker ATS: Enable this to bind key to instance (true/false)" type = bool default = false } -variable "ats_key_name" { +variable "supertenant_activity_tracker_key_name" { description = "Activity Tracker ATS: Name of the instance key" type = string default = null } -variable "ats_key_tags" { +variable "supertenant_activity_tracker_key_tags" { type = list(string) description = "Activity Tracker ATS: Tags that should be applied to the key" default = null @@ -303,13 +309,13 @@ variable "ats_key_tags" { # Copyright 2020 IBM ##################################################### -variable "monitoring_provision" { +variable "is_provision_monitoring" { type = bool description = "Monitoring: Disable this read the existing monitoring instance" default = true } -variable "monitoring_bind_key" { +variable "is_bind_key_to_monitoring" { description = "Monitoring: Flag indicating that key should be bind to logdna hippa instance" type = bool default = false @@ -321,10 +327,10 @@ variable "monitoring_plan" { default = "graduated-tier" } -variable "monitoring_enable_platform_metrics" { +variable "is_enable_platform_metrics" { type = bool description = "Monitoring: Receive platform metrics in Sysdig" - default = true + default = false } variable "monitoring_region" { @@ -334,7 +340,7 @@ variable "monitoring_region" { } -variable "monitoring_service_endpoints" { +variable "monitoring_visibility" { description = "Monitoring: Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." type = string default = null diff --git a/examples/obervability-complete/versions.tf b/examples/observability-complete/versions.tf similarity index 100% rename from examples/obervability-complete/versions.tf rename to examples/observability-complete/versions.tf diff --git a/main.tf b/main.tf index 09cc99d..86496ec 100644 --- a/main.tf +++ b/main.tf @@ -6,24 +6,24 @@ module "logging_str_instance" { //Uncomment the following line to point the source to registry level //source = "terraform-ibm-modules/observability/ibm//modules/logging-instance" - count = var.str_provision ? 1 : 0 + count = var.is_provision_logging ? 1 : 0 source = "./modules/logging-instance" - is_sts_instance = false - provision = var.str_provision - name = format("%s-logging-str", var.logging_name) - bind_key = var.str_logging_bind_key - enable_platform_logs = var.enable_platform_logs - resource_group_id = var.resource_group_id - plan = var.str_logging_plan - region = var.str_logging_region - service_endpoints = var.str_logging_service_endpoints - tags = var.str_logging_tags - key_name = var.str_logging_key_name - key_tags = var.str_logging_key_tags - create_timeout = var.create_timeout - update_timeout = var.update_timeout - delete_timeout = var.delete_timeout + is_supertenant_logging = false + is_provision_logging = var.is_provision_logging + name = format("%s-logging-str", var.logging_name) + is_bind_key = var.is_bind_key_to_logging + enable_platform_logs = var.enable_platform_logs + resource_group_id = var.resource_group_id + plan = var.logging_plan + region = var.logging_region + visibility = var.logging_visbility + tags = var.logging_tags + key_name = var.logging_key_name + key_tags = var.logging_key_tags + create_timeout = var.create_timeout + update_timeout = var.update_timeout + delete_timeout = var.delete_timeout } ################################################################### @@ -34,25 +34,25 @@ module "logging_sts_instance" { //Uncomment the following line to point the source to registry level //source = "terraform-ibm-modules/observability/ibm//modules/logging-instance" - count = (var.sts_provision || (var.ats_provision && var.use_existing_sts_crn == false)) ? 1 : 0 - source = "./modules/logging-instance" - provision = var.sts_provision + count = (var.is_provision_supertenant_logging || (var.is_provision_supertenant_activity_tracker && var.is_attach_existing_supertenant_logging_crn == false)) ? 1 : 0 + source = "./modules/logging-instance" + is_provision_logging = var.is_provision_supertenant_logging //STS Specific parameters - is_sts_instance = true - service_supertenant = var.sts_service_supertenant - provision_key = var.sts_provision_key + is_supertenant_logging = true + service_supertenant = var.sts_service_supertenant + provision_key = var.supertenant_logging_provision_key //Logging instance parameters name = format("%s-logging-sts", var.logging_name) - bind_key = var.sts_logging_bind_key + is_bind_key = var.is_bind_key_to_supertenant_logging resource_group_id = var.resource_group_id - plan = var.sts_logging_plan - region = var.sts_logging_region - service_endpoints = var.sts_logging_service_endpoints - tags = var.sts_logging_tags - key_name = var.sts_logging_key_name - key_tags = var.sts_logging_key_tags + plan = var.supertenant_logging_plan + region = var.supertenant_logging_region + visibility = var.supertenant_logging_visibility + tags = var.supertenant_logging_tags + key_name = var.supertenant_logging_key_name + key_tags = var.supertenant_logging_key_tags create_timeout = var.create_timeout update_timeout = var.update_timeout delete_timeout = var.delete_timeout @@ -66,23 +66,23 @@ module "activity-tracker-atr-instance" { //Uncomment the following line to point the source to registry level //source = "terraform-ibm-modules/observability/ibm//modules/activity-tracker-instance" - count = var.atr_provision ? 1 : 0 - - source = "./modules/activity-tracker-instance" - provision = var.atr_provision - is_ats_instance = false - name = format("%s-monitoring-atr", var.activity_tracker_name) - plan = var.atr_plan - region = var.atr_region - bind_key = var.atr_bind_key - make_default_receiver = var.atr_make_default_receiver - key_name = var.atr_key_name - key_tags = var.atr_key_tags - resource_group_id = var.resource_group_id - tags = var.atr_tags - create_timeout = var.create_timeout - update_timeout = var.update_timeout - delete_timeout = var.delete_timeout + count = var.is_provision_activity_tracker ? 1 : 0 + + source = "./modules/activity-tracker-instance" + is_provision_activity_tracker = var.is_provision_activity_tracker + is_supertenant_activity_tracker = false + name = format("%s-monitoring-atr", var.activity_tracker_name) + plan = var.activity_tracker_plan + region = var.activity_tracker_region + is_bind_key = var.is_bind_key_to_activity_tracker + is_activity_tracker_the_default_receiver = var.is_activity_tracker_the_default_receiver + key_name = var.activity_tracker_key_name + key_tags = var.activity_tracker_key_tags + resource_group_id = var.resource_group_id + tags = var.activity_tracker_tags + create_timeout = var.create_timeout + update_timeout = var.update_timeout + delete_timeout = var.delete_timeout } ################################################################### @@ -93,26 +93,26 @@ module "activity-tracker-ats-instance" { //Uncomment the following line to point the source to registry level //source = "terraform-ibm-modules/observability/ibm//modules/activity-tracker-instance" - count = var.ats_provision ? 1 : 0 + count = var.is_provision_supertenant_activity_tracker ? 1 : 0 - source = "./modules/activity-tracker-instance" - provision = var.ats_provision + source = "./modules/activity-tracker-instance" + is_provision_activity_tracker = var.is_provision_supertenant_activity_tracker //ATS specific parameters - is_ats_instance = true - service_supertenant = var.ats_service_supertenant - associated_logging_crn = var.use_existing_sts_crn ? var.ats_associated_logging_crn : module.logging_sts_instance[0].id - provision_key = var.ats_provision_key - + is_supertenant_activity_tracker = true + service_supertenant = var.supertenant_activity_tracker_name + associated_logging_crn = var.is_attach_existing_supertenant_logging_crn ? var.supertenant_activity_tracker_associated_logging_crn : module.logging_sts_instance[0].id + provision_key = var.supertenant_activity_tracker_provision_key + //use_existing_sts_crn = var.is_attach_existing_supertenant_logging_crn //Actvity tracker name = format("%s-monitoring-ats", var.activity_tracker_name) - plan = var.ats_plan - region = var.ats_region - bind_key = var.ats_bind_key - key_name = var.ats_key_name - key_tags = var.ats_key_tags + plan = var.supertenant_activity_tracker_plan + region = var.supertenant_activity_tracker_region + is_bind_key = var.is_bind_key_to_supertenant_activity_tracker + key_name = var.supertenant_activity_tracker_key_name + key_tags = var.supertenant_activity_tracker_key_tags resource_group_id = var.resource_group_id - tags = var.ats_tags + tags = var.supertenant_activity_tracker_tags create_timeout = var.create_timeout update_timeout = var.update_timeout delete_timeout = var.delete_timeout @@ -126,22 +126,22 @@ module "monitoring_instance" { //Uncomment the following line to point the source to registry level //source = "terraform-ibm-modules/observability/ibm//modules/monitoring-sysdig" - count = var.monitoring_provision ? 1 : 0 - - source = "./modules/monitoring-sysdig" - provision = var.monitoring_provision - bind_key = var.monitoring_bind_key - name = format("%s-monitoring", var.monitoring_name) - resource_group_id = var.resource_group_id - plan = var.monitoring_plan - region = var.monitoring_region - service_endpoints = var.monitoring_service_endpoints - enable_platform_metrics = var.monitoring_enable_platform_metrics - tags = var.monitoring_tags - key_name = var.monitoring_key_name - key_tags = var.monitoring_key_tags - create_timeout = var.create_timeout - update_timeout = var.update_timeout - delete_timeout = var.delete_timeout + count = var.is_provision_monitoring ? 1 : 0 + + source = "./modules/monitoring-sysdig" + is_provision_monitoring = var.is_provision_monitoring + is_bind_key = var.is_bind_key_to_monitoring + name = format("%s-monitoring", var.monitoring_name) + resource_group_id = var.resource_group_id + plan = var.monitoring_plan + region = var.monitoring_region + visibility = var.monitoring_visibility + is_enable_platform_metrics = var.is_enable_platform_metrics + tags = var.monitoring_tags + key_name = var.monitoring_key_name + key_tags = var.monitoring_key_tags + create_timeout = var.create_timeout + update_timeout = var.update_timeout + delete_timeout = var.delete_timeout } diff --git a/metadata.yaml b/metadata.yaml index f456f40..1cae2b3 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -36,7 +36,7 @@ root: regex: "^([a-z]|[a-z][-a-z0-9]*[a-z0-9])$" is_provision_controller: false is_count_controller: false - - name: "str_provision" + - name: "is_provision_logging" type: bool is_required: true description: "Controls the provisioning of logging STR instance" @@ -48,7 +48,7 @@ root: is_force_new: true is_provision_controller: true is_count_controller: true - - name: "str_logging_bind_key" + - name: "is_bind_key_to_logging"    type : bool    is_required: false default_value: false @@ -85,7 +85,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "str_logging_plan" + - name: "logging_plan"    type : string    is_required: true description: "Plan type should be one of the following (14-day, 30-day, 7-day, hipaa-30-day and lite)." @@ -97,7 +97,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "str_logging_region" + - name: "logging_region"    type : string    is_required: true description: "The location where the instance available" @@ -110,7 +110,7 @@ root: cloud_data_range: "resource_group_id" is_provision_controller: false is_count_controller: false - - name: "str_logging_service_endpoints" + - name: "logging_visbility"    type : string    is_required: false description: "Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." @@ -122,7 +122,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "str_logging_tags" + - name: "logging_tags"    type : list(string)    is_required: false description: "Tags to attach to str instance" @@ -133,7 +133,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "str_logging_key_name" + - name: "logging_key_name"    type : string    is_required: true description: "Name of the instance key" @@ -144,7 +144,7 @@ root: is_force_new: true is_provision_controller: false is_count_controller: false - - name: "str_logging_key_tags" + - name: "logging_key_tags"    type : list(string)    is_required: false description: "Tags that should be applied to the key" @@ -191,7 +191,7 @@ root: ################################### # logging_sts_instance variables ################################### - - name: "sts_provision" + - name: "is_provision_supertenant_logging" type: bool is_required: true description: "Controls the provisioning of logging STS instance" @@ -203,7 +203,7 @@ root: is_force_new: true is_provision_controller: true is_count_controller: true - - name: "use_existing_sts_crn" + - name: "is_attach_existing_supertenant_logging_crn"    type : bool    is_required: false default_value: false @@ -227,7 +227,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "sts_provision_key" + - name: "supertenant_logging_provision_key"    type : string    is_required: false description: "Provision key" @@ -238,7 +238,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "sts_logging_bind_key" + - name: "is_bind_key_to_supertenant_logging"    type : bool    is_required: false default_value: false @@ -251,7 +251,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "sts_logging_plan" + - name: "supertenant_logging_plan"    type : string    is_required: true description: "Plan type should be one of the following (14-day, 30-day, 7-day, hipaa-30-day and lite)." @@ -263,7 +263,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "sts_logging_region" + - name: "supertenant_logging_region"    type : string    is_required: true description: "The location where the instance available" @@ -276,7 +276,7 @@ root: cloud_data_range: "resource_group_id" is_provision_controller: false is_count_controller: false - - name: "sts_logging_service_endpoints" + - name: "supertenant_logging_visibility"    type : string    is_required: false description: "Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." @@ -288,7 +288,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "sts_logging_tags" + - name: "supertenant_logging_tags"    type : list(string)    is_required: false description: "Tags to attach to sts instance" @@ -299,7 +299,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "sts_logging_key_name" + - name: "supertenant_logging_key_name"    type : string    is_required: true description: "Name of the instance key" @@ -310,7 +310,7 @@ root: is_force_new: true is_provision_controller: false is_count_controller: false - - name: "sts_logging_key_tags" + - name: "supertenant_logging_key_tags"    type : list(string)    is_required: false description: "Tags that should be applied to the key" @@ -336,7 +336,7 @@ root: regex: "^([a-z]|[a-z][-a-z0-9]*[a-z0-9])$" is_provision_controller: false is_count_controller: false - - name: "atr_provision" + - name: "is_provision_activity_tracker" type: bool is_required: true description: "Controls the provisioning of activity tracker ATR instance" @@ -348,7 +348,7 @@ root: is_force_new: true is_provision_controller: true is_count_controller: true - - name: "atr_bind_key" + - name: "is_bind_key_to_activity_tracker"    type : bool    is_required: false default_value: false @@ -361,7 +361,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "atr_make_default_receiver" + - name: "is_activity_tracker_the_default_receiver"    type : bool    is_required: false default_value: true @@ -374,7 +374,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "atr_plan" + - name: "activity_tracker_plan"    type : string    is_required: true description: "Plan type should be one of the following (14-day, 30-day, 7-day, hipaa-30-day and lite)." @@ -386,7 +386,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "atr_region" + - name: "activity_tracker_region"    type : string    is_required: true description: "The location where the instance available" @@ -399,7 +399,7 @@ root: cloud_data_range: "resource_group_id" is_provision_controller: false is_count_controller: false - - name: "atr_tags" + - name: "activity_tracker_tags"    type : list(string)    is_required: false description: "Tags to attach to str instance" @@ -410,7 +410,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "atr_key_name" + - name: "activity_tracker_key_name"    type : string    is_required: true description: "Name of the instance key" @@ -421,7 +421,7 @@ root: is_force_new: true is_provision_controller: false is_count_controller: false - - name: "atr_key_tags" + - name: "activity_tracker_key_tags"    type : list(string)    is_required: false description: "Tags that should be applied to the key" @@ -435,7 +435,7 @@ root: ################################### # activity-tracker-ats-instance ################################### - - name: "ats_provision" + - name: "is_provision_supertenant_activity_tracker" type: bool is_required: true description: "Controls the provisioning of activity tracker ATS instance" @@ -447,7 +447,7 @@ root: is_force_new: true is_provision_controller: true is_count_controller: true - - name: "ats_service_supertenant" + - name: "supertenant_activity_tracker_name"    type : string    is_required: false description: "Name of your supertenant service" @@ -458,7 +458,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "ats_provision_key" + - name: "supertenant_activity_tracker_provision_key"    type : string    is_required: false description: "Provision key" @@ -469,7 +469,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "ats_associated_logging_crn" + - name: "supertenant_activity_tracker_associated_logging_crn"    type : string    is_required: false description: "associated logging crn" @@ -479,7 +479,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "ats_bind_key" + - name: "is_bind_key_to_supertenant_activity_tracker"    type : bool    is_required: false default_value: false @@ -492,7 +492,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "ats_plan" + - name: "supertenant_activity_tracker_plan"    type : string    is_required: true description: "Plan type should be one of the following (14-day, 30-day, 7-day, hipaa-30-day and lite)." @@ -504,7 +504,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "ats_region" + - name: "supertenant_activity_tracker_region"    type : string    is_required: true description: "The location where the instance available" @@ -517,7 +517,7 @@ root: cloud_data_range: "resource_group_id" is_provision_controller: false is_count_controller: false - - name: "ats_tags" + - name: "supertenant_activity_tracker_tags"    type : list(string)    is_required: false description: "Tags to attach to sts instance" @@ -528,7 +528,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "ats_key_name" + - name: "supertenant_activity_tracker_key_name"    type : string    is_required: true description: "Name of the instance key" @@ -539,7 +539,7 @@ root: is_force_new: true is_provision_controller: false is_count_controller: false - - name: "ats_key_tags" + - name: "supertenant_activity_tracker_key_tags"    type : list(string)    is_required: false description: "Tags that should be applied to the key" @@ -565,7 +565,7 @@ root: regex: "^([a-z]|[a-z][-a-z0-9]*[a-z0-9])$" is_provision_controller: false is_count_controller: false - - name: "monitoring_provision" + - name: "is_provision_monitoring" type: bool is_required: true description: "Controls the provisioning of monitoring instance" @@ -577,7 +577,7 @@ root: is_force_new: true is_provision_controller: true is_count_controller: true - - name: "monitoring_bind_key" + - name: "is_bind_key_to_monitoring"    type : bool    is_required: false default_value: false @@ -590,7 +590,7 @@ root: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "monitoring_enable_platform_metrics" + - name: "is_enable_platform_metrics"    type : bool    is_required: false default_value: true @@ -628,7 +628,7 @@ root: cloud_data_range: "resource_group_id" is_provision_controller: false is_count_controller: false - - name: "monitoring_service_endpoints" + - name: "monitoring_visibility"    type : string    is_required: false description: "Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." @@ -674,118 +674,118 @@ root: is_provision_controller: false is_count_controller: false outputs: - - name: "atr_id" + - name: "activity_tracker_id" type : string description : "ID of Activity Tracker ATR instance" example: "crn-1734gd74" is_sensitive: false related_to: ["activity-tracker-atr-instance"] - - name: "ats_id" + - name: "supertenant_activity_tracker_id" type : string description : "ID of Activity Tracker ATS instance" example: "crn-1734gd74" is_sensitive: false related_to: ["activity-tracker-ats-instance"] - - name: "atr_guid" + - name: "activity_tracker_guid" type : string description : "The GUID of the activity tracker ATR instance" example: "1734gd74" is_sensitive: false related_to: ["activity-tracker-atr-instance"] - - name: "ats_guid" + - name: "supertenant_activity_tracker_guid" type : string description : "GUID of Activity Tracker ATS instance" example: "1734gd74" is_sensitive: false related_to: ["activity-tracker-ats-instance"] - - name: "atr_key_id" + - name: "activity_tracker_key_id" type : string description : "Activity Tracker ATR instance key id" example: "1734gd74" is_sensitive: false related_to: ["activity-tracker-atr-instance"] - - name: "ats_key_id" + - name: "supertenant_activity_tracker_key_id" type : string description : "Activity Tracker ATS key id" example: "1734gd74" is_sensitive: false related_to: ["activity-tracker-ats-instance"] - - name: "atr_key_guid" + - name: "activity_tracker_key_guid" type : string description : "GUID of Activity Tracker ATR key " example: "crn-1734gd74" is_sensitive: false related_to: ["activity-tracker-atr-instance"] - - name: "ats_key_guid" + - name: "supertenant_activity_tracker_key_guid" type : string description : "GUID of Activity Tracker ATS key" example: "crn-1734gd74" is_sensitive: false related_to: ["activity-tracker-ats-instance"] - - name: "atr_key_credentials" + - name: "activity_tracker_key_credentials" type : string description : "ATR instance key credentials" is_sensitive: false related_to: ["activity-tracker-atr-instance"] - - name: "ats_key_credentials" + - name: "supertenant_activity_tracker_key_credentials" type : string description : "ATS instance key credentials" is_sensitive: false related_to: ["activity-tracker-ats-instance"] - - name: "str_logdna_id" + - name: "logging_id" type : string description : "ID of STR logging instance" example: "crn-1734gd74" is_sensitive: false related_to: ["logging_str_instance"] - - name: "sts_logdna_id" + - name: "supertenant_logging_id" type : string description : "ID of STS logging instance" example: "crn-1734gd74" is_sensitive: false related_to: ["logging_sts_instance"] - - name: "str_logdna_guid" + - name: "logging_guid" type : string description : "GUID of STR logging instance" example: "1734gd74" is_sensitive: false related_to: ["logging_str_instance"] - - name: "sts_logdna_guid" + - name: "supertenant_logging_guid" type : string description : "GUID of STS logging instance" example: "1734gd74" is_sensitive: false related_to: ["logging_sts_instance"] - - name: "str_logdna_key_id" + - name: "logging_key_id" type : string description : "ID of logging STR instance key" example: "1734gd74" is_sensitive: false related_to: ["logging_str_instance"] - - name: "sts_logdna_key_id" + - name: "supertenant_logging_key_id" type : string description : "ID of logging STS instance key" example: "1734gd74" is_sensitive: false related_to: ["logging_sts_instance"] - - name: "str_logdna_key_guid" + - name: "logging_key_guid" type : string description : "GUID of logging STR instance key " example: "crn-1734gd74" is_sensitive: false related_to: ["logging_str_instance"] - - name: "sts_logdna_key_guid" + - name: "supertenant_logging_key_guid" type : string description : "GUID of logging STS instance key " example: "crn-1734gd74" is_sensitive: false related_to: ["logging_sts_instance"] - - name: "str_logdna_key_credentials" + - name: "logging_key_credentials" type : string description : "The credentials associated with the STR instance key." is_sensitive: false related_to: ["logging_str_instance"] - - name: "sts_logdna_key_credentials" + - name: "supertenant_logging_key_credentials" type : string description : "The credentials associated with the STS instance key." is_sensitive: false @@ -852,7 +852,7 @@ submodules: source: "IBM-Cloud/ibm" version: "" inputs: - - name: "provision" + - name: "is_provision_logging"    type : bool    is_required: false default_value: true @@ -920,7 +920,7 @@ submodules: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "is_sts_instance" + - name: "is_supertenant_logging"    type : bool    is_required: false default_value: true @@ -932,7 +932,7 @@ submodules: is_force_new: true is_provision_controller: false is_count_controller: false - - name: "service_endpoints" + - name: "visibility"    type : string    is_required: false description: "Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." @@ -999,7 +999,7 @@ submodules: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "bind_key" + - name: "is_bind_key"    type : bool    is_required: false default_value: false @@ -1079,14 +1079,14 @@ submodules: is_sensitive: false related_to: ["ibm_resource_key.logging_key"] locals: - - name: "sts_parameters" + - name: "supertenant_logging_parameters" type : map example: {"service_supertenant" = var.service_supertenant} description : "List of parameters required to provision logging STS instance" is_hardcoded : false related_to: ["ibm_resource_instance.logging_instance"] derived_from: ["service_supertenant","associated_logging_crn","provision_key"] - - name: "str_parameters" + - name: "logging_parameters" type: map example: {"default_receiver" = var.enable_platform_logs"} description : "List of parameters required to provision logging STR instance" @@ -1119,7 +1119,7 @@ submodules: source: "IBM-Cloud/ibm" version: "" inputs: - - name: "provision" + - name: "is_provision_activity_tracker"    type : bool    is_required: false default_value: true @@ -1186,7 +1186,7 @@ submodules: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "is_ats_instance" + - name: "is_supertenant_activity_tracker"    type : bool    is_required: false default_value: true @@ -1276,7 +1276,7 @@ submodules: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "bind_key" + - name: "is_bind_key"    type : bool    is_required: false default_value: false @@ -1343,7 +1343,7 @@ submodules: is_sensitive: false related_to: ["ibm_resource_key.activity_tracker_key"] locals: - - name: "ats_parameters" + - name: "supertenant_activity_tracker_parameters" type : map example: "{ "service_supertenant" = var.service_supertenant @@ -1353,7 +1353,7 @@ submodules: is_hardcoded : false related_to: ["ibm_resource_instance.activity_tracker"] derived_from: ["service_supertenant","associated_logging_crn","provision_key"] - - name: "atr_parameters" + - name: "activity_tracker_parameters" type: map example: "{ "default_receiver" = var.make_default_receiver}" @@ -1391,7 +1391,7 @@ submodules: source: "sysdiglabs/sysdig" version: "0.5.10" inputs: - - name: "provision" + - name: "is_provision_monitoring"    type : bool    is_required: false default_value: true @@ -1459,7 +1459,7 @@ submodules: is_force_new: false is_provision_controller: false is_count_controller: false - - name: "service_endpoints" + - name: "visibility"    type : string    is_required: false description: "Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." diff --git a/modules/activity-tracker-instance/main.tf b/modules/activity-tracker-instance/main.tf index 878d090..71298bd 100644 --- a/modules/activity-tracker-instance/main.tf +++ b/modules/activity-tracker-instance/main.tf @@ -4,32 +4,32 @@ ##################################################### locals { - //when is_ats_instance is true, associated_logging_crn, service_supertenant and service_supertenant must be set - ats_validate_condition = var.is_ats_instance == true && (var.service_supertenant == null || var.provision_key == null) - ats_validate_msg = "Values for 'service_supertenant' and 'provision_key' variables must be passed when 'is_ats_instance = true'" + //when is_supertenant_activity_tracker is true, associated_logging_crn, service_supertenant and service_supertenant must be set + ats_validate_condition = var.is_supertenant_activity_tracker == true && (var.service_supertenant == null || var.provision_key == null) + ats_validate_msg = "Values for 'service_supertenant' and 'provision_key' variables must be passed when 'is_supertenant_activity_tracker = true'" ats_validate_check = regex("^${local.ats_validate_msg}$", (! local.ats_validate_condition ? local.ats_validate_msg : "")) //when bind_key is true, key_name has to be passed - bindkey_validate_condition = var.bind_key == true && (var.key_name == null) + bindkey_validate_condition = var.is_bind_key == true && (var.key_name == null) bindkey_validate_msg = "Values for 'key_name' variable must be passed when 'bind_key = true'" bindkey_validate_check = regex("^${local.bindkey_validate_msg}$", (! local.bindkey_validate_condition ? local.bindkey_validate_msg : "")) //ATS parameter block - ats_parameters = { + supertenant_activity_tracker_parameters = { "service_supertenant" = var.service_supertenant "associated_logging_crn" = var.associated_logging_crn "provision_key" = var.provision_key } //ATR parameter block - atr_parameters = { - "default_receiver" = var.make_default_receiver + activity_tracker_parameters = { + "default_receiver" = var.is_activity_tracker_the_default_receiver } } data "ibm_resource_instance" "activity_tracker" { - count = var.provision ? 0 : 1 + count = var.is_provision_activity_tracker ? 0 : 1 name = var.name location = var.region @@ -38,7 +38,7 @@ data "ibm_resource_instance" "activity_tracker" { } resource "ibm_resource_instance" "activity_tracker" { - count = var.provision ? 1 : 0 + count = var.is_provision_activity_tracker ? 1 : 0 name = var.name service = "logdnaat" @@ -46,7 +46,7 @@ resource "ibm_resource_instance" "activity_tracker" { location = var.region resource_group_id = (var.resource_group_id != null ? var.resource_group_id : null) tags = (var.tags != null ? var.tags : null) - parameters = var.is_ats_instance ? local.ats_parameters : local.atr_parameters + parameters = var.is_supertenant_activity_tracker ? local.supertenant_activity_tracker_parameters : local.activity_tracker_parameters timeouts { @@ -62,9 +62,9 @@ resource "ibm_resource_instance" "activity_tracker" { } resource "ibm_resource_key" "activity_tracker_key" { - count = var.bind_key ? 1 : 0 + count = var.is_bind_key ? 1 : 0 name = var.key_name role = "Manager" - resource_instance_id = var.provision ? ibm_resource_instance.activity_tracker[0].id : data.ibm_resource_instance.activity_tracker[0].id + resource_instance_id = var.is_provision_activity_tracker ? ibm_resource_instance.activity_tracker[0].id : data.ibm_resource_instance.activity_tracker[0].id tags = (var.key_tags != null ? var.key_tags : null) } \ No newline at end of file diff --git a/modules/activity-tracker-instance/output.tf b/modules/activity-tracker-instance/output.tf index d0a370f..a34d49c 100644 --- a/modules/activity-tracker-instance/output.tf +++ b/modules/activity-tracker-instance/output.tf @@ -1,29 +1,29 @@ ##################################################### -# Set up Activity Tracker Super Tenant Sender (ATS) instance +# Activity Tracker service instance # Copyright 2020 IBM ##################################################### output "id" { - description = "ID of Activity Tracker ATS" - value = var.provision ? concat(ibm_resource_instance.activity_tracker.*.id, [""])[0] : concat(data.ibm_resource_instance.activity_tracker.*.id, [""])[0] + description = "ID of activity tracker instance" + value = var.is_provision_activity_tracker ? concat(ibm_resource_instance.activity_tracker.*.id, [""])[0] : concat(data.ibm_resource_instance.activity_tracker.*.id, [""])[0] } output "guid" { description = "The GUID of the activity tracker" - value = var.provision ? concat(ibm_resource_instance.activity_tracker.*.guid, [""])[0] : concat(data.ibm_resource_instance.activity_tracker.*.guid, [""])[0] + value = var.is_provision_activity_tracker ? concat(ibm_resource_instance.activity_tracker.*.guid, [""])[0] : concat(data.ibm_resource_instance.activity_tracker.*.guid, [""])[0] } output "key_id" { - description = "Activity Tracker ATS key id" + description = "Activity Tracker instance key id" value = concat(ibm_resource_key.activity_tracker_key.*.id, [""])[0] } output "key_guid" { - description = "Activity Tracker ATS key guid" + description = "Activity Tracker instance key guid" value = concat(ibm_resource_key.activity_tracker_key.*.guid, [""])[0] } output "key_credentials" { - description = "Activity Tracker ATS key credentials" + description = "Key credentials for super-tenant activity tracker instance" value = concat(ibm_resource_key.activity_tracker_key.*.credentials, [""])[0] } diff --git a/modules/activity-tracker-instance/variables.tf b/modules/activity-tracker-instance/variables.tf index 10f1a94..3894438 100644 --- a/modules/activity-tracker-instance/variables.tf +++ b/modules/activity-tracker-instance/variables.tf @@ -3,16 +3,16 @@ # Copyright 2020 IBM ##################################################### -variable "provision" { +variable "is_provision_activity_tracker" { type = bool description = "Disable this to read the existing activity trcaker instance" default = true } -variable "is_ats_instance" { +variable "is_supertenant_activity_tracker" { type = bool description = "Set this to provison ATS instance" - default = true + default = false } variable "name" { @@ -71,7 +71,7 @@ variable "provision_key" { default = null } -variable "make_default_receiver" { +variable "is_activity_tracker_the_default_receiver" { type = bool description = "Enable this to make this instance as default receiver" default = true @@ -83,7 +83,7 @@ variable "tags" { default = null } -variable "bind_key" { +variable "is_bind_key" { description = "Enable this to bind key to instance (true/false)" type = bool default = false diff --git a/modules/logging-instance/README.md b/modules/logging-instance/README.md index ad0e205..c1e46ab 100644 --- a/modules/logging-instance/README.md +++ b/modules/logging-instance/README.md @@ -40,26 +40,28 @@ module "logging_sts_instance" { | Name | Description | Type | Default | Required | |---------------------------|------------------------------------------------------------------|:-------------|:------- |:---------| -| is_sts_instance | Set this to true to provision logging STS instance | bool | false | no | +| is_supertenant_logging | Set this to true to provision logging STS instance | bool | false | no | +| is_provision_logging | Disable this to read the existing activity trcaker instance | string | true | no | | service_supertenant | Name of service supertenant | string | Empty | no | | provision_key | Service Provision key | string | Empty | no | | name | Used as prefix to observability instances | string | n/a | yes | | plan | Plan type | string | n/a | yes | | region | Location to create the logging instance. | string | n/a | yes | | resource_group_id | ID of the resource group | string | n/a | yes | -| bind_key | Indicating that instance key should be bind to logging | bool | false | no | +| is_bind_key | Indicating that instance key should be bind to logging | bool | false | no | | sts_provision | Set this to provision logging instance | bool | true | yes | | key_name | Name used to identify logging resource key | string | empty | no | | tags | Tags that should be applied to the logging | list(string) | n/a | no | | key_tags | Tags that should be applied to the logging key | list(string) | n/a | no | +| visibility | Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private' | string | public | no | ## Outputs | Name | Description | |-----------------|----------------------------------------| -| id | ID of the logging instance | -| guid | GUID of the logging instance | -| key_id | ID of the logging instance key | -| key_guid | ID of the logging instance key | -| key_credentials | ID of the logging instance key | +| id | ID of the logging instance | +| guid | GUID of the logging instance | +| key_id | ID of the logging instance key | +| key_guid | ID of the logging instance key | +| key_credentials | ID of the logging instance key | diff --git a/modules/logging-instance/main.tf b/modules/logging-instance/main.tf index de13637..f7f9863 100644 --- a/modules/logging-instance/main.tf +++ b/modules/logging-instance/main.tf @@ -6,29 +6,29 @@ locals { //logging sts instance validation - 'service_supertenant' and 'provision_key' variables must be passed when 'provision = true' - logging_sts_validate_condition = (var.is_sts_instance == true && (var.service_supertenant == null || var.provision_key == null)) - logging_sts_validate_msg = "Values for 'service_supertenant' and 'provision_key' variables must be passed when 'is_sts_instance = true'" + logging_sts_validate_condition = (var.is_supertenant_logging == true && (var.service_supertenant == null || var.provision_key == null)) + logging_sts_validate_msg = "Values for 'service_supertenant' and 'provision_key' variables must be passed when 'is_supertenant_logging = true'" logging_sts_validate_check = regex("^${local.logging_sts_validate_msg}$", (! local.logging_sts_validate_condition ? local.logging_sts_validate_msg : "")) //bind key validation - 'key_name' variable must be passed when 'bind_key = true - bindkey_validate_condition = var.bind_key == true && (var.key_name == null) + bindkey_validate_condition = var.is_bind_key == true && (var.key_name == null) bindkey_validate_msg = "Value for 'key_name' variable must be passed when 'bind_key = true'" bindkey_validate_check = regex("^${local.bindkey_validate_msg}$", (! local.bindkey_validate_condition ? local.bindkey_validate_msg : "")) //parameters for STS logging instance - sts_parameters = { + supertenant_logging_parameters = { "service_supertenant" = var.service_supertenant "provision_key" = var.provision_key } //parameters for STR logging instance - str_parameters = { + logging_parameters = { "default_receiver" = var.enable_platform_logs } } data "ibm_resource_instance" "logging_instance" { - count = var.provision ? 0 : 1 + count = var.is_provision_logging ? 0 : 1 name = var.name location = var.region @@ -37,7 +37,7 @@ data "ibm_resource_instance" "logging_instance" { } resource "ibm_resource_instance" "logging_instance" { - count = var.provision ? 1 : 0 + count = var.is_provision_logging ? 1 : 0 name = var.name service = "logdna" @@ -45,8 +45,8 @@ resource "ibm_resource_instance" "logging_instance" { location = var.region resource_group_id = var.resource_group_id tags = (var.tags != null ? var.tags : null) - service_endpoints = (var.service_endpoints != null ? var.service_endpoints : null) - parameters = var.is_sts_instance ? local.sts_parameters : local.str_parameters + service_endpoints = (var.visibility != null ? var.visibility : null) + parameters = var.is_supertenant_logging ? local.supertenant_logging_parameters : local.logging_parameters timeouts { create = (var.create_timeout != null ? var.create_timeout : null) @@ -61,9 +61,9 @@ resource "ibm_resource_instance" "logging_instance" { } resource "ibm_resource_key" "logging_key" { - count = var.bind_key ? 1 : 0 + count = var.is_bind_key ? 1 : 0 name = var.key_name role = "Manager" - resource_instance_id = var.provision ? ibm_resource_instance.logging_instance[0].id : data.ibm_resource_instance.logging_instance[0].id + resource_instance_id = var.is_provision_logging ? ibm_resource_instance.logging_instance[0].id : data.ibm_resource_instance.logging_instance[0].id tags = (var.key_tags != null ? var.key_tags : null) } diff --git a/modules/logging-instance/output.tf b/modules/logging-instance/output.tf index 18931b2..27b3703 100644 --- a/modules/logging-instance/output.tf +++ b/modules/logging-instance/output.tf @@ -1,29 +1,29 @@ ##################################################### -# Set up a Logging Super Tenant Sender (STS) instance +# Logging service instance # Copyright 2020 IBM ##################################################### output "id" { - description = "The ID of the logging STS instance" - value = var.provision ? concat(ibm_resource_instance.logging_instance.*.id, [""])[0] : concat(data.ibm_resource_instance.logging_instance.*.id, [""])[0] + description = "ID of activity tracker instance" + value = var.is_provision_logging ? concat(ibm_resource_instance.logging_instance.*.id, [""])[0] : concat(data.ibm_resource_instance.logging_instance.*.id, [""])[0] } output "guid" { description = "The GUID of the logging STS instance" - value = var.provision ? concat(ibm_resource_instance.logging_instance.*.guid, [""])[0] : concat(data.ibm_resource_instance.logging_instance.*.guid, [""])[0] + value = var.is_provision_logging ? concat(ibm_resource_instance.logging_instance.*.guid, [""])[0] : concat(data.ibm_resource_instance.logging_instance.*.guid, [""])[0] } output "key_id" { - description = "ID of the logging STS instance key" + description = "Activity tracker instance key id" value = concat(ibm_resource_key.logging_key.*.id, [""])[0] } output "key_guid" { - description = "logging STS key guid" + description = "Activity tracker instance key guid" value = concat(ibm_resource_key.logging_key.*.guid, [""])[0] } output "key_credentials" { - description = "logging STS key credentials" + description = "Key credentials for super-tenant activity tracker instance" value = concat(ibm_resource_key.logging_key.*.credentials, [""])[0] } \ No newline at end of file diff --git a/modules/logging-instance/variables.tf b/modules/logging-instance/variables.tf index e5aeee2..e041967 100644 --- a/modules/logging-instance/variables.tf +++ b/modules/logging-instance/variables.tf @@ -3,13 +3,13 @@ # Copyright 2020 IBM ##################################################### -variable "provision" { +variable "is_provision_logging" { type = bool description = "Disable this to read the existing activity trcaker instance" default = true } -variable "is_sts_instance" { +variable "is_supertenant_logging" { description = "Set this to provision (STS) logging instance" type = bool default = false @@ -67,7 +67,7 @@ variable "region" { type = string } -variable "service_endpoints" { +variable "visibility" { description = "Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." type = string default = null @@ -79,7 +79,7 @@ variable "tags" { default = null } -variable "bind_key" { +variable "is_bind_key" { description = "Enable this to bind key to instance (true/false)" type = bool default = false diff --git a/modules/monitoring-sysdig/README.md b/modules/monitoring-sysdig/README.md index d1224c3..9fcf1fa 100644 --- a/modules/monitoring-sysdig/README.md +++ b/modules/monitoring-sysdig/README.md @@ -39,13 +39,14 @@ module "monitoring_instance" { | Name | Description | Type | Default | Required | |--------------------|------------------------------------------------------------------|:-------------|:------- |:---------| +| is_provision_monitoring | Disable this to read the existing activity trcaker instance | bool | true | no | | name | A descriptive name used to identify the resource instance | string | n/a | yes | -| bind_key | Indicating that instance key should be bind to logdna instance | bool | n/a | no | +| is_bind_key | Indicating that instance key should be bind to logdna instance | bool | n/a | no | | key\_name | A descriptive name used to identify the resource key | string | n/a | yes | | plan | The name of the plan type supported by service. | string | n/a | yes | | region | Target location or environment to create the resource instance. | string | n/a | yes | | resource_group_id | ID of the resource group | string | n/a | yes | -| service\_endpoints | Possible values are 'public', 'private', 'public-and-private'. | string | n/a | no | +| visibility | Possible values are 'public', 'private', 'public-and-private'. | string | public | no | | tags | Tags that should be applied to the service | list(string) | n/a | no | | key_tags | Tags that should be applied to the service key | list(string) | n/a | no | | create_timeout | Timeout duration for create | string | n/a | no | diff --git a/modules/monitoring-sysdig/main.tf b/modules/monitoring-sysdig/main.tf index bbe0beb..2cf33a6 100644 --- a/modules/monitoring-sysdig/main.tf +++ b/modules/monitoring-sysdig/main.tf @@ -1,10 +1,10 @@ ##################################################### -# Sysdig instance key +# Monitoring service instance # Copyright 2020 IBM ##################################################### data "ibm_resource_instance" "sysdig" { - count = var.provision ? 0 : 1 + count = var.is_provision_monitoring ? 0 : 1 name = var.name location = var.region @@ -14,7 +14,7 @@ data "ibm_resource_instance" "sysdig" { resource "ibm_resource_instance" "sysdig_instance" { - count = var.provision ? 1 : 0 + count = var.is_provision_monitoring ? 1 : 0 name = var.name service = "sysdig-monitor" @@ -22,9 +22,9 @@ resource "ibm_resource_instance" "sysdig_instance" { location = var.region resource_group_id = var.resource_group_id tags = (var.tags != null ? var.tags : []) - service_endpoints = (var.service_endpoints != "" ? var.service_endpoints : null) + service_endpoints = (var.visibility != "" ? var.visibility : null) parameters = { - "default_receiver" = var.enable_platform_metrics + "default_receiver" = var.is_enable_platform_metrics } timeouts { @@ -35,10 +35,10 @@ resource "ibm_resource_instance" "sysdig_instance" { } resource "ibm_resource_key" "sysdigKey" { - count = var.bind_key ? 1 : 0 + count = var.is_bind_key ? 1 : 0 name = var.key_name role = "Manager" - resource_instance_id = var.provision ? ibm_resource_instance.sysdig_instance[0].id : data.ibm_resource_instance.sysdig[0].id + resource_instance_id = var.is_provision_monitoring ? ibm_resource_instance.sysdig_instance[0].id : data.ibm_resource_instance.sysdig[0].id tags = (var.key_tags != null ? var.key_tags : []) } diff --git a/modules/monitoring-sysdig/output.tf b/modules/monitoring-sysdig/output.tf index 07fb858..b26f4f0 100644 --- a/modules/monitoring-sysdig/output.tf +++ b/modules/monitoring-sysdig/output.tf @@ -1,29 +1,29 @@ ##################################################### -# Sysdig key +# Monitoring service instance # Copyright 2020 IBM ##################################################### output "id" { - description = "The ID of the sysdig instance" - value = var.provision ? concat(ibm_resource_instance.sysdig_instance.*.id, [""])[0] : concat(data.ibm_resource_instance.sysdig.*.id, [""])[0] + description = "ID of monitoring instance" + value = var.is_provision_monitoring ? concat(ibm_resource_instance.sysdig_instance.*.id, [""])[0] : concat(data.ibm_resource_instance.sysdig.*.id, [""])[0] } output "guid" { - description = "The GUID of the sysdig instance" - value = var.provision ? concat(ibm_resource_instance.sysdig_instance.*.guid, [""])[0] : concat(data.ibm_resource_instance.sysdig.*.guid, [""])[0] + description = "GUID of the monitoring instance" + value = var.is_provision_monitoring ? concat(ibm_resource_instance.sysdig_instance.*.guid, [""])[0] : concat(data.ibm_resource_instance.sysdig.*.guid, [""])[0] } output "key_id" { - description = "ID of the sysdig instance key" + description = "Monitoring instance key id" value = concat(ibm_resource_key.sysdigKey.*.id, [""])[0] } output "key_guid" { - description = "sysdig key guid" + description = "Monitoring instance key guid" value = concat(ibm_resource_key.sysdigKey.*.guid, [""])[0] } output "key_credentials" { - description = "sysdig key credentials" + description = "Monitoring instance key credentials" value = concat(ibm_resource_key.sysdigKey.*.credentials, [""])[0] } diff --git a/modules/monitoring-sysdig/variables.tf b/modules/monitoring-sysdig/variables.tf index 9d2ee5a..b9b6108 100644 --- a/modules/monitoring-sysdig/variables.tf +++ b/modules/monitoring-sysdig/variables.tf @@ -3,13 +3,13 @@ # Copyright 2020 IBM ##################################################### -variable "provision" { +variable "is_provision_monitoring" { type = bool description = "Disable this to read the existing activity trcaker instance" default = true } -variable "bind_key" { +variable "is_bind_key" { description = "Enable this to bind key to instance (true/false)" type = bool default = false @@ -43,7 +43,7 @@ variable "delete_timeout" { default = null } -variable "enable_platform_metrics" { +variable "is_enable_platform_metrics" { type = bool description = "Receive platform metrics in Sysdig" default = true @@ -54,7 +54,7 @@ variable "region" { type = string } -variable "service_endpoints" { +variable "visibility" { description = "Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." type = string default = null diff --git a/output.tf b/output.tf index db174bd..aa1ee05 100644 --- a/output.tf +++ b/output.tf @@ -3,109 +3,109 @@ # activity tracker ###################################################### -output "atr_id" { - description = "Activity tracker id" +output "activity_tracker_id" { + description = "ID of activity tracker instance" value = concat(module.activity-tracker-atr-instance.*.id, [""])[0] } -output "ats_id" { - description = "Activity tracker id" +output "supertenant_activity_tracker_id" { + description = "ID of super-tenant activity tracker instance" value = concat(module.activity-tracker-ats-instance.*.id, [""])[0] } -output "atr_guid" { +output "activity_tracker_guid" { description = "The GUID of the activity tracker" value = concat(module.activity-tracker-atr-instance.*.guid, [""])[0] } -output "ats_guid" { +output "supertenant_activity_tracker_guid" { description = "The GUID of the activity tracker" value = concat(module.activity-tracker-ats-instance.*.guid, [""])[0] } -output "atr_key_id" { +output "activity_tracker_key_id" { description = "Activity tracker key id" value = concat(module.activity-tracker-atr-instance.*.key_id, [""])[0] } -output "ats_key_id" { +output "supertenant_activity_tracker_key_id" { description = "Activity tracker key id" value = concat(module.activity-tracker-ats-instance.*.key_id, [""])[0] } -output "atr_key_guid" { +output "activity_tracker_key_guid" { description = "Activity tracker key guid" value = concat(module.activity-tracker-atr-instance.*.key_guid, [""])[0] } -output "ats_key_guid" { +output "supertenant_activity_tracker_key_guid" { description = "Activity tracker key guid" value = concat(module.activity-tracker-ats-instance.*.key_guid, [""])[0] } -output "atr_key_credentials" { +output "activity_tracker_key_credentials" { description = "Activity tracker key credentials" value = concat(module.activity-tracker-atr-instance.*.key_credentials, [""])[0] } -output "ats_key_credentials" { +output "supertenant_activity_tracker_key_credentials" { description = "Activity tracker key credentials" value = concat(module.activity-tracker-ats-instance.*.key_credentials, [""])[0] } ###################################################### -# Logging +# Logging output parameters ###################################################### -output "str_logdna_id" { - description = "logdna id" +output "logging_id" { + description = "ID of logging instance" value = concat(module.logging_str_instance.*.id, [""])[0] } -output "sts_logdna_id" { - description = "logdna id" +output "supertenant_logging_id" { + description = "ID of super-tenant logging instance" value = concat(module.logging_sts_instance.*.id, [""])[0] } -output "str_logdna_guid" { - description = "The GUID of the logdna" +output "logging_guid" { + description = "GUID of the logging instance" value = concat(module.logging_str_instance.*.guid, [""])[0] } -output "sts_logdna_guid" { - description = "The GUID of the logdna" +output "supertenant_logging_guid" { + description = "GUID of super-tenant logging instance" value = concat(module.logging_sts_instance.*.guid, [""])[0] } -output "str_logdna_key_id" { - description = "logdna key id" +output "logging_key_id" { + description = "ID of logging instance key" value = concat(module.logging_str_instance.*.key_id, [""])[0] } -output "sts_logdna_key_id" { - description = "logdna key id" +output "supertenant_logging_key_id" { + description = "ID of super-tenant logging instance key" value = concat(module.logging_sts_instance.*.key_id, [""])[0] } -output "str_logdna_key_guid" { - description = "logdna key guid" +output "logging_key_guid" { + description = "GUID of logging instance key" value = concat(module.logging_str_instance.*.key_guid, [""])[0] } -output "sts_logdna_key_guid" { - description = "logdna key guid" +output "supertenant_logging_key_guid" { + description = "GUID of super-tenant logging instance key" value = concat(module.logging_sts_instance.*.key_guid, [""])[0] } -output "str_logdna_key_credentials" { - description = "logdna key credentials" +output "logging_key_credentials" { + description = "The credentials associated with the STR instance key" value = concat(module.logging_str_instance.*.key_credentials, [""])[0] } -output "sts_logdna_key_credentials" { - description = "logdna key credentials" +output "supertenant_logging_key_credentials" { + description = "The credentials associated with the STS instance key" value = concat(module.logging_sts_instance.*.key_credentials, [""])[0] } @@ -114,7 +114,7 @@ output "sts_logdna_key_credentials" { ###################################################### output "monitoring_id" { - description = "monitoring id" + description = "ID of monitoring instance" value = concat(module.monitoring_instance.*.id, [""])[0] } @@ -124,16 +124,16 @@ output "monitoring_guid" { } output "monitoring_key_id" { - description = "monitoring key id" + description = "ID of monitoring instance key" value = concat(module.monitoring_instance.*.key_id, [""])[0] } output "monitoring_key_guid" { - description = "monitoring key guid" + description = "GUID of monitoring instance key" value = concat(module.monitoring_instance.*.key_guid, [""])[0] } output "monitoring_key_credentials" { - description = "monitoring key credentials" + description = "Monitoring instance key credentials" value = concat(module.monitoring_instance.*.key_credentials, [""])[0] } diff --git a/test/ob_e2e_test.go b/test/ob_e2e_test.go index 53be582..7841606 100644 --- a/test/ob_e2e_test.go +++ b/test/ob_e2e_test.go @@ -14,7 +14,7 @@ func TestAccIBMObComplete(t *testing.T) { // terraform testing. terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ // The path to where our Terraform code is located - TerraformDir: "../examples/obervability-complete", + TerraformDir: "../examples/observability-complete", // Variables to pass to our Terraform code using -var options Vars: map[string]interface{}{ diff --git a/variables.tf b/variables.tf index c689e02..2ca7b11 100644 --- a/variables.tf +++ b/variables.tf @@ -21,13 +21,13 @@ variable "activity_tracker_name" { # Copyright 2020 IBM ##################################################### -variable "str_provision" { +variable "is_provision_logging" { type = bool description = "Logging STR: Disable this, not to provision logging STR instance" default = true } -variable "str_logging_bind_key" { +variable "is_bind_key_to_logging" { description = "Logging STR: Enable this flag to attach a key to STR instance." type = bool default = false @@ -39,7 +39,7 @@ variable "enable_platform_logs" { default = true } -variable "str_logging_plan" { +variable "logging_plan" { description = "Logging STR: plan type (14-day, 30-day, 7-day, hipaa-30-day and lite)" type = string validation { @@ -51,35 +51,35 @@ variable "str_logging_plan" { "7-day", "hipaa-30-day", "lite" - ], var.str_logging_plan) + ], var.logging_plan) ) } } -variable "str_logging_region" { +variable "logging_region" { description = "Logging STR: Provisioning Region" type = string } -variable "str_logging_service_endpoints" { +variable "logging_visbility" { description = "Logging STR: Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." type = string default = null } -variable "str_logging_tags" { +variable "logging_tags" { type = list(string) description = "Logging STR: Tags that should be applied to the service" default = null } -variable "str_logging_key_tags" { +variable "logging_key_tags" { type = list(string) description = "Logging STR: Tags that should be applied to the key" default = null } -variable "str_logging_key_name" { +variable "logging_key_name" { description = "Logging STR: Name of the instance key" type = string default = null @@ -90,13 +90,13 @@ variable "str_logging_key_name" { # Copyright 2020 IBM ##################################################### -variable "sts_provision" { +variable "is_provision_supertenant_logging" { type = bool description = "Logging STS: Disable this, not to create STS instance" default = true } -variable "sts_logging_bind_key" { +variable "is_bind_key_to_supertenant_logging" { description = "Logging STS: Enable this flag to attach a key to STS instance." type = bool default = false @@ -110,7 +110,7 @@ variable "sts_service_supertenant" { default = "" //provide valid value here } -variable "sts_provision_key" { +variable "supertenant_logging_provision_key" { type = string description = "Logging STS: Provision key" default = "" //provide valid value here @@ -118,7 +118,7 @@ variable "sts_provision_key" { ############## STS Parameters End ###################### -variable "sts_logging_plan" { +variable "supertenant_logging_plan" { description = "Logging STS: plan type (14-day, 30-day, 7-day, hipaa-30-day and lite)" type = string validation { @@ -130,35 +130,35 @@ variable "sts_logging_plan" { "7-day", "hipaa-30-day", "lite" - ], var.sts_logging_plan) + ], var.supertenant_logging_plan) ) } } -variable "sts_logging_region" { +variable "supertenant_logging_region" { description = "Logging STS: Provisioning Region" type = string } -variable "sts_logging_service_endpoints" { +variable "supertenant_logging_visibility" { description = "Logging STS: Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." type = string default = null } -variable "sts_logging_tags" { +variable "supertenant_logging_tags" { type = list(string) description = "Logging STS: Tags that should be applied to the service" default = null } -variable "sts_logging_key_tags" { +variable "supertenant_logging_key_tags" { type = list(string) description = "Logging STS: Tags that should be applied to the key" default = null } -variable "sts_logging_key_name" { +variable "supertenant_logging_key_name" { description = "Logging STS: Name of the instance key" type = string default = null @@ -168,18 +168,18 @@ variable "sts_logging_key_name" { # Set up Activity Tracker Super Tenant Receiver (ATR) instance ##################################################### -variable "atr_provision" { +variable "is_provision_activity_tracker" { type = bool description = "Activity Tracker ATR: Disable this not provision ATR instance" default = true } -variable "atr_region" { +variable "activity_tracker_region" { type = string description = "Activity Tracker ATS: Geographic location of the resource (e.g. us-south, us-east)" } -variable "atr_plan" { +variable "activity_tracker_plan" { type = string description = "Activity Tracker ATS: The type of plan the service instance should run under (lite, 7-day, 14-day, or 30-day)" validation { @@ -191,36 +191,36 @@ variable "atr_plan" { "7-day", "hipaa-30-day", "lite" - ], var.atr_plan) + ], var.activity_tracker_plan) ) } } -variable "atr_make_default_receiver" { +variable "is_activity_tracker_the_default_receiver" { type = bool description = "Enable this to make this instance a sdefault receiver" default = true } -variable "atr_tags" { +variable "activity_tracker_tags" { type = list(string) description = "Activity Tracker ATS: Tags that should be applied to the service" default = null } -variable "atr_bind_key" { +variable "is_bind_key_to_activity_tracker" { description = "Activity Tracker ATS: Enable this to bind key to instance (true/false)" type = bool default = false } -variable "atr_key_name" { +variable "activity_tracker_key_name" { description = "Activity Tracker ATS: Name of the instance key" type = string default = null } -variable "atr_key_tags" { +variable "activity_tracker_key_tags" { type = list(string) description = "Activity Tracker ATS: Tags that should be applied to the key" default = null @@ -233,31 +233,31 @@ variable "atr_key_tags" { ############## ATS Parameters Start ###################### -variable "use_existing_sts_crn" { +variable "is_attach_existing_supertenant_logging_crn" { type = bool description = "Enable this to attach existing logging STS instance to activity tracket ATS instance" default = false } -variable "ats_provision" { +variable "is_provision_supertenant_activity_tracker" { type = bool description = "Activity Tracker ATS: Disable this to read the existing activity tracker instance" default = true } -variable "ats_service_supertenant" { +variable "supertenant_activity_tracker_name" { type = string description = "Activity Tracker ATS: Name of your supertenant service" default = "" //provide valid values here } -variable "ats_provision_key" { +variable "supertenant_activity_tracker_provision_key" { type = string description = "Activity Tracker ATS: Provision key" default = "" //provide valid values here } -variable "ats_associated_logging_crn" { +variable "supertenant_activity_tracker_associated_logging_crn" { type = string description = "Logging: Enter the associated logging crn" default = null //provide valid value here @@ -266,12 +266,18 @@ variable "ats_associated_logging_crn" { ############## ATS Parameters End ###################### -variable "ats_region" { +variable "supertenant_activity_tracker_region" { type = string description = "Activity Tracker ATS: Geographic location of the resource (e.g. us-south, us-east)" } -variable "ats_plan" { +variable "use_existing_sts_crn" { + type = bool + description = "Enable this to attach existing logging STS instance to activity tracket ATS instance" + default = false +} + +variable "supertenant_activity_tracker_plan" { type = string description = "Activity Tracker ATS: The type of plan the service instance should run under (lite, 7-day, 14-day, or 30-day)" validation { @@ -283,30 +289,30 @@ variable "ats_plan" { "7-day", "hipaa-30-day", "lite" - ], var.ats_plan) + ], var.supertenant_activity_tracker_plan) ) } } -variable "ats_tags" { +variable "supertenant_activity_tracker_tags" { type = list(string) description = "Activity Tracker ATS: Tags that should be applied to the service" default = null } -variable "ats_bind_key" { +variable "is_bind_key_to_supertenant_activity_tracker" { description = "Activity Tracker ATS: Enable this to bind key to instance (true/false)" type = bool default = false } -variable "ats_key_name" { +variable "supertenant_activity_tracker_key_name" { description = "Activity Tracker ATS: Name of the instance key" type = string default = null } -variable "ats_key_tags" { +variable "supertenant_activity_tracker_key_tags" { type = list(string) description = "Activity Tracker ATS: Tags that should be applied to the key" default = null @@ -322,13 +328,13 @@ variable "monitoring_name" { type = string } -variable "monitoring_provision" { +variable "is_provision_monitoring" { type = bool description = "Monitoring: Disable this to read the existing activity tracker instance" default = true } -variable "monitoring_bind_key" { +variable "is_bind_key_to_monitoring" { description = "Monitoring: Flag indicating that key should be bind to logdna hippa instance" type = bool default = false @@ -339,7 +345,7 @@ variable "monitoring_plan" { type = string } -variable "monitoring_enable_platform_metrics" { +variable "is_enable_platform_metrics" { type = bool description = "Monitoring: Receive platform metrics in Sysdig" default = true @@ -351,7 +357,7 @@ variable "monitoring_region" { } -variable "monitoring_service_endpoints" { +variable "monitoring_visibility" { description = "Monitoring: Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'." type = string default = null