OpenNebula/terraform-provider-opennebula

Deprecated resources, data sources and attributes EOL

frousselet opened this issue · 4 comments

Deprecated EOL Attributes, Resources and Data Sources References Alternatives
1.1.1 1.3.0 r / opennebula_virtual_network.clusters #389 Use cluster_ids attribute instead
1.1.1 1.3.0 r / opennebula_datastore.cluster_id #389 Use cluster_ids attribute instead
1.1.1 1.3.0 r / opennebula_cluster.virtual_networks #389
1.1.1 1.3.0 r / opennebula_cluster.datastores #389
1.1.1 1.3.0 r / opennebula_cluster.hosts #389
1.0.0 1.2.0 r / opennebula_virtual_network.ar #279 Use resource opennebula_virtual_network_address_range instead
1.0.0 1.2.0 r / opennebula_virtual_network.hold_ips #279 Use resource opennebula_virtual_network_address_range instead
0.5.1 1.2.0 r / opennebula_virtual_machine.timeout #267 Use Operation Timeouts
0.5.1 1.2.0 r / opennebula_image.timeout #267 Use Operation Timeouts
0.5.0 1.1.0 r / opennebula_group.delete_on_destruction #249 Use Terraform Lifecycle
0.5.0 1.1.0 r / opennebula_group.template #248 Use opennebula_group.sunstone instead
0.5.0 1.1.0 d / opennebula_group.quotas #226
0.5.0 1.1.0 d / opennebula_template.context #226
0.5.0 1.1.0 d / opennebula_template.graphics #226
0.5.0 1.1.0 d / opennebula_template.os #226
0.5.0 1.1.0 d / opennebula_user.auth_driver #226
0.5.0 1.1.0 d / opennebula_virtual_network.description #226
0.5.0 1.1.0 d / opennebula_user.quotas #226
0.3.0 1.0.0 r / opennebula_virtual_network.hold_size #67
0.3.0 1.0.0 r / opennebula_virtual_network.ip_size #67
0.1.0 1.0.0 r / opennebula_virtual_machine.instance #14

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Is there a formal plan to remove the template attribute of the template resource? It's currently marked as deprecated, so I presume there is such a plan, though the deprecation occurred 3 years ago and there's no mention of its EOL above.

I ask since I would very much like to make use of this, though I'm hesitant to implement a solution that makes use of it given the Deprecated marker. I have a collection of user submitted templates, that will likely grow organically over time; ideally I could avoid writing a tool that translates these templates to the format understood by the terraform module.

It's a documentation error, template was already removed a long time ago: https://github.com/OpenNebula/terraform-provider-opennebula/pull/170/files#diff-9f084ea0f99816f2b1d2804d73954a89b60f71f29105da84ea55251df14e0237L35

It was removed via PR #170: i.e. when I refactored template resources to share a lot of code parts etc.
The deprecation come from the PR #24

For now template resource share a lot of attributes with VM, virtual machine router and templates.
Defining a whole template in a single attribute text adds some questions around diffs, and then may require more work on the provider side:

  • If the user add an extra space to key = value then becoming key = value: should this change trigger a diff in terraform ?
    If not, we need to parse the string, then regenerate a string with a unique formatting in order to help terraform...
  • Is there some case where we need fined grained diffs on attributes inside the template ?

Adding a template attribute in the current template resource would imply to add a lot of ConflictWith with attributes that may overlap, or we could just introduce a new resource RawTemplate...

I don't say I made the better choice at this time (when deprecating template) and I'm open to discuss your use case and proposals if you have some ideas 🙂

@treywelsh Aha! That would make sense.

I'd be interested in seeing whether other providers have attributes that expect a template or heredoc, and how they handle whitespace changes.

While I like simplicity of the idea of a RawTemplate resource, there may well be cases where I'd want to either override or supplement a given templatefile with some additional attributes. I'll ruminate on this and will open an issue once I have a fully formed idea.