diff --git a/cyral/resource_cyral_sidecar.go b/cyral/resource_cyral_sidecar.go index 0d2b1936..538b73c6 100644 --- a/cyral/resource_cyral_sidecar.go +++ b/cyral/resource_cyral_sidecar.go @@ -79,12 +79,12 @@ func resourceSidecar() *schema.Resource { Required: true, }, "deployment_method": { - Description: "Deployment method that will be used by this sidecar (valid values: `docker`, `cloudFormation`, `terraform`, `helm`, `helm3`, `automated`, `custom`, `terraformGKE`).", + Description: "Deployment method that will be used by this sidecar (valid values: `docker`, `cloudFormation`, `terraform`, `helm`, `helm3`, `automated`, `custom`, `terraformGKE` and `singleContainer`).", Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ "docker", "cloudFormation", "terraform", "helm", "helm3", - "automated", "custom", "terraformGKE", + "automated", "custom", "terraformGKE", "singleContainer", }, false), }, "labels": { diff --git a/cyral/resource_cyral_sidecar_test.go b/cyral/resource_cyral_sidecar_test.go index a25f9741..9305dab7 100644 --- a/cyral/resource_cyral_sidecar_test.go +++ b/cyral/resource_cyral_sidecar_test.go @@ -50,6 +50,14 @@ var tfSidecarConfig *SidecarData = &SidecarData{ CertificateBundleSecrets: getTestCBS(), } +var singleContainerSidecarConfig *SidecarData = &SidecarData{ + Name: "tf-provider-TestAccSidecarResource-singleContainer", + Labels: []string{"test5"}, + SidecarProperty: NewSidecarProperty("singleContainer"), + UserEndpoint: "some.singleContainer.user.endpoint", + CertificateBundleSecrets: getTestCBS(), +} + var failoverSidecarConfig *SidecarData = &SidecarData{ Name: "tf-provider-TestAccSidecarResource-failoverSidecar", SidecarProperty: NewSidecarProperty("terraform"), @@ -77,6 +85,9 @@ func TestAccSidecarResource(t *testing.T) { testUpdateConfigDocker, testUpdateFuncDocker := setupSidecarTest(dockerSidecarConfig) testUpdateConfigHelm, testUpdateFuncHelm := setupSidecarTest(helmSidecarConfig) testUpdateConfigTF, testUpdateFuncTF := setupSidecarTest(tfSidecarConfig) + testUpdateConfigSingleContainer, testUpdateFuncSingleContainer := setupSidecarTest( + singleContainerSidecarConfig, + ) testUpdateConfigPassthrough, testUpdateFuncPassthrough := setupSidecarTest(passthroughSidecarConfig) testUpdateConfigFailover, testUpdateFuncFailover := setupSidecarTest(failoverSidecarConfig) @@ -99,6 +110,10 @@ func TestAccSidecarResource(t *testing.T) { Config: testUpdateConfigTF, Check: testUpdateFuncTF, }, + { + Config: testUpdateConfigSingleContainer, + Check: testUpdateFuncSingleContainer, + }, { Config: testUpdateConfigPassthrough, Check: testUpdateFuncPassthrough, diff --git a/docs/resources/sidecar.md b/docs/resources/sidecar.md index c003e98e..7ae27c0c 100644 --- a/docs/resources/sidecar.md +++ b/docs/resources/sidecar.md @@ -28,7 +28,7 @@ resource "cyral_sidecar" "some_resource_name" { ### Required -- `deployment_method` (String) Deployment method that will be used by this sidecar (valid values: `docker`, `cloudFormation`, `terraform`, `helm`, `helm3`, `automated`, `custom`, `terraformGKE`). +- `deployment_method` (String) Deployment method that will be used by this sidecar (valid values: `docker`, `cloudFormation`, `terraform`, `helm`, `helm3`, `automated`, `custom`, `terraformGKE` and `singleContainer`). - `name` (String) Sidecar name that will be used internally in Control Plane (ex: `your_sidecar_name`). ### Optional