Skip to content

Conversation

@gerrytan
Copy link
Member

@gerrytan gerrytan commented Sep 6, 2024

ARM (Control Plane) API Specification Update Pull Request

Tip

Overwhelmed by all this guidance? See the Getting help section at the bottom of this PR description.

PR review workflow diagram

Please understand this diagram before proceeding. It explains how to get your PR approved & merged.

spec_pr_review_workflow_diagram

Purpose of this PR

What's the purpose of this PR? Check the specific option that applies. This is mandatory!

  • New resource provider.
  • New API version for an existing resource provider. (If API spec is not defined in TypeSpec, the PR should have been created in adherence to OpenAPI specs PR creation guidance).
  • Update existing version for a new feature. (This is applicable only when you are revising a private preview API version.)
  • Update existing version to fix OpenAPI spec quality issues in S360.
  • Convert existing OpenAPI spec to TypeSpec spec (do not combine this with implementing changes for a new API version).
  • Other, please clarify:
    • edit this with your clarification

This PR introduces a new RP Microsoft.AzureTerraform.Management which allows user to export existing Azure resources into a Terraform HCL.

This RP has been merged to RPSaaSMaster branch of the private (-pr) repo. Check via git log -- specification/terraform.

Due diligence checklist

To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:

  • I confirm this PR is modifying Azure Resource Manager (ARM) related specifications, and not data plane related specifications.
  • I have reviewed following Resource Provider guidelines, including
    ARM resource provider contract and
    REST guidelines (estimated time: 4 hours).
    I understand this is required before I can proceed to the diagram Step 2, "ARM API changes review", for this PR.

Additional information

Viewing API changes

For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.

Suppressing failures

If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
suppressions guide to get approval.

Getting help

  • First, please carefully read through this PR description, from top to bottom. Please fill out the Purpose of this PR and Due diligence checklist.
  • If you don't have permissions to remove or add labels to the PR, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories
  • To understand what you must do next to merge this PR, see the Next Steps to Merge comment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.
  • For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure
    and https://aka.ms/ci-fix.
  • For help with ARM review (PR workflow diagram Step 2), see https://aka.ms/azsdk/pr-arm-review.
  • If the PR CI checks appear to be stuck in queued state, please add a comment with contents /azp run.
    This should result in a new comment denoting a PR validation pipeline has started and the checks should be updated after few minutes.
  • If the help provided by the previous points is not enough, post to https://aka.ms/azsdk/support/specreview-channel and link to this PR.

Armstrong testing

https://github.com/gerrytan/azure-terraform-armstrong (private repo)

magodo and others added 19 commits September 6, 2024 16:49
* terraform: Modify the `exportTerraform` RT to be LRO

* Update

* prettier

* spell

* CI validation

* More CI issue fixes

* typo

* Add readme.go.md

* typo

* prettier

* suppression

* Update suppression
…`; Change `fullConfig` defaults (Azure#19178)

* exportTerraform: Change resourceId -> resourceIds; Add `maskSensitive`; Change `fullConfig` defaults

* rename

* rename

* rename
* Add format url

* update
* TypeSpec for Microsoft.AzureTerraform

* Sorted swagger file, and added typespec generated with tsp-client

* revert export.json in prep of merging

* Sorted export.json for easy diff on future typespec -> swagger

* Rerun swagger -> typespec conversion after merging latest RPSaaSMaster,
updated namespace

* tsp compile for TypeSpec -> swagger

* Refactored typescript to minimise swagger diff

* Spread ErrorResponse into OperationStatus model

* Fixed enums, use doc decorator

* Update exportTerraform path desc

* Update doc for ExportResource model

* LintDiff fix: remove unnecessary auth

* Add resourceId prop to OperationStatus model, fixed char casing so they're consistent throughout

* Made resourceId read only

* Check `Swagger BreakingChange`: minimise diff on x-ms-enum

* TypeSpec Validation fix: rename dir and add missing @doc
@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Sep 6, 2024

Next Steps to Merge

✅ All automated merging requirements have been met! To get your PR merged, see aka.ms/azsdk/specreview/merge.

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Sep 6, 2024

@ms-henglu
Copy link
Member

The detected lint diff errors are false positives.

@gerrytan gerrytan marked this pull request as ready for review September 19, 2024 03:38
@gerrytan gerrytan requested a review from tadelesh as a code owner September 19, 2024 03:38
@AzureRestAPISpecReview AzureRestAPISpecReview added ARMReview new-api-version WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Sep 19, 2024
@gerrytan
Copy link
Member Author

API TEST ERROR REPORT

Rule Message

Coverage Report

Operation Tested properties Total properties Coverage
All 25 25 100.0%
ExportTerraform 25 25 100.0%
OperationStatuses_Get 0 0 100.0%
Operations_List 0 0 100.0%

@ms-henglu ms-henglu added the ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review label Sep 19, 2024
@openapi-pipeline-app openapi-pipeline-app bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Sep 19, 2024
@ms-henglu ms-henglu added the PublishToCustomers Acknowledgement the changes will be published to Azure customers. label Sep 20, 2024
@gerrytan gerrytan merged commit 46b3863 into Azure:main Sep 20, 2024
cheukchuen pushed a commit that referenced this pull request Jan 24, 2025
…o Terraform HCL (#30455)

* New RP: Microsoft.AzureTerraform (ver=2023-07-01-preview)

* prettier

* remove x-ms-discriminator-value

* readme.md: add `openapi-subtype`

* Fix LintDiff failure

* Result configuration type change from object to string

* Remove properties: `subscriptionId` and `environment`

* Change `errors` from list of string to list of `ErrorResponse`

* Add operations endpoint

* Update

* Update

* AzureTerraform RP: Sync the MS version with the private version

* Terraform: Change `exportEerraform` endpoint to LRO (#18782)

* terraform: Modify the `exportTerraform` RT to be LRO

* Update

* prettier

* spell

* CI validation

* More CI issue fixes

* typo

* Add readme.go.md

* typo

* prettier

* suppression

* Update suppression

* AzureTerrform: Remove the parallelism property (#18909)

* exportTerraform: Change resourceId -> resourceIds; Add `maskSensitive`; Change `fullConfig` defaults (#19178)

* exportTerraform: Change resourceId -> resourceIds; Add `maskSensitive`; Change `fullConfig` defaults

* rename

* rename

* rename

* Specify LRO model (#19401)

* Add up the `resourceId` in `OperationStatus` model (#19450)

* Add `uri` format (#19455)

* Add format url

* update

* TypeSpec for Microsoft.AzureTerraform (#19390)

* TypeSpec for Microsoft.AzureTerraform

* Sorted swagger file, and added typespec generated with tsp-client

* revert export.json in prep of merging

* Sorted export.json for easy diff on future typespec -> swagger

* Rerun swagger -> typespec conversion after merging latest RPSaaSMaster,
updated namespace

* tsp compile for TypeSpec -> swagger

* Refactored typescript to minimise swagger diff

* Spread ErrorResponse into OperationStatus model

* Fixed enums, use doc decorator

* Update exportTerraform path desc

* Update doc for ExportResource model

* LintDiff fix: remove unnecessary auth

* Add resourceId prop to OperationStatus model, fixed char casing so they're consistent throughout

* Made resourceId read only

* Check `Swagger BreakingChange`: minimise diff on x-ms-enum

* TypeSpec Validation fix: rename dir and add missing @doc

* Upgrade/rp tsp 0.60 (#19551) -- applying only for specification/terraform

* Revert accidental changes to cSpell.json while merging

* Added tf files used for armstrong testing

---------

Co-authored-by: magodo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved-LintDiff ARMReview ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review new-api-version new-rp-namespace PublishToCustomers Acknowledgement the changes will be published to Azure customers. resource-manager RPaaS TypeSpec Authored with TypeSpec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants