Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

feat(provider): tenant argument to manage sub-accounts #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Jul 31, 2020

This change is adding a new argument to our provider named tenant,
it is otional and allows Organization Admins to manage multiple
sub-accounts with a single API key. It can also be sourced from the
LW_TENANT environment variable, or via the configuration file if
profile is specified.

Example: having a single API key with Organization Admin priviledges
configured into the local Lacework CLI configuratio file at
~/.lacework.toml:

[default]
  account = "primary-account"
  api_key = "my-org-admin-key"
  api_secret = "my-org-admin-secret"

You can configure the Lacework provider to point to multipel
sub-accounts using this new argument:

provider "lacework" {
  alias = "primary"
}

provider "lacework" {
  alias  = "subaccount1"
  tenant = "subaccount1"
}

provider "lacework" {
  alias  = "subaccount2"
  tenant = "subaccount2"
}

provider "lacework" {
  alias  = "subaccountN"
  tenant = "subaccountN"
}

Depends on lacework/go-sdk#177

Signed-off-by: Salim Afiune Maya afiune@lacework.net

This change is adding a new argument to our provider named `tenant`,
it is otional and allows Organization Admins to manage multiple
sub-accounts with a single API key. It can also be sourced from the
`LW_TENANT` environment variable, or via the configuration file if
`profile` is specified.

Example: having a single API key with Organization Admin priviledges
configured into the local Lacework CLI configuratio file at
`~/.lacework.toml`:
```toml
[default]
  account = "primary-account"
  api_key = "my-org-admin-key"
  api_secret = "my-org-admin-secret"
```

You can configure the Lacework provider to point to multipel
sub-accounts using this new argument:
```hcl
provider "lacework" {
  alias = "primary"
}

provider "lacework" {
  alias  = "subaccount1"
  tenant = "subaccount1"
}

provider "lacework" {
  alias  = "subaccount2"
  tenant = "subaccount2"
}

provider "lacework" {
  alias  = "subaccountN"
  tenant = "subaccountN"
}
```

Depends on lacework/go-sdk#177

Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
@afiune afiune force-pushed the afiune/manage-tenants branch from 3d995d2 to d1a4b71 Compare July 31, 2020 15:46
Copy link
Contributor

@scottford-lw scottford-lw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants