Skip to content

Commit

Permalink
Merge remote-tracking branch 'Hashi/master' into b-appserviceplan-val…
Browse files Browse the repository at this point in the history
…idation
  • Loading branch information
shanepoint committed Jun 6, 2018
2 parents a53ec9c + 0e0d185 commit 8ef5131
Show file tree
Hide file tree
Showing 162 changed files with 7,881 additions and 4,304 deletions.
67 changes: 50 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,67 @@
## 1.6.0 (Unreleased)
## 1.7.0 (Unreleased)

UPGRADE NOTES:

~> **Please Note:** The field `overprovision` on the `azurerm_virtual_machine_scale_set` resource has changed from `false` to `true` to match the behaviour of Azure in this release. [GH-1322]

BUG FIXES:

* `azurerm_kubernetes_cluster` - `dns_prefix` is now required [GH-1333]
* `azurerm_network_interface` - ensuring that Public IP's/Private IP Addresses can be removed once assigned [GH-1295]
* `azurerm_public_ip` - setting the `domain_name_label` property into state [GH-1287]
* `azurerm_virtual_machine_scale_set` - the field `overprovision` has been updated to `true` by default rather than `false` to match Azure [GH-1322]

FEATURES:

* `azurerm_virtual_machine` - support for `write_accelerator_enabled` on Premium disks attached to MS-series machines [GH-964]

IMPROVEMENTS:

* `azurerm_dns_ns_record` - deprecated `record` properties in favor of a `records` list [GH-991]
* `azurerm_storage_account` - adding the `network_rules` property [GH-1334]
* `azurerm_virtual_machine_scale_set` - adding the `dns_settings` and `dns_servers` property [GH-1209]
* `azurerm_virtual_machine_scale_set` - adding the `ip_forwarding` property [GH-1209]
* dependencies: migrating to the un-deprecated Preview's for Container Instance, EventGrid, Log Analytics and SQL [GH-1322]
* dependencies: upgrading to `2018-01-01` of the EventGrid API [GH-1322]
* dependencies: upgrading to `2018-03-01` of the Monitor API [GH-1322]

## 1.6.0 (May 24, 2018)

UPGRADE NOTES:

~> **Please Note:** The `azurerm_mysql_server` resource has been updated from the Preview API's to the GA API's - which requires code changes in your Terraform Configuration to use the new Pricing SKU's. Upon updating to v1.6.0 - you'll need to update the configuration from the Preview SKU's to the GA SKU's.

~> **Please Note:** The `azurerm_postgresql_server` resource has been updated from the Preview API's to the GA API's - which requires code changes in your Terraform Configuration to use the new Pricing SKU's. Upon updating to v1.6.0 - you'll need to update the configuration from the Preview SKU's to the GA SKU's.

* `azurerm_scheduler_job_collection` - the property `max_retry_interval` has been deprecated in favour of `max_recurrence_interval` to better match Azure [GH-1218]
* `azurerm_scheduler_job_collection` - the property `max_retry_interval` on both the resource and datasource has been deprecated in favour of `max_recurrence_interval` to better match Azure ([#1218](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1218))

FEATURES:

* **New Data Source:** `azurerm_storage_account_sas` [GH-1011]
* **New Resource:** `azurerm_data_lake_store` [GH-1219]
* **New Resource:** `azurerm_relay_namespace` [GH-1233]
* **New Data Source:** `azurerm_storage_account_sas` ([#1011](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1011))
* **New Resource:** `azurerm_data_lake_store` ([#1219](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1219))
* **New Resource:** `azurerm_relay_namespace` ([#1233](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1233))

BUG FIXES:

* across data-sources and resources: making Connection Strings, Keys and Passwords sensitive fields [GH-1242]
* `azurerm_virtual_machine_scale_set` - an empty `os_profile_windows_config` block no longer causes a panic [GH-1224]
* across data-sources and resources: making Connection Strings, Keys and Passwords sensitive fields ([#1242](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1242))
* `azurerm_virtual_machine_scale_set` - an empty `os_profile_windows_config` block no longer causes a panic ([#1224](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1224))

IMPROVEMENTS:

* `azurerm_app_service` - adding support for `ip_restriction`'s [GH-1231]
* `azurerm_container_registry` - no longer forces a new resource on SKU change [GH-1264]
* `azurerm_dns_zone` - datasource's `resource_group` field is now optional [GH-1180]
* `azurerm_mysql_server` - support for the new GA Pricing SKU's [GH-1154]
* `azurerm_postgresql_server` - support for the new GA Pricing SKU's [GH-1190]
* `azurerm_public_ip` - computed values now default to an empy string [GH-1247]
* `azurerm_servicebus_queue` - adding `dead_lettering_on_message_expiration` [GH-1235]
* `azurerm_virtual_machine_scale_set` - adding the `licence_type` property [GH-1245]
* authorization: upgrading to API version `2018-01-01-preview`
* `azurerm_app_service` - adding support for `ip_restriction`'s ([#1231](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1231))
* `azurerm_app_service_slot` - adding support for `ip_restriction`'s ([#1246](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1246))
* `azurerm_container_registry` - no longer forces a new resource on SKU change ([#1264](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1264))
* `azurerm_dns_zone` - datasource's `resource_group` field is now optional ([#1180](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1180))
* `azurerm_mysql_database` - ignoring casing for the `charset` field ([#1281](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1281))
* `azurerm_mysql_server` - support for the new GA Pricing SKU's ([#1154](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1154))
* `azurerm_postgresql_database` - ignoring the casing on the `collation` field ([#1255](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1255))
* `azurerm_postgresql_server` - support for the new GA Pricing SKU's ([#1190](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1190))
* `azurerm_public_ip` - computed values now default to an empy string ([#1247](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1247))
* `azurerm_role_assignment` - support for roles containing DataActions ([#1284](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1284))
* `azurerm_servicebus_queue` - adding `dead_lettering_on_message_expiration` ([#1235](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1235))
* `azurerm_virtual_machine_scale_set` - adding the `licence_type` property ([#1245](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1245))
* `azurerm_virtual_machine_scale_set` - adding the `priority` property ([#1250](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1250))

## 1.5.0 (May 14, 2018)

Expand Down Expand Up @@ -145,7 +178,7 @@ IMPROVEMENTS:
* `azurerm_app_service` - allow changing `client_affinity_enabled` without requiring a resource recreation ([#993](https://github.com/terraform-providers/terraform-provider-azurerm/issues/993))
* `azurerm_app_service` - support for configuring `LocalSCM` source control ([#826](https://github.com/terraform-providers/terraform-provider-azurerm/issues/826))
* `azurerm_app_service` - returning a clearer error message when the name (which needs to be globally unique) is in use ([#1037](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1037))
* `azurerm_cosmosdb_account` - increasing the maximum value for `max_interval_in_seconds` from 100s to 86400s (1 day) [[#1000](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1000)]
* `azurerm_cosmosdb_account` - increasing the maximum value for `max_interval_in_seconds` from 100s to 86400s (1 day) [[#1000](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1000)]
* `azurerm_function_app` - returning a clearer error message when the name (which needs to be globally unique) is in use ([#1037](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1037))
* `azurerm_network_interface` - support for attaching to Application Gateways ([#1027](https://github.com/terraform-providers/terraform-provider-azurerm/issues/1027))
* `azurerm_traffic_manager_endpoint` - adding support for `geo_mappings` ([#986](https://github.com/terraform-providers/terraform-provider-azurerm/issues/986))
Expand Down Expand Up @@ -323,4 +356,4 @@ IMPROVEMENTS:
* core - Upgrading `Azure/azure-sdk-for-go` to v11.2.2-beta ([#594](https://github.com/terraform-providers/terraform-provider-azurerm/issues/594))
* core - upgrading `Azure/go-autorest` to v9.5.2 ([#617](https://github.com/terraform-providers/terraform-provider-azurerm/issues/617))
* core - skipping Resource Provider Registration in AutoRest when opted-out ([#630](https://github.com/terraform-providers/terraform-provider-azurerm/issues/630))
* `azurerm_app_service` - exposing the Default Hostname as a Computed field
* `azurerm_app_service` - exposing the Default Hostname as a Computed field
14 changes: 7 additions & 7 deletions azurerm/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,29 @@ import (
"time"

appinsights "github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights"
"github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2015-07-01/authorization"
"github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation"
"github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-04-02/cdn"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-12-01/compute"
"github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-02-01-preview/containerinstance"
"github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-04-01/containerinstance"
"github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry"
"github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-09-30/containerservice"
"github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb"
"github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account"
"github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns"
"github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2017-09-15-preview/eventgrid"
"github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid"
"github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub"
"github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac"
"github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices"
keyVault "github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault"
"github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2016-10-01/keyvault"
"github.com/Azure/azure-sdk-for-go/services/monitor/mgmt/2017-05-01-preview/insights"
"github.com/Azure/azure-sdk-for-go/services/monitor/mgmt/2018-03-01/insights"
"github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/azure-sdk-for-go/services/operationalinsights/mgmt/2015-11-01-preview/operationalinsights"
"github.com/Azure/azure-sdk-for-go/services/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement"
"github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql"
"github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization"
"github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights"
"github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement"
"github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql"
"github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices"
"github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis"
"github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay"
Expand All @@ -43,7 +44,6 @@ import (
"github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler"
"github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search"
"github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus"
"github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2015-05-01-preview/sql"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage"
"github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager"
"github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web"
Expand Down
121 changes: 6 additions & 115 deletions azurerm/data_source_app_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

"github.com/hashicorp/terraform/helper/schema"
azSchema "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/schema"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
)

Expand All @@ -27,125 +28,19 @@ func dataSourceArmAppService() *schema.Resource {
Computed: true,
},

"site_config": {
Type: schema.TypeList,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"always_on": {
Type: schema.TypeBool,
Computed: true,
},

"default_documents": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},

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

"http2_enabled": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},

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

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

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

"local_mysql_enabled": {
Type: schema.TypeBool,
Computed: true,
},

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

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

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

"remote_debugging_enabled": {
Type: schema.TypeBool,
Computed: true,
},

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

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

"use_32_bit_worker_process": {
Type: schema.TypeBool,
Computed: true,
},

"websockets_enabled": {
Type: schema.TypeBool,
Computed: true,
},
},
},
},
"site_config": azSchema.AppServiceSiteConfigSchema(),

"client_affinity_enabled": {
Type: schema.TypeBool,
Computed: true,
},

"ip_restriction": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"ip_address": {
Type: schema.TypeString,
Computed: true,
},
"subnet_mask": {
Type: schema.TypeString,
Computed: true,
},
},
},
},

"https_only": {
"enabled": {
Type: schema.TypeBool,
Computed: true,
},

"enabled": {
"https_only": {
Type: schema.TypeBool,
Computed: true,
},
Expand Down Expand Up @@ -205,6 +100,7 @@ func dataSourceArmAppService() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},

"source_control": {
Type: schema.TypeList,
Computed: true,
Expand Down Expand Up @@ -296,16 +192,11 @@ func dataSourceArmAppServiceRead(d *schema.ResourceData, meta interface{}) error
return err
}

siteConfig := flattenAppServiceSiteConfig(configResp.SiteConfig)
siteConfig := azSchema.FlattenAppServiceSiteConfig(configResp.SiteConfig)
if err := d.Set("site_config", siteConfig); err != nil {
return err
}

restrictions := flattenAppServiceIpRestrictions(configResp.SiteConfig.IPSecurityRestrictions)
if err := d.Set("ip_restriction", restrictions); err != nil {
return fmt.Errorf("Error setting `ip_restriction`: %s", err)
}

scm := flattenAppServiceSourceControl(scmResp.SiteSourceControlProperties)
if err := d.Set("source_control", scm); err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions azurerm/data_source_builtin_role_definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ func dataSourceArmBuiltInRoleDefinitionRead(d *schema.ResourceData, meta interfa
return fmt.Errorf("Error loading Role Definition: %+v", err)
}

if props := role.Properties; props != nil {
if props := role.RoleDefinitionProperties; props != nil {
d.Set("name", props.RoleName)
d.Set("description", props.Description)
d.Set("type", props.Type)
d.Set("type", props.RoleType)

permissions := flattenRoleDefinitionPermissions(props.Permissions)
if err := d.Set("permissions", permissions); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions azurerm/data_source_role_definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ func dataSourceArmRoleDefinitionRead(d *schema.ResourceData, meta interface{}) e

d.SetId(*role.ID)

if props := role.Properties; props != nil {
if props := role.RoleDefinitionProperties; props != nil {
d.Set("name", props.RoleName)
d.Set("description", props.Description)
d.Set("type", props.Type)
d.Set("type", props.RoleType)

permissions := flattenRoleDefinitionPermissions(props.Permissions)
if err := d.Set("permissions", permissions); err != nil {
Expand Down
10 changes: 8 additions & 2 deletions azurerm/data_source_scheduler_job_collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@ func dataSourceArmSchedulerJobCollection() *schema.Resource {
Computed: true,
},

//this is MaxRecurrance.Interval, property is named this as the documentation in the api states:
// Gets or sets the interval between retries.
// API documentation states the MaxRecurrence.Interval "Gets or sets the interval between retries."
// however it does appear it is the max interval allowed for recurrences
"max_retry_interval": {
Type: schema.TypeInt,
Deprecated: "Renamed to `max_recurrence_interval` to match azure",
Computed: true,
},

"max_recurrence_interval": {
Type: schema.TypeInt,
Computed: true,
},
Expand Down
Loading

0 comments on commit 8ef5131

Please sign in to comment.