copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2024-06-13 |
cloud-logs |
{{site.data.keyword.attribute-definition-list}}
{: #instance-remove}
You can remove an {{site.data.keyword.logs_full_notm}} instance by using the {{site.data.keyword.cloud_notm}} UI, by using the command line, or by using a Terraform script. {: shortdesc}
{: #prereq_remove}
Before you remove an {{site.data.keyword.logs_full_notm}} instance from the {{site.data.keyword.cloud_notm}}, clean up resources associated with the instance:
-
Make note of the sources that forwarded logs to the {{site.data.keyword.logs_full_notm}} instance that you removed and, if appropriate, remove the logging agent from each source.
-
Remove permissions that are granted to users to work with the instane being deleted.
If you manage access by using dedicated access groups to work with a specific instance, you must remove these access groups.
If you manage access to multiple logging instances by using access groups, you must remove the policies that grant permissions to the instance you are deleting.
If you grant individual policies to users, you must gather the list of users that had permissions to work with the deleted instance. Then, for each user, you must remove the policies that relate to the instance that you are deleting.
{: #remove_ui} {: ui}
To remove an instance of {{site.data.keyword.logs_full_notm}} by using the {{site.data.keyword.cloud_notm}} UI, complete the following steps:
-
Log in to your {{site.data.keyword.cloud_notm}} account{: external}.
After you log in, the {{site.data.keyword.cloud_notm}} UI opens.
-
Go to the menu icon > Observability to access the Observability Dashboard.
-
Click Logging. The list of logging instances is displayed. You might need to click the Cloud Logs tab to see your {{site.data.keyword.logs_full_notm}} instances.
-
Click the Actions icon next to the instance that you want to delete.
-
Type the name of instance to confirm.
-
Click Delete.
{: #remove_cli} {: cli}
To remove an instance of {{site.data.keyword.logs_full_notm}} through the command line, complete the following steps:
-
[Pre-requisite] Install the {{site.data.keyword.cloud_notm}} CLI.
For more information, see Installing the {{site.data.keyword.cloud_notm}} CLI.
-
Log in to {{site.data.keyword.cloud_notm}}. Run the following command: ibmcloud login
-
Get information about the instance that you plan to delete.
ibmcloud resource service-instance INSTANCE-NAME --output JSON
{: codeblock}
-
Remove any service key associated with the instance.
Find the service keys that are associated with an instance:
ibmcloud resource service-keys --instance-id INSTANCE-GUID
{: codeblock}
Run the following command to delete 1 service key. You must delete all keys associated with the instance to be deleted.
ibmcloud resource service-key-delete SERVICE-KEY-NAME
{: codeblock}
-
Remove the instance. Run the ibmcloud resource service-instance-delete command:
ibmcloud resource service-instance-delete NAME
{: codeblock}
Where NAME is the name of the instance.
For example, to remove the
logging-instance-01
instance, run the following command:ibmcloud resource service-instance-delete logging-instance-01
{: codeblock}
{: #remove_terraform} {: terraform}
See Setting up Terraform for information on removing instances using Terraform.