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

azurerm_logic_app_standard - Support field 'public_network_access_enabled' in site properties. #24842

Conversation

galbantow
Copy link

@galbantow galbantow commented Feb 9, 2024

Add support for the 'public_network_access_enabled' flag against the Azure Logic app standard resource.

A change was made in #24257 which did not complete the requirements to allow for the enablement and disablement of public network access. This caused policy violations when attempting to deploy logic apps to environments were public network access was disallowed. See definition: https://www.azadvertizer.net/azpolicyadvertizer/1b5ef780-c53c-4a64-87f3-bb9c8c8094ba.html

Resolves: #23809

@galbantow
Copy link
Author

@maintainers... I'm seeing some unit test failures as I have updated the Models for web against version 2021, the field 'publicNetworkAccess' does not exist against the Azure API for this API version 2021-02-01 (it only exists in the site.config block). Newer versions of the API support this field.

  • What's the process here to update the model version?
  • I do understand why we would want to verify the models but why are we doing this if Terraform does not take into account the explicit API version when it calls the API? This has been proven by the successful calls I've made against Azure with these changes in place.

Looking for some feedback and support here, thanks!!

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 for opening this PR @gabinante

It looks like we have a test failure and you have edited a vendored file? we shouldn't be doing that, is there a propery missing from the sdk?

internal/services/logic/logic_app_standard_resource.go Outdated Show resolved Hide resolved
Comment on lines +24467 to +24468
// PublicNetworkAccess - Property to allow or block all public traffic.
PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

we shouldn't be changing any vendored files? is this not availible in the current SDK then?

Copy link
Author

Choose a reason for hiding this comment

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

Hi @katbyte,

Not sure if you saw my message above calling this out so I'll put it below.

I'm seeing some unit test failures as I have updated the Models for web against version 2021, the field 'publicNetworkAccess' does not exist against the Azure API for this API version 2021-02-01 (it only exists in the site.config block). Newer versions of the API support this field.

  • What's the process here to update the model version?
  • I do understand why we would want to verify the models but why are we doing this if Terraform does not take into account the explicit API version when it calls the API? This has been proven by the successful calls I've made against Azure with these changes in place.

Looking for some feedback and support here, thanks!!

Copy link
Collaborator

Choose a reason for hiding this comment

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

sorry i missed that message when reviewing - so this resource is still using the old track 1 SDK and to make use of the newer APIs/SDKs this resource will need to by migrated over to go-azure-sdk - currently 2023-01-01 is already vendor'd into the provider already. If a newer version is required it would need to be added to the list of generated SDKs here: https://github.com/hashicorp/pandora/blob/main/config/resource-manager.hcl.

It should be pretty straight forward to do this migration as the newer sdk is pretty close to the old one. An example of this can be found in this PR: #24760 which is also migrating a resource using the web api.

Copy link
Author

Choose a reason for hiding this comment

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

thanks for the detailed response @katbyte ,
Do you know if this change is already on a roadmap somewhere at Hashicorp or is this migration/enhancement low priority?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@galbantow migrating all resources possible to the newer go-azure-sdk is on our roadmap but low priority, we are doing as needed and as we have time (out of 1300 resources and data sources i believe only 100-200 are left)

as for adding site properties public network access that is not currently on a roadmap, but as there is this PR open it will remain on our radar till done & just become part of the work to migrate the resource over.

Copy link

This PR is being labeled as "stale" because it has not been updated for 30 or more days.

If this PR is still valid, please remove the "stale" label. If this PR is blocked, please add it to the "Blocked" milestone.

If you need some help completing this PR, please leave a comment letting us know. Thank you!

@github-actions github-actions bot added the stale label Mar 25, 2024
@anwarnk
Copy link

anwarnk commented Jul 17, 2024

Hi, Are we any closer to moving this to newer SDK, to make this option available "'public_network_access_enabled' in site properties"

@github-actions github-actions bot removed the stale label Jul 17, 2024
Copy link

This PR is being labeled as "stale" because it has not been updated for 30 or more days.

If this PR is still valid, please remove the "stale" label. If this PR is blocked, please add it to the "Blocked" milestone.

If you need some help completing this PR, please leave a comment letting us know. Thank you!

@stephybun
Copy link
Member

Closing this since I've opened #27913 which migrates the Logic App Standard resource and data source to use hashicorp/go-azure-sdk, this also simultaneously bumped the version allowing us to add support for the public_network_access property.

@stephybun stephybun closed this Nov 6, 2024
Copy link

github-actions bot commented Dec 7, 2024

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for publicNetworkAccess switch
5 participants