Giter VIP home page Giter VIP logo

terraform-tfe-workspace's Introduction

terraform-tfe-workspace

Configures a Terraform Cloud workspace and variables

Example

resource "random_pet" "project" {}

resource "tfe_organization" "org" {
  name  = "test-${random_pet.project.id}"
  email = "[email protected]"
}

resource "tfe_oauth_client" "github" {
  organization     = tfe_organization.org.name
  api_url          = "https://api.github.com"
  http_url         = "https://github.com"
  oauth_token      = var.github_pat
  service_provider = "github"
}

module "test_ws" {
  source = "../../"

  name                = "ws-test"
  oauth_token_id      = tfe_oauth_client.github.oauth_token_id
  organization_name   = tfe_organization.org.name
  repository_id       = "jamesrcounts/terraform-tfe-workspace"
  terraform_directory = "examples/default"

  environment = {
    MY_SECRET = {
      description = "This is a big secret"
      sensitive   = true
      value       = "I<3U"
    }
  }

  variables = {
    MY_PAT = {
      description = "Secret token"
      sensitive   = true
      value       = "t0pS3cret"
    }
  }
}

Required Inputs

The following input variables are required:

name

Description: (Required) The workspace name.

Type: string

oauth_token_id

Description: (Required) The token used to access the VCS provider.

Type: string

organization_name

Description: (Required) The organization to create the workspace in.

Type: string

repository_id

Description: (Required) The repository containing Terraform configuration for this workspace.

Type: string

Optional Inputs

The following input variables are optional (have default values):

environment

Description: (Optional) Map of environment variables to create in the workspace.

Type:

map(object({
    description = string
    sensitive   = bool
    value       = string
  }))

Default: {}

terraform_directory

Description: (Optional) The directory that Terraform will execute within.

Type: string

Default: ""

variables

Description: (Optional) Map of terraform variables to create in the workspace.

Type:

map(object({
    description = string
    sensitive   = bool
    value       = string
  }))

Default: {}

Outputs

The following outputs are exported:

id

Description: The workspace id.

name

Description: The workspace name.

terraform-tfe-workspace's People

Contributors

jamesrcounts 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.