Pulumi & Google Cloud: Destroy stack
Now that you’ve seen how to deploy changes to our program, let’s clean up and tear down the resources that are part of your stack.
To destroy resources, run the following:
$ pulumi destroy
You’ll be prompted to make sure you really want to delete these resources. This can take a minute or two; Pulumi waits until all resources are shut down and deleted before it considers the destroy operation complete.
Previewing destroy (dev): - pulumi:pulumi:Stack quickstart-dev delete - ├─ gcp:storage:BucketIAMBinding my-bucket-IAMBinding delete - ├─ gcp:storage:BucketObject index.html delete - └─ gcp:storage:Bucket my-bucket delete Outputs: - bucketEndpoint: "http://storage.googleapis.com/my-bucket-0167228/index.html-50b2ce9" - bucketName : "gs://my-bucket-0167228" Resources: - 4 to delete Do you want to perform this destroy? yes Destroying (dev): - pulumi:pulumi:Stack quickstart-dev deleted - ├─ gcp:storage:BucketIAMBinding my-bucket-IAMBinding deleted - ├─ gcp:storage:BucketObject index.html deleted - └─ gcp:storage:Bucket my-bucket deleted Outputs: - bucketEndpoint: "http://storage.googleapis.com/my-bucket-0167228/index.html-50b2ce9" - bucketName : "gs://my-bucket-0167228" Resources: - 4 deleted Duration: 7s
To delete the stack itself, run
pulumi stack rm. Note that this removes the stack entirely from the Pulumi Cloud, along with all of its update history.
Congratulations! You’ve successfully provisioned some cloud resources using Pulumi. By completing this guide you have successfully:
- Created a Pulumi new project.
- Provisioned a new storage bucket.
- Added an
index.htmlfile to your bucket.
- Served the
index.htmlas a static website.
- Destroyed the resources you’ve provisioned.
On the next page, we have a collection of examples and tutorials that you can deploy as they are or use them as a foundation for your own applications and infrastructure projects.
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.