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 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 HCP Terraform 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 | >=5.72.0 |
random | >=3.4.0 |
tfe | >=0.38.0 |
Name | Version |
---|---|
aws | >=5.72.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 |