(key *KmsKey)
| 357 | } |
| 358 | |
| 359 | func kmsKeyToMasterKey(key *KmsKey) kms.MasterKey { |
| 360 | ctx := make(map[string]*string) |
| 361 | for k, v := range key.Context { |
| 362 | value := v // Allocate a new string to prevent the pointer below from referring to only the last iteration value |
| 363 | ctx[k] = &value |
| 364 | } |
| 365 | return kms.MasterKey{ |
| 366 | Arn: key.Arn, |
| 367 | Role: key.Role, |
| 368 | EncryptionContext: ctx, |
| 369 | AwsProfile: key.AwsProfile, |
| 370 | } |
| 371 | } |
no outgoing calls