HashiCorpVaultConnection

Stores information and configuration for the access to a HashiCorp Vault.

Example. Adds a new Connection that allows TeamCity to connect to a HashiCorpVault using AppRole

project {
// Other Project settings ...
features {
// Other Project Features ...
        hashiCorpVaultConnection {
id = "PROJECT_ID"
name = "HashiCorp Vault"
authMethod = appRole {
endpointPath = "approle"
roleId = "id"
secretId = "credentialsJSON:ee2362ab-33fb-40bd-b49b-e77c4a45e978"
}
}







}
}




Example. Adds a new Connection that allows TeamCity to connect to a HashiCorpVault using AppRole. It defines it own parameter namespace and a respective vault namespace.

project {
// Other Project settings ...
features {
// Other Project Features ...
        hashiCorpVaultConnection {
id = "PROJECT_ID"
name = "HashiCorp Vault"
vaultId = "other-namespace"
vaultNamespace = "other"
authMethod = appRole {
endpointPath = "approle"
roleId = "id"
secretId = "credentialsJSON:ee2362ab-33fb-40bd-b49b-e77c4a45e978"
}
}









}
}




Example. Adds a new Connection that allows TeamCity to connect to a HashiCorpVault using LDAP

project {
// Other Project settings ...
features {
// Other Project Features ...
        hashiCorpVaultConnection {
id = "PROJECT_ID"
name = "HashiCorp Vault"
authMethod = ldap {
path = "path"
username = "username"
password = "credentialsJSON:636e34b4-d02e-4f27-9d12-141f75e8832b"
}
}







}
}




See also

Constructors

Link copied to clipboard
constructor(init: HashiCorpVaultConnection.() -> Unit)
constructor()

Types

Link copied to clipboard

Properties

Link copied to clipboard
var authMethod: <Error class: unknown class>

The way how to obtain credentials (just provide the keys, assume IAM role or other)

Link copied to clipboard
var failOnError: <Error class: unknown class>

Whether to fail builds in case of parameter resolving error

Link copied to clipboard
var id: String?

Project feature id, if not specified will be generated

Link copied to clipboard
var name: <Error class: unknown class>

HashiCorp Vault connection display name

Link copied to clipboard
var namespace: <Error class: unknown class>

Vault ID. Should be provided in case of multiple vault connections

Link copied to clipboard
Link copied to clipboard

Project feature type

Link copied to clipboard
var url: <Error class: unknown class>

Vault URL

Link copied to clipboard
var vaultId: <Error class: unknown class>

Vault ID. Should be provided in case of multiple vault connections

Link copied to clipboard
var vaultNamespace: <Error class: unknown class>

HashiCorp Vault namespace that the auth method and secrets engines are housed under.

Functions

Link copied to clipboard
fun booleanParameter(customName: String? = null, trueValue: String? = "true", falseValue: String? = "false"): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
fun clear()
Link copied to clipboard
fun <T : CompoundParam<T>> compoundParameter(customName: String? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
fun <T : Parametrized> copyParamsTo(target: T): T

Copies parameters of this object to the specified target

Link copied to clipboard

Creates an instance of this project feature via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor.

Link copied to clipboard
fun doubleParameter(customName: String? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
fun <E : Enum<E>> enumParameter(customName: String? = null, mapping: Map<E, String?>? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
fun findRawParam(paramName: String): Parameter?
Link copied to clipboard
fun hasParam(paramName: String): Boolean
Link copied to clipboard
fun intParameter(customName: String? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
fun param(name: String, value: String)

Adds parameter with specified name and value

Link copied to clipboard
fun removeRawParam(paramName: String)
Link copied to clipboard
open fun stringParameter(customName: String? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun validate(consumer: ErrorConsumer)

Validates this object and reports found errors to the provided consumer