Initialize Pluralith in the current working directory and generate a config file (pluralith.yml) for CI.
pluralith init [flags]
pluralith init command initializes Pluralith in your current working directory and creates a config file (
pluralith init at the level you usually run your Terraform commands on and follow the wizard to create a valid
pluralith.yml. Alternatively you can generate an empty config file by running
pluralith init --empty and populate it yourself.
pluralith init --api-key $PLURALITH_API_KEY --org-id $PLURALITH_ORG_ID --project-id $PLURALITH_PROJECT_ID --project-name $PLURALITH_PROJECT_NAME
pluralith run plan --show-changes --show-costs --show-drift
Where To Find Things
org-idcan also be found in the Pluralith dashboard (by clicking on your org name in the right upper corner and then on 'Organisation Settings').
project-idcan also be found in the Pluralith dashboard (by opening a project and clicking on settings in the left menu). You can also pass your own
project-idhere, if Pluralith detects that no project with this
project-idexists it will create a new one. The
project-idcan only consist of lowercase letter, numbers and dashes (-).
project-nameis only necessary when you pass a
project-idthat doesn't exist yet. In that case the
project-namewill be used for project creation. The
project-nameis what will be shown in your project grid in the Pluralith dashboard.
How To Pass Things To Init
There are a few options to pass configuration to the
init command. In the list below they are ordered by how the CLI prioritizes them (meaning 3. will override 2., 2. will override 1.)
- Environment Variables: Set the following variables and the CLI will pick them up automatically.
Config File: Run
pluralith initlocally in the root directory of your Terraform project, follow the wizard and commit the resulting pluralith.yml to your repo.
Flags: Pass the necessary parameters to initialize a project via flags. All availabe flags are listed blow.
|Your Pluralith API key. Pass via flag to skip user prompt.|
|Your Org Id (Can be found in your Pluralith dashboard). Pass via flag to skip user prompt and override pluralith.yml|
|Your Project Id (If no project with passed Id exists, one gets created). Pass via flag to skip user prompt and override pluralith.yml|
|Your Project name. Pass via flag to skip user prompt and override pluralith.yml|
|Creates an empty |