diff --git a/CHANGELOG.md b/CHANGELOG.md index 253dd5f6..99f74dbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `data.scalr_environments`: changed type of `ids` attribute from TypeList to TypeSet ([373](https://github.com/Scalr/terraform-provider-scalr/pull/373)) -- `scalr_workspace`: new attribute `terragrunt_version` ([#378](https://github.com/Scalr/terraform-provider-scalr/pull/378)) -- `scalr_workspace`: new attribute `terragrunt_use_run_all` ([#378](https://github.com/Scalr/terraform-provider-scalr/pull/378)) -- `scalr_environment`: new attribute `remote_backend` ([#378](https://github.com/Scalr/terraform-provider-scalr/pull/378)) +- `scalr_workspace` and `data.scalr_workspace`: new attributes `terragrunt_version` and `terragrunt_use_run_all` ([#378](https://github.com/Scalr/terraform-provider-scalr/pull/378)) +- `scalr_environment` and `data.scalr_environment`: new attribute `remote_backend` ([#378](https://github.com/Scalr/terraform-provider-scalr/pull/378)) ## [2.2.0] - 2024-11-22 diff --git a/docs/data-sources/environment.md b/docs/data-sources/environment.md index cac0664a..bee3a877 100644 --- a/docs/data-sources/environment.md +++ b/docs/data-sources/environment.md @@ -39,6 +39,7 @@ data "scalr_environment" "example2" { - `created_by` (List of Object) Details of the user that created the environment. (see [below for nested schema](#nestedatt--created_by)) - `default_provider_configurations` (List of String) List of IDs of provider configurations, used in the environment workspaces by default. - `policy_groups` (List of String) List of the environment policy-groups IDs, in the format `pgrp-`. +- `remote_backend` (Boolean) If Scalr exports the remote backend configuration and state storage for your infrastructure management. Disabling this feature will also prevent the ability to perform state locking, which ensures that concurrent operations do not conflict. Additionally, it will disable the capability to initiate CLI-driven runs through Scalr. - `status` (String) The status of an environment. - `tag_ids` (List of String) List of tag IDs associated with the environment. diff --git a/internal/provider/data_source_scalr_environment.go b/internal/provider/data_source_scalr_environment.go index c69719be..35e27846 100644 --- a/internal/provider/data_source_scalr_environment.go +++ b/internal/provider/data_source_scalr_environment.go @@ -90,6 +90,11 @@ func dataSourceScalrEnvironment() *schema.Resource { Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "remote_backend": { + Description: "If Scalr exports the remote backend configuration and state storage for your infrastructure management. Disabling this feature will also prevent the ability to perform state locking, which ensures that concurrent operations do not conflict. Additionally, it will disable the capability to initiate CLI-driven runs through Scalr.", + Type: schema.TypeBool, + Computed: true, + }, }} } @@ -131,6 +136,7 @@ func dataSourceEnvironmentRead(ctx context.Context, d *schema.ResourceData, meta _ = d.Set("name", environment.Name) _ = d.Set("cost_estimation_enabled", environment.CostEstimationEnabled) _ = d.Set("status", environment.Status) + _ = d.Set("remote_backend", environment.RemoteBackend) var createdBy []interface{} if environment.CreatedBy != nil { diff --git a/internal/provider/data_source_scalr_workspace.go b/internal/provider/data_source_scalr_workspace.go index 3866ca0d..6018b6c2 100644 --- a/internal/provider/data_source_scalr_workspace.go +++ b/internal/provider/data_source_scalr_workspace.go @@ -94,7 +94,16 @@ func dataSourceScalrWorkspace() *schema.Resource { Type: schema.TypeString, Computed: true, }, - + "terragrunt_version": { + Description: "The version of Terragrunt the workspace performs runs on.", + Type: schema.TypeString, + Computed: true, + }, + "terragrunt_use_run_all": { + Description: "Indicates whether the workspace uses `terragrunt run-all`.", + Type: schema.TypeBool, + Computed: true, + }, "iac_platform": { Description: "The IaC platform used for this workspace.", Type: schema.TypeString, @@ -275,6 +284,8 @@ func dataSourceScalrWorkspaceRead(ctx context.Context, d *schema.ResourceData, m _ = d.Set("operations", workspace.Operations) _ = d.Set("execution_mode", workspace.ExecutionMode) _ = d.Set("terraform_version", workspace.TerraformVersion) + _ = d.Set("terragrunt_version", workspace.TerragruntVersion) + _ = d.Set("terragrunt_use_run_all", workspace.TerragruntUseRunAll) _ = d.Set("iac_platform", workspace.IaCPlatform) _ = d.Set("type", workspace.EnvironmentType) _ = d.Set("working_directory", workspace.WorkingDirectory)