The cloudfoundry terraform provider supports any of the following authentication mechanism currently:
Use the env variables CF_API_URL
, CF_USER
and CF_PASSWORD
.
Alternatively,
provider "cloudfoundry" {
api_url = "<CF-API-URL>"
user = "<USER-ID>"
password = "<PASSWORD>"
}
Use the env variables CF_API_URL
, CF_CF_CLIENT_ID
and CF_CF_CLIENT_SECRET
.
Alternatively,
provider "cloudfoundry" {
api_url = "<CF-API-URL>"
cf_client_id = "<CF-CLIENT-ID>"
cf_client_secret = "<CF-CLIENT-SECRET>"
}
If you have installed the cf-cli and have logged into the environment, the the cloudfoundry terraform provider can use the default configuration of the cf-cli (present in ~/.cf
folder) to connect to the environment.
provider cloudfoundry {}
If the provider is initialized without any parameters and no environment variables are set, then the provider will try to connect this way.