This repository contains a Terraform provider for resources on the mittwald cloud platform.
You can install this provider from the Terraform registry. For this, add the following code to your Terraform configuration:
terraform {
required_providers {
mittwald = {
source = "mittwald/mittwald"
version = ">= 1.0.0, < 2.0.0"
}
}
}
provider "mittwald" {
}
In order to use this provider, you need to have a mittwald mStudio account with an API key. You can then configure the provider with the following environment variables:
MITTWALD_API_TOKEN
: Your API token; see our API documentation on how to obtain an API token.
Have a look at the general provider usage to see how to get started with this provider.
This provider offers the following resources:
mittwald_project
mittwald_app
mittwald_mysql_database
mittwald_redis_database
mittwald_cronjob
mittwald_virtualhost
mittwald_container_stack
mittwald_container_registry
and the following data sources:
Coming soon:
mittwald_mysql_user
mittwald_ssh_user
mittwald_dns_zone
mittwald_email_address
mittwald_email_deliverybox
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
install
command:
go install
Take note where you installed the terraform-provider-mittwald
binary (most likely in your $GOPATH/bin
directory). Then, create a file called ~/.terraformrc
with the following contents (replacing the path with the path to your binary):
provider_installation {
dev_overrides {
"registry.terraform.io/mittwald/mittwald" = "/opt/go/bin/terraform-provider-mittwald"
}
# For all other providers, install them directly from their origin provider
# registries as normal. If you omit this, Terraform will _only_ use
# the dev_overrides block, and so no other providers will be available.
direct {}
}
If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).
To compile the provider, run go install
. This will build the provider and put the provider binary in the $GOPATH/bin
directory.
To generate or update documentation, run go generate
.
In order to run the full suite of Acceptance tests, run make testacc
.
Note: Acceptance tests create real resources, and often cost money to run.
make testacc