Skip to content

Commit

Permalink
random generation of keyring / cryptokey names [(#786)](#786)
Browse files Browse the repository at this point in the history
* random generation of keyring / cryptokey names

* Fixed formatting of keyring name and cryptokey name
  • Loading branch information
ryanmats authored and busunkim96 committed Jun 4, 2020
1 parent 445ed0e commit 72f813c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions kms/snippets/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and

import random
import string

from googleapiclient import discovery

import snippets
Expand All @@ -22,10 +25,12 @@
LOCATION = 'global'

# Your Google Cloud Platform KeyRing name
KEYRING = 'sample-keyring-43'
KEYRING = ''.join(
random.choice(string.ascii_lowercase + string.digits) for _ in range(12))

# Your Google Cloud Platform CryptoKey name
CRYPTOKEY = 'sample-key-43'
CRYPTOKEY = ''.join(
random.choice(string.ascii_lowercase + string.digits) for _ in range(12))

# Your Google Cloud Platform CryptoKeyVersion name
VERSION = 1
Expand Down

0 comments on commit 72f813c

Please sign in to comment.