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

[BUG] Provider produced an unexpected new value: .amount #353

Closed
1 task done
lnoens-sap opened this issue Aug 1, 2023 · 4 comments
Closed
1 task done

[BUG] Provider produced an unexpected new value: .amount #353

lnoens-sap opened this issue Aug 1, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@lnoens-sap
Copy link

lnoens-sap commented Aug 1, 2023

Is there an existing issue for this?

  • I have searched the existing issues

What version of Terraform are you using?

v0.2.0-beta2

What type of issue are you facing

regression (a behavior that used to work and stopped in a new version)

Describe the bug

│ Error: Provider produced inconsistent result after apply

│ When applying changes to btp_subaccount_entitlement.entitlement-procode-bundle-quotas["Personal Data Manager"], provider
│ "provider["registry.terraform.io/sap/btp"]" produced an unexpected new value: .amount: was cty.NumberIntVal(1), but now
│ cty.NumberIntVal(0).

│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Expected Behavior

This seems to be related to specifying quota for the Personal Data Manager.

Steps To Reproduce

  1. execute terraform apply with a configuration that incliudes

entitlements.tf :

###
# Entitlements with quota
###
variable "entitlements_quota" {
  type = map(object({
    service_name = string
    plan_name    = string
    amount       = string
  }))
  description = "The list of entitlements with quota that shall be added to the subaccount."
    "Personal Data Manager" = {
      service_name = "personal-data-manager"
      plan_name    = "standard"
      amount       = 1
    }

Add screenshots to help explain your problem

No response

Additional context

No response

@lnoens-sap lnoens-sap added bug Something isn't working needs-triage For new issues labels Aug 1, 2023
@lnoens-sap
Copy link
Author

lnoens-sap commented Aug 1, 2023

Works fine with version 0.1.0-beta1

@lechnerc77 lechnerc77 self-assigned this Aug 1, 2023
@lechnerc77 lechnerc77 removed the needs-triage For new issues label Aug 1, 2023
@lechnerc77
Copy link
Member

@lnoens-sap Thanks for bringing this up. This seems to be connected to another issue we currently prepared a PR for (#354).
The output might be misleading here, as the entitlement per se failed, but is not reported correctly to the caller. Could you please check if the entitlement was assigned at all? The process is async, so even if the provider fails, the entitlement should be created.

@lechnerc77 lechnerc77 added the needs-author-feedback Waiting for author to respond label Aug 1, 2023
@lnoens-sap
Copy link
Author

@lechnerc77 The entitlement is not added and the global account has plenty of quota left. With version 0.1.0-beta1 I have no issues adding it.

@github-actions github-actions bot removed the needs-author-feedback Waiting for author to respond label Aug 1, 2023
@lechnerc77
Copy link
Member

@lnoens-sap : I tried to reproduce the setup in the BTP Cockpit for the service personal-data-manager with plan standard. Although I could entitle the service to the global account, I could not entitle it to my subaccount. Saving of the entitlement results in the following error:

Screenshot 2023-08-02 134759

Consequently, I checked for the existence of a service named personal-data-manager by querying the service manager and there is no such service in any SAP BTP region.
The service that corresponds to the SAP Personal Data Manager which I guess is the one you are targeting has the technical ID personal-data-manager-service. I cross-checked the entitlement logic with this service including an amount which works as expected.

I do not know why the service name referenced by you worked, but as it is not registered in the service manager, the entitlement cannot be processed (as mentioned before the error handling of the entitlement flow had a bug that was fixed in the meantime and will be available in the next release).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants