This provider is built to handel terraform for a well-known mailing system called postmark
Terraform 1.3.x Go 1.19.1 (to build the provider plugin)
$ git clone git@github.com:shebang-labs/terraform-provider-postmark.git
$ make
provider "postmark" {
account_token = "xxxxxxxxxxxxxxxxxxxx"
}
Run the following:
POSTMARK_ACCOUNT_TOKEN=xxxxxxxxxxxxxxxxxxxxxx TF_ACC=1 go test
Note: you need to replace the xxxxxxxxx with your account token.
The next line will create a datasource that have all servers data from your postmark portal
data "postmark_servers" "servers" {}
You can edit/delete for edit you can edit those two fields
resource "postmark_server" "s1" {
name = "Server 1"
color = "blue"
delivery_type = "live"
}
You can edit/delete for edit you can edit description and name only
resource "postmark_stream" "st1" {
stream_id = "transactional-dev-1"
name = "Stream 1"
description = "This is my first transactional stream"
message_stream_type = "Transactional"
server_token = "xxxxxxxxxxxxxxxxxxxx"
}
You can edit/delete for edit you can only edit the return_path_domain
resource "postmark_domain" "d1" {
name = "exmaple.com"
return_path_domain = "test.example.com"
}