terraform-provider-newrelic
terraform-provider-newrelic copied to clipboard
`newrelic_api_access_key` data source
Feature Description
The newrelic_account_management resource creates a brand new account with 2 prepopulated default API keys with names:
License Key for <Account name>Browser Key for <Account name>
However, there is no Terraform data source to retrieve them programmatically in another place.
It would be nice to have newrelic_api_access_key data source counterpart to the resource.
data "newrelic_api_access_key" "default" {
account_id = 1234567
key_type = "INGEST"
ingest_type = "LICENSE"
name = "License Key for <Account name>"
}
# Pass key as env var to k8s deployment
env {
name = "NEW_RELIC_LICENSE_KEY"
value = data.newrelic_api_access_key.default.key
}