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

[Module]: Container Apps #15

Open
lonegunmanb opened this issue Feb 27, 2023 · 4 comments
Open

[Module]: Container Apps #15

lonegunmanb opened this issue Feb 27, 2023 · 4 comments
Labels
module new module to enable a specific scenario

Comments

@lonegunmanb
Copy link
Member

Module Scenario

Pulumi wrote an interesting blog about Azure Container Apps, in this blog, they

  1. Created a container apps environment
  2. Created an Azure Container Registry
  3. Package a nodejs app into a docker container and push to the acr just created
  4. Created a container app by using the docker image just created

I'm thinking of a new Azure Verified Terraform module to support such scenarios, which also support configurable Dapr components. This module should be able to provision a modern microservice system with capability of scale down to zero.

Proposed module name

terraform-azure-container-apps

Link to existing example module

No response

Expected resources

- azurerm_container_app
- azurerm_container_app_environment
- azurerm_container_app_environment_dapr_component

Module inputs

yet to decide

Module outputs

No response

Other information

No response

@lonegunmanb lonegunmanb added the module new module to enable a specific scenario label Feb 27, 2023
@zioproto
Copy link
Contributor

Please look also at this example from @paolosalvatori

@paolosalvatori
Copy link

Thanks @zioproto. @lonegunmanb, my article + sample:

use the brand new native resources in the Azure Terraform module:

- azurerm_container_app
- azurerm_container_app_environment
- azurerm_container_app_environment_dapr_component

I also submitted a couple of PRs, currently under review, to solve a couple of issues of the azurerm provider with Azure Container Apps.

• PR: Made the app_port property in the dapr block of the azurerm_container_app resource optional
• PR: Made the traffic_weight block in the ingress block of the azurerm_container_app resource optional

@lonegunmanb
Copy link
Member Author

Thanks @paolosalvatori, your tutorial helps me a lot!

I'd like to add more resource like azurerm_container_registry, docker_image into this new module, so the user can just give a folder path that contains Dockerfile, the module would build the image, upload it to ACR or the registry they'd like to use, then create or update the container app, WDYT? I'd like to try a serverless style module which can simplify the deployment of a serverless app.

@paolosalvatori
Copy link

paolosalvatori commented Mar 1, 2023

Thanks @paolosalvatori, your tutorial helps me a lot!

I'd like to add more resource like azurerm_container_registry, docker_image into this new module, so the user can just give a folder path that contains Dockerfile, the module would build the image, upload it to ACR or the registry they'd like to use, then create or update the container app, WDYT? I'd like to try a serverless style module which can simplify the deployment of a serverless app.

I like the scenario you described. Feel free to fork my solution and eventually submit a PR 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module new module to enable a specific scenario
Projects
None yet
Development

No branches or pull requests

3 participants