An open API service indexing awesome lists of open source software.

https://github.com/terraform-ibm-modules/terraform-ibm-schematics-agent

Creates a Schematics Agent and deploys it on the existing cluster.
https://github.com/terraform-ibm-modules/terraform-ibm-schematics-agent

core-team ibm-cloud stable supported terraform terraform-module

Last synced: 27 days ago
JSON representation

Creates a Schematics Agent and deploys it on the existing cluster.

Awesome Lists containing this project

README

          

# Terraform Schematics Agent Module

[![Stable (With quality checks)](https://img.shields.io/badge/Status-Stable%20(With%20quality%20checks)-green)](https://terraform-ibm-modules.github.io/documentation/#/badge-status)
[![latest release](https://img.shields.io/github/v/release/terraform-ibm-modules/terraform-ibm-schematics-agent?logo=GitHub&sort=semver)](https://github.com/terraform-ibm-modules/terraform-ibm-schematics-agent/releases/latest)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

Creates an IBM Schematics Agent.

More information about the IBM Schematics Agent can be found [here](https://cloud.ibm.com/docs/schematics?topic=schematics-deploy-agent-overview&interface=ui)

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

## Overview
* [terraform-ibm-schematics-agent](#terraform-ibm-schematics-agent)
* [Examples](./examples)
* [Kubernetes example](./examples/kubernetes)
* [Contributing](#contributing)

## terraform-ibm-schematics-agent

### Usage

```hcl

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_resource_group_id = "xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX"
cos_instance_name = ""
cos_bucket_name = ""
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 = ""
}

```

### Required IAM access policies

### Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.9.0 |
| [ibm](#requirement\_ibm) | >= 1.49.0, < 2.0.0 |

### Modules

No modules.

### Resources

| Name | Type |
|------|------|
| [ibm_schematics_agent.schematics_agent_instance](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/schematics_agent) | resource |
| [ibm_schematics_agent_deploy.schematics_agent_deploy](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/schematics_agent_deploy) | resource |

### Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [agent\_description](#input\_agent\_description) | The schematics agent description. | `string` | `null` | no |
| [agent\_location](#input\_agent\_location) | The location where the schematics agent is deployed in the user environment. | `string` | `"us-south"` | no |
| [agent\_name](#input\_agent\_name) | The schematics agent name. | `string` | n/a | yes |
| [agent\_resource\_group\_id](#input\_agent\_resource\_group\_id) | The resource group ID of the schematics resource group. | `string` | n/a | yes |
| [agent\_version](#input\_agent\_version) | The schematics agent version. More info: https://cloud.ibm.com/docs/schematics?topic=schematics-update-agent-overview&interface=ui#agent_version-releases | `string` | `"1.3.1"` | no |
| [cluster\_id](#input\_cluster\_id) | ID of the target cluster where the schematics agent will be installed. | `string` | n/a | yes |
| [cluster\_resource\_group\_id](#input\_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](#input\_cos\_bucket\_name) | The COS bucket name to store the schematics agent logs. | `string` | n/a | yes |
| [cos\_bucket\_region](#input\_cos\_bucket\_region) | The COS bucket region. | `string` | n/a | yes |
| [cos\_instance\_name](#input\_cos\_instance\_name) | The COS instance name where the bucket is created for the schematics agent logs. | `string` | n/a | yes |
| [infra\_type](#input\_infra\_type) | Type of target agent infrastructure. Allowed values: `ibm_kubernetes`, `ibm_openshift` and `ibm_satellite`. | `string` | `"ibm_kubernetes"` | no |
| [schematics\_location](#input\_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](#output\_agent\_crn) | Schematics agent CRN. |
| [agent\_id](#output\_agent\_id) | Schematics agent ID. |
| [log\_url](#output\_log\_url) | URL to the full schematics agent deployment job logs. |
| [status\_code](#output\_status\_code) | Final result of the schematics agent deployment job. |
| [status\_message](#output\_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](https://github.com/terraform-ibm-modules/.github/blob/main/.github/SUPPORT.md).

To set up your local development environment, see [Local development setup](https://terraform-ibm-modules.github.io/documentation/#/local-dev-setup) in the project documentation.