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 uselocal
execution mode. Skip this if you publish the module into Terraform registry. -
Configure the AWS credentials (
AWS_ACCESS_KEY_ID
andAWS_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
andTFE_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
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 |
Name | Version |
---|---|
aws | >= 3.73.0, < 5.0.0 |
Name | Source | Version |
---|---|---|
runtask_iam_access_analyzer | ../../ | n/a |
Name | Type |
---|---|
aws_region.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
tfc_org | n/a | string |
n/a | yes |
workspace_prefix | n/a | string |
n/a | yes |
Name | Description |
---|---|
runtask_id | n/a |