Google Cloud Platform: Spring Boot APP with Secret Manager

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 6

  • @PolyanaGM
    @PolyanaGM 3 ปีที่แล้ว +1

    Thank you! Helped me a lot!

  • @nagendrababu3664
    @nagendrababu3664 2 ปีที่แล้ว +1

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

    • @TheTiagoslater
      @TheTiagoslater  2 ปีที่แล้ว

      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 3 ปีที่แล้ว +1

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

    • @TheTiagoslater
      @TheTiagoslater  3 ปีที่แล้ว

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

    • @TheTiagoslater
      @TheTiagoslater  2 ปีที่แล้ว

      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;