HUB
Sign inSign up

projectnebula/terraform

By projectnebula

•Updated over 6 years ago

The Terraform task runs Terraform `apply`.

Image
0

50K+

projectnebula/terraform repository overview

⁠Hashicorp Terraform

This Terraform step container runs Terraform apply.

Use the following specifications:

⁠Specifications

SettingChild settingData typeDescriptionDefaultRequired
providerstringThe cloud provider to use. Currently "aws" or "gcp".gcpFalse
credentialsmappingA map of platform credentials.NoneTrue
credentials.jsonmappingThe GCP service account file contents. Pass the contents to Nebula as a secret. See the example below.NoneTrue for gcp
credentialsmappingThe AWS shared account file contents. Pass the file contents into Nebula as a secret. See the example below.NoneTrue for aws
backendConfigmappingA map of configuration to pass to the terraform backend as -backend-config options.NoneFalse
varsmappingA map of variables that are interpolated into the terraform configuration files.NoneFalse
workspacestringA name for the Terraform workspace to use.defaultFalse
directorystringThe directory in the git repo that contains your Terraform modules and resources.defaultFalse
gitmappingA map of git configuration. If you're using HTTPS, only name and repository are required.NoneFalse
ssh_keystringThe SSH key to use when cloning the git repository. You can pass the key into Nebula as a secret. See the example below.NoneTrue
known_hostsstringSSH known hosts file. Pass the contents of the file into Nebula as a secret. See the example below.NoneTrue
namestringA directory name for the git clone.NoneTrue
branchstringThe Git branch to clone.masterFalse
repositorystringThe git repository URL.NoneTrue

Note: The value you set for a secret must be a string. If you have multiple key-value pairs to pass into the secret, or your secret is the contents of a file, you must encode the values using base64 encoding, and use the encoded string as the secret value.

⁠Outputs

All outputs you specify in your Terraform workspace are mapped to Nebula outputs as 1:1 key-value pairs.

⁠Examples

Here is an example of the step in a Nebula workflow:

steps:

...

- name: terraform
  image: projectnebula/terraform:latest
  spec:
    provider: gcp
    credentials:
      credentials.json: 
        $type: Secret
        name: credentials
    workspace: my_workspace
    directory: infra/app    
    git: 
      ssh_key:
        $type: Secret
        name: ssh_key
      known_hosts:
        $type: Secret
        name: known_hosts
      name: my-git-repo
      branch: dev
      repository: path/to/your/repo
Tag summary
Recent tags
Content type
Image
Digest
Size
38.8 MB
Last updated
over 6 years ago
docker pull projectnebula/terraform:latest