Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
196 changes: 102 additions & 94 deletions README.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion examples/activity-tracker-atr-instance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ 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 |
| resource\_group | Name of the resource group | string | n/a | yes |
| 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 |

Expand Down
30 changes: 15 additions & 15 deletions examples/activity-tracker-atr-instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

9 changes: 4 additions & 5 deletions examples/activity-tracker-atr-instance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions examples/activity-tracker-ats-instance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 |
Expand Down
70 changes: 35 additions & 35 deletions examples/activity-tracker-ats-instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

###################################################################
Expand All @@ -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
}
Loading