diff --git a/cyral/resource_cyral_repository_access_gateway.go b/cyral/resource_cyral_repository_access_gateway.go index 16fb9fe4..0d7f5c38 100644 --- a/cyral/resource_cyral_repository_access_gateway.go +++ b/cyral/resource_cyral_repository_access_gateway.go @@ -105,17 +105,21 @@ func resourceRepositoryAccessGateway() *schema.Resource { Description: "ID of the repository the access gateway is associated with. This is also the " + "import ID for this resource.", Type: schema.TypeString, + ForceNew: true, Required: true, }, SidecarIDKey: { - Description: "ID of the sidecar that will be set as the access gatway for the given repository.", + Description: "ID of the sidecar that will be set as the access gateway for the given repository.", Type: schema.TypeString, Required: true, }, BindingIDKey: { - Description: "ID of the binding that will be set as the access gatway for the given repository.", - Type: schema.TypeString, - Required: true, + Description: "ID of the binding that will be set as the access gateway for the given repository. " + + "Note that modifications to this field will result in terraform replacing the given " + + "access gateway resource, since the access gateway must be deleted before binding. ", + Type: schema.TypeString, + ForceNew: true, + Required: true, }, }, Importer: &schema.ResourceImporter{ diff --git a/docs/resources/repository_access_gateway.md b/docs/resources/repository_access_gateway.md index f44b574a..ecb19434 100644 --- a/docs/resources/repository_access_gateway.md +++ b/docs/resources/repository_access_gateway.md @@ -59,9 +59,9 @@ resource "cyral_repository_access_gateway" "access_gateway" { ### Required -- `binding_id` (String) ID of the binding that will be set as the access gatway for the given repository. +- `binding_id` (String) ID of the binding that will be set as the access gateway for the given repository. Note that modifications to this field will result in terraform replacing the given access gateway resource, since the access gateway must be deleted before binding. - `repository_id` (String) ID of the repository the access gateway is associated with. This is also the import ID for this resource. -- `sidecar_id` (String) ID of the sidecar that will be set as the access gatway for the given repository. +- `sidecar_id` (String) ID of the sidecar that will be set as the access gateway for the given repository. ### Read-Only