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

[Feature Request]: REST2CARML PoC #1839

Closed
AlexanderSehr opened this issue Aug 31, 2022 · 1 comment · Fixed by #2069 · May be fixed by #2130
Closed

[Feature Request]: REST2CARML PoC #1839

AlexanderSehr opened this issue Aug 31, 2022 · 1 comment · Fixed by #2069 · May be fixed by #2130

Comments

@AlexanderSehr
Copy link
Contributor

AlexanderSehr commented Aug 31, 2022

Description

Idea: Automatically generate new CARML modules from the Azure REST API.

To elaborate a bit further:

  • The end result will likely be a utility - like a PowerShell script
  • An approach could be to crawl data from
  • Using these sources, it should be possible to determine the parameters for PUT/POST commands and as such use the data to generate the CARML module structure.
  • This structure should contain
    • The module folder structure & files
    • Input parameters with metadata
    • The resource implementation itself
    • Child resources (referenced in the parent)
    • Extension resources (like RBAC, Private Endpoints, Diagnostics, Locks,...)
  • We should further try to adhear certain design descision we follow such as
    • If a resource property is only an object with a single value, the corresponding input parameter should be a simplified combination of the two. For example the property something: something where something is an object with only an id property should be simplified to something: { id: somethingId }.
    • In general, we should follow the guidlines specified in the Module Design section of the Wiki

Note: The end result will likely not get us 100% of the way as modules usually always have some specifics to them. However, if it gets us already 70% of the way, it would be a big win.

Stretch goal: Have the utility give you a 'diff' - i.e., would there be anything to update for a new API version
Stretch goal: In an ideal world we may even be able to run the function idempotently to add new properties to an existing template (e.g. if a new API version was released).


Implementation takes place in branch users/hack-REST2CARML.

@AlexanderSehr
Copy link
Contributor Author

Given that the modules were migrated to AVM by now, I'll close this issue in CARML. If we were to reapproach the topic, it will definitely be in there.
cc: @matebarabas (for awareness)

@AlexanderSehr AlexanderSehr closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment