A Terraform provider for mackerel.io.
- Terraform Website: https://terraform.io
- Terraform Registry: https://registry.terraform.io/providers/mackerelio-labs/mackerel/latest
- Slack Workspace: https://mackerel-ug-slackin.herokuapp.com/
Terraform >= v0.14
Terraform 0.14 and later
terraform {
required_providers {
mackerel = {
source = "mackerelio-labs/mackerel"
version = "~> 0.0.1"
}
}
}
resource "mackerel_service" "app" {
name = "app"
}
resource "mackerel_role" "compute" {
service = mackerel_service.app.name
name = "ecs"
}
Mackerel terraform provider offers two ways of setting credential.
You can provide your Mackerel API key using environment variables, MACKEREL_API_KEY
.
Static credentials can be provided by adding mackerel_api_key
.
Usage:
variable "mackerel_api_key" {
}
provider "mackerel" {
api_key = var.mackerel_api_key
}
We thank @xcezx and @kjmkznr for contributing to terraform-provider-mackerel.
Copyright 2021 Tsuyoshi Maekawa
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.