Skip to content

Commit

Permalink
Add Terraform template links in SMT docs (#914)
Browse files Browse the repository at this point in the history
* Add terraform docs

* Add terraform docs

* Add terraform docs

* Add callout

* Add callout
  • Loading branch information
manitgupta authored Oct 15, 2024
1 parent 43ab9cc commit 8485393
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/cli/cli.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: SMT CLI
nav_order: 5
nav_order: 6
has_children: true
permalink: /cli
---
Expand Down
2 changes: 1 addition & 1 deletion docs/data-types/schema.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Data Type Conversion
nav_order: 7
nav_order: 8
has_children: true
permalink: /data-types-conv
---
Expand Down
2 changes: 1 addition & 1 deletion docs/limitations.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Known Limitations
nav_order: 12
nav_order: 13
permalink: /known-limitations
---

Expand Down
2 changes: 1 addition & 1 deletion docs/minimal/minimal.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Minimal downtime migrations
nav_order: 8
nav_order: 9
has_children: true
permalink: /minimal
---
Expand Down
2 changes: 1 addition & 1 deletion docs/monitoring/Monitoring.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Monitoring
nav_order: 13
nav_order: 14
has_children: true
permalink: /monitoring
---
Expand Down
2 changes: 1 addition & 1 deletion docs/permissions.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Permissions and Connectivity
nav_order: 4
nav_order: 5
description: "Permissions and connectivity required to run SMT"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/poc/poc.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: POC migrations
nav_order: 9
nav_order: 10
has_children: true
permalink: /poc
---
Expand Down
2 changes: 1 addition & 1 deletion docs/reports.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: SMT Output(s)
nav_order: 10
nav_order: 11
description: "Artifacts generated when you run Spanner migration tool"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/reverse-replication/ReverseReplication.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Reverse Replication
nav_order: 13
nav_order: 14
has_children: true
permalink: /reverse-replication
---
Expand Down
47 changes: 47 additions & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
layout: default
title: Terraform Templates
nav_order: 4
description: "Terraform templates to run migrations"
---

# Terraform Templates
{: .d-inline-block }

New
{: .label .label-green }

Dataflow templates now contains a repository that provides samples for common scenarios users might have while trying to run a live migration to Spanner using Terraform based orchestration.

Pick a sample that is closest to your use-case, and use it as a starting point, and tailor it to your own specific needs.

## Terraform repositories

1. [Bulk migration](https://github.com/GoogleCloudPlatform/DataflowTemplates/tree/main/v2/datastream-to-spanner/terraform/samples)
2. [Live migration](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/sourcedb-to-spanner/terraform/samples)
3. [Sample environment setups](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/spanner-common/terraform/samples)

## Commonly used templates & guides

1. [How to run a production migration using a combination of bulk and live migrations](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/spanner-common/docs/END-TO-END-PRODUCTION-MIGRATION.md)
2. [Bulk migration](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/sourcedb-to-spanner/terraform/samples/single-job-bulk-migration/README.md)
3. [Live migration](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/datastream-to-spanner/terraform/samples/mysql-end-to-end/README.md)
4. [Sharded bulk migration](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/sourcedb-to-spanner/terraform/samples/sharded-bulk-migration/README.md)
5. [Sharded live migration using one dataflow job](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/datastream-to-spanner/terraform/samples/mysql-sharded-single-df-job/README.md)
6. [Sharded live migration using multiple dataflow jobs](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/datastream-to-spanner/terraform/samples/mysql-sharded-end-to-end/README.md)

## Sample structure

Each sample contains the following (and potentially more) files:

1. `main.tf` - This contains the Terraform resources which will be created.
2. `outputs.tf` - This declares the outputs that will be output as part of
running the terraform example.
3. `variables.tf` - This declares the input variables that are required to
configure the resources.
4. `terraform.tf` - This contains the required providers and APIs/project
configurations for the sample.
5. `terraform.tfvars` - This contains the dummy inputs that need to be populated
to run the example.
6. `terraform_simple.tfvars` - This contains the minimal list of dummy inputs
that need to be populated to run the example.
2 changes: 1 addition & 1 deletion docs/transformations/CustomTransformation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Custom Transformations
nav_order: 15
nav_order: 16
permalink: /custom-transformation
---

Expand Down
2 changes: 1 addition & 1 deletion docs/troubleshoot/trouble.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Troubleshooting
nav_order: 11
nav_order: 12
has_children: true
permalink: /troubleshooting
---
Expand Down
2 changes: 1 addition & 1 deletion docs/ui/ui.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: SMT UI
nav_order: 6
nav_order: 7
has_children: true
permalink: /ui
---
Expand Down

0 comments on commit 8485393

Please sign in to comment.