Skip to content

Commit

Permalink
Add docs about tsuru_app_deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
wpjunior committed Jan 25, 2023
1 parent a33abc9 commit df44c6b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
15 changes: 11 additions & 4 deletions docs/resources/app_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@
page_title: "tsuru_app_deploy Resource - terraform-provider-tsuru"
subcategory: ""
description: |-
Tsuru Application Deploy
Do a deployment for an application, that currently only supports deploys via prebuilt docker images, to do deploys via tsuru platforms please use tsuru-client
---

# tsuru_app_deploy (Resource)

Tsuru Application Deploy
Do a deployment for an application, that currently only supports deploys via prebuilt docker images, to do deploys via tsuru platforms please use tsuru-client

## Example Usage

```terraform
resource "tsuru_app_deploy" "my-deploy" {
app = tsuru_app.my-app.name
image = "myrepository/my-app:0.1.0"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -30,8 +37,8 @@ Tsuru Application Deploy
### Read-Only

- `id` (String) The ID of this resource.
- `output_image` (String)
- `status` (String)
- `output_image` (String) Image generated after success of deploy
- `status` (String) after apply may be three kinds of statuses: running or failed or finished

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`
Expand Down
4 changes: 4 additions & 0 deletions examples/resources/tsuru_app_deploy/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "tsuru_app_deploy" "my-deploy" {
app = tsuru_app.my-app.name
image = "myrepository/my-app:0.1.0"
}
12 changes: 7 additions & 5 deletions internal/provider/resource_tsuru_app_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

func resourceTsuruApplicationDeploy() *schema.Resource {
return &schema.Resource{
Description: "Tsuru Application Deploy",
Description: "Do a deployment for an application, that currently only supports deploys via prebuilt docker images, to do deploys via tsuru platforms please use tsuru-client",
CreateContext: resourceTsuruApplicationDeployDo,
UpdateContext: resourceTsuruApplicationDeployDo,
ReadContext: resourceTsuruApplicationDeployRead,
Expand Down Expand Up @@ -71,13 +71,15 @@ func resourceTsuruApplicationDeploy() *schema.Resource {
},

"status": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Description: "after apply may be three kinds of statuses: running or failed or finished",
Computed: true,
},

"output_image": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Description: "Image generated after success of deploy",
Computed: true,
},
},
}
Expand Down

0 comments on commit df44c6b

Please sign in to comment.