- Site24x7 Website: https://www.site24x7.com
- Terraform Website: https://www.terraform.io
- Tutorials: learn.hashicorp.com
- Mailing List: Google Groups
The Terraform Site24x7 provider is a plugin for Terraform that allows for the full lifecycle management of Site24x7 resources. This provider is maintained by Site24x7 team.
Please note: If you believe you have found a security issue in the Terraform Site24x7 Provider, please responsibly disclose by contacting us at support@site24x7.com.
- Terraform 0.13+
To use the latest version of the provider in your Terraform environment, run terraform init
and Terraform will automatically install the provider.
For Terraform version 0.13.x
terraform {
required_version = "~> 0.15.0"
required_providers {
site24x7 = {
source = "site24x7/site24x7"
// Update the latest version from https://registry.terraform.io/providers/site24x7/site24x7/latest
version = "0.0.1-beta.12"
}
}
}
A terraform provider for managing the following resources in Site24x7:
- Website Monitor - site24x7_website_monitor (Site24x7 Website Monitor API doc)
- SSL Certificate Monitor - site24x7_ssl_monitor (Site24x7 SSL Certificate Monitor API doc)
- Rest API Monitor - site24x7_rest_api_monitor (Site24x7 Rest API Monitor API doc)
- Amazon Monitor - site24x7_amazon_monitor (Site24x7 Amazon Monitor API doc)
- URL IT Automation - site24x7_url_action (Site24x7 IT Automation API doc)
- Monitor Group - site24x7_monitor_group (Site24x7 Monitor Group API doc)
- Threshold Profile - site24x7_threshold_profile (Site24x7 Threshold Profile API doc)
- Location Profile - site24x7_location_profile (Site24x7 Location Profile API doc)
- Notification Profile - site24x7_notification_profile (Site24x7 Notification Profile API doc)
- User Group - site24x7_user_group (Site24x7 User Group API doc)
- Tag - site24x7_tag (Site24x7 Tag API doc)
- Opsgenie integration - site24x7_opsgenie_integration (Site24x7 Opsgenie integration API doc)
- Slack integration - site24x7_slack_integration (Site24x7 Slack integration API doc)
- Webhook integration - site24x7_webhook_integration (Site24x7 Webhook integration API doc)
Refer to the examples/ directory for a fully documented usage example.
This is a quick example of the provider configuration:
// Authentication API doc - https://www.site24x7.com/help/api/#authentication
provider "site24x7" {
// The client ID will be looked up in the SITE24X7_OAUTH2_CLIENT_ID
// environment variable if the attribute is empty or omitted.
oauth2_client_id = "<SITE24X7_CLIENT_ID>"
// The client secret will be looked up in the SITE24X7_OAUTH2_CLIENT_SECRET
// environment variable if the attribute is empty or omitted.
oauth2_client_secret = "<SITE24X7_CLIENT_SECRET>"
// The refresh token will be looked up in the SITE24X7_OAUTH2_REFRESH_TOKEN
// environment variable if the attribute is empty or omitted.
oauth2_refresh_token = "<SITE24X7_REFRESH_TOKEN>"
// Specify the data center from which you have obtained your
// OAuth client credentials and refresh token. It can be (US/EU/IN/AU/CN).
data_center = "US"
// The minimum time to wait in seconds before retrying failed Site24x7 API requests.
retry_min_wait = 1
// The maximum time to wait in seconds before retrying failed Site24x7 API
// requests. This is the upper limit for the wait duration with exponential
// backoff.
retry_max_wait = 30
// Maximum number of Site24x7 API request retries to perform until giving up.
max_retries = 4
}
// Website Monitor API doc: https://www.site24x7.com/help/api/#website
resource "site24x7_website_monitor" "website_monitor_us" {
// (Required) Name of the monitor
display_name = "Example Monitor"
// (Required) Website address to monitor.
website = "https://www.example.com"
// (Optional) Check interval for monitoring. Default: 1. See
// https://www.site24x7.com/help/api/#check-interval for all supported
// values.
check_frequency = 1
}
If you wish to work on the provider, you'll first need Go installed on your
machine (version 1.13+ is required). You'll also need to correctly setup a
GOPATH, as well as adding $GOPATH/bin
to your $PATH
.
Clone the repository and build the provider:
git clone git@github.com:Site24x7/terraform-provider-site24x7
cd terraform-provider-site24x7
./build/build_terraform_provider_site24x7.sh
This will build the terraform-provider-site24x7
binary and install it into
the $HOME/.terraform.d/plugins/registry.zoho.io/zoho/site24x7/1.0.0/linux_amd64
directory.
Place the below content in ~/.terraformrc
provider_installation {
filesystem_mirror {
path = "$HOME/.terraform.d/plugins/"
include = ["registry.zoho.io/*/*"]
}
direct {
exclude = ["registry.zoho.io/*/*"]
}
}
Please refer the following links for installing custom providers.
We'll aim to support the latest supported release of Go, along with the previous release. This doesn't mean that building with an older version of Go will not work, but we don't intend to support a Go version in this project that is not supported by the larger Go community. Please see the Go releases page for more details.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Even the tiniest contributions to the script or to the documentation are very welcome and greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b <branch name>
) - Commit your Changes (
git commit -m '<commit message>'
) - Push to the Branch (
git push origin <branch name>
) - Open a Pull Request
Copyright (c) 2022 Zoho Corporation Private Limited
This project is licensed under the MIT License - see LICENSE file for details.
The Site24x7 Terraform Provider uses code from the following library:
- Bonial.com, MIT License