OpenShift - Getting Started with Terraform
by
Jeremy Canfield |
Updated: July 20 2023
| 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