cloud-init-bastion.tpl.yaml 489 B

123456789101112131415161718192021222324
  1. #cloud-config
  2. datasource:
  3. Ec2:
  4. strict_id: false
  5. ssh_pwauth: no
  6. users:
  7. - name: yc-user
  8. sudo: ALL=(ALL) NOPASSWD:ALL
  9. shell: /bin/bash
  10. groups: wheel
  11. ssh_authorized_keys:
  12. - "${ssh_key}"
  13. packages:
  14. - awscli
  15. package_update: true
  16. package_reboot_if_required: true
  17. runcmd:
  18. - sleep 5
  19. - aws configure set aws_access_key_id "${aws_key}"
  20. - aws configure set aws_secret_access_key "${aws_sec}"
  21. - aws configure set default.region ru-central1
  22. - sleep 1
  23. - reboot