Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Update docs/examples
Browse files Browse the repository at this point in the history
  • Loading branch information
DAlperin committed May 26, 2022
1 parent 0ca73f6 commit d345b29
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ provider "scaffolding" {

### Optional

- `flytoken` (String) fly.io api token. If not set checks env for flytoken
- `fly_api_token` (String) fly.io api token. If not set checks env for FLY_API_TOKEN
3 changes: 1 addition & 2 deletions docs/resources/fly_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ Fly app resource

```terraform
resource "fly_app" "exampleApp" {
name = "hellofromterraform"
regions = ["ewr", "ord", "lax"]
name = "hellofromterraform"
}
```

Expand Down
5 changes: 5 additions & 0 deletions docs/resources/fly_ip.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ resource "fly_ip" "exampleIp" {
app = "hellofromterraform"
type = "v4"
}
resource "fly_ip" "exampleIpv6" {
app = "hellofromterraform"
type = "v6"
}
```

<!-- schema generated by tfplugindocs -->
Expand Down
44 changes: 43 additions & 1 deletion docs/resources/fly_machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,49 @@ description: |-

Fly machine resource


## Example Usage

```terraform
resource "fly_machine" "exampleMachine" {
app = "hellofromterraform"
region = "iad"
name = "extremelyuniquenamelikesoveryunique8"
image = "nginx"
env = {
key = "value"
}
services = [
{
ports = [
{
port = 443
handlers = ["tls", "http"]
},
{
port = 80
handlers = ["http"]
}
]
"protocol" : "tcp",
"internal_port" : 80
},
{
ports = [
{
port = 8080
handlers = ["tls", "http"]
},
{
port = 8081
handlers = ["http"]
}
]
"protocol" : "tcp",
"internal_port" : 8089
}
]
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
9 changes: 4 additions & 5 deletions docs/resources/fly_volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ Fly volume resource

```terraform
resource "fly_volume" "exampleApp" {
name = "exampleVolume"
app = "hellofromterraform"
size = 10
region = "ewr"
depends_on = [fly_app.exampleApp]
name = "exampleVolume"
app = "hellofromterraform"
size = 10
region = "ewr"
}
```

Expand Down
1 change: 0 additions & 1 deletion examples/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ terraform {

resource "fly_app" "exampleApp" {
name = "hellofromterraform"
# regions = ["ewr", "ord", "lax", "mia"]
}

#resource "fly_volume" "exampleVol" {
Expand Down
5 changes: 2 additions & 3 deletions examples/resources/fly_app/resource.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
resource "fly_app" "exampleApp" {
name = "hellofromterraform"
regions = ["ewr", "ord", "lax"]
}
name = "hellofromterraform"
}
5 changes: 5 additions & 0 deletions examples/resources/fly_ip/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ resource "fly_ip" "exampleIp" {
app = "hellofromterraform"
type = "v4"
}

resource "fly_ip" "exampleIpv6" {
app = "hellofromterraform"
type = "v6"
}
39 changes: 39 additions & 0 deletions examples/resources/fly_machine/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
resource "fly_machine" "exampleMachine" {
app = "hellofromterraform"
region = "iad"
name = "extremelyuniquenamelikesoveryunique8"
image = "nginx"
env = {
key = "value"
}
services = [
{
ports = [
{
port = 443
handlers = ["tls", "http"]
},
{
port = 80
handlers = ["http"]
}
]
"protocol" : "tcp",
"internal_port" : 80
},
{
ports = [
{
port = 8080
handlers = ["tls", "http"]
},
{
port = 8081
handlers = ["http"]
}
]
"protocol" : "tcp",
"internal_port" : 8089
}
]
}
9 changes: 4 additions & 5 deletions examples/resources/fly_volume/resource.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
resource "fly_volume" "exampleApp" {
name = "exampleVolume"
app = "hellofromterraform"
size = 10
region = "ewr"
depends_on = [fly_app.exampleApp]
name = "exampleVolume"
app = "hellofromterraform"
size = 10
region = "ewr"
}

0 comments on commit d345b29

Please sign in to comment.