-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
virtual_machine_scale_set datasource - support network_interfaces #10585
virtual_machine_scale_set datasource - support network_interfaces #10585
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pr @shurikk - could we update the docs to reflect this new property? thanks
yes, will do, was planning to but got distracted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @shurikk - overall this looks good but instead of referring to the schema in another resource could we pull that out? I think the new windows|linux virtual resources already have done that so you should be able to use "network_interface": VirtualMachineScaleSetNetworkInterfaceSchema(),
return &schema.Schema{ | ||
Type: schema.TypeSet, | ||
Computed: true, | ||
Elem: resourceVirtualMachineScaleSet().Schema["network_profile"].Elem, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should pull that out into a shared schema function instead of doing this
azurerm/internal/services/compute/virtual_machine_scale_set_data_source.go
Outdated
Show resolved
Hide resolved
…ta_source.go Co-authored-by: kt <kt@katbyte.me>
@katbyte just to be on the same page, we want this change to be aligned with perhaps new data sources should be introduced rather than adding new properties to the |
@shurikk - correct, those are the new resources that will replace the old |
@katbyte updated, still need e.g.
results in
|
oh right 🤦♀️🤦♀️ sorry i totally blanked on this, this is a datasource so we need to have everything be computed, which means copying that function's schema and changing everything to be computed - however you should beable to reuse the flatten function |
@katbyte how should we proceed from here? I've updated docs and the code to be aligned with |
…-to-virtual-machine-scale-set-data
config
terraform output
|
@shurikk - i hope you don't mind but I just pushed the changes required to get this merged, i'll have someone else review it and get it into this weeks release 🙂 |
thanks, works, it's not super urgent. also noticed some doc updates, still work in progress? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@katbyte, thank you for this PR... I left one super minor comment and there are a few lint errors. Other than that this LGTM! 🚀
azurerm/internal/services/compute/virtual_machine_scale_set_data_source.go
Outdated
Show resolved
Hide resolved
…ta_source.go Co-authored-by: WS <20408400+WodansSon@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
…shicorp#10585) Co-authored-by: kt <kt@katbyte.me> Co-authored-by: WS <20408400+WodansSon@users.noreply.github.com> Co-authored-by: Alexander Kabanov <akabanov@linkedin.com>
This has been released in version 2.57.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 = "~> 2.57.0"
}
# ... other configuration ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we change the schemas above to be Computed: true
?
func virtualMachineScaleSetIPConfigurationSchemaForDataSource() *schema.Schema { | ||
return &schema.Schema{ | ||
Type: schema.TypeList, | ||
Required: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change this to Computed: true
?
func virtualMachineScaleSetPublicIPAddressSchemaForDataSource() *schema.Schema { | ||
return &schema.Schema{ | ||
Type: schema.TypeList, | ||
Optional: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change this to Computed: true
?
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Knowing scale set
network_profile
is important when creating load balancers as a separate process/state because the scale set and the load balancer must be on the same virtual network.