Skip to main content

An AWS CDK Construct that creates GITLAB CI/CD variables from SecretsManager Secrets

Project description

npm version PyPI version

A CDK L3 Construct for storing Gitlab CI variables from a SecretsManager secret

Installation

You can install the library into your project using npm or pip.

npm install @taimos/cdk-construct-gitlab-variable

pip3 install taimos.cdk-construct-gitlab-variable

Usage

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
secret = Secret(self, "DBSecret",
    description="Some Secret",
    generate_secret_string={
        "secret_string_template": "{\"username\":\"admin2\"}",
        "generate_string_key": "password",
        "password_length": 20
    }
)

gitlab_secret = Secret.from_secret_arn(self, "GitlabToken", "arn:aws:secretsmanager:eu-central-1:123456789012:secret:GitlabToken-abcde")

db_password = GitlabVariable(self, "GitlabVarPassword",
    gitlab_secret=gitlab_secret,
    secret=secret,
    secret_field="password",
    project_id="group/secrets-test",
    variable_name="RDS_PASSWORD"
)

Contributing

We welcome community contributions and pull requests.

License

The CDK construct library is distributed under the Apache License, Version 2.0.

See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for taimos.cdk-construct-gitlab-variable, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size taimos.cdk-construct-gitlab-variable-1.0.1.tar.gz (15.5 MB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page