Skip to content

Commit 6ce9146

Browse files
committed
fix: update environment variable references for Alibaba Cloud KMS to use ARN format
Signed-off-by: Perrie Qian <perrie-qian@outlook.com>
1 parent 3a25e0a commit 6ce9146

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -628,11 +628,11 @@ To encrypt a file, specify the Alibaba Cloud KMS key using its ARN format:
628628
629629
$ sops encrypt --acs-kms acs:kms:cn-shanghai:1234567890:key/key-idxxxx test.yaml > test.enc.yaml
630630
631-
Or using the ``SOPS_ACS_KMS_IDS`` environment variable:
631+
Or using the ``SOPS_ACS_KMS_ARN`` environment variable:
632632
633633
.. code:: bash
634634
635-
export SOPS_ACS_KMS_IDS="acs:kms:cn-shanghai:1234567890:key/key-idxxxx"
635+
export SOPS_ACS_KMS_ARN="acs:kms:cn-shanghai:1234567890:key/key-idxxxx"
636636
$ sops encrypt test.yaml > test.enc.yaml
637637
638638
You can also configure Alibaba Cloud KMS keys in the ``.sops.yaml`` config file:
@@ -649,7 +649,7 @@ Adding and removing keys
649649
When creating new files, ``sops`` uses the PGP, KMS and GCP KMS defined in the
650650
command line arguments ``--kms``, ``--pgp``, ``--gcp-kms``, ``--acs-kms``, ``--hckms`` or ``--azure-kv``, or from
651651
the environment variables ``SOPS_KMS_ARN``, ``SOPS_PGP_FP``, ``SOPS_GCP_KMS_IDS``,
652-
``SOPS_ACS_KMS_IDS``, ``SOPS_HUAWEICLOUD_KMS_IDS``, ``SOPS_AZURE_KEYVAULT_URLS``. That information is stored in the file under the
652+
``SOPS_ACS_KMS_ARN``, ``SOPS_HUAWEICLOUD_KMS_IDS``, ``SOPS_AZURE_KEYVAULT_URLS``. That information is stored in the file under the
653653
``sops`` section, such that decrypting files does not require providing those
654654
parameters again.
655655

cmd/sops/main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func main() {
112112
https://developers.google.com/identity/protocols/application-default-credentials)
113113
114114
To encrypt or decrypt a document with Alibaba Cloud KMS, specify the
115-
Alibaba Cloud KMS key ARN in the --acs-kms flag or in the SOPS_ACS_KMS_IDS
115+
Alibaba Cloud KMS key ARN in the --acs-kms flag or in the SOPS_ACS_KMS_ARN
116116
environment variable.
117117
(You need to setup Alibaba Cloud credentials via environment variables:
118118
ALIBABA_CLOUD_ACCESS_KEY_ID, ALIBABA_CLOUD_ACCESS_KEY_SECRET, or
@@ -955,8 +955,8 @@ func main() {
955955
},
956956
cli.StringFlag{
957957
Name: "acs-kms",
958-
Usage: "comma separated list of Alibaba Cloud KMS key IDs (format: region:key-id)",
959-
EnvVar: "SOPS_ACS_KMS_IDS",
958+
Usage: "comma separated list of Alibaba Cloud KMS key ARNs",
959+
EnvVar: "SOPS_ACS_KMS_ARN",
960960
},
961961
cli.StringFlag{
962962
Name: "hckms",
@@ -1319,8 +1319,8 @@ func main() {
13191319
},
13201320
cli.StringFlag{
13211321
Name: "acs-kms",
1322-
Usage: "comma separated list of Alibaba Cloud KMS key IDs (format: region:key-id)",
1323-
EnvVar: "SOPS_ACS_KMS_IDS",
1322+
Usage: "comma separated list of Alibaba Cloud KMS key ARNs",
1323+
EnvVar: "SOPS_ACS_KMS_ARN",
13241324
},
13251325
cli.StringFlag{
13261326
Name: "hckms",
@@ -1738,7 +1738,7 @@ func main() {
17381738
cli.StringFlag{
17391739
Name: "acs-kms",
17401740
Usage: "comma separated list of Alibaba Cloud KMS key ARNs",
1741-
EnvVar: "SOPS_ACS_KMS_IDS",
1741+
EnvVar: "SOPS_ACS_KMS_ARN",
17421742
},
17431743
cli.StringFlag{
17441744
Name: "hckms",

0 commit comments

Comments
 (0)