Skip to content

ManoManoTech/terraform-provider-mangopay

Repository files navigation

Manomano Mangopay Terraform Provider

The Manomano Mangopay Terraform provider provides convenient access to the Mangopay REST API from Terraform.

Requirements

This provider requires Terraform CLI 1.0 or later. You can install it for your system on Hashicorp's website.

Usage

Add the following to your main.tf file:

# Declare the provider and version
terraform {
  required_providers {
    mangopay = {
      source = "registry.terraform.io/manomano/mangopay"
      version = "~> 5.10.1"
    }
  }
}

# Initialize the provider
provider "mangopay" {
  # The preferred authorization scheme for interacting with the Mangopay API. [Create a token](https://docs.mangopay.com/api-reference/overview/authentication#1-generate-a-bearer-token).
  client_id     = var.mangopay_client_id
  api_key = var.mangopay_api_key
  # Wether you hit the Sandbox or not (false by default)
  sandbox       = true
}

# Configure a resource
resource "mangopay_hook" "card_validation_created" {
  event_type = "CARD_VALIDATION_CREATED"
  url        = "https://mangopay.com/docs/please-ignore"
  tag        = "Custom metadata"
}

Initialize your project by running terraform init in the directory.

Additional examples can be found in the ./examples folder within this repository, and you can refer to the full documentation on [the Terraform Registry]https://registry.terraform.io/providers/manomano/mangopay/latest/docs).

Provider Options

When you initialize the provider, the following options are supported. It is recommended to use environment variables for sensitive values like access tokens. If an environment variable is provided, then the option does not need to be set in the terraform source.

Property Environment variable Required Default value
client_id MANGOPAY_CLIENT_ID true
api_key MANGOPAY_API_KEY true
sandbox MANGOPAY_SANDBOX false false

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

About

A Terraform provider for Mangopay API

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •