Deprecate service_account_email config (#610)
* Deprecate service_account_email config - it could be extracted from the JWT if needed Co-authored-by: João Palet <joao.palet@outlook.com>
This commit is contained in:
parent
100704c0f4
commit
d7e4ab2adb
5 changed files with 6 additions and 19 deletions
|
|
@ -95,7 +95,7 @@ func (p *Provider) Metadata(_ context.Context, _ provider.MetadataRequest, resp
|
|||
|
||||
type providerModel struct {
|
||||
CredentialsFilePath types.String `tfsdk:"credentials_path"`
|
||||
ServiceAccountEmail types.String `tfsdk:"service_account_email"`
|
||||
ServiceAccountEmail types.String `tfsdk:"service_account_email"` // Deprecated: ServiceAccountEmail is not required and will be removed after 12th June 2025
|
||||
ServiceAccountKey types.String `tfsdk:"service_account_key"`
|
||||
ServiceAccountKeyPath types.String `tfsdk:"service_account_key_path"`
|
||||
PrivateKey types.String `tfsdk:"private_key"`
|
||||
|
|
@ -170,8 +170,9 @@ func (p *Provider) Schema(_ context.Context, _ provider.SchemaRequest, resp *pro
|
|||
Description: descriptions["credentials_path"],
|
||||
},
|
||||
"service_account_email": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: descriptions["service_account_email"],
|
||||
Optional: true,
|
||||
Description: descriptions["service_account_email"],
|
||||
DeprecationMessage: "The `service_account_email` field has been deprecated because it is not required. Will be removed after June 12th 2025.",
|
||||
},
|
||||
"service_account_token": schema.StringAttribute{
|
||||
Optional: true,
|
||||
|
|
@ -310,10 +311,6 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,
|
|||
if !(providerConfig.CredentialsFilePath.IsUnknown() || providerConfig.CredentialsFilePath.IsNull()) {
|
||||
sdkConfig.CredentialsFilePath = providerConfig.CredentialsFilePath.ValueString()
|
||||
}
|
||||
if !(providerConfig.ServiceAccountEmail.IsUnknown() || providerConfig.ServiceAccountEmail.IsNull()) {
|
||||
providerData.ServiceAccountEmail = providerConfig.ServiceAccountEmail.ValueString()
|
||||
sdkConfig.ServiceAccountEmail = providerConfig.ServiceAccountEmail.ValueString()
|
||||
}
|
||||
if !(providerConfig.ServiceAccountKey.IsUnknown() || providerConfig.ServiceAccountKey.IsNull()) {
|
||||
sdkConfig.ServiceAccountKey = providerConfig.ServiceAccountKey.ValueString()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue