From e1640e45efd3ee85ba081a8b6a5957844c1c39d8 Mon Sep 17 00:00:00 2001 From: Martin Helmich Date: Wed, 13 Nov 2024 16:17:07 +0100 Subject: [PATCH] Update generated files --- docs/resources/virtualhost.md | 23 ++++++++++++++++++- .../mittwald_virtualhost/resource.tf | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/docs/resources/virtualhost.md b/docs/resources/virtualhost.md index 13c961f..51cee43 100644 --- a/docs/resources/virtualhost.md +++ b/docs/resources/virtualhost.md @@ -10,7 +10,28 @@ description: |- This resource models a virtualhost. - +## Example Usage + +```terraform +variable "server_id" { + type = string +} + +resource "mittwald_virtualhost" "foobar" { + hostname = "test.example" + project_id = mittwald_project.foobar.id + + paths = { + "/" = { + app = mittwald_app.foobar.id + } + + "/redirect" = { + redirect = "https://redirect.example" + } + } +} +``` ## Schema diff --git a/examples/resources/mittwald_virtualhost/resource.tf b/examples/resources/mittwald_virtualhost/resource.tf index 30294f2..780bc93 100644 --- a/examples/resources/mittwald_virtualhost/resource.tf +++ b/examples/resources/mittwald_virtualhost/resource.tf @@ -3,7 +3,7 @@ variable "server_id" { } resource "mittwald_virtualhost" "foobar" { - hostname = "test.example" + hostname = "test.example" project_id = mittwald_project.foobar.id paths = {