Bootstrap FreeKB - OpenShift - Getting Started with Terraform
OpenShift - Getting Started with Terraform

Updated:   |  OpenShift articles

This assumes you have installed Terraform, as described at https://learn.hashicorp.com/tutorials/terraform/install-cli?in=terraform/aws-get-started.

Let's say you have the following files on your Terraform server.

├── locals.tf
├── modules.tf
├── outputs.tf
├── provider.tf
├── terraform.tfstate
├── variables.tf
├── deployments (directory, child module)
│   ├── data.tf
│   ├── outputs.tf
│   ├── resources.tf

 

Let's say provider.tf has the following.

terraform {
  required_providers {
    openshift = {
      source  = "llomgui/openshift"
    }
  }
}

provider "openshift" {
  load_config_file = "false"
  host = "https://api.openshift.example.com:6443"
  username = "john.doe"
  password = "itsasecret"
}

 

Issue the terraform init command and something like this should be displayed.

~]# terraform init
Initializing the backend...
Initializing provider plugins...
Terraform has been successfully initialized!

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 808f5f in the box below so that we can be sure you are a human.