Skip to content

Commit 8e0a6a1

Browse files
authored
fix: resolve error with importing in the wrong place
1 parent 11c1b7a commit 8e0a6a1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

secretmanager/snippets/create_secret.py

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

22-
2322
# [START secretmanager_create_secret]
23+
# Import the Secret Manager client library.
24+
from google.cloud import secretmanager
25+
2426
def create_secret(
2527
project_id: str, secret_id: str, ttl: Optional[str] = None
2628
) -> secretmanager.Secret:
@@ -48,8 +50,7 @@ def create_secret(
4850
new_secret_with_ttl = create_secret("my-project", "my-timed-secret", "7776000s")
4951
"""
5052

51-
# Import the Secret Manager client library.
52-
from google.cloud import secretmanager
53+
5354

5455
# Create the Secret Manager client.
5556
client = secretmanager.SecretManagerServiceClient()

0 commit comments

Comments
 (0)