Terraform provider for OCM
Build
To build the provider use the make
command.
Use
To use the provider first build and install it:
$ make install
Then go to the directory containing the Terraform .tf
files and run the terraform init
and terraform apply
commands:
$ terraform init $ terraform apply
To see the debug log of the provider set the TF_LOG
environment variable to DEBUG
before running the terraform apply
command:
$ export TF_LOG $ terraform apply
Examples
The examples
directory contains some examples, together with Makefiles to simplify their use. For example, to run the create_cluster
example:
$ make install $ cd examples/create_cluster $ make
Note that this examples expect that you have the ocm
command line utility installed, and use it to get a valid access token (with ocm token
) and put it in the OCM_TOKEN
environment variable where the provider gets the token by default.
Use the make clean
command to remove the .terraform
and terraform.tfstate
files so that the next time you run the example it starts from scratch.