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

feat: Add used_in_production arg in subaccount creation and update #288

Merged
merged 3 commits into from
Jul 13, 2023

Conversation

Thanhphan1147
Copy link
Contributor

Purpose

Closes #273

With this PR users can now set used_for_production = UNSET | USED_FOR_PRODUCTION | NOT_USED_FOR_PRODUCTION when creating subaccounts

  • ...

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[x] Feature
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Test the code
resource "btp_subaccount" "subaccount" {
  name = var.display_name
  subdomain = var.subdomain
  region = var.region
  parent_id = var.parent_guid
  used_for_procduction = "NOT_USED_FOR_PRODUCTION"
}

What to Check

Verify that the following are valid

  • Verify that the subaccount created has the attribute correctly set

Other Information

@cla-assistant
Copy link

cla-assistant bot commented Jul 12, 2023

CLA assistant check
All committers have signed the CLA.

@Thanhphan1147 Thanhphan1147 changed the title Add used_in_production arg in subaccount creation and update feat: Add used_in_production arg in subaccount creation and update Jul 12, 2023
@lechnerc77
Copy link
Member

Thanks for your contribution! Can you execute a make generate and commit the updated documentation to this PR?

@lechnerc77 lechnerc77 added this to the 0.2.0-beta1 - July release milestone Jul 12, 2023
@lechnerc77 lechnerc77 added the enhancement New feature or request label Jul 12, 2023
@lechnerc77
Copy link
Member

@Thanhphan1147 : No worries about the failed tests. I will check what is missing an eventually add new test recordings to this PR

@lechnerc77
Copy link
Member

@Thanhphan1147 there is one issue to fix: you need to adjust the facade_accounts_subaccount_test.go. Due to the addition of the usage the expected result now deviates (see e.g. https://github.com/SAP/terraform-provider-btp/actions/runs/5532790691/jobs/10095867971?pr=288#step:6:214)

The other error in the test must be fixed by us by re-recording the test fixtures for the subaccount

@Thanhphan1147
Copy link
Contributor Author

I updated the test file

@lechnerc77 lechnerc77 changed the base branch from main to temp-test-recording July 13, 2023 12:07
@lechnerc77 lechnerc77 merged commit 6687594 into SAP:temp-test-recording Jul 13, 2023
8 of 13 checks passed
@lechnerc77
Copy link
Member

I merged it into a temporary branch to re-record the tests and then merge it into main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Support "used_for_production" as input parameter for subaccounts
2 participants