Skip to content

Latest commit

 

History

History
94 lines (66 loc) · 2.86 KB

File metadata and controls

94 lines (66 loc) · 2.86 KB

Usage Example

First step is to deploy the module into dedicated HCP Terraform workspace. The output runtask_id is used on other HCP Terraform 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 HCP Terraform org name.
        organization = "<enter your org name here>"
        workspaces {
          ...
        }
      }
      ...
    }
  • Initialize HCP Terraform. When prompted, enter a new workspace name, i.e. aws-ia2-infra

    terraform init
  • Configure the new workspace (i.e aws-ia2-infra) in HCP Terraform 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 HCP Terraform 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 >=5.72.0
random >=3.4.0
tfe >=0.38.0

Providers

Name Version
aws >=5.72.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