Как установить Terraform на CentOS 8

Как установить Terraform на CentOS 8

 

В этом руководстве мы покажем вам, как установить Terraform на CentOS 8. Для тех из вас, кто не знал, Terraform — это бесплатный инструмент автоматизации инфраструктуры с открытым исходным кодом от Hashicorp, который используется для создания, сборки и изменения с использованием инфраструктуры. в виде кода для различных облачных провайдеров, таких как AWS, Azure Cloud, GCP, Oracle Cloud и многих других.

В этой статье предполагается, что у вас есть хотя бы базовые знания Linux, вы знаете, как использовать оболочку, и, что наиболее важно, вы размещаете свой сайт на собственном VPS. Установка довольно проста и предполагает, что вы работаете с учетной записью root, в противном случае вам может потребоваться добавить ‘ sudo‘ к командам для получения привилегий root. Я покажу вам пошаговую установку Terraform на CentOS 8.

Установите Terraform на CentOS 8

Шаг 1. Прежде всего, убедитесь, что все пакеты обновлены.

sudo dnf update

Шаг 2. Установка Terraform на CentOS 8.

Выполните следующую команду, чтобы загрузить последнюю версию установки terraform с официального сайта Terraform :

wget https://releases.hashicorp.com/terraform/1.0.0/terraform_1.0.0_linux_amd64.zip
sudo unzip terraform_1.0.0_linux_amd64.zip

Затем переместите извлеченную установку в каталог:/usr/local/bin

sudo mv terraform /usr/local/bin/

Теперь установку можно проверить, выполнив простую команду terraform version:

terraform -v

После успешной установки давайте проверим, как терраформировать команды:

terraform

Вывод:

terraform
Usage: terraform [-version] [-help] [args]

The available commands for execution are listed below.
The most common, useful commands are shown first, followed by
less common or more advanced commands. If you're just getting
started with Terraform, stick with the common commands. For the
other commands, please read the help and docs before usage.

Common commands:
    apply              Builds or changes infrastructure
    console            Interactive console for Terraform interpolations
    destroy            Destroy Terraform-managed infrastructure
    env                Workspace management
    fmt                Rewrites config files to canonical format
    get                Download and install modules for the configuration
    graph              Create a visual graph of Terraform resources
    import             Import existing infrastructure into Terraform
    init               Initialize a Terraform working directory
    login              Obtain and save credentials for a remote host
    logout             Remove locally-stored credentials for a remote host
    output             Read an output from a state file
    plan               Generate and show an execution plan
    providers          Prints a tree of the providers used in the configuration
    refresh            Update local state file against real resources
    show               Inspect Terraform state or plan
    taint              Manually mark a resource for recreation
    untaint            Manually unmark a resource as tainted
    validate           Validates the Terraform files
    version            Prints the Terraform version
    workspace          Workspace management


All other commands:
    0.12upgrade        Rewrites pre-0.12 module source code for v0.12
    debug              Debug output management (experimental)
    force-unlock       Manually unlock the terraform state
    push               Obsolete command for Terraform Enterprise legacy (v1)
    state              Advanced state management

Поздравляю! Вы успешно установили Terraform . Благодарим за использование этого руководства для установки Terraform в системе CentOS 8. Для получения дополнительной помощи или полезной информации мы рекомендуем вам посетить официальный сайт Terraform .

Оставить ответ

Ваш адрес email не будет опубликован. Обязательные поля помечены *

1 + 10 =