Deleting a broker
Note
The broker is at the Preview stage.
To access a broker, use its unique ID or name. For information on retrieving the unique broker ID or name, see Getting information about a broker.
- In the management console
, select the folder to delete the broker from. - Select IoT Core.
- In the left-hand panel, select Brokers.
- To the right of the name of the broker you want to delete, click the
icon and select Delete from the drop-down list. - In the window that opens, click Delete.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
Delete a broker:
yc iot broker delete my-broker
-
Make sure the broker was deleted:
yc iot broker list
Result:
+----+------+ | ID | NAME | +----+------+ +----+------+
Terraform
For more information about the provider resources, see the documentation on the Terraform
If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.
If you don't have Terraform, install it and configure the Yandex Cloud provider.
To delete a broker created using Terraform:
-
Open the Terraform configuration file and delete the fragment with the broker description.
Example broker description in the Terraform configuration:
resource "yandex_iot_core_broker" "my_broker" { name = "test-broker" description = "test broker for terraform provider documentation" } ... }
For more information about the
yandex_iot_core_broker
resource parameters in Terraform, see the provider documentation . -
In the command line, change to the folder where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validate
If the configuration is correct, you will get this message:
Success! The configuration is valid.
-
Run this command:
terraform plan
The terminal will display a list of resources with parameters. No changes will be made at this step. If the configuration contains any errors, Terraform will point them out.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
in the terminal and press Enter.You can check the update using the management console
or this CLI command:yc iot broker list
To delete a broker, use the delete REST API method for the Broker resource or the BrokerService/Delete gRPC API call.