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

Adding data source subscription(s), new subscription client #156

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rkhaled0
Copy link
Contributor

Bring support to these following data sources:

  • azurestack_subscription
  • azurestack_subscriptions

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @redak-hash - we have a filling test here:

<div class="rightBlock expandedDetails" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; float: right; background-color: rgba(245, 245, 245, 0.81); border-left-width: 5px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-bottom-width: 5px; border-bottom-style: solid; border-bottom-color: rgb(255, 255, 255); caret-color: rgb(31, 35, 38); color: rgb(31, 35, 38); font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif; font-size: 13px;"><br class="Apple-interchange-newline"><div class="icon_before icon16 collapser collapser_expanded" title="Click to hide the details block" style="float: right; height: 2em; padding: 5px; cursor: pointer;"></div><div class="relatedBuildsWrapper" style="border-right-width: 3px; border-right-style: solid; border-right-color: white; float: right;">

  | First failure: |   | #11 | Changes (3) | 23 Feb 22 16:15
-- | -- | -- | -- | -- | --


<div id="div_iaa_17c32841381"></div></div></div><span style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(31, 35, 38); color: rgb(31, 35, 38); font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); float: none; display: inline !important;"></span><span style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(31, 35, 38); color: rgb(31, 35, 38); font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); float: none; display: inline !important;"></span><div class="testMetadata" id="testMetadata_tdi_17c3284137f" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(31, 35, 38); color: rgb(31, 35, 38); font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif; font-size: 13px;"></div><pre class="fullStacktrace" id="fullStacktrace_260874_83867537089881702" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; font-stretch: normal; font-size: 12px; line-height: 1.2em; font-family: Menlo, &quot;Bitstream Vera Sans Mono&quot;, &quot;Ubuntu Mono&quot;, Consolas, &quot;Courier New&quot;, Courier, monospace; padding: 3px 3px 0px; color: darkred; margin-top: 0.5em; margin-bottom: 0.5em; white-space: pre-wrap; overflow-wrap: break-word;">Test Failed

------- Stdout: -------
=== RUN   TestAccDataSourceSubscription_specific
=== PAUSE TestAccDataSourceSubscription_specific
=== CONT  TestAccDataSourceSubscription_specific
    testcase.go:110: Step 1/1 error: Check failed: Check 5/6 error: data.azurestack_subscription.specific: Attribute 'quota_id' expected to be set
--- FAIL: TestAccDataSourceSubscription_specific (3.94s)</pre>[](https://www.jetbrains.com/help/teamcity/2020.2/?First%20Failure)First failure: 	refs/pull/156/merge	[#11 ](https://ci-oss.hashicorp.engineering/viewLog.html?buildId=260874&tab=buildResultsDiv&buildTypeId=AzureStack_TerraformProviderAzurestack_AZURESTACK_PR_STACK) 	[Changes (3)](https://ci-oss.hashicorp.engineering/viewLog.html?buildId=260874&tab=buildChangesDiv&buildTypeId=AzureStack_TerraformProviderAzurestack_AZURESTACK_PR_STACK) 	23 Feb 22 16:15
 Test Failed

------- Stdout: -------
=== RUN   TestAccDataSourceSubscription_specific
=== PAUSE TestAccDataSourceSubscription_specific
=== CONT  TestAccDataSourceSubscription_specific
    testcase.go:110: Step 1/1 error: Check failed: Check 5/6 error: data.azurestack_subscription.specific: Attribute 'quota_id' expected to be set
--- FAIL: TestAccDataSourceSubscription_specific (3.94s)

@rkhaled0
Copy link
Contributor Author

rkhaled0 commented Feb 23, 2022

Thank you for your review @katbyte ,

Regarding acceptance test failure, according to the azure rest api specs, the response should contain quota_id and spending_limit but those fields are missing.

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json#L456

Do we remove those fields from data source schema even if they are expected "theoretically" ?

@rkhaled0 rkhaled0 requested a review from katbyte February 24, 2022 19:17
@rkhaled0 rkhaled0 force-pushed the feature/bring-data-source-subscriptions branch from b96c40e to f6859f9 Compare March 2, 2022 08:37
@rkhaled0
Copy link
Contributor Author

rkhaled0 commented Mar 2, 2022

Thanks @redak-hash - we have a filling test here:

<div class="rightBlock expandedDetails" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; float: right; background-color: rgba(245, 245, 245, 0.81); border-left-width: 5px; border-left-style: solid; border-left-color: rgb(255, 255, 255); border-bottom-width: 5px; border-bottom-style: solid; border-bottom-color: rgb(255, 255, 255); caret-color: rgb(31, 35, 38); color: rgb(31, 35, 38); font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif; font-size: 13px;"><br class="Apple-interchange-newline"><div class="icon_before icon16 collapser collapser_expanded" title="Click to hide the details block" style="float: right; height: 2em; padding: 5px; cursor: pointer;"></div><div class="relatedBuildsWrapper" style="border-right-width: 3px; border-right-style: solid; border-right-color: white; float: right;">

  | First failure: |   | #11 | Changes (3) | 23 Feb 22 16:15
-- | -- | -- | -- | -- | --


<div id="div_iaa_17c32841381"></div></div></div><span style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(31, 35, 38); color: rgb(31, 35, 38); font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); float: none; display: inline !important;"></span><span style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(31, 35, 38); color: rgb(31, 35, 38); font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); float: none; display: inline !important;"></span><div class="testMetadata" id="testMetadata_tdi_17c3284137f" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(31, 35, 38); color: rgb(31, 35, 38); font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif; font-size: 13px;"></div><pre class="fullStacktrace" id="fullStacktrace_260874_83867537089881702" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; font-stretch: normal; font-size: 12px; line-height: 1.2em; font-family: Menlo, &quot;Bitstream Vera Sans Mono&quot;, &quot;Ubuntu Mono&quot;, Consolas, &quot;Courier New&quot;, Courier, monospace; padding: 3px 3px 0px; color: darkred; margin-top: 0.5em; margin-bottom: 0.5em; white-space: pre-wrap; overflow-wrap: break-word;">Test Failed

------- Stdout: -------
=== RUN   TestAccDataSourceSubscription_specific
=== PAUSE TestAccDataSourceSubscription_specific
=== CONT  TestAccDataSourceSubscription_specific
    testcase.go:110: Step 1/1 error: Check failed: Check 5/6 error: data.azurestack_subscription.specific: Attribute 'quota_id' expected to be set
--- FAIL: TestAccDataSourceSubscription_specific (3.94s)</pre>[](https://www.jetbrains.com/help/teamcity/2020.2/?First%20Failure)First failure: 	refs/pull/156/merge	[#11 ](https://ci-oss.hashicorp.engineering/viewLog.html?buildId=260874&tab=buildResultsDiv&buildTypeId=AzureStack_TerraformProviderAzurestack_AZURESTACK_PR_STACK) 	[Changes (3)](https://ci-oss.hashicorp.engineering/viewLog.html?buildId=260874&tab=buildChangesDiv&buildTypeId=AzureStack_TerraformProviderAzurestack_AZURESTACK_PR_STACK) 	23 Feb 22 16:15
 Test Failed

------- Stdout: -------
=== RUN   TestAccDataSourceSubscription_specific
=== PAUSE TestAccDataSourceSubscription_specific
=== CONT  TestAccDataSourceSubscription_specific
    testcase.go:110: Step 1/1 error: Check failed: Check 5/6 error: data.azurestack_subscription.specific: Attribute 'quota_id' expected to be set
--- FAIL: TestAccDataSourceSubscription_specific (3.94s)

@katbyte , thank you for reviewing again, should be ok right now.

@hashicorp-cla
Copy link

hashicorp-cla commented Mar 12, 2022

CLA assistant check
All committers have signed the CLA.

@rkhaled0 rkhaled0 force-pushed the feature/bring-data-source-subscriptions branch from f6859f9 to b603899 Compare March 14, 2022 20:06
@rkhaled0
Copy link
Contributor Author

Hello @katbyte , could you please review this PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants