Skip to content

Latest commit

 

History

History
91 lines (66 loc) · 2.88 KB

File metadata and controls

91 lines (66 loc) · 2.88 KB

Usage Example

First step is to deploy the module into dedicated Terraform Cloud workspace. The output runtask_id is used on other Terraform Cloud workspace to configure the runtask.

  • Build and package the Lambda files using the makefile. Run this command from the root directory of this repository.

    make all
  • Use the provided module example to deploy the solution.

    cd examples/module_workspace
  • Change the org name to your TFC org.

    terraform {
    
      cloud {
        # TODO: Change this to your Terraform Cloud org name.
        organization = "<enter your org name here>"
        workspaces {
          ...
        }
      }
      ...
    }   
    
  • Initialize Terraform Cloud. When prompted, enter a new workspace name, i.e. aws-ia2-infra

    terraform init
  • Configure the new workspace (i.e aws-ia2-infra) in Terraform Cloud to use local execution mode. Skip this if you publish the module into Terraform registry.

  • Configure the AWS credentials (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) by using environment variables.

  • In order to create and configure the run tasks, you also need to have Terraform Cloud token stored as Environment Variables. Add TFE_HOSTNAME and TFE_TOKEN environment variable.

  • Run Terraform apply

    terraform apply
  • Use the output value runtask_id when deploying the demo workspace. See example of demo workspace here

Requirements

Name Version
terraform >= 1.0.7
archive ~>2.2.0
aws >= 3.73.0, < 5.0.0
random >=3.4.0
tfe ~>0.38.0

Providers

Name Version
aws >= 3.73.0, < 5.0.0

Modules

Name Source Version
runtask_iam_access_analyzer ../../ n/a

Resources

Name Type
aws_region.current data source

Inputs

Name Description Type Default Required
tfc_org n/a string n/a yes
workspace_prefix n/a string n/a yes

Outputs

Name Description
runtask_id n/a