Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Commit 03a8a26

Browse files
Input variables Naming convention
1 parent 15fcfad commit 03a8a26

File tree

44 files changed

+757
-727
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+757
-727
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,6 @@ jobs:
5353
status: ${{ job.status }}
5454
author_name: Integration Test # default: 8398a7@action-slack
5555
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # optional
5657
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
5758
if: always() # Pick up events even if the job fails or is canceled.

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ default_stages: [commit]
66
# 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
77
repos:
88
- repo: git://github.com/antonbabenko/pre-commit-terraform
9-
rev: v1.45.0
9+
rev: v1.62.3
1010
hooks:
1111
- id: terraform_fmt
1212
- repo: git://github.com/pre-commit/pre-commit-hooks
13-
rev: v3.4.0
13+
rev: v4.1.0
1414
hooks:
1515
- id: check-merge-conflict
1616
- id: trailing-whitespace
@@ -20,7 +20,7 @@ repos:
2020
# You are encouraged to use static refs such as tags, instead of branch name
2121
#
2222
# Running "pre-commit autoupdate" would automatically updates rev to latest tag
23-
rev: 0.13.1+ibm.46.dss
23+
rev: 0.13.1+ibm.47.dss
2424
hooks:
2525
- id: detect-secrets # pragma: whitelist secret
2626
# Add options for detect-secrets-hook binary. You can run `detect-secrets-hook --help` to list out all possible options.

.secrets.baseline

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2021-10-20T11:29:50Z",
6+
"generated_at": "2022-01-05T11:20:40Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -77,7 +77,7 @@
7777
}
7878
],
7979
"results": {},
80-
"version": "0.13.1+ibm.46.dss",
80+
"version": "0.13.1+ibm.47.dss",
8181
"word_list": {
8282
"file": null,
8383
"hash": null

README.md

Lines changed: 102 additions & 94 deletions
Large diffs are not rendered by default.

examples/activity-tracker-atr-instance/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,15 @@ module "activity_tracker_instance" {
4848
| Name | Description | Type | Default | Required |
4949
|----------------------|------------------------------------------------------------------|:-------------|---------|----------|
5050
| name | Name of the service | string | n/a | yes |
51+
| is_provision_activity_tracker | Disable this to read the existing activity tracker instance | bool | true | no |
5152
| plan | Type of plan the service instance should run under | string | n/a | yes |
5253
| region | Location of the resource | string | n/a | yes |
5354
| tags | Tags that should be applied to the service | list(string) | n/a | no |
5455
| resource\_group | Name of the resource group | string | n/a | yes |
5556
| create_timeout | Timeout duration for create | string | n/a | no |
5657
| update_timeout | Timeout duration for update | string | n/a | no |
5758
| delete_timeout | Timeout duration for delete | string | n/a | no |
58-
| bind_key | Set this to attach key to instance | bool | false | no |
59+
| is_bind_key | Set this to attach key to instance | bool | false | no |
5960
| key_name | Name of the key | string | n/a | no |
6061
| key_tags | Tags that should be applied to the key | list(string) | n/a | no |
6162

examples/activity-tracker-atr-instance/main.tf

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ data "ibm_resource_group" "res_group" {
1616

1717
module "activity_tracker_instance" {
1818

19-
source = "./../../modules/activity-tracker-instance"
20-
provision = var.provision
21-
is_ats_instance = false
22-
name = var.name
23-
plan = var.plan
24-
region = var.region
25-
bind_key = var.bind_key
26-
key_name = var.key_name
27-
key_tags = var.key_tags
28-
resource_group_id = data.ibm_resource_group.res_group.id
29-
tags = var.tags
30-
make_default_receiver = var.make_default_receiver
31-
create_timeout = var.create_timeout
32-
update_timeout = var.update_timeout
33-
delete_timeout = var.delete_timeout
19+
source = "./../../modules/activity-tracker-instance"
20+
is_provision_activity_tracker = var.is_provision_activity_tracker
21+
is_supertenant_activity_tracker = false
22+
name = var.name
23+
plan = var.plan
24+
region = var.region
25+
is_bind_key = var.is_bind_key
26+
key_name = var.key_name
27+
key_tags = var.key_tags
28+
resource_group_id = data.ibm_resource_group.res_group.id
29+
tags = var.tags
30+
is_activity_tracker_the_default_receiver = var.is_activity_tracker_the_default_receiver
31+
create_timeout = var.create_timeout
32+
update_timeout = var.update_timeout
33+
delete_timeout = var.delete_timeout
3434
}
3535

examples/activity-tracker-atr-instance/variables.tf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ variable "plan" {
1414
default = "7-day"
1515
}
1616

17-
variable "make_default_receiver" {
17+
variable "is_activity_tracker_the_default_receiver" {
1818
type = bool
19-
description = "Enable this to make this instance as default receiver"
19+
description = "Enable this to make this instance a sdefault receiver"
2020
default = true
2121
}
2222

23-
24-
variable "provision" {
23+
variable "is_provision_activity_tracker" {
2524
type = bool
2625
description = "Disable this to read the existing activity tracker instance"
2726
default = true
@@ -62,7 +61,7 @@ variable "tags" {
6261
default = null
6362
}
6463

65-
variable "bind_key" {
64+
variable "is_bind_key" {
6665
description = "Enable this to bind key to instance (true/false)"
6766
type = bool
6867
default = false

examples/activity-tracker-ats-instance/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ data "ibm_resource_group" "res_group" {
5252
module "logging_sts_instance" {
5353
//Uncomment the following line to point the source to registry level
5454
//source = "terraform-ibm-modules/observability/ibm//modules/logging-logdna"
55-
count = (var.is_ats_instance && var.use_existing_sts_crn == false) ? 1 : 0
55+
count = (var.is_supertenant_activity_tracker && var.use_existing_sts_crn == false) ? 1 : 0
5656
source = "./../../modules/logging-instance"
5757
provision = var.sts_provision
5858
is_sts_instance = true //logging sts is required only if ATS instance is provisioned
@@ -81,7 +81,7 @@ module "activity_tracker_ats_instance" {
8181
//source = "terraform-ibm-modules/observability/ibm//modules/activity-tracker-logdna"
8282
8383
source = "./../../modules/activity-tracker-instance"
84-
provision = var.ats_provision
84+
provision = var.is_supertenant_activity_tracker
8585
is_ats_instance = var.is_ats_instance
8686
name = var.ats_name
8787
plan = var.ats_plan
@@ -106,7 +106,7 @@ module "activity_tracker_ats_instance" {
106106

107107
| Name | Description | Type | Default | Required |
108108
|---------------------------|------------------------------------------------------------------|:-------------|:------- |:---------|
109-
| is_ats_instance | Set this to true to provision Activity tracker ATS instance | bool | false | no |
109+
| is_supertenant_activity_tracker | Set this to true to provision Activity tracker ATS instance | bool | false | no |
110110
| use_existing_sts_crn | Set this to true to use existing logging STS crn | string | Empty | no |
111111
| ats_service_supertenant | Name of service supertenant | string | Empty | no |
112112
| ats_provision_key | Service provision key | string | Empty | no |

examples/activity-tracker-ats-instance/main.tf

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,24 @@ data "ibm_resource_group" "res_group" {
1717
module "logging_sts_instance" {
1818
//Uncomment the following line to point the source to registry level
1919
//source = "terraform-ibm-modules/observability/ibm//modules/logging-logdna"
20-
count = (var.is_ats_instance && var.use_existing_sts_crn == false) ? 1 : 0
21-
source = "./../../modules/logging-instance"
22-
provision = var.sts_provision
23-
is_sts_instance = true //logging sts is required only if ATS instance is provisioned
24-
bind_key = var.sts_bind_key
25-
name = var.sts_name
26-
resource_group_id = data.ibm_resource_group.res_group.id
27-
plan = var.sts_plan
28-
region = var.sts_region
29-
service_endpoints = var.sts_service_endpoints
30-
service_supertenant = var.sts_service_supertenant
31-
provision_key = var.sts_provision_key
32-
tags = var.sts_tags
33-
create_timeout = var.create_timeout
34-
update_timeout = var.update_timeout
35-
delete_timeout = var.delete_timeout
36-
key_name = var.sts_key_name
37-
key_tags = var.sts_key_tags
20+
count = (var.is_supertenant_activity_tracker && var.is_attach_existing_supertenant_logging_crn == false) ? 1 : 0
21+
source = "./../../modules/logging-instance"
22+
is_provision_logging = var.is_provision_logging
23+
is_supertenant_logging = true //logging sts is required only if ATS instance is provisioned
24+
is_bind_key = var.is_bind_key_to_logging_instance
25+
name = var.logging_name
26+
resource_group_id = data.ibm_resource_group.res_group.id
27+
plan = var.logging_plan
28+
region = var.logging_region
29+
visibility = var.logging_visibility
30+
service_supertenant = var.logging_service_supertenant
31+
provision_key = var.logging_provision_key
32+
tags = var.logging_tags
33+
create_timeout = var.create_timeout
34+
update_timeout = var.update_timeout
35+
delete_timeout = var.delete_timeout
36+
key_name = var.logging_key_name
37+
key_tags = var.logging_key_tags
3838
}
3939

4040
###################################################################
@@ -43,21 +43,21 @@ module "logging_sts_instance" {
4343

4444
module "activity_tracker_ats_instance" {
4545

46-
source = "./../../modules/activity-tracker-instance"
47-
provision = var.ats_provision
48-
is_ats_instance = true
49-
name = var.ats_name
50-
plan = var.ats_plan
51-
region = var.ats_region
52-
bind_key = var.ats_bind_key
53-
key_name = var.ats_key_name
54-
key_tags = var.ats_key_tags
55-
resource_group_id = data.ibm_resource_group.res_group.id
56-
service_supertenant = var.ats_service_supertenant
57-
associated_logging_crn = var.is_ats_instance ? (var.use_existing_sts_crn ? var.ats_associated_logging_crn : module.logging_sts_instance[0].id) : ""
58-
provision_key = var.ats_provision_key
59-
tags = var.ats_tags
60-
create_timeout = var.create_timeout
61-
update_timeout = var.update_timeout
62-
delete_timeout = var.delete_timeout
46+
source = "./../../modules/activity-tracker-instance"
47+
is_provision_activity_tracker = var.is_provision_activity_tracker
48+
is_supertenant_activity_tracker = true
49+
name = var.supertenant_activity_tracker_name
50+
plan = var.supertenant_activity_tracker_plan
51+
region = var.supertenant_activity_tracker_region
52+
is_bind_key = var.is_bind_key_to_supertenant_activity_tracker
53+
key_name = var.supertenant_activity_tracker_key_name
54+
key_tags = var.supertenant_activity_tracker_key_tags
55+
resource_group_id = data.ibm_resource_group.res_group.id
56+
service_supertenant = var.ats_service_supertenant
57+
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) : ""
58+
provision_key = var.supertenant_activity_tracker_provision_key
59+
tags = var.supertenant_activity_tracker_tags
60+
create_timeout = var.create_timeout
61+
update_timeout = var.update_timeout
62+
delete_timeout = var.delete_timeout
6363
}

0 commit comments

Comments
 (0)