Skip to content

Commit

Permalink
Adjust documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-helmich committed Oct 10, 2023
1 parent afe72fa commit e64f02f
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 2 deletions.
38 changes: 38 additions & 0 deletions docs/resources/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,45 @@ description: |-

Models an app installation on the mittwald platform

## Example Usage

```terraform
variable "admin_password" {
description = "The password for the admin user of the wordpress app"
type = string
sensitive = true
}
resource "mittwald_app" "wordpress" {
project_id = mittwald_project.foobar.id
app = "wordpress"
version = "6.3.1"
description = "Martins Test-App"
update_policy = "patchlevel"
user_inputs = {
"site_title" = "My awesome site"
"admin_user" = "martin"
"admin_pass" = var.admin_password
"admin_email" = "[email protected]"
}
}
resource "mittwald_app" "custom_php" {
project_id = mittwald_project.foobar.id
database_id = mittwald_mysql_database.foobar_database.id
app = "php"
version = "1.0.0"
description = "Martins Test-App"
document_root = "/public"
update_policy = "none"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/mysql_database.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ variable "database_password" {
sensitive = true
}
resource "mittwald_mysql_database" "martin_test" {
resource "mittwald_mysql_database" "foobar_database" {
project_id = mittwald_project.foobar.id
version = "8.0"
description = "Foo"
Expand Down
35 changes: 35 additions & 0 deletions examples/resources/mittwald_app/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
variable "admin_password" {
description = "The password for the admin user of the wordpress app"
type = string
sensitive = true
}

resource "mittwald_app" "wordpress" {
project_id = mittwald_project.foobar.id

app = "wordpress"
version = "6.3.1"

description = "Martins Test-App"
update_policy = "patchlevel"

user_inputs = {
"site_title" = "My awesome site"
"admin_user" = "martin"
"admin_pass" = var.admin_password
"admin_email" = "[email protected]"

}
}

resource "mittwald_app" "custom_php" {
project_id = mittwald_project.foobar.id
database_id = mittwald_mysql_database.foobar_database.id

app = "php"
version = "1.0.0"

description = "Martins Test-App"
document_root = "/public"
update_policy = "none"
}
2 changes: 1 addition & 1 deletion examples/resources/mittwald_mysql_database/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ variable "database_password" {
sensitive = true
}

resource "mittwald_mysql_database" "martin_test" {
resource "mittwald_mysql_database" "foobar_database" {
project_id = mittwald_project.foobar.id
version = "8.0"
description = "Foo"
Expand Down

0 comments on commit e64f02f

Please sign in to comment.