interface EnvironmentVariableProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CodeBuild.CfnProject.EnvironmentVariableProperty |
Java | software.amazon.awscdk.services.codebuild.CfnProject.EnvironmentVariableProperty |
Python | aws_cdk.aws_codebuild.CfnProject.EnvironmentVariableProperty |
TypeScript | @aws-cdk/aws-codebuild » CfnProject » EnvironmentVariableProperty |
EnvironmentVariable
is a property of the AWS CodeBuild Project Environment property type that specifies the name and value of an environment variable for an AWS CodeBuild project environment. When you use the environment to run a build, these variables are available for your builds to use. EnvironmentVariable
contains a list of EnvironmentVariable
property types.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as codebuild from '@aws-cdk/aws-codebuild';
const environmentVariableProperty: codebuild.CfnProject.EnvironmentVariableProperty = {
name: 'name',
value: 'value',
// the properties below are optional
type: 'type',
};
Properties
Name | Type | Description |
---|---|---|
name | string | The name or key of the environment variable. |
value | string | The value of the environment variable. |
type? | string | The type of environment variable. Valid values include:. |
name
Type:
string
The name or key of the environment variable.
value
Type:
string
The value of the environment variable.
We strongly discourage the use of
PLAINTEXT
environment variables to store sensitive values, especially AWS secret key IDs and secret access keys.PLAINTEXT
environment variables can be displayed in plain text using the AWS CodeBuild console and the AWS CLI . For sensitive values, we recommend you use an environment variable of typePARAMETER_STORE
orSECRETS_MANAGER
.
type?
Type:
string
(optional)
The type of environment variable. Valid values include:.
PARAMETER_STORE
: An environment variable stored in Systems Manager Parameter Store. For environment variables of this type, specify the name of the parameter as thevalue
of the EnvironmentVariable. The parameter value will be substituted for the name at runtime. You can also define Parameter Store environment variables in the buildspec. To learn how to do so, see env/parameter-store in the AWS CodeBuild User Guide .PLAINTEXT
: An environment variable in plain text format. This is the default value.SECRETS_MANAGER
: An environment variable stored in AWS Secrets Manager . For environment variables of this type, specify the name of the secret as thevalue
of the EnvironmentVariable. The secret value will be substituted for the name at runtime. You can also define AWS Secrets Manager environment variables in the buildspec. To learn how to do so, see env/secrets-manager in the AWS CodeBuild User Guide .