Closed njculver closed 2 years ago
Using type:URL parameter should allow to workaround this problem; here is an example how to get zone/region value from Google Cloud Metadata Service:
runtime_parameters:
- name: REGION
type: url
value: http://metadata.google.internal/computeMetadata/v1/instance/zone
headers:
- name: Metadata-Flavor
value: Google
https://github.com/F5Networks/f5-bigip-runtime-init#runtime-parameters
here is link to Google Cloud Docs with more info around accessing metadata: https://cloud.google.com/compute/docs/metadata/default-metadata-values
Closing.
Please reopen if you would still like additional help.
When using runtime-init for the various cloud providers, the metadataProvider config only allows you to query specific values due to schema constraints (see: https://github.com/F5Networks/f5-bigip-runtime-init/blob/main/src/schema/base_schema.json#L187-L239) despite the cloudClient.ts functions being parameterized to allow passing any valid fields (example for gcp: https://github.com/F5Networks/f5-bigip-runtime-init/blob/main/src/lib/cloud/gcp/cloudClient.ts#L105-L180).
The schema should be updated to allow for querying all valid values using the metadata provider rather than having to query the metadata URL directly.