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

Commit

Permalink
Stabilizes volume mount supports
Browse files Browse the repository at this point in the history
Closes #2
Closes #14
  • Loading branch information
DAlperin committed Jun 5, 2022
1 parent 0c4a677 commit c45af6a
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 91 deletions.
40 changes: 30 additions & 10 deletions examples/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,24 @@ terraform {

resource "fly_app" "exampleApp" {
name = "hellofromterraform"
org = "fly-external"
}

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

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

resource "fly_ip" "exampleIp" {
app = "hellofromterraform"
Expand All @@ -38,11 +47,12 @@ resource "fly_cert" "exampleCert" {

resource "fly_machine" "exampleMachine" {
app = "hellofromterraform"
region = "iad"
name = "extremelyuniquenamelikesoveryunique8"
region = "ewr"
name = "extremelyuniquenamelikesoveryunique18"
image = "nginx"
env = {
key = "value"
otherKey = "theothervalue"
}
services = [
{
Expand Down Expand Up @@ -74,7 +84,17 @@ resource "fly_machine" "exampleMachine" {
"internal_port" : 8089
}
]
depends_on = [fly_app.exampleApp]
mounts = [
{
path = "/volume_mount"
volume = fly_volume.exampleVol.id
},
{
path = "/the_other_volume_mount"
volume = fly_volume.secondVolume.id
}
]
depends_on = [fly_app.exampleApp, fly_volume.exampleVol, fly_volume.secondVolume]
}

output "machineID" {
Expand Down
31 changes: 16 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ go 1.18

require (
github.com/Khan/genqlient v0.4.0
github.com/hashicorp/terraform-plugin-framework v0.7.0
github.com/hashicorp/terraform-plugin-go v0.9.0
github.com/hashicorp/terraform-plugin-log v0.3.0
github.com/hashicorp/terraform-plugin-framework v0.8.0
github.com/hashicorp/terraform-plugin-go v0.9.1
github.com/hashicorp/terraform-plugin-log v0.4.0
github.com/miekg/dns v1.1.49
github.com/vektah/gqlparser/v2 v2.3.1
github.com/vektah/gqlparser/v2 v2.4.4
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
golang.zx2c4.com/wireguard v0.0.0-20220407013110-ef5c587f782d
golang.zx2c4.com/wireguard/tun/netstack v0.0.0-20220407013110-ef5c587f782d
Expand All @@ -30,46 +30,47 @@ require (
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.2.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
github.com/hashicorp/go-plugin v1.4.4 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.5.0 // indirect
github.com/hashicorp/hc-install v0.3.2 // indirect
github.com/hashicorp/terraform-exec v0.16.1 // indirect
github.com/hashicorp/terraform-json v0.14.0 // indirect
github.com/hashicorp/terraform-plugin-docs v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20220510144317-d78f4a47ae27 // indirect
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/cli v1.1.4 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/russross/blackfriday v1.6.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/vmihailenco/tagparser v0.1.2 // indirect
github.com/zclconf/go-cty v1.10.0 // indirect
golang.org/x/mod v0.4.2 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/mod v0.5.1 // indirect
golang.org/x/net v0.0.0-20220531201128-c960675eff93 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
golang.org/x/tools v0.1.7 // indirect
golang.org/x/tools v0.1.9 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210312152112-fc591d9ea70f // indirect
google.golang.org/grpc v1.45.0 // indirect
google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 // indirect
google.golang.org/grpc v1.47.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
gvisor.dev/gvisor v0.0.0-20211020211948-f76a604701b6 // indirect
)
Loading

0 comments on commit c45af6a

Please sign in to comment.