Giter Site home page Giter Site logo

terraform-provider-dnd5e's Introduction

Terraform Provider DND5e

This repository is a Terraform provider for Dungeons & Dragons 5th Edition. It is a terrible idea.

Requirements

Installation

terraform {
  required_providers {
    dnd5e = {
      source = "alisdair/dnd5e"
      version = "0.0.1"
    }
  }
}

Using the provider

resource "dnd5e_character" "julia" {
  name              = "Julia Axereaver"
  class             = "druid"
  alignment         = "lawful good"
  experience_points = 14900
  strength          = 13
  dexterity         = 9
  constitution      = 12
  intelligence      = 19
  wisdom            = 17
  charisma          = 10
}

resource "dnd5e_roll" "damage" {
  number = 3
  sides = 6
  modifier = dnd5e_character.julia.strength_modifier
}

output "level" {
  value = dnd5e_character.julia.level
}

output "damage" {
  value = "${join(" + ", dnd5e_roll.damage.values)} + ${dnd5e_roll.damage.modifier} = ${dnd5e_roll.damage.total}"
}

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).

To compile the provider, run go build. You can use it locally by copying the provider to your global plugin cache directory:

$ mkdir -p ~/.terraform.d/plugins/registry.terraform.io/alisdair/dnd5e/0.0.1/darwin_amd64
$ cp terraform-provider-dnd5e ~/.terraform.d/plugins/registry.terraform.io/alisdair/dnd5e/0.0.1/darwin_amd64/terraform-provider-dnd5e_v0.0.1

Change darwin_amd64 to the appropriate OS/arch for your system.

terraform-provider-dnd5e's People

Contributors

alisdair avatar

Watchers

 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.