Skip to content

spsinghc/terraform-provider-tasklite

Repository files navigation

Terraform TaskLite Provider

Prerequisites

Building The Provider

  • Clone the repository
  • Enter the repository directory
  • Build the provider using the Go install command:
go install

Using the provider

To use the provider, follow the steps below:

  1. Update .terraformrc file to use dev_overrides. If the file .terraformrc doesn't exist in the home directory ~, create one, then add the following code. Change <PATH> to the value returned from the go env GOBIN command above.
provider_installation {
  dev_overrides {
      "registry.terraform.io/providers/tasklite" = "<PATH>"
  }
  # For all other providers, install them directly from their origin provider
  # registries as normal. If you omit this, Terraform will _only_ use
  # the dev_overrides block, and so no other providers will be available.
  direct {}
}
  1. Initialize the provider in your Terraform configuration:
terraform {
  required_providers {
    tasklite = {
      source = "registry.terraform.io/providers/tasklite"
    }
  }
}

provider "tasklite" {
  host = "<HOST>" # replace it with TechChallengeApp api url
}
  1. Define resources using the provider:
resource "tasklite_task" "example" {
    title = "Task title"
}
  1. Initialize Terraform and apply the configuration:
    terraform plan # to check plan
    terraform apply # to apply changes
go install

Check the docs directory for more information on the provider.

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 install. This will build the provider and put the provider binary in the $GOPATH/bin directory.

To generate or update documentation, run make generate.

Tests

  • Use make test to run api client unit tests.
  • Use make testacc to run API client unit tests as well as acceptance tests. Don't forget to update API server url in the task_resource_test.go file if it's other than http:/127.0.0.1:3000

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •