Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Environment variable to configure the provider_loglevel attribute ProviderLogLevelEnv string = "FOREMAN_PROVIDER_LOGLEVEL" // Environment variable to configure the provider_logfile attribute ProviderLogFileEnv string = "FOREMAN_PROVIDER_LOGFILE" // Environment variable to configure the client_username attribute ClientUsernameEnv string = "FOREMAN_CLIENT_USERNAME" // Environment variable to configure the client_password attribute ClientPasswordEnv string = "FOREMAN_CLIENT_PASSWORD" )
Environment variables the provider recognizes for configuration
View Source
const ( // Default log level if one is not provided DefaultProviderLogLevel string = "INFO" // Default output log file if one is not provided DefaultProviderLogFile string = "terraform-provider-foreman.log" )
Provider configuration default values
View Source
const ( // Specifying the log file as "-" preserves the standard behavior of the // Golang stdlib log package. LogFileStdLog string = "-" )
Log file constants
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶
func InitLogger(logConfig LoggingConfig)
InitLogger initialize the provider's shared logging instance. The shared logger will attempt to log to a file. If an error is encountered while trying to set up the log file , the error is captured with Golang stdlib "log" and the default log writer is used.
func Provider ¶
func Provider() terraform.ResourceProvider
Provider : Defines params for provider in terraform and available resources
Types ¶
type Config ¶
type Config struct { // Server definition. The server's URL will be the 'base URL' the REST // client uses for issuing API requests to the API gateway. Server api.Server // Whether or not to verify the server's certificate/hostname. This flag // is passed to the TLS config when initializing the REST client for API // communication. // // See 'pkg/crypto/tls/#Config.InsecureSkipVerify' for more information. ClientTLSInsecure bool // Set of credentials needed to authenticate against Foreman ClientCredentials api.ClientCredentials }
Config struct defines the necessary information needed to configure the terraform provider for communication with the Foreman API.
type LoggingConfig ¶
type LoggingConfig struct { // The log level to use LogLevel logger.LogLevel // The path to the log file LogFile string }
Configuration options for the provider logging
Source Files ¶
- config.go
- data_source_foreman_architecture.go
- data_source_foreman_domain.go
- data_source_foreman_environment.go
- data_source_foreman_hostgroup.go
- data_source_foreman_media.go
- data_source_foreman_model.go
- data_source_foreman_operatingsystem.go
- data_source_foreman_partitiontable.go
- data_source_foreman_provisioningtemplate.go
- data_source_foreman_smartproxy.go
- data_source_foreman_subnet.go
- data_source_foreman_templatekind.go
- provider.go
- resource_foreman_architecture.go
- resource_foreman_domain.go
- resource_foreman_environment.go
- resource_foreman_host.go
- resource_foreman_hostgroup.go
- resource_foreman_media.go
- resource_foreman_model.go
- resource_foreman_operatingsystem.go
- resource_foreman_partitiontable.go
- resource_foreman_provisioningtemplate.go
- resource_foreman_smartproxy.go
- resource_foreman_subnet.go
- resource_helper.go
Click to show internal directories.
Click to hide internal directories.