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

New Data Source: azurerm_virtual_network #533

Merged
merged 7 commits into from
Dec 8, 2017
Merged

New Data Source: azurerm_virtual_network #533

merged 7 commits into from
Dec 8, 2017

Conversation

dcaro
Copy link
Contributor

@dcaro dcaro commented Nov 7, 2017

Adding a data source for vnet in Azure.

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @dcaro

Thanks for opening this PR - I've taken a look through and left some comments in-line but this is off to a good start; the only thing missing that I can see at this point is some documentation - would it be possible to add some for this Data Source?

Thanks!


resp, err := vnetClient.Get(resGroup, name, "")
if err != nil {
if resp.StatusCode == http.StatusNotFound {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we change this to use utils.ResponseWasNotFound() to handle the connection being dropped (where this will currently crash)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense, will do so.

if resp.StatusCode == http.StatusNotFound {
d.SetId("")
}
return fmt.Errorf("Error making Read request on Azure virtual network %s: %s", name, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we change this second formatting argument to %+v - which outputs the full exception, rather than just the friendly message (sometimes the actual error is hidden)

func flattenVnetAddressPrefixes(input *[]string) []interface{} {
prefixes := make([]interface{}, 0)

for _, prefix := range *input {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in order to handle a potential crash - can we update this to:

if prefixes := input; prefixes != nil {
  for _, prefix := range *prefixes {
    # ..
  }
}

at the moment - if input isn't returned (such as, for a resource created through an older API version) - this will crash (this check should fix that)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tombuildsstuff let me know if the change that I made here is what you are expecting.

func flattenVnetSubnetsNames(input *[]network.Subnet) []interface{} {
subnets := make([]interface{}, 0)

for _, subnet := range *input {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same here)

func flattenVnetPeerings(input *[]network.VirtualNetworkPeering) map[string]interface{} {
output := make(map[string]interface{}, 0)

for _, vnetpeering := range *input {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same here)

@@ -80,6 +80,7 @@ func Provider() terraform.ResourceProvider {
"azurerm_snapshot": dataSourceArmSnapshot(),
"azurerm_subnet": dataSourceArmSubnet(),
"azurerm_subscription": dataSourceArmSubscription(),
"azurerm_vnet": dataSourceArmVnet(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we name this azurerm_virtual_network to match the other resource?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

of course, done :)

//"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
)

func dataSourceArmVnet() *schema.Resource {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we rename this to dataSourceArmVirtualNetwork to match the other resource?

Copy link
Contributor Author

@dcaro dcaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including suggested changes from @tombuildsstuff and added documentation.


resp, err := vnetClient.Get(resGroup, name, "")
if err != nil {
if resp.StatusCode == http.StatusNotFound {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense, will do so.

@@ -80,6 +80,7 @@ func Provider() terraform.ResourceProvider {
"azurerm_snapshot": dataSourceArmSnapshot(),
"azurerm_subnet": dataSourceArmSubnet(),
"azurerm_subscription": dataSourceArmSubscription(),
"azurerm_vnet": dataSourceArmVnet(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

of course, done :)

func flattenVnetAddressPrefixes(input *[]string) []interface{} {
prefixes := make([]interface{}, 0)

for _, prefix := range *input {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tombuildsstuff let me know if the change that I made here is what you are expecting.

dns_servers = ["10.0.0.4"]

subnet {
name = "subnet1"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use spaces to keep indentation

}

resource "azurerm_virtual_network_peering" "test1" {
name = "peer-1to2"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use spaces to keep indentation (same for next 3 lines)

@pmarques
Copy link

There are some indentation that could be fixed but this LGTM and I need this feature.
Can we merge this?

@dcaro
Copy link
Contributor Author

dcaro commented Nov 26, 2017

@pmarques I have updated the code to include spaces instead of tabs. @tombuildsstuff let me know if you see any issues.

@tombuildsstuff tombuildsstuff changed the title Adding data source for vnet New Data Source: azurerm_virtual_network Nov 27, 2017
@@ -0,0 +1,37 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just noticed there isn't a sidebar entry for this Data Source - I've pushed a commit to fix this :)

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @dcaro

Thanks for pushing the latest changes - I've taken another look through and have left some comments inline, but this mostly LGTM. I've also pushed a commit to add the Data Source to the sidebar - however upon running the tests I noticed the Peering test failed:

$ acctests azurerm TestAccDataSourceArmVirtualNetwork_
=== RUN   TestAccDataSourceArmVirtualNetwork_basic
--- PASS: TestAccDataSourceArmVirtualNetwork_basic (77.07s)
=== RUN   TestAccDataSourceArmVirtualNetwork_peering
--- FAIL: TestAccDataSourceArmVirtualNetwork_peering (95.24s)
	testing.go:459: Step 0 error: Check failed: Check 3/3 error: data.azurerm_virtual_network.test: Attribute 'vnet_peerings.%' expected "1", got "0"
FAIL
exit status 1
FAIL	github.com/terraform-providers/terraform-provider-azurerm/azurerm	172.327s

If we can fix up the broken test this PR otherwise looks good to merge :)

Thanks!

@tombuildsstuff
Copy link
Contributor

ping @dcaro - have you had a chance to look into this yet? :)

@dcaro
Copy link
Contributor Author

dcaro commented Dec 6, 2017

@tombuildsstuff I have some issues with the second test. I traced the response from the REST API and I see that the peering is correctly provisioned when running the testAccDataSourceArmVirtualNetwork_peering function. The interpretation of the response is the issue. I'm trying to narrow down the function where this fails but so far, to me, it looks like an issue in terraform. Any help on this would be welcome.

@tombuildsstuff
Copy link
Contributor

@dcaro sure - used the configuration from the failing test (and added some variables) to take a look into this:

resource "azurerm_resource_group" "test" {
  name     = "tharvey-devrg"
  location = "West Europe"
}

resource "azurerm_virtual_network" "test1" {
  name                = "tharvey-nw1"
  address_space       = ["10.0.1.0/24"]
  location            = "${azurerm_resource_group.test.location}"
  resource_group_name = "${azurerm_resource_group.test.name}"
}

resource "azurerm_virtual_network" "test2" {
  name                = "tharvey-nw2"
  address_space       = ["10.0.2.0/24"]
  location            = "${azurerm_resource_group.test.location}"
  resource_group_name = "${azurerm_resource_group.test.name}"
}

resource "azurerm_virtual_network_peering" "test1" {
  name                      = "peer-1to2"
  resource_group_name       = "${azurerm_resource_group.test.name}"
  virtual_network_name      = "${azurerm_virtual_network.test1.name}"
  remote_virtual_network_id = "${azurerm_virtual_network.test2.id}"
}

data "azurerm_virtual_network" "test" {
  resource_group_name = "${azurerm_resource_group.test.name}"
  name                = "${azurerm_virtual_network.test1.name}"
}

In order to understand what's going on, we can inspect what the Terraform Graph for this Terraform Configuration using the command terraform graph | dot -Tpng > graph.png - which in this case generates:

original

Given the azurerm_virtual_network_peering resource isn't referenced within the azurerm_virtual_network data source (known as an Implicit Dependency) - Terraform believes it should be able to execute these in Parallel, as shown in the graph (since there's no lines between them) - where it's possible the VNet Peering may not exist.

We can use the depends_upon graph to specify an Explicit Dependency as shown in the configuration below:

resource "azurerm_resource_group" "test" {
  name     = "tharvey-devrg"
  location = "West Europe"
}

resource "azurerm_virtual_network" "test1" {
  name                = "tharvey-nw1"
  address_space       = ["10.0.1.0/24"]
  location            = "${azurerm_resource_group.test.location}"
  resource_group_name = "${azurerm_resource_group.test.name}"
}

resource "azurerm_virtual_network" "test2" {
  name                = "tharvey-nw2"
  address_space       = ["10.0.2.0/24"]
  location            = "${azurerm_resource_group.test.location}"
  resource_group_name = "${azurerm_resource_group.test.name}"
}

resource "azurerm_virtual_network_peering" "test1" {
  name                      = "peer-1to2"
  resource_group_name       = "${azurerm_resource_group.test.name}"
  virtual_network_name      = "${azurerm_virtual_network.test1.name}"
  remote_virtual_network_id = "${azurerm_virtual_network.test2.id}"
}

data "azurerm_virtual_network" "test" {
  resource_group_name = "${azurerm_resource_group.test.name}"
  name                = "${azurerm_virtual_network.test1.name}"
  depends_on          = ["azurerm_virtual_network_peering.test1"]
}

The Terraform Graph for this looks like so:

graph

which means that the vnet_peerings are included in the Data Source (since they exist at this point). More information on Implicit and Explicit Dependencies is available on this page.

I've confirmed that props.VirtualNetworkPeerings has a value at this point too - so I'm hoping that should be helpful? :)

Thanks!

@dcaro
Copy link
Contributor Author

dcaro commented Dec 7, 2017

Thanks so much @tombuildsstuff I will update my PR today !

@dcaro
Copy link
Contributor Author

dcaro commented Dec 8, 2017

@tombuildsstuff when I introduce the dependency, I have the following error when I run the test:
API server listening at: 127.0.0.1:50704
testing.go:459: Step 0 error: After applying this step and refreshing, the plan was not empty:
DIFF:

	CREATE: data.azurerm_virtual_network.test
	  address_spaces.#:    "" => "<computed>"
	  dns_servers.#:       "" => "<computed>"
	  name:                "" => "acctestvnet-1-4667103784115642641"
	  resource_group_name: "" => "acctest4667103784115642641-rg"
	  subnets.#:           "" => "<computed>"
	  vnet_peerings.%:     "" => "<computed>"
	
	STATE:
	
	azurerm_resource_group.test:

[properties of the resource group]

            azurerm_virtual_network.test1:

[properties of the virtual network]

	Dependencies:
	    azurerm_resource_group.test

	azurerm_virtual_network.test2:

[properties of the virtual network]

           Dependencies:
	    azurerm_resource_group.test
	azurerm_virtual_network_peering.test1:

[properties of the virtual network peering]

	  Dependencies:
	    azurerm_resource_group.test
	    azurerm_virtual_network.test1
	    azurerm_virtual_network.test2

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for this 👍

@tombuildsstuff
Copy link
Contributor

tombuildsstuff commented Dec 8, 2017

@dcaro so after digging into this, it appears that a data source with a depends_on will be re-triggered whenever a plan is attempted. Whilst it's possible to work around this by referencing the virtual network name via ${azurerm_virtual_network_peering.test1.virtual_network_name} - I instead figured it better to split this out into two separate test-steps as shown below:

func TestAccDataSourceArmVirtualNetwork_peering(t *testing.T) {
	dataSourceName := "data.azurerm_virtual_network.test"
	ri := acctest.RandInt()

	name_vnet_1 := fmt.Sprintf("acctestvnet-1-%d", ri)
	location := testLocation()

	resource.Test(t, resource.TestCase{
		PreCheck:  func() { testAccPreCheck(t) },
		Providers: testAccProviders,
		Steps: []resource.TestStep{
			{
				Config: testAccDataSourceArmVirtualNetwork_peering(ri, location),
			},
			{
				Config: testAccDataSourceArmVirtualNetwork_peeringWithDataSource(ri, location),
				Check: resource.ComposeTestCheckFunc(
					resource.TestCheckResourceAttr(dataSourceName, "name", name_vnet_1),
					resource.TestCheckResourceAttr(dataSourceName, "address_spaces.0", "10.0.1.0/24"),
					resource.TestCheckResourceAttr(dataSourceName, "vnet_peerings.%", "1"),
				),
			},
		},
	})
}

I've pushed a commit to add support for this and this Data Source now LGTM - thanks for this :)

Tests pass:

$ acctests azurerm TestAccDataSourceArmVirtualNetwork_
=== RUN   TestAccDataSourceArmVirtualNetwork_basic
--- PASS: TestAccDataSourceArmVirtualNetwork_basic (76.72s)
=== RUN   TestAccDataSourceArmVirtualNetwork_peering
--- PASS: TestAccDataSourceArmVirtualNetwork_peering (102.65s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	179.391s

Thanks!

@tombuildsstuff tombuildsstuff merged commit 57c8034 into hashicorp:master Dec 8, 2017
tombuildsstuff added a commit that referenced this pull request Dec 8, 2017
@pmarques
Copy link

pmarques commented Dec 8, 2017

@tombuildsstuff do you have any details about the next release date? I would like to have this available without compiling my own.

@tombuildsstuff
Copy link
Contributor

@pmarques "soon" - it'll be next week, but I'd rather not commit to a specific day/date - hope that helps :)

sebastus added a commit to sebastus/terraform-provider-azurerm that referenced this pull request Dec 8, 2017
* Provision sample for ASP.NET on azure_rm_app_service

* Added vnet datasource

* add identity property to vm

* refactor, tests and docs

* added vnet_peering

* changing to TypeMap

* Updating the Provider block

* Variable consistency and removing unused variables

* Changed to azure_virtual_network, added crash control and added documentation.

* vmss: Support for updating the customData field

Fixes hashicorp#61
Fixes hashicorp#490

* Updating to include hashicorp#559

* Support for Auto Inflating

```
$ acctests azurerm TestAccAzureRMEventHubNamespace_maximumThroughputUnits
=== RUN   TestAccAzureRMEventHubNamespace_maximumThroughputUnits
--- PASS: TestAccAzureRMEventHubNamespace_maximumThroughputUnits (202.41s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm    202.432s
```

* New Resource: `azurerm_network_watcher`

```
$ acctests azurerm TestAccAzureRMNetworkWatcher_
=== RUN   TestAccAzureRMNetworkWatcher_importBasic
--- PASS: TestAccAzureRMNetworkWatcher_importBasic (75.79s)
=== RUN   TestAccAzureRMNetworkWatcher_importComplete
--- PASS: TestAccAzureRMNetworkWatcher_importComplete (69.85s)
=== RUN   TestAccAzureRMNetworkWatcher_basic
--- PASS: TestAccAzureRMNetworkWatcher_basic (69.62s)
=== RUN   TestAccAzureRMNetworkWatcher_complete
--- PASS: TestAccAzureRMNetworkWatcher_complete (72.16s)
=== RUN   TestAccAzureRMNetworkWatcher_update
--- PASS: TestAccAzureRMNetworkWatcher_update (81.75s)
=== RUN   TestAccAzureRMNetworkWatcher_disappears
--- PASS: TestAccAzureRMNetworkWatcher_disappears (94.38s)
PASS
ok
```

* Updating to include hashicorp#569

* Hotfix: upgrade packages under go-autorest to be v9.4.1.

Intergrate with latest version of go-autorest to read access tokens through new way
customized through environment variable. The old behavior on local shell will be kept.

Notice: for Azure Cloud Shell user, please make sure that they're using latest patched
provider.

* Vendoring the Locks SDK

* New Resource: `azurerm_management_lock`

Note: As the Subscription specific Locks will break other tests; these tests need to be run individually.
As such I've introduced the `TF_ACC_SUBSCRIPTION_PARALLEL_LOCK`  environment variable for this purpose.

Tests pass:

```
$ TF_ACC_SUBSCRIPTION_PARALLEL_LOCK=1 acctests azurerm TestAccAzureRMManagementLock_
=== RUN   TestAccAzureRMManagementLock_importResourceGroupReadOnlyBasic
--- PASS: TestAccAzureRMManagementLock_importResourceGroupReadOnlyBasic (61.52s)
=== RUN   TestAccAzureRMManagementLock_importResourceGroupReadOnlyComplete
--- PASS: TestAccAzureRMManagementLock_importResourceGroupReadOnlyComplete (58.75s)
=== RUN   TestAccAzureRMManagementLock_importResourceGroupCanNotDeleteBasic
--- PASS: TestAccAzureRMManagementLock_importResourceGroupCanNotDeleteBasic (53.38s)
=== RUN   TestAccAzureRMManagementLock_importResourceGroupCanNotDeleteComplete
--- PASS: TestAccAzureRMManagementLock_importResourceGroupCanNotDeleteComplete (46.87s)
=== RUN   TestAccAzureRMManagementLock_importPublicIPCanNotDeleteBasic
--- PASS: TestAccAzureRMManagementLock_importPublicIPCanNotDeleteBasic (80.46s)
=== RUN   TestAccAzureRMManagementLock_importPublicIPReadOnlyBasic
--- PASS: TestAccAzureRMManagementLock_importPublicIPReadOnlyBasic (68.53s)
=== RUN   TestAccAzureRMManagementLock_resourceGroupReadOnlyBasic
--- PASS: TestAccAzureRMManagementLock_resourceGroupReadOnlyBasic (61.24s)
=== RUN   TestAccAzureRMManagementLock_resourceGroupReadOnlyComplete
--- PASS: TestAccAzureRMManagementLock_resourceGroupReadOnlyComplete (64.10s)
=== RUN   TestAccAzureRMManagementLock_resourceGroupCanNotDeleteBasic
--- PASS: TestAccAzureRMManagementLock_resourceGroupCanNotDeleteBasic (72.49s)
=== RUN   TestAccAzureRMManagementLock_resourceGroupCanNotDeleteComplete
--- PASS: TestAccAzureRMManagementLock_resourceGroupCanNotDeleteComplete (113.71s)
=== RUN   TestAccAzureRMManagementLock_publicIPReadOnlyBasic
--- PASS: TestAccAzureRMManagementLock_publicIPReadOnlyBasic (64.05s)
=== RUN   TestAccAzureRMManagementLock_publicIPCanNotDeleteBasic
--- PASS: TestAccAzureRMManagementLock_publicIPCanNotDeleteBasic (94.53s)
=== RUN   TestAccAzureRMManagementLock_subscriptionReadOnlyBasic
--- PASS: TestAccAzureRMManagementLock_subscriptionReadOnlyBasic (17.98s)
=== RUN   TestAccAzureRMManagementLock_subscriptionCanNotDeleteBasic
--- PASS: TestAccAzureRMManagementLock_subscriptionCanNotDeleteBasic (15.20s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm    872.839s
```

Fixes hashicorp#23

* Updating to include hashicorp#573

* Updating to include hashicorp#571

* Adding validation for the locks name

Tests:
```
$ acctests azurerm TestValidateManagementLockName
=== RUN   TestValidateManagementLockName
--- PASS: TestValidateManagementLockName (0.00s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm    0.020s
```

* Linting

* Updating to include hashicorp#575

* Updating the changelog for consistency

* removed tabs, used spaces

* add test for issue hashicorp#450

* Updated the way user agent string gets assigned.

* Changed code to make it more readable.

* pr tweaks

* Avoid out of index errors when flattening image data disks.

* Updating to include hashicorp#587

* Updating to include hashicorp#589

* Conditional loading of the Subscription ID / Tenant ID / Environment

* Refactoring the provider block to support determining the TenantID/Environment from the SubscriptionID

Splitting out the authentication logic into a helpers folder
Also adding unit tests for these - which pass:

```
$ go test . -v
=== RUN   TestAzureFindValidAccessTokenForTenant_InvalidDate
--- PASS: TestAzureFindValidAccessTokenForTenant_InvalidDate (0.00s)
=== RUN   TestAzureFindValidAccessTokenForTenant_Expired
2017/11/30 15:02:01 [DEBUG] Token "7cabcf30-8dca-43f9-91e6-fd56dfb8632f" has expired
--- PASS: TestAzureFindValidAccessTokenForTenant_Expired (0.00s)
=== RUN   TestAzureFindValidAccessTokenForTenant_ExpiringIn
--- PASS: TestAzureFindValidAccessTokenForTenant_ExpiringIn (0.00s)
=== RUN   TestAzureFindValidAccessTokenForTenant_InvalidManagementDomain
2017/11/30 15:02:01 [DEBUG] Resource "https://portal.azure.com/" isn't a management domain
--- PASS: TestAzureFindValidAccessTokenForTenant_InvalidManagementDomain (0.00s)
=== RUN   TestAzureFindValidAccessTokenForTenant_DifferentTenant
2017/11/30 15:02:01 [DEBUG] Resource "https://management.core.windows.net/" isn't for the correct Tenant
--- PASS: TestAzureFindValidAccessTokenForTenant_DifferentTenant (0.00s)
=== RUN   TestAzureFindValidAccessTokenForTenant_ValidFromCloudShell
--- PASS: TestAzureFindValidAccessTokenForTenant_ValidFromCloudShell (0.00s)
=== RUN   TestAzureFindValidAccessTokenForTenant_ValidFromAzureCLI
--- PASS: TestAzureFindValidAccessTokenForTenant_ValidFromAzureCLI (0.00s)
=== RUN   TestAzureFindValidAccessTokenForTenant_NoTokens
--- PASS: TestAzureFindValidAccessTokenForTenant_NoTokens (0.00s)
=== RUN   TestAzureCLIProfileFindDefaultSubscription
--- PASS: TestAzureCLIProfileFindDefaultSubscription (0.00s)
=== RUN   TestAzureCLIProfileFindSubscription
--- PASS: TestAzureCLIProfileFindSubscription (0.00s)
=== RUN   TestAzurePopulateSubscriptionFromCLIProfile_Missing
--- PASS: TestAzurePopulateSubscriptionFromCLIProfile_Missing (0.00s)
=== RUN   TestAzurePopulateSubscriptionFromCLIProfile_NoDefault
--- PASS: TestAzurePopulateSubscriptionFromCLIProfile_NoDefault (0.00s)
=== RUN   TestAzurePopulateSubscriptionFromCLIProfile_Default
--- PASS: TestAzurePopulateSubscriptionFromCLIProfile_Default (0.00s)
=== RUN   TestAzurePopulateTenantAndEnvironmentFromCLIProfile_Empty
--- PASS: TestAzurePopulateTenantAndEnvironmentFromCLIProfile_Empty (0.00s)
=== RUN   TestAzurePopulateTenantAndEnvironmentFromCLIProfile_MissingSubscription
--- PASS: TestAzurePopulateTenantAndEnvironmentFromCLIProfile_MissingSubscription (0.00s)
=== RUN   TestAzurePopulateTenantAndEnvironmentFromCLIProfile_PopulateEnvironment
--- PASS: TestAzurePopulateTenantAndEnvironmentFromCLIProfile_PopulateEnvironment (0.00s)
=== RUN   TestAzurePopulateTenantAndEnvironmentFromCLIProfile_NormaliseAndPopulateEnvironment
--- PASS: TestAzurePopulateTenantAndEnvironmentFromCLIProfile_NormaliseAndPopulateEnvironment (0.00s)
=== RUN   TestAzurePopulateTenantAndEnvironmentFromCLIProfile_PopulateTenantId
--- PASS: TestAzurePopulateTenantAndEnvironmentFromCLIProfile_PopulateTenantId (0.00s)
=== RUN   TestAzurePopulateTenantAndEnvironmentFromCLIProfile_Complete
--- PASS: TestAzurePopulateTenantAndEnvironmentFromCLIProfile_Complete (0.00s)
=== RUN   TestAzurePopulateFromAccessToken_Missing
--- PASS: TestAzurePopulateFromAccessToken_Missing (0.00s)
=== RUN   TestAzurePopulateFromAccessToken_Exists
--- PASS: TestAzurePopulateFromAccessToken_Exists (0.00s)
=== RUN   TestAzureEnvironmentNames
--- PASS: TestAzureEnvironmentNames (0.00s)
=== RUN   TestAzureValidateBearerAuth
--- PASS: TestAzureValidateBearerAuth (0.00s)
=== RUN   TestAzureValidateServicePrincipal
--- PASS: TestAzureValidateServicePrincipal (0.00s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/authentication    0.012s
```

* Fixing the build

* Remove the field marked as "Removed" according to hashicorp#572.

* Upgrading to v11.2.2-beta of the Azure SDK for Go

* Updating to include hashicorp#593

* Fixing the Management Lock validation

* Adding a default value for the identity field

* Updating to include hashicorp#482

* Updating to include hashicorp#574

* Adding settings to the hash

Test passes:

```
$ acctests azurerm TestAccAzureRMVirtualMachineScaleSet_extensionUpdate
=== RUN   TestAccAzureRMVirtualMachineScaleSet_extensionUpdate
--- PASS: TestAccAzureRMVirtualMachineScaleSet_extensionUpdate (593.13s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm    593.153s
```

* Updating to include hashicorp#609

* Local Network Gateways: support for BGP Settings

```
$ acctests azurerm TestAccAzureRMLocalNetworkGateway_
=== RUN   TestAccAzureRMLocalNetworkGateway_importBasic
--- PASS: TestAccAzureRMLocalNetworkGateway_importBasic (82.23s)
=== RUN   TestAccAzureRMLocalNetworkGateway_basic
--- PASS: TestAccAzureRMLocalNetworkGateway_basic (81.29s)
=== RUN   TestAccAzureRMLocalNetworkGateway_disappears
--- PASS: TestAccAzureRMLocalNetworkGateway_disappears (79.17s)
=== RUN   TestAccAzureRMLocalNetworkGateway_bgpSettings
--- PASS: TestAccAzureRMLocalNetworkGateway_bgpSettings (78.70s)
=== RUN   TestAccAzureRMLocalNetworkGateway_bgpSettingsDisable
--- PASS: TestAccAzureRMLocalNetworkGateway_bgpSettingsDisable (96.18s)
=== RUN   TestAccAzureRMLocalNetworkGateway_bgpSettingsEnable
--- PASS: TestAccAzureRMLocalNetworkGateway_bgpSettingsEnable (97.39s)
=== RUN   TestAccAzureRMLocalNetworkGateway_bgpSettingsComplete
--- PASS: TestAccAzureRMLocalNetworkGateway_bgpSettingsComplete (79.68s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm    594.680s
```

* Refactoring

* Adding an import test for BGP Settings:

```
$ acctests azurerm TestAccAzureRMLocalNetworkGateway_importBGPSettingsComplete
=== RUN   TestAccAzureRMLocalNetworkGateway_importBGPSettingsComplete
--- PASS: TestAccAzureRMLocalNetworkGateway_importBGPSettingsComplete (80.96s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm    80.987s
```

* Splitting the data source out into it's own step

* Minor refactoring

* Updating to include hashicorp#533

* Exporting the Default Hostname field

* Updating the App Service example to be complete

This removes support for Publishing, since the SCM URL's aren't consistent across Sovereign Clouds (China/Germany/Govt etc)
Switches to using the new `default_site_hostname` field introduced in hashicorp#612 rather than assuming what it is

* Updating to include hashicorp#594

* Updating to include hashicorp#611

* Updating to include hashicorp#612

* Remove leading line break from key_vault_key docs

Leading line break causes page metadata to be ignored.
@ghost
Copy link

ghost commented Apr 1, 2020

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 👉 [email protected]. Thanks!

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

Successfully merging this pull request may close these issues.

4 participants