Skip to content
Discussion options

You must be logged in to vote

Put the dependency on the plan data source. Referencing the same subaccount ID in both blocks only makes them depend on the subaccount; it doesn't order the entitlement assignment before the plan lookup.

For the serviceplan_id approach, the relevant part is:

# Assumes btp_subaccount_entitlement.service is declared elsewhere.
data "btp_subaccount_service_plan" "service" {
  subaccount_id = var.subaccount_id
  offering_name = var.service_offering_name
  name          = var.service_plan_name

  depends_on = [btp_subaccount_entitlement.service]
}

resource "btp_subaccount_service_instance" "service" {
  subaccount_id  = var.subaccount_id
  name           = var.instance_name
  serviceplan_id = d…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by leotardoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants