Skip to content

terraform-ibm-modules/terraform-ibm-schematics-agent

Repository files navigation

Terraform Schematics Agent Module

Stable (With quality checks) latest release pre-commit Renovate enabled semantic-release

Creates an IBM Schematics Agent.

More information about the IBM Schematics Agent can be found here

Limitation: Currently there's a limitation to destroy Schematics Agent using terraform, but it can be deleted using CLI and API. Provider issue - IBM-Cloud/terraform-provider-ibm#5475

Overview

terraform-ibm-schematics-agent

Usage

provider "ibm" {
  ibmcloud_api_key = "XXXXXXXXXX"
  region           = "us-south"
}
module "schematics_agent" {
  source                    = "terraform-ibm-modules/schematics-agent/ibm"
  version                   = "latest" # Replace "latest" with a release version to lock into a specific release
  infra_type                = "ibm_kubernetes" # ibm_kubernetes, ibm_openshift, ibm_satellite.
  cluster_id                = "<cluster-id>"
  cluster_resource_group_id = "xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX"
  cos_instance_name         = "<cos-instance-name>"
  cos_bucket_name           = "<cos-bucket-name>"
  cos_bucket_region         = "<cos-bucket-region>"
  agent_location            = "us-south"
  agent_description         = "schematics agent description"
  agent_name                = "k8s-schematics-agent"
  agent_resource_group_id   = "xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX"
  schematics_location       = "us-south" # Allowed values are `us-south`, `us-east`, `eu-gb`, `eu-de`.
  agent_version             = "<agent-version>"
}

Required IAM access policies

Requirements

Name Version
terraform >= 1.3.0
ibm >= 1.49.0, < 2.0.0

Modules

No modules.

Resources

Name Type
ibm_schematics_agent.schematics_agent_instance resource
ibm_schematics_agent_deploy.schematics_agent_deploy resource

Inputs

Name Description Type Default Required
agent_description The schematics agent description. string null no
agent_location The location where the schematics agent is deployed in the user environment. string "us-south" no
agent_name The schematics agent name. string n/a yes
agent_resource_group_id The resource group ID of the schematics resource group. string n/a yes
agent_version The schematics agent version. string "1.0.1-beta" no
cluster_id ID of the target cluster where the schematics agent will be installed. string n/a yes
cluster_resource_group_id Resource group ID of the target cluster where the schematics agent will be installed. string n/a yes
cos_bucket_name The COS bucket name to store the schematics agent logs. string n/a yes
cos_bucket_region The COS bucket region. string n/a yes
cos_instance_name The COS instance name where the bucket is created for the schematics agent logs. string n/a yes
infra_type Type of target agent infrastructure. Allowed values: ibm_kubernetes, ibm_openshift and ibm_satellite. string "ibm_kubernetes" no
schematics_location List of locations supported by IBM Cloud Schematics service. Allowed values are us-south, us-east, eu-gb, eu-de. string "us-south" no

Outputs

Name Description
agent_crn Schematics agent CRN.
agent_id Schematics agent ID.
log_url URL to the full schematics agent deployment job logs.
status_code Final result of the schematics agent deployment job.
status_message The outcome of the schematics agent deployment job, in a formatted log string.

Contributing

You can report issues and request features for this module in GitHub issues in the module repo. See Report an issue or request a feature.

To set up your local development environment, see Local development setup in the project documentation.