diff --git a/docs/index.md b/docs/index.md index fd8d04a..c9e5662 100644 --- a/docs/index.md +++ b/docs/index.md @@ -9,7 +9,7 @@ description: |- The Forem provider provides resources to interact with a Forem API. -In order to use this provider, you must first generate an API key under `settings/account`. +In order to use this provider, you must first generate a Forem **API key** under `Settings -> Account`. ## Example Usage diff --git a/docs/resources/listing.md b/docs/resources/listing.md index 6610fdd..33e540e 100644 --- a/docs/resources/listing.md +++ b/docs/resources/listing.md @@ -17,7 +17,48 @@ description: |- - https://developers.forem.com/api#operation/createListing - https://developers.forem.com/api#operation/updateListing +## Example Usage +```terraform +locals { + tags = ["golang", "terraform", "forem", "md", "listings"] +} + +# Minimum required values set +resource "forem_listing" "example_basic" { + title = "This a basic listing" + body_markdown = "A simple single-line body that is very basic even for a listing..." +} + +# Listing generated from a file +resource "forem_listing" "example_file" { + title = "How to create a Listing from a file!" + body_markdown = file("${path.module}/files/example.md") + + tags = local.tags +} + +# Full Listing example +resource "forem_listing" "example_full" { + title = "My first listing using TF Forem provider!" + action = "publish" + category = "cfp" + expires_at = "09/06/2025" + contact_via_connect = false + location = "Amsterdam" + + body_markdown = <<-EOT + This is the markdown for the listing + # First header + - bullet1 + - bullet2 + - bullet3 + - bullet4 +EOT + + tags = local.tags +} +``` ## Schema diff --git a/templates/index.md.tmpl b/templates/index.md.tmpl index aa27c91..89a09e4 100644 --- a/templates/index.md.tmpl +++ b/templates/index.md.tmpl @@ -9,7 +9,7 @@ description: |- The Forem provider provides resources to interact with a Forem API. -In order to use this provider, you must first generate an API key under `settings/account`. +In order to use this provider, you must first generate a Forem **API key** under `Settings -> Account`. ## Example Usage