chesshacker / terraform-provider-confluence

Terraform Provider for Confluence
https://chesshacker.github.io/terraform-provider-confluence/
Mozilla Public License 2.0
10 stars 30 forks source link

How can I pass a multiline document into the body? #1

Open augustgerro opened 4 years ago

augustgerro commented 4 years ago

I try to past:

resource confluence_content "default" {
  space = "DO"
  title = "Example Page"
  body  = <<HERE
1.  create Dockerfile

2.  create docker-compose.yaml

2.1  define: parametrs, volumes

3. docker-compose up -d

Right     | Left   | Center 
---------:| :----- |:-----:
Computer  |  $1600 | one
Phone     |    $12 | three
Pipe      |     $1 | eleven

  HERE
}

But in confluence page:

image

or

resource confluence_content "default" {
  space = "DO"
  title = "Example Page"
  body = templatefile("${path.module}/doc.md", {
  })
}
❯ cat doc.md             
# Header 1 

1.  create Dockerfile

2.  create docker-compose.yaml

2.1  define: parametrs, volumes

3. docker-compose up -d

## Header 2

|    Right | Left  | Center |
|---------:|:------|:------:|
| Computer | $1600 |  one   |
|    Phone | $12   | three  |
|     Pipe | $1    | eleven |

Result:

image

Expected result:

image

Are you there any way to insert the structure of the document?

chickenandpork commented 2 years ago

Did you consider structuring your document as an HTML? Asking, not accusing, but if you did a here-doc as you have, but with HTML markup, you might get what you're looking for.

Extra markup in here for confluence-specific things: https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html