Skip to content

Commit

Permalink
Add gRPC as valid endpoint type (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelaossa authored Oct 10, 2024
1 parent faea5c0 commit f257203
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions aptible/resource_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ func resourceEndpointValidate(_ context.Context, diff *schema.ResourceDiff, _ in
}

// container ports can only be used with tls/tcp
if len(containerPorts) != 0 && (endpointType == "https") {
err = multierror.Append(err, fmt.Errorf("do not specify container ports with https endpoint (see terraform docs)"))
if len(containerPorts) != 0 && (endpointType == "https" || endpointType == "grpc") {
err = multierror.Append(err, fmt.Errorf("do not specify container ports with %s endpoint (see terraform docs)", endpointType))
}

return err
Expand Down Expand Up @@ -329,6 +329,7 @@ var validEndpointTypes = []string{
"https",
"tls",
"tcp",
"grpc",
}

var validPlatforms = []string{
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/Djarvur/go-err113 v0.1.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/aptible/aptible-api-go v0.3.0
github.com/aptible/go-deploy v0.5.2
github.com/aptible/go-deploy v0.5.3
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
github.com/aws/aws-sdk-go v1.38.67 // indirect
github.com/bflad/tfproviderdocs v0.9.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
github.com/aptible/aptible-api-go v0.3.0 h1:fko5TnKJ7t1PrXOdO6T1GIQQsA7Rkyhe8LS5M5kw0BM=
github.com/aptible/aptible-api-go v0.3.0/go.mod h1:JIQ26rTFdhNrST98Ji1TI9OMd0/YqqxIkmiZld2YN7s=
github.com/aptible/go-deploy v0.5.2 h1:cmPawI9esyBkQ7009UR7z3I2AWgzsWtnBz7HKKjImao=
github.com/aptible/go-deploy v0.5.2/go.mod h1:h0Zt8I+pV3aqvPo+rA1hIeQjT/13RzFPYuTmg4+SyPQ=
github.com/aptible/go-deploy v0.5.3 h1:fNUakAsvjfWJ3Gk+fpC/JGTXKb3l2PwlzV1143Z4+cA=
github.com/aptible/go-deploy v0.5.3/go.mod h1:h0Zt8I+pV3aqvPo+rA1hIeQjT/13RzFPYuTmg4+SyPQ=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
Expand Down

0 comments on commit f257203

Please sign in to comment.