Skip to content

Commit 2c67153

Browse files
authored
feat: initial release (#3)
1 parent e9bd2c0 commit 2c67153

25 files changed

+1563
-254
lines changed

.github/settings.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ repository:
1515
# By changing this field, you rename the repository.
1616

1717
# Uncomment this name property and set the name to the current repo name.
18-
# name: ""
18+
name: "terraform-ibm-icd-elasticsearch"
1919

2020
# The description is displayed under the repository name on the
2121
# organization page and in the 'About' section of the repository.
2222

2323
# Uncomment this description property
2424
# and update the description to the current repo description.
25-
# description: ""
25+
description: "Implements an instance of the IBM Cloud Databases for Elasticsearch service."
2626

2727
# Uncomment this topics property
2828
# and add a comma-separated list of topics to set on the repo.
29-
# topics: terraform, ibm-cloud, terraform-module
29+
topics: core-team, terraform, ibm-cloud, terraform-module, ibm-database, icd-elasticsearch, elasticsearch, supported, graduated

.secrets.baseline

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2023-06-03T04:42:19Z",
6+
"generated_at": "2023-09-07T16:30:47Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -76,7 +76,28 @@
7676
"name": "TwilioKeyDetector"
7777
}
7878
],
79-
"results": {},
79+
"results": {
80+
"README.md": [
81+
{
82+
"hashed_secret": "33da8d0e8af2efc260f01d8e5edfcc5c5aba44ad",
83+
"is_secret": true,
84+
"is_verified": false,
85+
"line_number": 35,
86+
"type": "Secret Keyword",
87+
"verified_result": null
88+
}
89+
],
90+
"module-metadata.json": [
91+
{
92+
"hashed_secret": "99075eb0baa8cfda1cae029da06b57b93cc13a31",
93+
"is_secret": false,
94+
"is_verified": false,
95+
"line_number": 407,
96+
"type": "Secret Keyword",
97+
"verified_result": null
98+
}
99+
]
100+
},
80101
"version": "0.13.1+ibm.61.dss",
81102
"word_list": {
82103
"file": null,

README.md

Lines changed: 89 additions & 135 deletions
Large diffs are not rendered by default.

common-dev-assets

Submodule common-dev-assets updated 46 files

cra-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# More info about this file at https://github.com/terraform-ibm-modules/common-pipeline-assets/blob/main/.github/workflows/terraform-test-pipeline.md#cra-config-yaml
22
version: "v1"
33
CRA_TARGETS:
4-
- CRA_TARGET: "examples/basic" # Target directory for CRA scan. If not provided, the CRA Scan will not be run.
4+
- CRA_TARGET: "examples/complete" # Target directory for CRA scan. If not provided, the CRA Scan will not be run.
55
CRA_IGNORE_RULES_FILE: "cra-tf-validate-ignore-rules.json" # CRA Ignore file to use. If not provided, it checks the repo root directory for `cra-tf-validate-ignore-rules.json`
66
# CRA_ENVIRONMENT_VARIABLES: # An optional map of environment variables for CRA, where the key is the variable name and value is the value. Useful for providing TF_VARs.
77
# TF_VAR_sample: "sample value"

examples/basic/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Basic example
22

3-
<!-- There is a pre-commit hook that will take the title of each example add include it in the repos main README.md -->
4-
<!-- The text below should describe exactly what resources are provisioned / configured by the example -->
3+
An end-to-end example that creates the following infrastructure:
54

6-
An end-to-end basic example that will provision the following:
7-
- A new resource group if one is not passed in.
8-
- A new Cloud Object Storage instance.
5+
- A resource group, if one is not passed in.
6+
- An ICD Elasticsearch database instance.

examples/basic/main.tf

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
##############################################################################
2-
# Resource group
2+
# Resource Group
33
##############################################################################
44

55
module "resource_group" {
6-
source = "terraform-ibm-modules/resource-group/ibm"
7-
version = "1.0.5"
6+
source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-resource-group.git?ref=v1.0.6"
87
# if an existing resource group is not set (null) create a new one using prefix
98
resource_group_name = var.resource_group == null ? "${var.prefix}-resource-group" : null
109
existing_resource_group_name = var.resource_group
1110
}
1211

1312
##############################################################################
14-
# COS instance
13+
# Elasticsearch Instance
1514
##############################################################################
1615

17-
resource "ibm_resource_instance" "cos_instance" {
18-
name = "${var.prefix}-cos"
19-
resource_group_id = module.resource_group.resource_group_id
20-
service = "cloud-object-storage"
21-
plan = "standard"
22-
location = "global"
23-
tags = var.resource_tags
16+
module "icd_elasticsearch" {
17+
source = "../../"
18+
resource_group_id = module.resource_group.resource_group_id
19+
name = "${var.prefix}-elasticsearch"
20+
region = var.region
21+
elasticsearch_version = var.elasticsearch_version
22+
tags = var.resource_tags
2423
}

examples/basic/outputs.tf

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,7 @@
22
# Outputs
33
##############################################################################
44

5-
output "cos_instance_id" {
6-
description = "COS instance id"
7-
value = ibm_resource_instance.cos_instance.id
8-
}
9-
10-
output "resource_group_name" {
11-
description = "Resource group name"
12-
value = module.resource_group.resource_group_name
13-
}
14-
15-
output "resource_group_id" {
16-
description = "Resource group ID"
17-
value = module.resource_group.resource_group_id
5+
output "id" {
6+
description = "Elasticsearch id"
7+
value = module.icd_elasticsearch.id
188
}

examples/basic/provider.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
##############################################################################
2-
# Provider config
3-
##############################################################################
4-
51
provider "ibm" {
62
ibmcloud_api_key = var.ibmcloud_api_key
73
region = var.region

examples/basic/variables.tf

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
##############################################################################
2-
# Input variables
3-
##############################################################################
4-
51
variable "ibmcloud_api_key" {
62
type = string
73
description = "The IBM Cloud API Key"
@@ -17,12 +13,18 @@ variable "region" {
1713
variable "prefix" {
1814
type = string
1915
description = "Prefix to append to all resources created by this example"
20-
default = "basic"
16+
default = "elastic"
2117
}
2218

2319
variable "resource_group" {
2420
type = string
25-
description = "The name of an existing resource group to provision resources in to. If not set a new resource group will be created using the prefix variable"
21+
description = "An existing resource group name to use for this example, if unset a new resource group will be created"
22+
default = null
23+
}
24+
25+
variable "elasticsearch_version" {
26+
type = string
27+
description = "Version of elasticsearch to deploy"
2628
default = null
2729
}
2830

0 commit comments

Comments
 (0)