Skip to content

Commit

Permalink
SCALRCORE-27528 Provider > error doesn't contain 'oidc' when applying…
Browse files Browse the repository at this point in the history
… run with wrong credentials_type
  • Loading branch information
DayS1eeper committed Sep 4, 2023
1 parent b19d202 commit 06fd536
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scalr/resource_scalr_provider_configuration.go
Expand Up @@ -310,7 +310,7 @@ func resourceScalrProviderConfigurationCreate(ctx context.Context, d *schema.Res
return diag.Errorf("'audience' field is required for 'oidc' credentials type of aws provider configuration")
}
} else if *configurationOptions.AwsCredentialsType != "access_keys" {
return diag.Errorf("unknown aws provider configuration credentials type: %s, allowed: 'role_delegation', 'access_keys'", *configurationOptions.AwsCredentialsType)
return diag.Errorf("unknown aws provider configuration credentials type: %s, allowed: 'role_delegation', 'access_keys', 'oidc'", *configurationOptions.AwsCredentialsType)
} else if !accessKeyIdExists || !accessSecretKeyExists {
return diag.Errorf("'access_key' and 'secret_key' fields are required for 'access_keys' credentials type of aws provider configuration")
}
Expand Down Expand Up @@ -679,7 +679,7 @@ func resourceScalrProviderConfigurationUpdate(ctx context.Context, d *schema.Res
return diag.Errorf("'audience' field is required for 'oidc' credentials type of aws provider configuration")
}
} else if *configurationOptions.AwsCredentialsType != "access_keys" {
return diag.Errorf("unknown aws provider configuration credentials type: %s, allowed: 'role_delegation', 'access_keys'", *configurationOptions.AwsCredentialsType)
return diag.Errorf("unknown aws provider configuration credentials type: %s, allowed: 'role_delegation', 'access_keys', 'oidc'", *configurationOptions.AwsCredentialsType)
} else if !accessKeyIdExists || !accessSecretKeyExists {
return diag.Errorf("'access_key' and 'secret_key' fields are required for 'access_keys' credentials type of aws provider configuration")
}
Expand Down

0 comments on commit 06fd536

Please sign in to comment.