layout | page_title | description |
---|---|---|
metanetworks |
Provider: metanetworks |
The Meta Networks provider is used to interact with Meta Networks APIs. |
The Meta Networks provider is used to interact with Meta Networks API.
provider "metanetworks" {
org = "example_organization"
}
terraform {
required_providers {
metanetworks = {
source = "localhost/mataneine/metanetworks"
version = "1.0.0-pre"
}
}
}
# Example resource configuration
resource "metanetworks_resource" "example" {
# ...
}
The Metanetworks provider offers a flexible means of providing credentials for authentication. The following methods are supported, in this order, and explained below:
- Static credentials
- Environment variables
- Configuration file
!> Warning: Hard-coding credentials into any Terraform configuration is not recommended, and risks secret leakage should this file ever be committed to a public version control system.
Static credentials can be provided by adding an api_key
and api_secret
in-line in the Metanetworks provider block:
Usage:
provider "metanetworks" {
org = "example_organization"
api_key = "my-api-key"
api_secret = "my-api-secret"
}
You can provide your credentials via the METANETWORKS_API_KEY
,
METANETWORKS_API_SECRET
and METANETWORKS_ORG
, environment variables,
representing your Metanetworks Access Key, Secret Key and the Organization name respectively.
Usage:
provider "metanetworks" {}
$ export METANETWORKS_API_KEY="anapikey"
$ export METANETWORKS_API_SECRET="asecretkey"
$ export METANETWORKS_ORG="example_organization"
$ terraform plan
You can use a configuration file to specify your credentials. The
file location is $HOME/.metanetworks/credentials.json
on Linux and OS X, or
"%USERPROFILE%\.metanetworks/credentials.json"
for Windows users.
If we fail to detect credentials inline, or in the environment, Terraform will check
this location.
Usage:
provider "metanetworks" {}
credentials.json file:
{
"api_key": "my-api-key",
"api_secret": "my-api-secret",
"org": "example_organization"
}