beget_factorio_tf/README.md

25 lines
No EOL
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Factorio Terraform Beget
Terraform-сценарий, создающий VPS-сервер в инфраструктуре Beget. Для запуска необходимо для начала создать файл `.auto.tfvars` с переменной `beget_token`,
в которой указан JWT-токен:
```
beget_token = "eyJhbG...gQg"
```
Создать его можно на странице https://developer.beget.com/#post-/v1/auth
После этого запустить создание VPS-сервера с помощью команды:
```
terraform apply
```
Если используется [OpenTofu](https://opentofu.org/docs/intro/install/) (HashiCorp блокирует российские IP-адреса), то для запуска используется следующая команда:
```
tofu apply
```
Для удаления сервера используется команда `terraform destroy` или `tofu destroy`
---
## Зависимости
- [Terraform](https://developer.hashicorp.com/terraform/install) или [OpenTofu](https://opentofu.org/docs/intro/install/)
- [Ansible](https://docs.ansible.com/projects/ansible/latest/installation_guide/intro_installation.html#pipx-install)