diff --git a/banyan/resource_connector.go b/banyan/resource_connector.go index 5292239a..57cb831f 100644 --- a/banyan/resource_connector.go +++ b/banyan/resource_connector.go @@ -68,6 +68,16 @@ func resourceConnector() *schema.Resource { Type: schema.TypeString, }, }, + "platform": { + Type: schema.TypeString, + Optional: true, + Description: "The platform from which the satellite is deployed.", + }, + "method": { + Type: schema.TypeString, + Optional: true, + Description: "The method used for the deployment of the satellite.", + }, }, } } @@ -96,6 +106,10 @@ func connectorFromState(d *schema.ResourceData) (info satellite.Info) { }, CIDRs: convertSchemaSetToStringSlice(d.Get("cidrs").(*schema.Set)), Domains: convertSchemaSetToStringSlice(d.Get("domains").(*schema.Set)), + Deployment: &satellite.Deployment{ + Platform: d.Get("platform").(string), + Method: d.Get("method").(string), + }, }, } return spec diff --git a/client/satellite/model.go b/client/satellite/model.go index feae361c..1545605a 100644 --- a/client/satellite/model.go +++ b/client/satellite/model.go @@ -102,6 +102,12 @@ type Spec struct { PeerAccessTiers []PeerAccessTier `json:"peer_access_tiers"` DisableSnat bool `json:"disable_snat"` Domains []string `json:"domains,omitempty"` + Deployment *Deployment `json:"deployment,omitempty"` +} + +type Deployment struct { + Platform string `json:"platform"` // Windows, Linux, sonicOS, other + Method string `json:"method"` // app, tar, docker, firmware, terraform, other } type PeerAccessTier struct { diff --git a/client/satellite/satellite_test.go b/client/satellite/satellite_test.go index 06f77157..32cd80df 100644 --- a/client/satellite/satellite_test.go +++ b/client/satellite/satellite_test.go @@ -1,11 +1,12 @@ package satellite_test import ( + "testing" + "github.com/banyansecurity/terraform-banyan-provider/client/satellite" "github.com/banyansecurity/terraform-banyan-provider/client/testutil" "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" - "testing" ) func Test_CreatSatellite(t *testing.T) { @@ -29,6 +30,10 @@ func Test_CreatSatellite(t *testing.T) { AccessTiers: []string{"us-west1"}, }, }, + Deployment: &satellite.Deployment{ + Platform: "Linux", + Method: "docker", + }, }, } got, err := client.Satellite.Create(testSatellite)