SAP / terraform-provider-btp

Terraform provider for SAP BTP
https://registry.terraform.io/providers/SAP/btp/latest
Apache License 2.0
89 stars 18 forks source link

[FEATURE] resource btp_globalaccount_entitlement to set entitlements to the global account #927

Closed marcorosa closed 1 month ago

marcorosa commented 1 month ago

What area do you want to see improved?

terraform provider

Is your feature request related to a problem? Please describe.

Hi colleagues, I watched your presentation in TechED and also did your tutorial here, so you may be already aware of such missing feature.

Indeed, when btp_subaccount_entitlement is used, if the global account doesn't already have assigned the service, or it has the service but it doesn't have an entitlement available, then the execution fails. See here the error raised when following your example without assigning alert-notification service and entitlement to the global account:

 Error: API Error Creating Resource Entitlement (Subaccount)
│ 
│   with btp_subaccount_entitlement.alert_notification_service,
│   on main.tf line 13, in resource "btp_subaccount_entitlement" "alert_notification_service":
│   13: resource "btp_subaccount_entitlement" "alert_notification_service" {
│ 
│ Cannot assign service alert-notification and plan standard to subaccount SSSSSSSSS. The global
│ account GGGGGGGGGG of this subaccount is not entitled to this service plan. [Error: 30015/409]
╵

Generated by (extract of main.tf)

resource "btp_subaccount_entitlement" "alert_notification_service" {
  subaccount_id = btp_subaccount.sa_build.id
  service_name  = "alert-notification"
  plan_name     = "standard"
}

Describe the solution you would like

I think what's missing here is a resource btp_globalaccount_entitlement to assign a services to the global account (in case it's not assigned yet), and set an entitlement.

Describe alternatives you have considered

An alternative could be integrating the assignment of the service and the quota in btp_subaccount_entitlement, but that would only work if the user running terraform is also a global account admin.

Additional context

No response

github-actions[bot] commented 1 month ago

Thanks for the feature request. We evaluate it and update the issue accordingly.

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

lechnerc77 commented 1 month ago

@marcorosa : The entitlements on global account level are part of the commercial model ie.e. the contract between SAP and the customer. They cannot be influenced by Terraform.

I am closing this issue as this resource won't be implemented.