diff --git a/docs/data-sources/directory_entitlements.md b/docs/data-sources/directory_entitlements.md index bd3b1234..8c18b6a4 100644 --- a/docs/data-sources/directory_entitlements.md +++ b/docs/data-sources/directory_entitlements.md @@ -41,6 +41,17 @@ data "btp_directory_entitlements" "all" { Read-Only: +- `category` (String) The current state of the entitlement. Possible values are: + + | value | description | + | --- | --- | + | `PLATFORM` | A service required for using a specific platform; for example, Application Runtime is required for the Cloud Foundry platform. | + | `SERVICE` | A commercial or technical service. that has a numeric quota (amount) when entitled or assigned to a resource. When assigning entitlements of this type, use the 'amount' option. | + | `ELASTIC_SERVICE` | A commercial or technical service that has no numeric quota (amount) when entitled or assigned to a resource. Generally this type of service can be as many times as needed when enabled, but may in some cases be restricted by the service owner. | + | `ELASTIC_LIMITED` | An elastic service that can be enabled for only one subaccount per global account. | + | `APPLICATION` | A multitenant application to which consumers can subscribe. As opposed to applications defined as a 'QUOTA_BASED_APPLICATION', these applications do not have a numeric quota and are simply enabled or disabled as entitlements per subaccount. | + | `QUOTA_BASED_APPLICATION` | A multitenant application to which consumers can subscribe. As opposed to applications defined as 'APPLICATION', these applications have an numeric quota that limits consumer usage of the subscribed application per subaccount. | + | `ENVIRONMENT` | An environment service; for example, Cloud Foundry. | - `plan_description` (String) The description of the entitled service plan. - `plan_display_name` (String) The display name of the entitled service plan. - `plan_name` (String) The name of the entitled service plan. diff --git a/docs/data-sources/globalaccount_entitlements.md b/docs/data-sources/globalaccount_entitlements.md index f56587f2..601d1779 100644 --- a/docs/data-sources/globalaccount_entitlements.md +++ b/docs/data-sources/globalaccount_entitlements.md @@ -35,6 +35,17 @@ data "btp_globalaccount_entitlements" "all" {} Read-Only: +- `category` (String) The current state of the entitlement. Possible values are: + + | value | description | + | --- | --- | + | `PLATFORM` | A service required for using a specific platform; for example, Application Runtime is required for the Cloud Foundry platform. | + | `SERVICE` | A commercial or technical service. that has a numeric quota (amount) when entitled or assigned to a resource. When assigning entitlements of this type, use the 'amount' option. | + | `ELASTIC_SERVICE` | A commercial or technical service that has no numeric quota (amount) when entitled or assigned to a resource. Generally this type of service can be as many times as needed when enabled, but may in some cases be restricted by the service owner. | + | `ELASTIC_LIMITED` | An elastic service that can be enabled for only one subaccount per global account. | + | `APPLICATION` | A multitenant application to which consumers can subscribe. As opposed to applications defined as a 'QUOTA_BASED_APPLICATION', these applications do not have a numeric quota and are simply enabled or disabled as entitlements per subaccount. | + | `QUOTA_BASED_APPLICATION` | A multitenant application to which consumers can subscribe. As opposed to applications defined as 'APPLICATION', these applications have an numeric quota that limits consumer usage of the subscribed application per subaccount. | + | `ENVIRONMENT` | An environment service; for example, Cloud Foundry. | - `plan_description` (String) The description of the entitled service plan. - `plan_display_name` (String) The display name of the entitled service plan. - `plan_name` (String) The name of the entitled service plan. diff --git a/docs/data-sources/subaccount_entitlements.md b/docs/data-sources/subaccount_entitlements.md index 8f897a39..43971a25 100644 --- a/docs/data-sources/subaccount_entitlements.md +++ b/docs/data-sources/subaccount_entitlements.md @@ -39,6 +39,17 @@ data "btp_subaccount_entitlements" "all" { Read-Only: +- `category` (String) The current state of the entitlement. Possible values are: + + | value | description | + | --- | --- | + | `PLATFORM` | A service required for using a specific platform; for example, Application Runtime is required for the Cloud Foundry platform. | + | `SERVICE` | A commercial or technical service. that has a numeric quota (amount) when entitled or assigned to a resource. When assigning entitlements of this type, use the 'amount' option. | + | `ELASTIC_SERVICE` | A commercial or technical service that has no numeric quota (amount) when entitled or assigned to a resource. Generally this type of service can be as many times as needed when enabled, but may in some cases be restricted by the service owner. | + | `ELASTIC_LIMITED` | An elastic service that can be enabled for only one subaccount per global account. | + | `APPLICATION` | A multitenant application to which consumers can subscribe. As opposed to applications defined as a 'QUOTA_BASED_APPLICATION', these applications do not have a numeric quota and are simply enabled or disabled as entitlements per subaccount. | + | `QUOTA_BASED_APPLICATION` | A multitenant application to which consumers can subscribe. As opposed to applications defined as 'APPLICATION', these applications have an numeric quota that limits consumer usage of the subscribed application per subaccount. | + | `ENVIRONMENT` | An environment service; for example, Cloud Foundry. | - `plan_description` (String) The description of the entitled service plan. - `plan_display_name` (String) The display name of the entitled service plan. - `plan_name` (String) The name of the entitled service plan. diff --git a/internal/provider/datasource_directory_entitlements.go b/internal/provider/datasource_directory_entitlements.go index f3b51bc5..f2f8003f 100644 --- a/internal/provider/datasource_directory_entitlements.go +++ b/internal/provider/datasource_directory_entitlements.go @@ -92,6 +92,19 @@ To view all the resources that a directory and its subdirectories and subaccount MarkdownDescription: "The quota, which is not used.", Computed: true, }, + "category": schema.StringAttribute{ + MarkdownDescription: "The current state of the entitlement. Possible values are: \n " + + getFormattedValueAsTableRow("value", "description") + + getFormattedValueAsTableRow("---", "---") + + getFormattedValueAsTableRow("`PLATFORM`", " A service required for using a specific platform; for example, Application Runtime is required for the Cloud Foundry platform.") + + getFormattedValueAsTableRow("`SERVICE`", "A commercial or technical service. that has a numeric quota (amount) when entitled or assigned to a resource. When assigning entitlements of this type, use the 'amount' option.") + + getFormattedValueAsTableRow("`ELASTIC_SERVICE`", "A commercial or technical service that has no numeric quota (amount) when entitled or assigned to a resource. Generally this type of service can be as many times as needed when enabled, but may in some cases be restricted by the service owner.") + + getFormattedValueAsTableRow("`ELASTIC_LIMITED`", "An elastic service that can be enabled for only one subaccount per global account.") + + getFormattedValueAsTableRow("`APPLICATION`", "A multitenant application to which consumers can subscribe. As opposed to applications defined as a 'QUOTA_BASED_APPLICATION', these applications do not have a numeric quota and are simply enabled or disabled as entitlements per subaccount.") + + getFormattedValueAsTableRow("`QUOTA_BASED_APPLICATION`", "A multitenant application to which consumers can subscribe. As opposed to applications defined as 'APPLICATION', these applications have an numeric quota that limits consumer usage of the subscribed application per subaccount.") + + getFormattedValueAsTableRow("`ENVIRONMENT`", " An environment service; for example, Cloud Foundry."), + Computed: true, + }, }, }, Computed: true, @@ -128,6 +141,7 @@ func (ds *directoryEntitlementsDataSource) Read(ctx context.Context, req datasou PlanDescription: types.StringValue(servicePlan.Description), QuotaAssigned: types.Float64Value(servicePlan.Amount), QuotaRemaining: types.Float64Value(servicePlan.RemainingAmount), + Category: types.StringValue(servicePlan.Category), } } } diff --git a/internal/provider/datasource_globalaccount_entitlements.go b/internal/provider/datasource_globalaccount_entitlements.go index fd9015fe..ae4ed299 100644 --- a/internal/provider/datasource_globalaccount_entitlements.go +++ b/internal/provider/datasource_globalaccount_entitlements.go @@ -24,6 +24,7 @@ type entitledService struct { PlanDescription types.String `tfsdk:"plan_description"` QuotaAssigned types.Float64 `tfsdk:"quota_assigned"` QuotaRemaining types.Float64 `tfsdk:"quota_remaining"` + Category types.String `tfsdk:"category"` } func entitledServiceType() map[string]attr.Type { @@ -35,6 +36,7 @@ func entitledServiceType() map[string]attr.Type { "plan_description": types.StringType, "quota_assigned": types.Float64Type, "quota_remaining": types.Float64Type, + "category": types.StringType, } } @@ -105,6 +107,19 @@ To view all the resources a global account: MarkdownDescription: "The quota, which is not used.", Computed: true, }, + "category": schema.StringAttribute{ + MarkdownDescription: "The current state of the entitlement. Possible values are: \n " + + getFormattedValueAsTableRow("value", "description") + + getFormattedValueAsTableRow("---", "---") + + getFormattedValueAsTableRow("`PLATFORM`", " A service required for using a specific platform; for example, Application Runtime is required for the Cloud Foundry platform.") + + getFormattedValueAsTableRow("`SERVICE`", "A commercial or technical service. that has a numeric quota (amount) when entitled or assigned to a resource. When assigning entitlements of this type, use the 'amount' option.") + + getFormattedValueAsTableRow("`ELASTIC_SERVICE`", "A commercial or technical service that has no numeric quota (amount) when entitled or assigned to a resource. Generally this type of service can be as many times as needed when enabled, but may in some cases be restricted by the service owner.") + + getFormattedValueAsTableRow("`ELASTIC_LIMITED`", "An elastic service that can be enabled for only one subaccount per global account.") + + getFormattedValueAsTableRow("`APPLICATION`", "A multitenant application to which consumers can subscribe. As opposed to applications defined as a 'QUOTA_BASED_APPLICATION', these applications do not have a numeric quota and are simply enabled or disabled as entitlements per subaccount.") + + getFormattedValueAsTableRow("`QUOTA_BASED_APPLICATION`", "A multitenant application to which consumers can subscribe. As opposed to applications defined as 'APPLICATION', these applications have an numeric quota that limits consumer usage of the subscribed application per subaccount.") + + getFormattedValueAsTableRow("`ENVIRONMENT`", " An environment service; for example, Cloud Foundry."), + Computed: true, + }, }, }, Computed: true, @@ -141,6 +156,7 @@ func (ds *globalaccountEntitlementsDataSource) Read(ctx context.Context, req dat PlanDescription: types.StringValue(servicePlan.Description), QuotaAssigned: types.Float64Value(servicePlan.Amount), QuotaRemaining: types.Float64Value(servicePlan.RemainingAmount), + Category: types.StringValue(servicePlan.Category), } } } diff --git a/internal/provider/datasource_subaccount_entitlements.go b/internal/provider/datasource_subaccount_entitlements.go index f14525fe..319057b6 100644 --- a/internal/provider/datasource_subaccount_entitlements.go +++ b/internal/provider/datasource_subaccount_entitlements.go @@ -90,6 +90,19 @@ To get all entitlements and quota assigned to a specific subaccount: MarkdownDescription: "The quota, which is not used.", Computed: true, }, + "category": schema.StringAttribute{ + MarkdownDescription: "The current state of the entitlement. Possible values are: \n " + + getFormattedValueAsTableRow("value", "description") + + getFormattedValueAsTableRow("---", "---") + + getFormattedValueAsTableRow("`PLATFORM`", " A service required for using a specific platform; for example, Application Runtime is required for the Cloud Foundry platform.") + + getFormattedValueAsTableRow("`SERVICE`", "A commercial or technical service. that has a numeric quota (amount) when entitled or assigned to a resource. When assigning entitlements of this type, use the 'amount' option.") + + getFormattedValueAsTableRow("`ELASTIC_SERVICE`", "A commercial or technical service that has no numeric quota (amount) when entitled or assigned to a resource. Generally this type of service can be as many times as needed when enabled, but may in some cases be restricted by the service owner.") + + getFormattedValueAsTableRow("`ELASTIC_LIMITED`", "An elastic service that can be enabled for only one subaccount per global account.") + + getFormattedValueAsTableRow("`APPLICATION`", "A multitenant application to which consumers can subscribe. As opposed to applications defined as a 'QUOTA_BASED_APPLICATION', these applications do not have a numeric quota and are simply enabled or disabled as entitlements per subaccount.") + + getFormattedValueAsTableRow("`QUOTA_BASED_APPLICATION`", "A multitenant application to which consumers can subscribe. As opposed to applications defined as 'APPLICATION', these applications have an numeric quota that limits consumer usage of the subscribed application per subaccount.") + + getFormattedValueAsTableRow("`ENVIRONMENT`", " An environment service; for example, Cloud Foundry."), + Computed: true, + }, }, }, Computed: true, @@ -126,6 +139,7 @@ func (ds *subaccountEntitlementsDataSource) Read(ctx context.Context, req dataso PlanDescription: types.StringValue(servicePlan.Description), QuotaAssigned: types.Float64Value(servicePlan.Amount), QuotaRemaining: types.Float64Value(servicePlan.RemainingAmount), + Category: types.StringValue(servicePlan.Category), } } }