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: Support for Linux Container based Function Apps #1937

Closed
wbreza opened this issue Sep 18, 2018 · 2 comments · Fixed by #2767
Closed

Feature Request: Support for Linux Container based Function Apps #1937

wbreza opened this issue Sep 18, 2018 · 2 comments · Fixed by #2767

Comments

@wbreza
Copy link

wbreza commented Sep 18, 2018

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 "+1" or "me too" comments, 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

Description

Azure Function apps now support being deployed as a docker image within a Linux app service plan. The only primary difference in the underlying ARM properties are the following:

kind: functionapp,linux,container
siteProperties/LinuxFxVersion: DOCKER|{path_to_registry}/{image_name}:{tag}

I don't have a PR yet but would like to volunteer to add support for this.

Based on reading the threads for the referenced items its unclear how it would be best to handle the overloaded kind attribute to automatically be built based on other settings.

The default value for kind in function apps is functionapp. If it's a linux app then it becomes functionapp,linux and finally if its a linux container the value is functionapp,linux,container

One option would be to dynamically build up the kind attribute based on inspecting the app_service_plan_id and other related properties.

Another approach vs. continuing with the linux_fx_version approach would be to split this configuration out into a common object with the properties required to configure a container

container_config = {
    registry_url = "{path_to_registry}"
    image_name = "{image_name}"
    tag_name = "{tag_name}"
}

New or Affected Resource(s)

  • azurerm_function_app

Potential Terraform Configuration

resource "azurerm_function_app" "function_app" {
    name                      = "{name_of_resource}"
    location                  = "{region_for_resource}"
    resource_group_name       = "{resource_group_name}"
    app_service_plan_id       = "{app_service_plan_id}"
    storage_connection_string = "{storage_connection_string}"

    site_config = {
        linux_fx_version = "DOCKER|{path_to_registry}/{image_name}:{tag}"
    }

    #OR

    container_config = {
        registry_url = "{path_to_registry}"
        image_name = "{image_name}"
        tag_name = "{tag_name}"
    }
}

References

@joakimhew
Copy link
Contributor

joakimhew commented Jan 25, 2019

I might be wrong. But it seems like there is already support for this? 1578 @tombuildsstuff @wbreza

EDIT: Apologies, I just realised that this is about the azurerm_function_app resource type

@ghost
Copy link

ghost commented Mar 5, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants