Skip to content

Commit

Permalink
Updated data source and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jackofallops committed Feb 21, 2020
1 parent bba05e3 commit 8fd1ad1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions azurerm/internal/services/web/data_source_function_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package web

import (
"fmt"
"strings"
"time"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
Expand Down Expand Up @@ -94,6 +95,11 @@ func dataSourceArmFunctionApp() *schema.Resource {
},
},

"os_type": {
Type: schema.TypeString,
Computed: true,
},

"outbound_ip_addresses": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -168,6 +174,12 @@ func dataSourceArmFunctionAppRead(d *schema.ResourceData, meta interface{}) erro
d.Set("possible_outbound_ip_addresses", props.PossibleOutboundIPAddresses)
}

osType := ""
if v := resp.Kind; v != nil && strings.Contains(*v, "linux") {
osType = "linux"
}
d.Set("os_type", osType)

appSettings := flattenAppServiceAppSettings(appSettingsResp.Properties)

if err = d.Set("app_settings", appSettings); err != nil {
Expand Down
4 changes: 4 additions & 0 deletions website/docs/d/function_app.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ The following attributes are exported:

* `site_credential` - A `site_credential` block as defined below, which contains the site-level credentials used to publish to this App Service.

* `os_type` - A string indicating the Operating System type for this function app.

~> **NOTE:** This value will be `linux` for Linux Derivatives or an empty string for Windows.

* `outbound_ip_addresses` - A comma separated list of outbound IP addresses.

* `possible_outbound_ip_addresses` - A comma separated list of outbound IP addresses, not all of which are necessarily in use. Superset of `outbound_ip_addresses`.
Expand Down
4 changes: 4 additions & 0 deletions website/docs/r/function_app.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ The following arguments are supported:

* `connection_string` - (Optional) An `connection_string` block as defined below.

* `os_type` - (Optional) A string indicating the Operating System type for this function app.

~> **NOTE:** This value will be `linux` for Linux Derivatives or an empty string for Windows (default).

* `client_affinity_enabled` - (Optional) Should the Function App send session affinity cookies, which route client requests in the same session to the same instance?

* `enabled` - (Optional) Is the Function App enabled?
Expand Down

0 comments on commit 8fd1ad1

Please sign in to comment.