Skip to content

Commit

Permalink
SCALRCORE-23247 fix account_id in scalr_variable data source.
Browse files Browse the repository at this point in the history
  • Loading branch information
DayS1eeper committed Sep 28, 2022
1 parent c23ec61 commit b6a307b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scalr/data_source_scalr_variable.go
Expand Up @@ -106,7 +106,7 @@ func dataSourceScalrVariableRead(d *schema.ResourceData, meta interface{}) error
d.SetId(variable.ID)

if variable.Account != nil {
d.Set("environment_id", variable.Account.ID)
d.Set("account_id", variable.Account.ID)
}
if variable.Environment != nil {
d.Set("environment_id", variable.Environment.ID)
Expand Down
1 change: 1 addition & 0 deletions scalr/data_source_scalr_variable_test.go
Expand Up @@ -24,6 +24,7 @@ func TestAccScalrVariableDataSource(t *testing.T) {
resource.TestCheckResourceAttr("data.scalr_variable.workspace_hostname", "sensitive", "false"),
resource.TestCheckResourceAttr("data.scalr_variable.workspace_hostname", "description", "The hostname of scalr workspace."),
resource.TestCheckResourceAttr("data.scalr_variable.workspace_hostname", "final", "false"),
resource.TestCheckResourceAttr("data.scalr_variable.workspace_hostname", "account_id", defaultAccount),
testAccCheckEqualID("data.scalr_variable.secret", "scalr_variable.secret"),
resource.TestCheckResourceAttr("data.scalr_variable.secret", "hcl", "false"),
resource.TestCheckResourceAttr("data.scalr_variable.secret", "sensitive", "true"),
Expand Down

0 comments on commit b6a307b

Please sign in to comment.