Skip to content

Instantly share code, notes, and snippets.

@dixneuf19
Created July 29, 2020 20:56
Show Gist options
  • Select an option

  • Save dixneuf19/e5c75760affd5f55412a6f13a524bc19 to your computer and use it in GitHub Desktop.

Select an option

Save dixneuf19/e5c75760affd5f55412a6f13a524bc19 to your computer and use it in GitHub Desktop.

Revisions

  1. dixneuf19 created this gist Jul 29, 2020.
    13 changes: 13 additions & 0 deletions do-remote-state.tf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    # main.tf
    # Remote state
    terraform {
    backend "s3" {
    endpoint = "ams3.digitaloceanspaces.com/" # specify the correct DO region
    region = "us-west-1" # not used since it's a DigitalOcean spaces bucket
    key = "terraform.tfstate"
    bucket = "kube-terraform-state" # The name of your Spaces

    skip_credentials_validation = true
    skip_metadata_api_check = true
    }
    }