lgc envs
The lgc envs
command manages the environments that describes your organization by associating one or more services to a given environment such as prod
or dev
.
lgc envs add
This command creates a new environment.
For example to create a staging environment, run:
~$ lgc envs add staging
kebab-case
Environment IDs must respect kebab-case convention.
Finally, if you are creating an environment that already exists, you will see this error:
~$ lgc envs add staging
ERROR environment `staging` already exists
~$
lgc envs link
This command attaches a service to an environment.
For example, if the service 'splunk-prod' exists, to link it to the prod environment, run:
~$ lgc envs link prod --service-id splunk-prod
INFO service `splunk-prod` linked to environement `prod`
~$
See also lgc services
lgc envs list
This command lists existing environments.
~$ lgc envs list
`prod`: 1 service(s)
`dev`: 3 service(s)
~$
The name of the environment are returned with the total number of services attached to each environment.
lgc envs remove
This command deletes an environment.
For example to remove the staging environment, run:
~$ lgc envs remove staging
TIP
This will not remove the services that may be linked to the deleted environment.
lgc envs unlink
This command removes a service from an environment, without removing the declaration of the service itself.
~$ lgc envs unlink prod -s splunk-prod
INFO service `splunk-prod` unlinked from environement `prod`
~$
INFO
To remove a service completely, see lgc services remove