suzuken / yamlssm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot SSM decrypt

sioncojp opened this issue · comments

package main

import (
	"fmt"

	"github.com/suzuken/yamlssm"
)

type Config struct {
	Foo string `yaml:"foo"`
	Bar string `yaml:"bar"`
}

func main() {
	b := []byte(`
development:
  foo: ssm://encrypt_parameter
  bar: test
`)

	var configs map[string]Config
	yamlssm.Unmarshal(b, &configs)

	fmt.Printf("%v\n", configs["development"])
}
// $ go run *.go
// {ssm://encrypt_parameter test}