CREATE.tmpl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. {{- $d := .resource_details }}
  2. {{- $consoleServiceType := list "loadbalancer" "dbinstance" "elasticcache" -}}
  3. Your {{ if $d.brand -}} {{ $d.brand }} {{ end -}} {{ .resource_type_display }} {{ $d.name }} {{ if $d.project -}} in project {{ $d.project }} {{ end -}} has been created successfully
  4. {{- if $d.private_dns -}}
  5. , the intranet address is {{ $d.private_dns }}:{{ $d.private_connect_port }}
  6. {{- end -}}
  7. {{- if $d.public_dns -}}
  8. , the internet address is {{ $d.public_dns }}:{{ $d.public_connect_port }}
  9. {{- end -}}
  10. {{- if $d.address -}}
  11. , the service address is {{ $d.address }}
  12. {{- end -}}
  13. {{- if $d.ips -}}
  14. , the IP address is {{ $d.ips }}
  15. {{- end -}}
  16. {{- if and $d.guest_ip_start $d.guest_ip_end -}}
  17. , the IP range is {{ $d.guest_ip_start }}-{{ $d.guest_ip_end }}
  18. {{- end -}}
  19. {{- if $d.ip_addr -}}
  20. , the IP address is {{ $d.ip_addr }}
  21. {{- end -}}
  22. {{- if $d.account -}}
  23. , the initial account is {{ $d.account }}
  24. {{- end -}}
  25. {{- if $d.password -}}
  26. , the initial password is {{ $d.password }}
  27. {{- end -}}
  28. {{- if $d.keypair -}}
  29. , the access ssh key is {{ $d.keypair }}
  30. {{- end -}}
  31. {{- if $d.common_name -}}
  32. , the certificate domain name is {{ $d.common_name }}
  33. {{- end -}}
  34. {{- if $d.not_after -}}
  35. , the expiration is {{ $d.not_after }}
  36. {{- end -}}
  37. {{- if eq .resource_type "server" -}}
  38. , and please use {{ if $d.windows -}} Remote Desktop Connector (RDC) {{ else -}} SSH {{ end -}} or go to the console to access the VM.
  39. {{- end -}}
  40. {{- if has .resource_type $consoleServiceType -}}
  41. . For more information, please go to the console to view
  42. {{- end -}}