diff --git a/README.md b/README.md index 72d15c0..b07bd42 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,14 @@ # Elastio Stack -This repository contains necessary code to deploy the resources of elastio scanning solution in your cloud account (currently only AWS is supported). +This repository contains necessary IaC code to deploy the resources of elastio scanning solution in your cloud account. + +## Configure the Elastio Terraform Modules Registry + +Elastio terraform modules are published to the public Cloudsmith registry. In order to use them from that registry add this to your [`.terraformrc`](https://developer.hashicorp.com/terraform/cli/config/config-file), which should reside in your home directory (if you are on Linux): + + +```hcl +credentials "terraform.cloudsmith.io" { + token = "elastio/public/" +} +``` diff --git a/asset-account/terraform/stack-set/README.md b/asset-account/terraform/stack-set/README.md index d1a38ae..0383280 100644 --- a/asset-account/terraform/stack-set/README.md +++ b/asset-account/terraform/stack-set/README.md @@ -5,5 +5,19 @@ See [this README](../..) for more details on what this stack does. This is a Terraform module, that is a thin wrapper on top of an [`aws_cloudformation_stack_set`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack_set) and [`aws_cloudformation_stack_instances`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack_instances) resources used to deploy the Elastio Asset Account stack. See the `examples` directory for some examples of how this module can be used: + - `self-managed` - deploy the stack set using the [self-managed permission model](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-getting-started-create-self-managed.html) - `service-managed` - deploy the stack set using the [service-managed permission model](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-associate-stackset-with-org.html) + +## Installation + +[Configure](../../../README.md#configuring-the-terraform-modules-registry) the Elastio terraform module registry, and add this to your project: + +```tf +module "elastio_asset_account" { + source = "terraform.cloudsmith.io/public/elastio-asset-account-stack-set/aws" + version = "0.33.0" + + // Provide input parameters +} +``` diff --git a/asset-account/terraform/stack-set/examples/self-managed/admin.tf b/asset-account/terraform/stack-set/examples/self-managed/admin.tf index c9c821e..fde1c27 100644 --- a/asset-account/terraform/stack-set/examples/self-managed/admin.tf +++ b/asset-account/terraform/stack-set/examples/self-managed/admin.tf @@ -1,6 +1,6 @@ -module "elastio_asset_accounts" { - # Use the link from the real terraform registry here. Relative path is used for testing purposes. +module "elastio_asset_account" { source = "../../" + providers = { aws = aws.admin } diff --git a/asset-account/terraform/stack-set/examples/service-managed/main.tf b/asset-account/terraform/stack-set/examples/service-managed/main.tf index 9d85a5e..102149f 100644 --- a/asset-account/terraform/stack-set/examples/service-managed/main.tf +++ b/asset-account/terraform/stack-set/examples/service-managed/main.tf @@ -1,5 +1,4 @@ -module "elastio_asset_accounts" { - # Use the link from the real terraform registry here. Relative path is used for testing purposes. +module "elastio_asset_account" { source = "../../" template_url = var.template_url