Skip to content

briancain/terraform-provider-diceroll

Repository files navigation

terraform-provider-diceroll

release

An example provider that rolls x,y die.

terraform {
  required_providers {
    diceroll = {
      source  = "briancain/diceroll"
      version = ">=0.1.10"
    }
  }
}

resource "diceroll_roll" "yahtzee" {
  quantity = 6
  sides = 6
  seed = "yahtzee!"
}

output "yahtzee_roll" {
  value = diceroll_roll.yahtzee
}

Example Module

  • terraform-diceroll-dnd is an example Terraform module that uses this provider to roll die.
  • terraform-dnd-campaign is a Terraform module used with no-code provisioning to create a random D&D campaign static site on GitHub Pages.

Development

A Makefile has been provided for building and installing this terraform provider.o

Run the following command to build the provider:

make build

It will build the provider binary and drop it in your local directory.

If you wish to install the provider, and try out one of the examples, you'll want to install it locally:

make install

Then you will be able to navigate to the example folder and test out a terraform configuration for this provider.