scalr_workspace_remote_state_consumer

Resource: scalr_workspace_remote_state_consumer

Allows a workspace to access the state of another workspace in Scalr.

The source workspace must have remote_state_sharing set to false. Do not use this resource together with the remote_state_consumers attribute of the scalr_workspace resource for the same source workspace, as they will conflict.

Example Usage

resource "scalr_workspace" "parent" {
  name                 = "parent"
  environment_id       = "env-xxxxxxxxxx"
  remote_state_sharing = false
}

resource "scalr_workspace" "child" {
  name           = "child"
  environment_id = "env-xxxxxxxxxx"
}

resource "scalr_workspace_remote_state_consumer" "child" {
  workspace_id = scalr_workspace.parent.id
  consumer_id  = scalr_workspace.child.id
}

Schema

Required

  • consumer_id (String) ID of the workspace that is allowed to access the state.
  • workspace_id (String) ID of the workspace whose state is shared.

Read-Only

  • id (String) The ID of this resource, in the format <workspace_id>/<consumer_id>.

Import

Import is supported using the following syntax:

terraform import scalr_workspace_remote_state_consumer.example ws-xxxxxxxxxx/ws-yyyyyyyyyy

Did this page help you?