terraform-provider-vsphere
terraform-provider-vsphere copied to clipboard
Add support for license assignment
Community Guidelines
- [X] I have read and agree to the HashiCorp Community Guidelines .
- [X] Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
- [x] Do not leave "+1" or other comments that do not add relevant information or questions.
- [x] If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Description
Add a capability for license assignment to deployment assets, e.g vCenter server itself, hosts etc.
Use Case(s)
I'm trying to deploy vCenter plus some virtualized ESXi nodes as a testing environment, using Terraform. One of the obstacles I ran into is, while the provider allows creation of licenses within vCenter, I couldn't find a way to assign this license to assets such as vCenter server, ESXi hosts etc. As this is doable with powercli, I guess that it's doable with Terraform as well.
Potential Terraform Provider Configuration
` data "vsphere_license" "license" { license_key = "00000-00000-00000-00000-00000" }
data "vsphere_datacenter" "datacenter" { name = "dc-01" }
data "vsphere_host" "host" { name = "esxi-01.example.com" datacenter_id = data.vsphere_datacenter.datacenter.id }
resource "vsphere_license_assignment" "esxi1_license" { license_id = data.vsphere_license.license.id license_asset = data.vsphere_host.host.id }
References
No response
Hello, ksamoray! 🖐
Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.
If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.
Marking this issue as stale due to inactivity in the past 180 days. This helps us focus on the active issues. If this issue is reproducible with the latest version of the provider, please comment. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!
I would also like to see this feature added to the provider.
Since I can add hosts to the vcentre server using terraform, it would be nice to be able to assign a license to them at the same time.
Also being able to assign the vcentre license as part of terraform could be added along side?
Thanks.
@tadgy assigning a host license is supported from the host resource. for the VC license, I haven't found any way to apply the license.