teamcity/global.go [151:173]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	var plan globalResourceModel
	diags := req.Plan.Get(ctx, &plan)
	resp.Diagnostics.Append(diags...)
	if resp.Diagnostics.HasError() {
		return
	}

	newState, err := r.update(plan)
	if err != nil {
		resp.Diagnostics.AddError(
			"Error setting global settings",
			err.Error(),
		)
		return
	}
	if newState.Encryption != nil {
		newState.Encryption.Key = plan.Encryption.Key
	}

	diags = resp.State.Set(ctx, newState)
	resp.Diagnostics.Append(diags...)
	if resp.Diagnostics.HasError() {
		return
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



teamcity/global.go [214:236]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	var plan globalResourceModel
	diags := req.Plan.Get(ctx, &plan)
	resp.Diagnostics.Append(diags...)
	if resp.Diagnostics.HasError() {
		return
	}

	newState, err := r.update(plan)
	if err != nil {
		resp.Diagnostics.AddError(
			"Error setting global settings",
			err.Error(),
		)
		return
	}
	if newState.Encryption != nil {
		newState.Encryption.Key = plan.Encryption.Key
	}

	diags = resp.State.Set(ctx, newState)
	resp.Diagnostics.Append(diags...)
	if resp.Diagnostics.HasError() {
		return
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



