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/Resource: azurerm_dedicated_host #5513

Merged
merged 10 commits into from
Jan 24, 2020
Merged

Conversation

tombuildsstuff
Copy link
Contributor

@tombuildsstuff tombuildsstuff commented Jan 24, 2020

This PR contains the changes from @magodo in #5417 with the PR comments resolved so that this can be merged - which is a requirement for the new VM Resources.

Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

Couple of minor comments to revisit later, but LGTM otherwise.

@@ -103,3 +105,11 @@ func validateDiskSizeGB(v interface{}, _ string) (warnings []string, errors []er
}
return warnings, errors
}

func validateDedicatedHostGroupName() func(i interface{}, k string) (warnings []string, errors []error) {
return validation.StringMatch(regexp.MustCompile(`^[^_\W][\w-.]{0,78}[\w]$`), "")
Copy link
Member

Choose a reason for hiding this comment

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

I suspect this regex may need tweaking, but since I'm unable to put my hands on the naming rules, I'm not completely sure. Worth checking later.

@tombuildsstuff tombuildsstuff force-pushed the dedicated_host branch 2 times, most recently from 8a256fa to 58efb83 Compare January 24, 2020 16:23
@tombuildsstuff
Copy link
Contributor Author

Resource Tests pass:

$ TF_ACC=1 envchain azurerm go test -v ./azurerm/internal/services/compute/tests/ -timeout=60m -run=TestAccAzureRMDedicatedHost_
=== RUN   TestAccAzureRMDedicatedHost_basic
=== PAUSE TestAccAzureRMDedicatedHost_basic
=== RUN   TestAccAzureRMDedicatedHost_autoReplaceOnFailure
=== PAUSE TestAccAzureRMDedicatedHost_autoReplaceOnFailure
=== RUN   TestAccAzureRMDedicatedHost_licenseType
=== PAUSE TestAccAzureRMDedicatedHost_licenseType
=== RUN   TestAccAzureRMDedicatedHost_complete
=== PAUSE TestAccAzureRMDedicatedHost_complete
=== RUN   TestAccAzureRMDedicatedHost_update
=== PAUSE TestAccAzureRMDedicatedHost_update
=== RUN   TestAccAzureRMDedicatedHost_requiresImport
--- SKIP: TestAccAzureRMDedicatedHost_requiresImport (0.00s)
    resource_arm_dedicated_host_test.go:162: Skipping since resources aren't required to be imported
=== CONT  TestAccAzureRMDedicatedHost_basic
=== CONT  TestAccAzureRMDedicatedHost_complete
=== CONT  TestAccAzureRMDedicatedHost_update
=== CONT  TestAccAzureRMDedicatedHost_autoReplaceOnFailure
--- PASS: TestAccAzureRMDedicatedHost_complete (205.95s)
=== CONT  TestAccAzureRMDedicatedHost_licenseType
--- PASS: TestAccAzureRMDedicatedHost_basic (206.44s)
--- PASS: TestAccAzureRMDedicatedHost_update (424.20s)
--- PASS: TestAccAzureRMDedicatedHost_licenseType (315.04s)
--- PASS: TestAccAzureRMDedicatedHost_autoReplaceOnFailure (649.08s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/compute/tests	649.195s

Includes:

- custom parser function
- rename `sku` to `sku_name`
- multi-line code to oneline
- increase each timeout of state polling for eventual consistency from
  5sec to 10 sec, to alleviate
@tombuildsstuff
Copy link
Contributor Author

Data Source tests pass:

=== RUN   TestAccDataSourceAzureRMDedicatedHost_basic
=== PAUSE TestAccDataSourceAzureRMDedicatedHost_basic
=== CONT  TestAccDataSourceAzureRMDedicatedHost_basic
--- PASS: TestAccDataSourceAzureRMDedicatedHost_basic (183.91s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/compute/tests	(cached)

@tombuildsstuff tombuildsstuff modified the milestones: v1.43.0, v1.42.0 Jan 24, 2020
@tombuildsstuff tombuildsstuff merged commit 8fa2b74 into master Jan 24, 2020
@tombuildsstuff tombuildsstuff deleted the dedicated_host branch January 24, 2020 21:19
tombuildsstuff added a commit that referenced this pull request Jan 24, 2020
@ghost
Copy link

ghost commented Jan 27, 2020

This has been released in version 1.42.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.42.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 28, 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 Mar 28, 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.

3 participants