Skip to content

coder/terraform-provider-coder

Folders and files

NameName
Last commit message
Last commit date
Feb 16, 2024
Apr 2, 2024
Mar 22, 2024
Apr 3, 2024
Sep 9, 2022
Mar 7, 2022
Mar 7, 2022
Mar 7, 2022
May 24, 2022
Mar 22, 2024
Jan 28, 2024
Jan 28, 2024
Sep 29, 2022
Mar 7, 2022

Repository files navigation

terraform-provider-coder

Terraform provider for Coder.

Developing

Follow the instructions outlined in the Terraform documentation to setup your local Terraform to use your local version rather than the registry version.

  1. Create a file named .terraformrc in your $HOME directory
  2. Add the following content:
     provider_installation {
         # Override the coder/coder provider to use your local version
         dev_overrides {
           "coder/coder" = "/path/to/terraform-provider-coder"
         }
    
         # 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 {}
     }
  3. (optional, but recommended) Validate your configuration:
    1. Create a new main.tf file and include:
    terraform {
        required_providers {
            coder = {
                source = "coder/coder"
            }
        }
    }
    1. Run terraform init and observe a warning like Warning: Provider development overrides are in effect
  4. Run go build -o terraform-provider-coder to build the provider binary, which Terraform will try locate and execute
  5. All local Terraform runs will now use your local provider!
  6. NOTE: we vendor in this provider into github.com/coder/coder, so if you're testing with a local clone then you should also run go mod edit -replace github.com/coder/terraform-provider-coder=/path/to/terraform-provider-coder in your clone.