All Projects → runtheops → ssm-diff

runtheops / ssm-diff

Licence: MIT license
A human-friendly way of managing parameters in AWS SSM

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ssm-diff

ssm-parameter-store
λ✨ Ergonomic SSM Parameter Store wrapper for AWS Lambda
Stars: ✭ 23 (-45.24%)
Mutual labels:  ssm, aws-ssm
ssmenv
A tool to use Amazon EC2 Systems Manager (AWS SSM) Parameter Store as environment variables
Stars: ✭ 16 (-61.9%)
Mutual labels:  ssm, aws-ssm
bicycleSharingServer
🚲共享单车JavaWEB后台(ssm)
Stars: ✭ 86 (+104.76%)
Mutual labels:  ssm
library-booksystem
基于ssm的入门项目,图书在线管理系统。a library system.
Stars: ✭ 26 (-38.1%)
Mutual labels:  ssm
IDEAPractice
Java练习 - Java基础知识,面试题,小demo,长期积累 | intellij idea + maven + tomcat
Stars: ✭ 45 (+7.14%)
Mutual labels:  ssm
exec-with-secrets
Handle secrets in Docker using AWS KMS, SSM parameter store, Secrets Manager, or Azure Key Vault
Stars: ✭ 54 (+28.57%)
Mutual labels:  ssm
json2ssm
AWS Parameter Store import & export functionality for JSON
Stars: ✭ 47 (+11.9%)
Mutual labels:  ssm
blog-ssm
一个简单漂亮的SSM博客系统。
Stars: ✭ 487 (+1059.52%)
Mutual labels:  ssm
xm-spring-boot
Spring Boot 基础项目
Stars: ✭ 33 (-21.43%)
Mutual labels:  ssm
examonlinesystem
基于SSM框架开发的一款在线考试系统。An online examination system with ssm framework in Java Language
Stars: ✭ 27 (-35.71%)
Mutual labels:  ssm
atguigu ssm crud
Atguigu-SSM-CRUD 一个最基本的CRUD系统,采用IDEA+Maven搭建,具备前后端交互功能,前端采用BootStrap+Ajax异步请求DOM渲染,后端采用SpringMVC+MyBatis+Mysql8.0+Servlet+Jsp,符合REST风格URL规范,并加入了Hibernate提供的数据校验功能,支持PageHelper的分页功能,很适合SSM阶段性练习。同时用到了很多前端操作以及BootStrap组件,也有利于学习JS和前端框架。
Stars: ✭ 52 (+23.81%)
Mutual labels:  ssm
ecs composex
Manage, Configure and Deploy your services and AWS services and applications from your docker-compose definitions
Stars: ✭ 79 (+88.1%)
Mutual labels:  aws-ssm
pinyougou
品优购项目实战
Stars: ✭ 19 (-54.76%)
Mutual labels:  ssm
springboot-bbs
基于springboot的论坛系统,主要使用的技术有springboot+mybatis+redis+自定义分页,数据库为mysql,前端为bootstrap+jquery+html5
Stars: ✭ 49 (+16.67%)
Mutual labels:  ssm
EMAN
一个基于SSM框架与物品的协同过滤算法(ItemCF)的简单电子书推荐系统
Stars: ✭ 48 (+14.29%)
Mutual labels:  ssm
secret config
Centralized Configuration and Secrets Management for Ruby and Rails applications.
Stars: ✭ 15 (-64.29%)
Mutual labels:  aws-ssm
cloud-note
无道云笔记,原生JSP的仿有道云笔记项目
Stars: ✭ 66 (+57.14%)
Mutual labels:  ssm
sigil
AWS SSM Session manager client
Stars: ✭ 67 (+59.52%)
Mutual labels:  aws-ssm
ssm-ami-automation
Automated AMI creation using SSM
Stars: ✭ 14 (-66.67%)
Mutual labels:  aws-ssm
answerWeb
基于SSM在线答题系统
Stars: ✭ 137 (+226.19%)
Mutual labels:  ssm

ssm-diff

AWS SSM Parameter Store is a really convenient, AWS-native, KMS-enabled storage for parameters and secrets.

Unfortunately, as of now, it doesn't seem to provide any human-friendly ways of batch-managing hierarchies of parameters.

The goal of the ssm-diff tool is to simplify that process by unwraping path-style (/Dev/DBServer/MySQL/db-string13 = value) parameters into a YAML structure:

Dev:
  DBServer:
    MySQL:
      db-string13: value

Then, given that this local YAML representation of the SSM Parameter Store state was edited, calculating and applying diffs on the parameters.

ssm-diff supports complex data types as values and can operate within single or multiple prefixes.

Installation

pip install ssm-diff

Geting Started

The tool relies on native AWS SDK, thus, on a way SDK figures out an effective AWS configuration. You might want to configure it explicitly, setting AWS_DEFAULT_REGION, or AWS_PROFILE, before doing and manipulations on parameters

When AWS_PROFILE environment variable is set, local state file will have a name corresponding to the profile name.

Before we start editing the local representation of parameters state, we have to get it from SMM:

$ ssm-diff init

will create a local parameters.yml (or <AWS_PROFILE>.yml if AWS_PROFILE is in use) file that stores a YAML representation of the SSM Parameter Store state.

Once you accomplish editing this file, adding, modifying or deleting parameters, run:

$ ssm-diff plan

Which will show you the diff between this local representation and an SSM Parameter Store.

Finally

$ ssm-diff apply

will actually apply local changes to the Parameter Store.

Operations can also be limited to a particular prefix(es):

$ ssm-diff -p /dev -p /qa/ci {init,plan,apply}

NOTE: when remote state diverges for some reason, but you still want to preserve remote changes, there's a:

$ ssm-diff pull

command, doing just that.

Examples

Let's assume we have the following parameters set in SSM Parameter Store:

/qa/ci/api/db_schema    = foo_ci
/qa/ci/api/db_user      = bar_ci
/qa/ci/api/db_password  = baz_ci
/qa/uat/api/db_schema   = foo_uat
/qa/uat/api/db_user     = bar_uat
/qa/uat/api/db_password = baz_uat

$ ssm-diff init

will create a parameters.yml file with the following content:

qa:
  ci:
    api:
      db_schema: foo_ci
      db_user: bar_ci
      db_password: !secure 'baz_ci'
  uat:
    api:
      db_schema: foo_uat
      db_user: bar_uat
      db_password: !secure 'baz_uat'

KMS-encrypted (SecureString) and String type values are distunguished by !secure YAML tag.

Let's drop the ci-related stuff completely, and edit uat parameters a bit, ending up with the following parameters.yml file contents:

qa:
  uat:
    api:
      db_schema: foo_uat
      db_charset: utf8mb4 
      db_user: bar_changed
      db_password: !secure 'baz_changed'

Running

$ ssm-diff plan

will give the following output:

- /qa/ci/api/db_schema
- /qa/ci/api/db_user
- /qa/ci/api/db_password
+ /qa/uat/api/db_charset = utf8mb4
~ /qa/uat/api/db_user:
  < bar_uat
  ---
  > bar_changed
~ /qa/uat/api/db_password:
  < baz_uat
  ---
  > baz_changed

Finally

$ ssm-diff apply

will actually do all the necessary modifications of parameters in SSM Parameter Store itself, applying local changes

Known issues and limitations

  • There's currently no option to use different KMS keys for SecureString values encryption.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].