Skip to main content

Applicaton config via AWS S3 and AWS Secrets Manager

Project description

Python script to push and pull application config

This script is used to push and pull secrets, s3 config and ssm values for use in applications.

Usage

Pushing Config

Usage: croudtech-bootstrap put-config [OPTIONS] VALUES_PATH

Options:
  --prefix TEXT   The path prefix (Name prefix used when storing secrets and SSM values)
  --region TEXT   The AWS region (Defaults to the current region set using AWS_DEFAULT_REGION or AWS_REGION env vars)
  --delete-first  Delete the values in this path before pushing (useful for cleanup) This will remove any values with the current path prefix that aren't included in the files we're pushing.
  --help          Show this message and exit.

The put-config command requires the following file structure:

├── ENVIRONMENT_NAME_1
│   ├── common.yaml
│   ├── common.secret.yaml
│   ├── AppConfig1.yaml
│   ├── AppConfig1.secret.yaml
│   ├── AppConfig2.yaml
│   └── AppConfig2.secret.yaml
├── ENVIRONMENT_NAME_2
│   ├── common.yaml
│   ├── common.secret.yaml
│   ├── AppConfig1.yaml
│   ├── AppConfig1.secret.yaml
│   ├── AppConfig2.yaml
│   └── AppConfig2.secret.yaml

Running python -m croudtech-bootstrap put-config CONFIG_FILES_PATH will create config for AppConfig1 and AppConfig2 in both defined environments.

common.yaml and common.secret.yaml files contain shared config that will be used for all applications.

Pulling config

Usage: croudtech-bootstrap get-config [OPTIONS]

Options:
  --environment-name TEXT         The environment name  [required]
  --app-name TEXT                 The app name  [required]
  --prefix TEXT                   The path prefix
  --region TEXT                   The AWS region
  --include-common / --ignore-common
                                  Include shared variables
  --output-format [json|yaml|environment|environment-export]
  --parse-redis-param / --ignore-redis-param
                                  Parse redis host and allocate a redis
                                  database number. Requires network access to the redis instance
  --help                          Show this message and exit.

Using the put-config example above we can pull the config as follows

croudtech-bootstrap get-config --environment-name ENVIRONMENT_NAME_1 --app-name AppConfig1 --output-format environment

Installation

pip install croudtech-bootstrap

Project details


Download files

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

Source Distribution

croudtech_bootstrap-0.1.56.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

croudtech_bootstrap-0.1.56-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file croudtech_bootstrap-0.1.56.tar.gz.

File metadata

  • Download URL: croudtech_bootstrap-0.1.56.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for croudtech_bootstrap-0.1.56.tar.gz
Algorithm Hash digest
SHA256 468f191dcc52999ddd8e0d34518b61cdda761b97bc0f8d37b3fe51a3c82cfc04
MD5 34fc33a94b5a85a2d4d84e851115605b
BLAKE2b-256 6ca503662bb308a2b87542d25f1204afb7271759cbae51c923a0f485f5cda4ff

See more details on using hashes here.

File details

Details for the file croudtech_bootstrap-0.1.56-py3-none-any.whl.

File metadata

File hashes

Hashes for croudtech_bootstrap-0.1.56-py3-none-any.whl
Algorithm Hash digest
SHA256 0bf3aa6f42f01c406874686570cde25deed2614597525592a5c7ef4e4a737fa1
MD5 94bec0022f4c3565034769be309aa501
BLAKE2b-256 d0dd5f54ebf7d5268239bd02984b5e2ca6c65241b7df5997c56236024d644e59

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page