I am looking into how to secure things like API keys within my terraform code. I am using terraform to push config and changes to palo alto Firewalls and this requires an API key. So the example is this:
# Configure the panos provider
provider "panos" {
hostname = "127.0.0.1"
json_config_file = "../panos-creds.json"
}
Then the solution to filling the creds is this:
{
"hostname": "127.0.0.1",
"api_key": "secret",
"timeout": 10,
"logging": ["action", "op", "uid"],
"verify_certificate": false
}
So to me this seems like they are calling the json file to fill the credentials for api access to the palo alto. The issue is how do we secure the json file that lies in the terraform folder structure? How can I use something like AWS KMS for this? Is that an option?