Code Monkey home page Code Monkey logo

terraform-provider-concourse's Introduction

terraform-provider-concourse

What

A terraform provider for concourse

Why

fly is an amazing tool, but configuration using scripts running fly is not ideal.

Prerequisites

Install go, and terraform.

How to install and use

make install

How to build and test for development

make
make integration-tests

Example terraform

Create a provider (using target from fly)

provider "concourse" {
  target = "target_name"
}

Create a provider (using a local username and password)

Note: this is not basic authentication

provider "concourse" {
  url  = "https://wings.pivotal.io"
  team = "main"

  username = "localuser"
  password = "very-secure-password"
}

Look up all teams

data "concourse_teams" "teams" {
}

output "team_names" {
  value = data.concourse_teams.teams.names
}

Look up a team

data "concourse_team" "my_team" {
  team_name = "main"
}

output "my_team_name" {
  value = data.concourse_team.my_team.team_name
}

output "my_team_owners" {
  value = data.concourse_team.my_team.owners
}

output "my_team_members" {
  value = data.concourse_team.my_team.members
}

output "my_team_pipeline_operators" {
  value = data.concourse_team.my_team.pipeline_operators
}

output "my_team_viewers" {
  value = data.concourse_team.my_team.viewers
}

Look up a pipeline

data "concourse_pipeline" "my_pipeline" {
  team_name     = "main"
  pipeline_name = "pipeline"
}

output "my_pipeline_team_name" {
  value = data.concourse_pipeline.my_pipeline.team_name
}

output "my_pipeline_pipeline_name" {
  value = data.concourse_pipeline.my_pipeline.pipeline_name
}

output "my_pipeline_is_exposed" {
  value = data.concourse_pipeline.my_pipeline.is_exposed
}

output "my_pipeline_is_paused" {
  value = data.concourse_pipeline.my_pipeline.is_paused
}

output "my_pipeline_json" {
  value = data.concourse_pipeline.my_pipeline.json
}

output "my_pipeline_yaml" {
  value = data.concourse_pipeline.my_pipeline.yaml
}

Create a team

Supports owners, members, pipeline_operators, and viewers.

Specify users and groups by prefixing the strings:

  • user:
  • group:
resource "concourse_team" "my_team" {
  team_name = "my-team"

  owners = [
    "group:github:org-name",
    "group:github:org-name:team-name",
    "user:github:tlwr",
  ]

  viewers = [
    "user:github:samrees"
  ]
}

Create a pipeline

resource "concourse_pipeline" "my_pipeline" {
  team_name     = "main"
  pipeline_name = "my-pipeline"

  is_exposed = true
  is_paused  = true

  pipeline_config        = file("pipeline-config.yml")
  pipeline_config_format = "yaml"
}

# OR

resource "concourse_pipeline" "my_pipeline" {
  team_name     = "main"
  pipeline_name = "my-pipeline"

  is_exposed = true
  is_paused  = true

  pipeline_config        = file("pipeline-config.json")
  pipeline_config_format = "json"
}

terraform-provider-concourse's People

Contributors

risicle avatar samrees avatar isaacsanders avatar tlwr avatar ap-hunt avatar issyl0 avatar lsjostro avatar blairboy362 avatar evilr00t avatar pd avatar tvon 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.