feat(tenants): provision the product tenant with the registry UUID on create (#21)
This commit was merged in pull request #21.
This commit is contained in:
@@ -27,6 +27,13 @@ type Config struct {
|
||||
// contains AuthAudience.
|
||||
AuthEnabled bool
|
||||
AuthAudience string
|
||||
|
||||
// Downstream product provisioning. When ProductAPIURL is set, tenant
|
||||
// creation also provisions the tenant in the product's own database with
|
||||
// the SAME registry UUID, so both anchors agree. Empty ⇒ no-op adapter.
|
||||
ProductAPIURL string
|
||||
ProductAPIPath string
|
||||
ProductTimeout time.Duration
|
||||
}
|
||||
|
||||
func Load() (*Config, error) {
|
||||
@@ -49,6 +56,10 @@ func Load() (*Config, error) {
|
||||
|
||||
AuthEnabled: getenv("AUTH_ENABLED", "false") == "true",
|
||||
AuthAudience: getenv("AUTH_EXPECTED_AUDIENCE", "tenant-registry"),
|
||||
|
||||
ProductAPIURL: os.Getenv("PRODUCT_API_URL"),
|
||||
ProductAPIPath: getenv("PRODUCT_API_TENANTS_PATH", "/sdk/v1/tenants"),
|
||||
ProductTimeout: 10 * time.Second,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user