Mention the purpose of writing these modules.
E.g:
This is a collection of modules that make it easier to provision and configure Observability services like logging, monitor and activity tracker on IBM Cloud Platform:
This module is meant for use with Terraform 0.13 (and higher).
Examples are captured in examples folder, demonstarte how to use a module through a template:
e.g:
provider "ibm" {
}
data "ibm_resource_group" "logdna" {
name = var.resource_group
}
module "logdna_instance" {
source = "terraform-ibm-modules/observability/ibm//modules/logging-logdna"
bind_resource_key = var.bind_resource_key
service_name = var.service_name
resource_group_id = data.ibm_resource_group.logdna.id
plan = var.plan
region = var.region
service_endpoints = var.service_endpoints
tags = var.tags
resource_key_name = var.resource_key_name
role = var.role
resource_key_tags = var.resource_key_tags
}
- Terraform 0.13 (or later)
- terraform-provider-ibm
Be sure you have the correct Terraform version (0.13), you can choose the binary here:
Be sure you have the compiled plugins on $HOME/.terraform.d/plugins/
Run the following command to execute the pre-commit hooks defined in .pre-commit-config.yaml file
pre-commit run -a
You can install pre-coomit tool using
pip install pre-commit
or
pip3 install pre-commit
Used to detect secrets within a code base.
To create a secret baseline file run following command
detect-secrets scan --update .secrets.baseline
While running the pre-commit hook, if you encounter an error like
WARNING: You are running an outdated version of detect-secrets.
Your version: 0.13.1+ibm.27.dss
Latest version: 0.13.1+ibm.46.dss
See upgrade guide at https://ibm.biz/detect-secrets-how-to-upgrade
run below command
pre-commit autoupdate
which upgrades all the pre-commit hooks present in .pre-commit.yaml file.
To review the plan for the configuration defined (no resources actually provisioned)
terraform plan -var-file=./input.tfvars
To execute and start building the configuration defined in the plan (provisions resources)
terraform apply -var-file=./input.tfvars
To destroy the VPC and all related resources
terraform destroy -var-file=./input.tfvars
All optional parameters, by default, will be set to null
in respective example's variable.tf file. You can also override these optional parameters.