Creating the provider configuration - Adaptive Plugins - BlueCat Gateway - 1.1.1

BlueCat Terraform Plugin Administration Guide

Locale
English
Product name
BlueCat Gateway
Version
1.1.1

Before you begin, you must create a provider configuration that allows Terraform to interact with the resources and datasets. The provider configuration should be placed in the root module of the Terraform configuration.

The following is an example contents of a provider configuration file named main.tf:
terraform {
    required_providers {
        bluecat = {
            version = "1.1.1"
            source = "bluecatlabs/bluecat"
        }
    }
}

provider "bluecat" {
    server = "127.0.0.1"
    api_version = "1"
    transport = "http"
    port = "80"
    username = "api_user"
    password = "api_password"
    encrypt_password = "false"  
}
Where the fields represent the following:
  • server: the IP address of the BlueCat REST API image.
  • api_version: the version of the REST API.
  • transport: the protocol used to access the REST API.
  • port: the port used to access the REST API.
  • username: the username of the API user with the correct permissions to access the REST API.
  • encrypt_password (optional): True or false option to use an encrypted password in the password field.
  • password: If encrypt_password is set to false or not set, the password of the API users with the correct permissions to access the REST API. If encrypt_password is set to true, the filename of the encrypted password as created in BlueCat Gateway.
    Example:
    encrypt_password = "true"
    password = ".encrypted_password"
    To encrypt password, log into Gateway and navigate to Administration > Encrypt Password.
    Path: customizations/.encrypted_password
    Password: user_password_here
    Once this is complete, you can use the .encrypted_password value in the BlueCat Provider password field.

Once you have created the provider configuration, you can access the BlueCat resources and datasets.