Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Latest commit

 

History

History
38 lines (27 loc) · 998 Bytes

index.md

File metadata and controls

38 lines (27 loc) · 998 Bytes

Caddy Provider

This provider can be used to manage Caddy configurations.

Installation

  1. Download a binary from the release section.
  2. Install it into the user plugins directory.
    • Windows: %APPDATA%\terraform.d\plugins
    • other OS: ~/.terraform.d/plugins

Example Usage

resource "caddy_server_block" "my-server" {
  filename = "test.conf"
  content = <<EOF
my-server.com {
  respond "Hello, world!"
}
sub.my-server.com {
  respond "Hello, world!"
}
EOF
}

The file will be stored inside the configured folder.

Argument Reference

In addition to generic provider arguments (e.g. alias and version), the following arguments are supported in the Nginx provider block:

  • config_folder - (Optional) Folder where all configurations are stored. Default: /etc/caddy/conf.d

Resources