Encrypted password in template context by Terraform

Hello.
How can create an encrypted password in a template context using Terraform?

The context in Terraform:

 context = {
    NETWORK  = "YES"
    PASSWORD = "mypassword"
  }

But when add password and it value to the template context without terraform, using a web interface, password is encrypted.

HI @perrfect,

The password should be encrypted in the OpenNebula Template once it’s created by Terraform. Could you share the output of onetemplate show -x for the resulting template?

Hello.
Thank you for reply.
The password doesn’t encrypted(

<VMTEMPLATE>
  <ID>36</ID>
  <UID>2</UID>
  <GID>100</GID>
  <UNAME>terraform-admin</UNAME>
  <GNAME>terraform</GNAME>
  <NAME>Centos 7</NAME>
  <PERMISSIONS>
    <OWNER_U>1</OWNER_U>
    <OWNER_M>1</OWNER_M>
    <OWNER_A>0</OWNER_A>
    <GROUP_U>1</GROUP_U>
    <GROUP_M>1</GROUP_M>
    <GROUP_A>0</GROUP_A>
    <OTHER_U>0</OTHER_U>
    <OTHER_M>0</OTHER_M>
    <OTHER_A>0</OTHER_A>
  </PERMISSIONS>
  <REGTIME>1626170802</REGTIME>
  <TEMPLATE>
    <CONTEXT>
      <NETWORK><![CDATA[YES]]></NETWORK>
      <PASSWORD><![CDATA[mypassword]]></PASSWORD>
      <SET_HOSTNAME><![CDATA[$NAME]]></SET_HOSTNAME>
      <SSH_PUBLIC_KEY><![CDATA[$USER[SSH_PUBLIC_KEY]]]></SSH_PUBLIC_KEY>
    </CONTEXT>
    <CPU><![CDATA[2.000000]]></CPU>
    <DISK>
      <DRIVER><![CDATA[raw]]></DRIVER>
      <IMAGE_ID><![CDATA[51]]></IMAGE_ID>
      <SIZE><![CDATA[8192]]></SIZE>
      <TARGET><![CDATA[sda]]></TARGET>
    </DISK>
    <GRAPHICS>
      <KEYMAP><![CDATA[en-us]]></KEYMAP>
      <LISTEN><![CDATA[0.0.0.0]]></LISTEN>
      <TYPE><![CDATA[VNC]]></TYPE>
    </GRAPHICS>
    <MEMORY><![CDATA[2048]]></MEMORY>
    <OS>
      <ARCH><![CDATA[x86_64]]></ARCH>
      <BOOT><![CDATA[disk0]]></BOOT>
    </OS>
    <VCPU><![CDATA[2]]></VCPU>
  </TEMPLATE>
</VMTEMPLATE>