Skip to content

Commit 11c1b7a

Browse files
authored
fix(secretmanager): clean up some issues with create_secret
* arguments make this required in running, but the function says optional * remove duplicate import
1 parent 4b20167 commit 11c1b7a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

secretmanager/snippets/create_secret.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
import argparse
2020
from typing import Optional
2121

22-
from google.cloud import secretmanager
23-
2422

2523
# [START secretmanager_create_secret]
2624
def create_secret(
@@ -81,7 +79,7 @@ def create_secret(
8179
)
8280
parser.add_argument("project_id", help="id of the GCP project")
8381
parser.add_argument("secret_id", help="id of the secret to create")
84-
parser.add_argument("ttl", help="time to live for secrets, f.e. '600s' ")
82+
parser.add_argument("--ttl", help="time to live for secrets, f.e. '600s' ")
8583
args = parser.parse_args()
8684

8785
create_secret(args.project_id, args.secret_id, args.ttl)

0 commit comments

Comments
 (0)