Skip to content

Commit

Permalink
Merge branch 'master' into role-assignment-retry
Browse files Browse the repository at this point in the history
  • Loading branch information
katbyte committed Nov 7, 2018
2 parents 63fc501 + 633ce5e commit b3179a9
Show file tree
Hide file tree
Showing 362 changed files with 13,356 additions and 14,632 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_Report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If you are running into one of these scenarios, we recommend opening an issue in

<!--- Thank you for keeping this note for the community --->

### Terraform Version
### Terraform (and AzureRM Provider) Version

<!--- Please run `terraform -v` to show the Terraform core version and provider version(s). If you are not running the latest version of Terraform or the provider, please upgrade because your issue may have already been fixed. [Terraform documentation on provider versioning](https://www.terraform.io/docs/configuration/providers.html#provider-versions). --->

Expand Down
5 changes: 3 additions & 2 deletions .gometalinter.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"unconvert",
"unused",
"varcheck",
"vet"
"vet",
"vetshadow"
],
"EnableGC": true,
"Linters": {
Expand All @@ -31,5 +32,5 @@
"line"
],
"Vendor": true,
"WarnUnmatchedDirective": true
"WarnUnmatchedDirective": false
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
- docker
language: go
go:
- "1.10.x"
- "1.11.x"

install:
# This script is used by the Travis build to install a cookie for
Expand Down
84 changes: 49 additions & 35 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,61 @@
## 1.18.0 (Unreleased)
## 1.19.0 (Unreleased)

FEATURES:

* **New Resource:** `azurerm_devspace_controller` [GH-2086]
* **New Resource:** `azurerm_log_analytics_workspace_linked_service` [GH-2139]
* **New Data Source:** `azurerm_key_vault_key` [GH-2231]
* **New Resource:** `azurerm_iothub_consumer_group` [GH-2243]

IMPROVEMENTS:

* authentication: decoupling the authentication methods from the provider to enable splitting out the authentication library [GH-2197]
* authentication: using the Proxy from the Environment, if set [GH-2133]
* dependencies: upgrading to v21.3.0 of `github.com/Azure/azure-sdk-for-go` [GH-2163]
* refactoring: decoupling Resource Provider Registration to enable splitting out the authentication library [GH-2197]
* sdk: upgrading to `2018-10-01` of the `containerinstance` sdk [GH-2174]
* `azurerm_automation_account` - exposing `dsc_server_endpoint`, `dsc_primary_access_key`, `dsc_secondary_access_key` properties [GH-2166]
* `azurerm_automation_account` - support for the `free` SKU [GH-2166]
* `azurerm_client_config` - ensuring the `service_principal_application_id` and `service_principal_object_id` are always set [GH-2120]
* `azurerm_cosmosdb_account` - support for the `enable_multiple_write_locations` property [GH-2109]
* `azurerm_eventhub_namespace` - allow `maximum_throughput_units` to be zero [GH-2124]
* `azurerm_key_vault_certificate` - support for setting `extended_key_usage` [GH-2128]
* `azurerm_key_vault_certificate` - support for setting `subject_alternative_names` [GH-2123]
* `azurerm_managed_disk` - support for the `UltraSSD_LRS` storage account type [GH-2118]
* `azurerm_monitor_activity_log_alert` - support the criteria fields `resource_provider`, `resource_type`, `resource_group` [GH-2150]
* `azurerm_recovery_services_protected_vm` - `backup_policy_id` is now required [GH-2154]
* `azurerm_sql_database` - adding validation to `requested_service_objective_name` [GH-2125]
* `azurerm_virtual_network_gateway` - support for `OpenVPN` as a client protocol option [GH-2126]
* `azurerm_virtual_machine_scale_set` - support for the `application_security_group_ids` property of `ip_configuration` [GH-2009]
* `azurerm_virtual_machine_scale_set` - support for a Rolling Upgrade Policy with Automatic OS upgrades [GH-922]
* dependencies: switching to Go 1.11 [GH-2229]
* authentication: refactoring to allow authentication modes to be feature-toggled [GH-2199]
* `azurerm_databricks_workspace` - fixing validation on the `name` field [GH-2221]
* `azurerm_network_interface` - deprecating `internal_fqdn` since it's no longer setable/returned by Azure [GH-2253]
* `azurerm_virtual_machine` - support for assigning both a system and a user managed identity [GH-2188]
* `azurerm_virtual_machine_scale_set` - support for assigning both a system and a user managed identity [GH-2188]
* `azurerm_virtual_machine_scale_set` - support for setting `eviction_policy` [GH-2226]

BUG FIXES:

* security: removing the `Authorization` header from the debug logs [GH-2131]
* `azurerm_api_management` - validating the Key Vault Secret ID for the `key_vault_id` field in the `hostname_configuration` block [GH-2189]
* `azurerm_function_app` - correctly marking the resource as missing upon manual deletion [GH-2111]
* `azurerm_kubernetes_cluster` - changing `os_disk_size_gb` to computed as the API now returns a valid default [GH-2117]
* `azurerm_public_ip` - `domain_name_label` validation now allows 63 characters [GH-2122]
* `azurerm_virtual_machine` - making `availability_set_id` conflict with `zones` [GH-2185]
* `azurerm_cosmosdb_account` - the `ip_range_filter` range filter now allows /32 ip addresses [GH-2222]

## 1.18.0 (November 02, 2018)

FEATURES:

* **New Resource:** `azurerm_devspace_controller` ([#2086](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2086))
* **New Resource:** `azurerm_log_analytics_workspace_linked_service` ([#2139](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2139))

IMPROVEMENTS:

* authentication: decoupling the authentication methods from the provider to enable splitting out the authentication library ([#2197](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2197))
* authentication: using the Proxy from the Environment, if set ([#2133](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2133))
* dependencies: upgrading to v21.3.0 of `github.com/Azure/azure-sdk-for-go` ([#2163](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2163))
* refactoring: decoupling Resource Provider Registration to enable splitting out the authentication library ([#2197](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2197))
* sdk: upgrading to `2018-10-01` of the `containerinstance` sdk ([#2174](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2174))
* `azurerm_automation_account` - exposing `dsc_server_endpoint`, `dsc_primary_access_key`, `dsc_secondary_access_key` properties [[#2166](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2166)]
* `azurerm_automation_account` - support for the `free` SKU ([#2166](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2166))
* `azurerm_client_config` - ensuring the `service_principal_application_id` and `service_principal_object_id` are always set ([#2120](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2120))
* `azurerm_cosmosdb_account` - support for the `enable_multiple_write_locations` property ([#2109](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2109))
* `azurerm_eventhub_namespace` - allow `maximum_throughput_units` to be zero ([#2124](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2124))
* `azurerm_key_vault_certificate` - support for setting `extended_key_usage` ([#2128](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2128))
* `azurerm_key_vault_certificate` - support for setting `subject_alternative_names` ([#2123](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2123))
* `azurerm_managed_disk` - support for the `UltraSSD_LRS` storage account type ([#2118](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2118))
* `azurerm_monitor_activity_log_alert` - support the criteria fields `resource_provider`, `resource_type`, `resource_group` ([#2150](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2150))
* `azurerm_recovery_services_protected_vm` - `backup_policy_id` is now required ([#2154](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2154))
* `azurerm_sql_database` - adding validation to `requested_service_objective_name` ([#2125](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2125))
* `azurerm_virtual_network_gateway` - support for `OpenVPN` as a client protocol option ([#2126](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2126))
* `azurerm_virtual_machine_scale_set` - support for the `application_security_group_ids` property of `ip_configuration` ([#2009](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2009))
* `azurerm_virtual_machine_scale_set` - support for a Rolling Upgrade Policy with Automatic OS upgrades ([#922](https://github.com/terraform-providers/terraform-provider-azurerm/issues/922))

BUG FIXES:

* security: removing the `Authorization` header from the debug logs ([#2131](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2131))
* `azurerm_api_management` - validating the Key Vault Secret ID for the `key_vault_id` field in the `hostname_configuration` block ([#2189](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2189))
* `azurerm_function_app` - correctly marking the resource as missing upon manual deletion ([#2111](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2111))
* `azurerm_kubernetes_cluster` - changing `os_disk_size_gb` to computed as the API now returns a valid default ([#2117](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2117))
* `azurerm_public_ip` - `domain_name_label` validation now allows 63 characters ([#2122](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2122))
* `azurerm_virtual_machine` - making `availability_set_id` conflict with `zones` ([#2185](https://github.com/terraform-providers/terraform-provider-azurerm/issues/2185))


## 1.17.0 (October 18, 2018)
Expand Down Expand Up @@ -888,10 +909,3 @@ IMPROVEMENTS:
BUG FIXES:

* `azurerm_virtual_machine_scale_set` - fix panic with `additional_unattend_config` block ([#266](https://github.com/terraform-providers/terraform-provider-azurerm/issues/266))

## 0.2.0 (September 15, 2017)

FEATURES:

* **Support for authenticating using the Azure CLI** ([#316](https://github.com/terraform-providers/terraform-provider-azurerm/issues/316))
* **New Resource:** `azurerm_container_group` ([#333](https://github.com/terraform-providers/terraform-provider-azurerm/issues/333)] [[#31
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ General Requirements
------------

- [Terraform](https://www.terraform.io/downloads.html) 0.10.x
- [Go](https://golang.org/doc/install) 1.10 (to build the provider plugin)
- [Go](https://golang.org/doc/install) 1.11.x (to build the provider plugin)

Windows Specific Requirements
-----------------------------
Expand Down
24 changes: 16 additions & 8 deletions azurerm/azurerm_sweeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,24 @@ func buildConfigForSweepers() (*ArmClient, error) {
return nil, fmt.Errorf("ARM_SUBSCRIPTION_ID, ARM_CLIENT_ID, ARM_CLIENT_SECRET and ARM_TENANT_ID must be set for acceptance tests")
}

config := &authentication.Config{
SubscriptionID: subscriptionID,
ClientID: clientID,
ClientSecret: clientSecret,
TenantID: tenantID,
Environment: environment,
SkipProviderRegistration: false,
builder := &authentication.Builder{
SubscriptionID: subscriptionID,
ClientID: clientID,
ClientSecret: clientSecret,
TenantID: tenantID,
Environment: environment,

// Feature Toggles
SupportsClientSecretAuth: true,
}

config, err := builder.Build()
if err != nil {
return nil, fmt.Errorf("Error building ARM Client: %+v", err)
}

return getArmClient(config)
skipProviderRegistration := false
return getArmClient(config, skipProviderRegistration)
}

func shouldSweepAcceptanceTestResource(name string, resourceLocation string, region string) bool {
Expand Down
12 changes: 6 additions & 6 deletions azurerm/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func setUserAgent(client *autorest.Client) {

// getArmClient is a helper method which returns a fully instantiated
// *ArmClient based on the Config's current settings.
func getArmClient(c *authentication.Config) (*ArmClient, error) {
func getArmClient(c *authentication.Config, skipProviderRegistration bool) (*ArmClient, error) {
env, err := authentication.DetermineEnvironment(c.Environment)
if err != nil {
return nil, err
Expand All @@ -366,8 +366,8 @@ func getArmClient(c *authentication.Config) (*ArmClient, error) {
tenantId: c.TenantID,
subscriptionId: c.SubscriptionID,
environment: *env,
usingServicePrincipal: c.ClientSecret != "",
skipProviderRegistration: c.SkipProviderRegistration,
usingServicePrincipal: c.AuthenticatedAsAServicePrincipal,
skipProviderRegistration: skipProviderRegistration,
}

oauthConfig, err := adal.NewOAuthConfig(env.ActiveDirectoryEndpoint, c.TenantID)
Expand All @@ -382,22 +382,22 @@ func getArmClient(c *authentication.Config) (*ArmClient, error) {

// Resource Manager endpoints
endpoint := env.ResourceManagerEndpoint
auth, err := authentication.GetAuthorizationToken(c, oauthConfig, endpoint)
auth, err := c.GetAuthorizationToken(oauthConfig, endpoint)
if err != nil {
return nil, err
}

// Graph Endpoints
graphEndpoint := env.GraphEndpoint
graphAuth, err := authentication.GetAuthorizationToken(c, oauthConfig, graphEndpoint)
graphAuth, err := c.GetAuthorizationToken(oauthConfig, graphEndpoint)
if err != nil {
return nil, err
}

// Key Vault Endpoints
sender := azure.BuildSender()
keyVaultAuth := autorest.NewBearerAuthorizerCallback(sender, func(tenantID, resource string) (*autorest.BearerAuthorizer, error) {
keyVaultSpt, err := authentication.GetAuthorizationToken(c, oauthConfig, resource)
keyVaultSpt, err := c.GetAuthorizationToken(oauthConfig, resource)
if err != nil {
return nil, err
}
Expand Down
15 changes: 8 additions & 7 deletions azurerm/data_source_application_security_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ func TestAccDataSourceAzureRMApplicationSecurityGroup_complete(t *testing.T) {
func testAccDataSourceApplicationSecurityGroup_basic(rInt int, location string) string {
return fmt.Sprintf(`
resource "azurerm_resource_group" "test" {
name = "acctestRG-%d"
location = "%s"
name = "acctestRG-%d"
location = "%s"
}
resource "azurerm_application_security_group" "test" {
Expand All @@ -63,7 +63,7 @@ resource "azurerm_application_security_group" "test" {
}
data "azurerm_application_security_group" "test" {
name = "${azurerm_application_security_group.test.name}"
name = "${azurerm_application_security_group.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
}
`, rInt, location, rInt)
Expand All @@ -72,21 +72,22 @@ data "azurerm_application_security_group" "test" {
func testAccDataSourceApplicationSecurityGroup_complete(rInt int, location string) string {
return fmt.Sprintf(`
resource "azurerm_resource_group" "test" {
name = "acctestRG-%d"
location = "%s"
name = "acctestRG-%d"
location = "%s"
}
resource "azurerm_application_security_group" "test" {
name = "acctest-%d"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
tags {
"Hello" = "World"
"Hello" = "World"
}
}
data "azurerm_application_security_group" "test" {
name = "${azurerm_application_security_group.test.name}"
name = "${azurerm_application_security_group.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
}
`, rInt, location, rInt)
Expand Down
4 changes: 2 additions & 2 deletions azurerm/data_source_cdn_profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ resource "azurerm_cdn_profile" "test" {
}
data "azurerm_cdn_profile" "test" {
name = "${azurerm_cdn_profile.test.name}"
name = "${azurerm_cdn_profile.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
}
`, rInt, location, rInt)
Expand All @@ -93,7 +93,7 @@ resource "azurerm_cdn_profile" "test" {
}
data "azurerm_cdn_profile" "test" {
name = "${azurerm_cdn_profile.test.name}"
name = "${azurerm_cdn_profile.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
}
`, rInt, location, rInt)
Expand Down
8 changes: 4 additions & 4 deletions azurerm/data_source_cosmos_db_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func dataSourceArmCosmosDBAccountRead(d *schema.ResourceData, meta interface{})
d.Set("is_virtual_network_filter_enabled", resp.IsVirtualNetworkFilterEnabled)
d.Set("enable_automatic_failover", resp.EnableAutomaticFailover)

if err := d.Set("consistency_policy", flattenAzureRmCosmosDBAccountConsistencyPolicy(resp.ConsistencyPolicy)); err != nil {
if err = d.Set("consistency_policy", flattenAzureRmCosmosDBAccountConsistencyPolicy(resp.ConsistencyPolicy)); err != nil {
return fmt.Errorf("Error setting `consistency_policy`: %+v", err)
}

Expand All @@ -222,15 +222,15 @@ func dataSourceArmCosmosDBAccountRead(d *schema.ResourceData, meta interface{})
"failover_priority": int(*l.FailoverPriority),
}
}
if err := d.Set("geo_location", locations); err != nil {
if err = d.Set("geo_location", locations); err != nil {
return fmt.Errorf("Error setting `geo_location`: %+v", err)
}

if err := d.Set("capabilities", flattenAzureRmCosmosDBAccountCapabilitiesAsList(resp.Capabilities)); err != nil {
if err = d.Set("capabilities", flattenAzureRmCosmosDBAccountCapabilitiesAsList(resp.Capabilities)); err != nil {
return fmt.Errorf("Error setting `capabilities`: %+v", err)
}

if err := d.Set("virtual_network_rule", flattenAzureRmCosmosDBAccountVirtualNetworkRulesAsList(props.VirtualNetworkRules)); err != nil {
if err = d.Set("virtual_network_rule", flattenAzureRmCosmosDBAccountVirtualNetworkRulesAsList(props.VirtualNetworkRules)); err != nil {
return fmt.Errorf("Error setting `virtual_network_rule`: %+v", err)
}

Expand Down
4 changes: 2 additions & 2 deletions azurerm/data_source_data_lake_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ resource "azurerm_data_lake_store" "test" {
location = "%s"
tier = "Commitment_1TB"
resource_group_name = "${azurerm_resource_group.test.name}"
tags {
hello = "world"
hello = "world"
}
}
Expand Down
Loading

0 comments on commit b3179a9

Please sign in to comment.