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: add support for exporting to azapi provider #462

Merged
merged 5 commits into from
Oct 20, 2023
Merged

Conversation

wuxu92
Copy link
Contributor

@wuxu92 wuxu92 commented Oct 17, 2023

This PR is to add support for exporting to azapi provider.

  1. Add a new argument to specify the provider to export to. Currently support azapi.
  2. Extract building common config from main.go as it is repeated too many times.
  3. Do not add dependency in the resource if the parent resource contains the sub-resources' id in its body. This is to prevent the circular dependencies in the generated configuration.

@stemaMSFT
Copy link
Member

Thanks for this PR, excited to see it merged!
a couple questions (but don’t block merging on this):

  • does this have compatibility or use the same previous pre-loading of the terraform binary and azurerm provider to avoid overhead w installation if we were to expose this in API form? Better handling for attribute/block constraints #2 bullet is reading like this to me.
  • will this work on data plane resources that AzAPI supports or resource action?

Copy link
Collaborator

@magodo magodo left a comment

Choose a reason for hiding this comment

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

Thanks for this PR!
I've taken a look through and left some comments inline, but this is mostly looking good to me 👍

main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
flag.go Show resolved Hide resolved
flag.go Show resolved Hide resolved
internal/meta/base_meta.go Outdated Show resolved Hide resolved
internal/meta/base_meta.go Outdated Show resolved Hide resolved
internal/meta/meta_query.go Outdated Show resolved Hide resolved
internal/meta/meta_res.go Show resolved Hide resolved
internal/meta/config_info.go Show resolved Hide resolved
Copy link
Collaborator

@magodo magodo left a comment

Choose a reason for hiding this comment

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

Thanks for this PR!
I have left some additional mostly minor comments that once addressed this should be good to merge 👍

internal/meta/base_meta.go Outdated Show resolved Hide resolved
@magodo magodo added the enhancement New feature or request label Oct 19, 2023
Copy link
Collaborator

@magodo magodo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@magodo magodo merged commit a24308b into Azure:main Oct 20, 2023
7 checks passed
@magodo magodo mentioned this pull request Oct 20, 2023
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.

None yet

3 participants