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 Resource & Datasources: azurerm_automation_variable_[bool|datetime|string|int] #3310

Merged
merged 31 commits into from May 10, 2019

Conversation

WodansSon
Copy link
Collaborator

@WodansSon WodansSon commented Apr 25, 2019

I would normally have these as individual PR's but they all share a common function so I had to bundle them all up into a single PR.

(fixes #1312)

@WodansSon WodansSon changed the title New Resource: azurerm_automation_string_variable New Resource: azurerm_automation_string_variable and azurerm_automation_null_variable Apr 25, 2019
@ghost ghost added size/XXL and removed size/XL labels Apr 26, 2019
@WodansSon WodansSon changed the title New Resource: azurerm_automation_string_variable and azurerm_automation_null_variable New Resource: azurerm_automation_string_variable, azurerm_automation_null_variable and azurerm_automation_bool_variable Apr 26, 2019
@WodansSon WodansSon changed the title New Resource: azurerm_automation_string_variable, azurerm_automation_null_variable and azurerm_automation_bool_variable New Resource: azurerm_automation_string_variable, azurerm_automation_null_variable, azurerm_automation_bool_variable and azurerm_automation_int_variable Apr 26, 2019
@WodansSon WodansSon changed the title New Resource: azurerm_automation_string_variable, azurerm_automation_null_variable, azurerm_automation_bool_variable and azurerm_automation_int_variable New Resource: azurerm_automation_string_variable, azurerm_automation_null_variable, azurerm_automation_bool_variable, azurerm_automation_int_variable and azurerm_automation_datetime_variable Apr 27, 2019
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Hi @jeffreyCline,

Thank you for the PR. I've left some comments inline but my main question is why 5 separate resources for the same client & API call? Unless I am missing something these are almost identical, call the same API just take a different type of value parameter.

Wouldn't a single resource that takes a string value for value (matching the API) and then possible a type property of int|bool|datetime|ect that then triggers the correct validation for that property be far simpler and easier to maintain? I am not sure what you gain with the current design.

I can see the types in the portal but all that seems to do is just change how the frontend looks & maybe some validation.

azurerm/helpers/azure/automation_variable.go Show resolved Hide resolved
website/docs/r/automation_bool_variable.html.markdown Outdated Show resolved Hide resolved
website/docs/r/automation_datetime_variable.html.markdown Outdated Show resolved Hide resolved
website/docs/r/automation_bool_variable.html.markdown Outdated Show resolved Hide resolved
website/docs/r/automation_int_variable.html.markdown Outdated Show resolved Hide resolved
website/docs/r/automation_string_variable.html.markdown Outdated Show resolved Hide resolved
website/docs/r/automation_string_variable.html.markdown Outdated Show resolved Hide resolved
azurerm/resource_arm_automation_bool_variable.go Outdated Show resolved Hide resolved
azurerm/resource_arm_automation_bool_variable.go Outdated Show resolved Hide resolved
azurerm/resource_arm_automation_bool_variable.go Outdated Show resolved Hide resolved
katbyte and others added 3 commits April 29, 2019 12:25
Co-Authored-By: jeffreyCline <jcline@microsoft.com>
Co-Authored-By: jeffreyCline <jcline@microsoft.com>
@WodansSon WodansSon requested a review from katbyte May 1, 2019 22:57
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks for the updates @jeffreyCline, looks much better!

just a couple more comments i've left inline

azurerm/resource_arm_automation_bool_variable_test.go Outdated Show resolved Hide resolved
azurerm/resource_arm_automation_bool_variable_test.go Outdated Show resolved Hide resolved
azurerm/resource_arm_automation_datetime_variable.go Outdated Show resolved Hide resolved
azurerm/resource_arm_automation_bool_variable.go Outdated Show resolved Hide resolved
azurerm/resource_arm_automation_int_variable.go Outdated Show resolved Hide resolved
azurerm/resource_arm_automation_datetime_variable.go Outdated Show resolved Hide resolved
azurerm/resource_arm_automation_bool_variable.go Outdated Show resolved Hide resolved
azurerm/automation_variable.go Outdated Show resolved Hide resolved
azurerm/automation_variable.go Outdated Show resolved Hide resolved
@WodansSon WodansSon changed the title New Resource: azurerm_automation_string_variable, azurerm_automation_null_variable, azurerm_automation_bool_variable, azurerm_automation_int_variable and azurerm_automation_datetime_variable New Resource: azurerm_automation_string_variable, azurerm_automation_bool_variable, azurerm_automation_int_variable and azurerm_automation_datetime_variable May 8, 2019
@WodansSon WodansSon requested a review from katbyte May 8, 2019 01:33
@WodansSon WodansSon changed the title New Resource: azurerm_automation_string_variable, azurerm_automation_bool_variable, azurerm_automation_int_variable and azurerm_automation_datetime_variable New Resource: azurerm_automation_string_variable, azurerm_automation_bool_variable, azurerm_automation_int_variable, azurerm_automation_datetime_variable and data sources May 9, 2019
@WodansSon
Copy link
Collaborator Author

All resource and data source tests pass.
image

katbyte
katbyte previously approved these changes May 10, 2019
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Aside from two minor comments this looks good to me now @jeffreyCline ! thanks

azurerm/automation_variable.go Outdated Show resolved Hide resolved
azurerm/automation_variable.go Outdated Show resolved Hide resolved
@katbyte katbyte dismissed their stale review May 10, 2019 21:10

New Resource: azurerm_automation_string_variable, azurerm_automation_bool_variable, azurerm_automation_int_variable, azurerm_automation_datetime_variable and data sources (#3310)

@katbyte katbyte changed the title New Resource: azurerm_automation_string_variable, azurerm_automation_bool_variable, azurerm_automation_int_variable, azurerm_automation_datetime_variable and data sources New Resource & Datasources: azurerm_automation_variable_[bool|datetime|string|int] May 10, 2019
Copy link
Collaborator Author

@WodansSon WodansSon left a comment

Choose a reason for hiding this comment

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

Thanks @katbyte for updating the naming... made 4 suggestions, other than that LGTM! 👍

azurerm/automation_variable.go Outdated Show resolved Hide resolved
azurerm/automation_variable.go Outdated Show resolved Hide resolved
azurerm/helpers/azure/automation_variable.go Outdated Show resolved Hide resolved
azurerm/helpers/azure/automation_variable.go Outdated Show resolved Hide resolved
@katbyte katbyte merged commit 15d93f1 into master May 10, 2019
@katbyte katbyte deleted the resource_automation_variable branch May 10, 2019 22:29
katbyte added a commit that referenced this pull request May 10, 2019
@ghost
Copy link

ghost commented May 17, 2019

This has been released in version 1.28.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.28.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jun 10, 2019

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators Jun 10, 2019
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.

Feature Request: resource azurerm_automation_variable
4 participants