Skip to content

Prashanna313/gcs-static-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Configuration for Static Website Hosting on Google Cloud Storage

This Terraform configuration allows you to deploy a static website on Google Cloud Storage (GCS).

Prerequisites

Before you begin, make sure you have the following installed/configured:

Setup

  1. Clone this repository:

    git clone https://github.com/Prashanna313/gcs-static-website.git
  2. Navigate to the project directory:

    cd terraform
  3. Initialize Terraform:

    terraform init
  4. Configure your Terraform variables by editing terraform.tfvars:

    project_id = "your-project-id"
    bucket_name     = "your-bucket-name"
  5. Apply the Terraform configuration:

    terraform apply
  6. Follow the prompts to review and confirm the changes.

Configuration

  • main.tf: Defines the resources to be provisioned including Cloud Storage bucket.
  • variables.tf: Declares the input variables used in the Terraform configuration.

Usage

Once the Terraform configuration is applied successfully, your static website will be hosted on GCP Cloud Storage. You can upload your website content to the Cloud Storage bucket and access it using the configured domain name.

Cleanup

To destroy the provisioned resources and clean up the environment, run:

terraform destroy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages