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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for linking static_web_app to container_app #26350

Open
1 task done
michael-ball-ctct opened this issue Jun 17, 2024 · 4 comments 路 May be fixed by #26507
Open
1 task done

Support for linking static_web_app to container_app #26350

michael-ball-ctct opened this issue Jun 17, 2024 · 4 comments 路 May be fixed by #26507

Comments

@michael-ball-ctct
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Description

Similar to #14319 (but notably different):

Thanks to #25331 we can now link function_apps to static_web_apps via Terraform, but remain unable to link container_apps in the same fashion without taking manual steps in the Azure Portal Web UI. A similar resource would be fantastic for this subtly different use case.

At this stage, I am personally not familiar enough with Terraform (and Terraform plugins, etc.) to implement this myself.

New or Affected Resource(s)/Data Source(s)

azurerm_static_web_app_container_app_registration

Potential Terraform Configuration

resource "azurerm_static_web_app_container_app_registration" "container-app-to-swa-link" {
  static_web_app_id = azurerm_static_web_app.swa.id
  container_app_id  = azurerm_container_app.container-app.id
}

References

#14319
#25331

@nnstt1
Copy link
Contributor

nnstt1 commented Jun 23, 2024

After looking at the documentation and API specifications, it seems that all services (API Management, App Service, Container Apps) that can be linked as API backends for Static Web Apps are created using a common API. Only "User Provided Function App" are created with a separate API.

I think we need to decide whether to create a dedicated resource for linking Container Apps (azurerm_static_web_app_container_app_registration) or a service for linking services other than Functions (e.g. azurerm_static_web_app_link_backend). Could someone share their opinion on this matter? Thanks!

@SlyckLizzie
Copy link

I would like to see something more generic like azurerm_static_web_app_link_backend

@michael-ball-ctct
Copy link
Author

I'd be all for a more generalised resource, as long as it gets the job done. My inital request was simply based on the existing similar feature.

@nnstt1
Copy link
Contributor

nnstt1 commented Jun 26, 2024

Thanks for your feedback! If it's okay, I'd like to work on implementing azurerm_static_web_app_link_backend for this issue.

@nnstt1 nnstt1 linked a pull request Jun 30, 2024 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants