Google Cloud Platform: Spring Boot APP with Secret Manager

Sdílet
Vložit
  • čas přidán 5. 09. 2024

Komentáře • 6

  • @PolyanaGM
    @PolyanaGM Před 3 lety +1

    Thank you! Helped me a lot!

  • @nagendrababu3664
    @nagendrababu3664 Před 2 lety +1

    Hi Tiago,
    Will accessing secrets from secret manager work in spring boot app from gke aswell?

    • @TheTiagoslater
      @TheTiagoslater  Před 2 lety

      it does , use this :
      gcloud secrets create greeting-prod \
      --data-file=- --replication-policy=automatic
      com.google.cloud
      spring-cloud-gcp-starter-secretmanager
      src/main/resources/application.properties
      greeting=${sm://greeting-prod}
      @Value("${sm://greeting}")
      String greeting;

  • @danielsoto5517
    @danielsoto5517 Před 3 lety +1

    Followed exactly as described, but doesn't work: "The Application Default Credentials are not available"

    • @TheTiagoslater
      @TheTiagoslater  Před 3 lety

      there are many reasons it could have failed 4 u, is ur user an owner or at least has the privilegies ?

    • @TheTiagoslater
      @TheTiagoslater  Před 2 lety

      it does , use this :
      gcloud secrets create greeting-prod \
      -data-file= --replication-policy=automatic
      com.google.cloud
      spring-cloud-gcp-starter-secretmanager

      src/main/resources/application.properties
      greeting=${sm://greeting-prod}
      @Value("${sm://greeting}")
      String greeting;