Closed lechnerc77 closed 3 months ago
Regression test done with HANA Cloud that exposes the dashboard URL- due to computed field, change has no impact on existing states.
Customers can fetch the additional computed field via terraform refresh
which will update the state without any impact on the provided resources on SAP BTP
Here is the sample configuration used to validate the setup:
provider.tf
terraform {
required_providers {
btp = {
source = "SAP/btp"
version = "~>1.4.0"
}
}
}
# Configure the BTP Provider
provider "btp" {
globalaccount = var.globalaccount
cli_server_url = var.cli_server_url
}
main.tf
resource "btp_subaccount" "sa_retest_hana_cloud" {
name = "retest-hana-cloud"
subdomain = "retest-hana-cloud"
region = var.region
}
resource "btp_subaccount_entitlement" "se_hana-cloud" {
subaccount_id = resource.btp_subaccount.sa_retest_hana_cloud.id
service_name = "hana-cloud"
plan_name = "hana"
}
data "btp_subaccount_service_plan" "sp_hana_cloud__hana" {
subaccount_id = resource.btp_subaccount.sa_retest_hana_cloud.id
offering_name = "hana-cloud"
name = "hana"
depends_on = [btp_subaccount_entitlement.se_hana-cloud]
}
resource "btp_subaccount_service_instance" "hana_cloud_hana_instance" {
subaccount_id = resource.btp_subaccount.sa_retest_hana_cloud.id
serviceplan_id = data.btp_subaccount_service_plan.sp_hana_cloud__hana.id
name = "hana-cloud-test-tf"
parameters = jsonencode({
"data" = {
"memory" = 32
"generateSystemPassword" = true
"edition" = "cloud"
}
})
timeouts = {
create = "25m"
update = "15m"
delete = "15m"
}
}
variables.tf
variable "globalaccount" {
description = "The global account name"
type = string
default = <YOUR GLOBAL ACCOUNT SUBDOMAIN>
}
variable "cli_server_url" {
description = "The BTP CLI server URL"
type = string
default = "https://cli.btp.cloud.sap"
}
variable "region" {
description = "The region where the subaccount should be created"
type = string
default = "us10"
}
@vipinvkmenon @CHERIANS: when doing the review, please also validate the regression e.g. via the sample configuration provided above.
Verified
Purpose
dashboard_url
as computed parameter to the resource and data source for service instanceDoes this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
What to Check
Verify that the following are valid:
Other Information
n/a
Checklist for reviewer
The following organizational tasks must be completed before merging this PR: