Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCALRCORE-32726 Add the ability to disable the Scalr backend to API/P… #166

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ type Environment struct {
CostEstimationEnabled bool `jsonapi:"attr,cost-estimation-enabled"`
CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"`
Status EnvironmentStatus `jsonapi:"attr,status"`
RemoteBackend bool `jsonapi:"attr,remote-backend"`

// Relations
Account *Account `jsonapi:"relation,account"`
Expand Down Expand Up @@ -77,6 +78,7 @@ type EnvironmentCreateOptions struct {
ID string `jsonapi:"primary,environments"`
Name *string `jsonapi:"attr,name"`
CostEstimationEnabled *bool `jsonapi:"attr,cost-estimation-enabled,omitempty"`
RemoteBackend *bool `jsonapi:"attr,remote-backend,omitempty"`

// Relations
Account *Account `jsonapi:"relation,account"`
Expand Down
2 changes: 2 additions & 0 deletions environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func TestEnvironmentsCreate(t *testing.T) {
Name: String("tst-" + randomString(t)),
Account: &Account{ID: defaultAccountID},
DefaultProviderConfigurations: []*ProviderConfiguration{provider_configuration},
RemoteBackend: Bool(false),
}

env, err := client.Environments.Create(ctx, options)
Expand All @@ -128,6 +129,7 @@ func TestEnvironmentsCreate(t *testing.T) {

assert.Equal(t, *options.Name, env.Name)
assert.Equal(t, options.Account.ID, env.Account.ID)
assert.Equal(t, false, env.RemoteBackend)
assert.Len(t, env.DefaultProviderConfigurations, 1)
assert.Equal(t, provider_configuration.ID, env.DefaultProviderConfigurations[0].ID)
})
Expand Down
8 changes: 8 additions & 0 deletions workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ type Workspace struct {
RunOperationTimeout *int `jsonapi:"attr,run-operation-timeout"`
VarFiles []string `jsonapi:"attr,var-files"`
EnvironmentType WorkspaceEnvironmentType `jsonapi:"attr,environment-type"`
TerragruntVersion string `jsonapi:"attr,terragrunt-version"`
TerragruntUseRunAll bool `jsonapi:"attr,terragrunt-use-run-all"`

// Relations
CurrentRun *Run `jsonapi:"relation,current-run"`
Expand Down Expand Up @@ -287,6 +289,9 @@ type WorkspaceCreateOptions struct {

// Specifies tags assigned to the workspace
Tags []*Tag `jsonapi:"relation,tags,omitempty"`

TerragruntVersion *string `jsonapi:"attr,terragrunt-version,omitempty"`
TerragruntUseRunAll *bool `jsonapi:"attr,terragrunt-use-run-all,omitempty"`
}

// WorkspaceVCSRepoOptions represents the configuration options of a VCS integration.
Expand Down Expand Up @@ -471,6 +476,9 @@ type WorkspaceUpdateOptions struct {

// Specifies the number of minutes run operation can be executed before termination.
RunOperationTimeout *int `jsonapi:"attr,run-operation-timeout"`

TerragruntVersion *string `jsonapi:"attr,terragrunt-version,omitempty"`
TerragruntUseRunAll *bool `jsonapi:"attr,terragrunt-use-run-all,omitempty"`
}

// Update settings of an existing workspace.
Expand Down
Loading