Coder Social home page Coder Social logo

aolwas / terraform-provider-gandi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from go-gandi/terraform-provider-gandi

0.0 2.0 0.0 7.25 MB

Terraform provider for the Gandi LiveDNS service

License: Mozilla Public License 2.0

Go 83.51% Makefile 7.84% Shell 8.65%

terraform-provider-gandi's Introduction

Terraform Gandi Provider

This provider supports managing DNS zones and managing the LiveDNS service in Gandi.

This provider currently doesn't support the Email, Organization or Billing APIs. We welcome pull requests to implement more functionality!

Installation

make
mkdir -p ~/.terraform.d/plugins/
install -m 644 terraform-provider-gandi ~/.terraform.d/plugins/

Once installed, run terraform init to enable the Gandi plugin in your terraform environment.

See the Hashicorp Terraform documentation for further details.

Example

This example partly mimics the steps of the official LiveDNS documentation example, using the parts that have been implemented as Terraform resources. Note: sharing_id is optional. It is used e.g. when the API key is registered to a user, where the domain you want to manage is not registered with that user (but the user does have rights on that zone/organization).

provider "gandi" {
  key = "<the API key>"
  sharing_id = "<the sharing_id>"
}

resource "gandi_domain" "example_com" {
  name = "example.com"
  nameservers = gandi_livedns_domain.example_com.nameservers
}

resource "gandi_livedns_domain" "example_com" {
  name = "example.com"
}

resource "gandi_livedns_record" "www_example_com" {
  zone = "${gandi_livedns_domain.example_com.id}"
  name = "www"
  type = "A"
  ttl = 3600
  values = [
    "192.168.0.1"
  ]
}

This example sums up the available resources.

Zone data source

If your zone already exists (which is very likely), you may use it as a data source:

provider "gandi" {
  key = "<the API key>"
  sharing_id = "<the sharing_id>"
}

data "gandi_domain" "example_com" {
  name = "example.com"
}

resource "gandi_livedns_record" "www" {
  zone = "${data.gandi_domain.example_com.id}"
  name = "www"
  type = "A"
  ttl = 3600
  values = [
    "192.168.0.1"
  ]
}

Licensing

This provider is distributed under the terms of the Mozilla Public License version 2.0. See the LICENSE file.

Its main author is not affiliated in any way with Gandi - apart from being a happy customer of their services.

terraform-provider-gandi's People

Contributors

thommay avatar tiramiseb avatar nlamirault avatar lttmtins avatar claudusd avatar duemir avatar trendels avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.