一身上の都合により terraform-provider-firebaseremoteconfig を作った。
こういう感じでFirebaseのRemote Configのパラメータを管理できる。
resource "firebaseremoteconfig_parameter" "foo" { key = "foo" value_type = "JSON" default_value = { value = jsonencode({ foo = "bar" zoo = 100 }) } }
conditional_valuesも一応、管理できる。
resource "firebaseremoteconfig_parameter" "bar" { key = "bar" description = "blah blah blah" value_type = "STRING" conditional_values = { android = { value = "ZOO" } ios = { value = "BAZ" } } default_value = { value = "hoge" } }
APIに沿っている、と思う。
google-api-go-clientの状況
firebaseremoteconfig/v1は3年前から更新されていない。firebaseremoteconfig-api.jsonに至っては8年前から更新されていない。go run ./google-api-go-generator/ -gendir .
を実行してもコードが更新されない。
今のこところ更新される予定はない模様。
The Go firebaseremoteconfig has not been generated from a new discovery doc in many years it seems. We only regenerate libraries for things that show up in the public listing of APIs, which this one no longer does it seems: https://www.googleapis.com/discovery/v1/apis.
https://www.googleapis.com/discovery/v1/apis を見ると確かにfirebaseremoteconfig
が載っていない。グエー。
おかげでvalueType
とかがコードにない状態になっている。
なのでterraform-provider-firebaseremoteconfigではgoogle-api-go-clientのフォーク版を使うということをやっている。 やりたくはなかった…
Node.jsのFirebase Admin SDKではサポートされているが、GoのFirebase Admin SDKではサポートされていない。
これからどうしたものか。
追記
tech blogに書いた