You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 0-bootstrap/README-GitHub.md
+43-19Lines changed: 43 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -215,7 +215,7 @@ export the GitHub fine grained access token as an environment variable:
215
215
terraform apply bootstrap.tfplan
216
216
```
217
217
218
-
1. Run `terraform output` to get the email address of the terraform service accounts that will be used to run manual steps for `shared` environments in steps `3-networks-dual-svpc`, `3-networks-hub-and-spoke`, and `4-projects`.
218
+
1. Run `terraform output` to get the email address of the terraform service accounts that will be used to run manual steps for `shared` environments in steps `3-networks-svpc`, `3-networks-hub-and-spoke`, and `4-projects`.
@@ -508,7 +508,7 @@ See any of the envs folder [README.md](../2-environments/envs/production/README.
508
508
1. Review merge output in GitHub https://github.com/GITHUB-OWNER/GITHUB-ENVIRONMENTS-REPO/actions under `tf-apply`.
509
509
510
510
1. You can now move to the instructions in the network stage.
511
-
To use the [Dual Shared VPC](https://cloud.google.com/architecture/security-foundations/networking#vpcsharedvpc-id7-1-shared-vpc-) network mode go to [Deploying step 3-networks-dual-svpc](#deploying-step-3-networks-dual-svpc),
511
+
To use the [Shared VPC](https://cloud.google.com/architecture/security-foundations/networking#vpcsharedvpc-id7-1-shared-vpc-) network mode go to [Deploying step 3-networks-svpc](#deploying-step-3-networks-svpc),
512
512
or go to [Deploying step 3-networks-hub-and-spoke](#deploying-step-3-networks-hub-and-spoke) to use the [Hub and Spoke](https://cloud.google.com/architecture/security-foundations/networking#hub-and-spoke) network mode.
513
513
514
514
1. Before moving to the next step, go back to the parent directory.
@@ -517,9 +517,9 @@ or go to [Deploying step 3-networks-hub-and-spoke](#deploying-step-3-networks-hu
517
517
cd ..
518
518
```
519
519
520
-
## Deploying step 3-networks-dual-svpc
520
+
## Deploying step 3-networks-svpc
521
521
522
-
1. Clone the repository you created to host the `3-networks-dual-svpc` terraform configuration at the same level of the `terraform-example-foundation` folder.
522
+
1. Clone the repository you created to host the `3-networks-svpc` terraform configuration at the same level of the `terraform-example-foundation` folder.
@@ -587,8 +587,8 @@ or go to [Deploying step 3-networks-hub-and-spoke](#deploying-step-3-networks-hu
587
587
```
588
588
589
589
1. Update `common.auto.tfvars` file with values from your GCP environment.
590
-
See any of the envs folder [README.md](../3-networks-dual-svpc/envs/production/README.md#inputs) files for additional information on the values in the `common.auto.tfvars` file.
591
-
1. You must add your user email in the variable `perimeter_additional_members` to be able to see the resources created in the restricted project.
590
+
See any of the envs folder [README.md](../3-networks-svpc/envs/production/README.md#inputs) files for additional information on the values in the `common.auto.tfvars` file.
591
+
1. You must add your user email in the variable `perimeter_additional_members` to be able to see the resources created in the project.
592
592
1. Update the `remote_state_bucket` variable with the backend bucket from step Bootstrap in the `common.auto.tfvars` file.
593
593
594
594
```bash
@@ -643,24 +643,48 @@ An environment variable `GOOGLE_IMPERSONATE_SERVICE_ACCOUNT` will be set with th
643
643
./tf-wrapper.sh apply shared
644
644
```
645
645
646
-
1. Push your plan branch.
646
+
1. You must manually plan and apply the `production` environment since the `development`, `nonproduction` and `plan` environments depend on it.
647
647
648
648
```bash
649
-
git push --set-upstream origin plan
649
+
git checkout production
650
+
git merge plan
650
651
```
651
652
652
-
1. Open a pull request in GitHub https://github.com/GITHUB-OWNER/GITHUB-NETWORKS-REPO/pull/new/plan from the `plan` branch to the `production` branch and review the output.
653
+
1. Run `init` and `plan` and review output for environment production.
653
654
654
-
> NOTE: Development and Non-production branches depends on the production branch to be deployed first, for the `3-networks-dual-svpc`.
655
+
```bash
656
+
./tf-wrapper.sh init production
657
+
./tf-wrapper.sh plan production
658
+
```
655
659
656
-
1. The Pull request will trigger a GitHub Action that will run Terraform `init`/`plan`/`validate` in the `production` environment.
657
-
1. Review the GitHub Action output in GitHub https://github.com/GITHUB-OWNER/GITHUB-NETWORKS-REPO/actions under `tf-pull-request`.
658
-
1. If the GitHub action is successful, merge the pull request in to the `production` branch.
659
-
1. The merge will trigger a GitHub Action that will apply the terraform configuration for the `production` environment.
660
-
1. Review merge output in GitHub https://github.com/GITHUB-OWNER/GITHUB-NETWORKS-REPO/actions under `tf-apply`.
661
-
1. If the GitHub action is successful, apply the next environment.
660
+
1. Run `apply` production.
662
661
663
-
1. Open a pull request in GitHub https://github.com/GITHUB-OWNER/GITHUB-NETWORKS-REPO/pull/new/plan from the `plan` branch to the `development` branch and review the output.
662
+
```bash
663
+
./tf-wrapper.sh apply production
664
+
```
665
+
666
+
1. Push your production branch since development and nonproduction depends it.
667
+
668
+
*Note:** The Production envrionment must be the first branch to be pushed as it includes the DNS Hub communication that will be used by other environments.
1. Open a merge request in GitLab https://gitlab.com/GITLAB-OWNER/GITLAB-NETWORKS-REPO/-/merge_requests?scope=all&state=opened from the `production` branch to the `plan` branch and review the output.
677
+
678
+
> NOTE: Development and Non-production branches depends on the production branch to be deployed first, for the `3-networks-dual-svpc`.
679
+
680
+
1. Push your plan branch.
681
+
682
+
```bash
683
+
git checkout plan --set-upstream origin plan
684
+
git push
685
+
```
686
+
687
+
1. Open a pull request in GitHub https://github.com/GITHUB-OWNER/GITHUB-NETWORKS-REPO/pull/new/plan from the `production` branch to the `development` branch and review the output.
664
688
1. The Pull request will trigger a GitHub Action that will run Terraform `init`/`plan`/`validate` in the `development` environment.
665
689
1. Review the GitHub Action output in GitHub https://github.com/GITHUB-OWNER/GITHUB-NETWORKS-REPO/actions under `tf-pull-request`.
666
690
1. If the GitHub action is successful, merge the pull request in to the `development` branch.
@@ -748,7 +772,7 @@ An environment variable `GOOGLE_IMPERSONATE_SERVICE_ACCOUNT` will be set with th
748
772
749
773
1. Update `common.auto.tfvars` file with values from your GCP environment.
750
774
See any of the envs folder [README.md](../3-networks-hub-and-spoke/envs/production/README.md#inputs) files for additional information on the values in the `common.auto.tfvars` file.
751
-
1. You must add your user email in the variable `perimeter_additional_members` to be able to see the resources created in the restricted project.
775
+
1. You must add your user email in the variable `perimeter_additional_members` to be able to see the resources created in the project.
752
776
1. Update the `remote_state_bucket` variable with the backend bucket from step Bootstrap in the `common.auto.tfvars` file.
Copy file name to clipboardExpand all lines: 0-bootstrap/README-GitLab.md
+43-19Lines changed: 43 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,7 +184,7 @@ Run the `0-bootstrap/scripts/git_create_branches_helper.sh` script to create the
184
184
185
185
1. Go to https://gitlab.com/GITLAB-OWNER/GITLAB-RUNNER-REPO/-/settings/ci_cd#js-token-access
186
186
1. Add all the repositories: Bootstrap, Organization, Environments, Networks, and Projects to the allow list tha allow access to the CI/CD runner image.
187
-
1. In "Allow CI job tokens from the following projects to access this project" add the other projects/repositories. Format is <GITLAB-OWNER>/<GITLAB-REPO>
187
+
1. In "Allow CI job tokens from the following projects to access this project" add the other projects/repositories. Format is `<GITLAB-OWNER>/<GITLAB-REPO>`
188
188
189
189
### Deploying step 0-bootstrap
190
190
@@ -283,7 +283,7 @@ export the GitLab personal or group access token as an environment variable:
283
283
terraform apply bootstrap.tfplan
284
284
```
285
285
286
-
1. Run `terraform output` to get the email address of the terraform service accounts that will be used to run manual steps for `shared` environments in steps `3-networks-dual-svpc`, `3-networks-hub-and-spoke`, and `4-projects`.
286
+
1. Run `terraform output` to get the email address of the terraform service accounts that will be used to run manual steps for `shared` environments in steps `3-networks-svpc`, `3-networks-hub-and-spoke`, and `4-projects`.
@@ -539,10 +539,10 @@ See any of the envs folder [README.md](../2-environments/envs/production/README.
539
539
```
540
540
541
541
1. You can now move to the instructions in the network stage.
542
-
To use the [Dual Shared VPC](https://cloud.google.com/architecture/security-foundations/networking#vpcsharedvpc-id7-1-shared-vpc-) network mode go to [Deploying step 3-networks-dual-svpc](#deploying-step-3-networks-dual-svpc),
542
+
To use the [Dual Shared VPC](https://cloud.google.com/architecture/security-foundations/networking#vpcsharedvpc-id7-1-shared-vpc-) network mode go to [Deploying step 3-networks-svpc](#deploying-step-3-networks-svpc),
543
543
or go to [Deploying step 3-networks-hub-and-spoke](#deploying-step-3-networks-hub-and-spoke) to use the [Hub and Spoke](https://cloud.google.com/architecture/security-foundations/networking#hub-and-spoke) network mode.
544
544
545
-
## Deploying step 3-networks-dual-svpc
545
+
## Deploying step 3-networks-svpc
546
546
547
547
1. Navigate into the repo. All subsequent steps assume you are running them from the `gcp-networks` directory.
548
548
If you run them from another directory, adjust your copy paths accordingly.
@@ -560,7 +560,7 @@ or go to [Deploying step 3-networks-hub-and-spoke](#deploying-step-3-networks-hu
@@ -590,8 +590,8 @@ or go to [Deploying step 3-networks-hub-and-spoke](#deploying-step-3-networks-hu
590
590
```
591
591
592
592
1. Update `common.auto.tfvars` file with values from your GCP environment.
593
-
See any of the envs folder [README.md](../3-networks-dual-svpc/envs/production/README.md#inputs) files for additional information on the values in the `common.auto.tfvars` file.
594
-
1. You must add your user email in the variable `perimeter_additional_members` to be able to see the resources created in the restricted project.
593
+
See any of the envs folder [README.md](../3-networks-svpc/envs/production/README.md#inputs) files for additional information on the values in the `common.auto.tfvars` file.
594
+
1. You must add your user email in the variable `perimeter_additional_members` to be able to see the resources created in the project.
595
595
1. Update the `remote_state_bucket` variable with the backend bucket from step Bootstrap in the `common.auto.tfvars` file.
596
596
597
597
```bash
@@ -646,37 +646,61 @@ An environment variable `GOOGLE_IMPERSONATE_SERVICE_ACCOUNT` will be set with th
646
646
./tf-wrapper.sh apply shared
647
647
```
648
648
649
+
1. You must manually plan and apply the `production` environment since the `development`, `nonproduction` and `plan` environments depend on it.
650
+
651
+
```bash
652
+
git checkout production
653
+
git merge plan
654
+
```
655
+
656
+
1. Run `init` and `plan` and review output for environment production.
657
+
658
+
```bash
659
+
./tf-wrapper.sh init production
660
+
./tf-wrapper.sh plan production
661
+
```
662
+
663
+
1. Run `apply` production.
664
+
665
+
```bash
666
+
./tf-wrapper.sh apply production
667
+
```
668
+
669
+
1. Push your production branch since development and nonproduction depends it.
670
+
671
+
*Note:** The Production envrionment must be the first branch to be pushed as it includes the DNS Hub communication that will be used by other environments.
1. Open a merge request in GitLab https://gitlab.com/GITLAB-OWNER/GITLAB-NETWORKS-REPO/-/merge_requests?scope=all&state=opened from the `production` branch to the `plan` branch and review the output.
680
+
649
681
1. Push your plan branch.
650
682
651
683
```bash
684
+
git checkout plan
652
685
git push
653
686
```
654
687
655
-
1. Open a merge request in GitLab https://gitlab.com/GITLAB-OWNER/GITLAB-NETWORKS-REPO/-/merge_requests?scope=all&state=opened from the `plan` branch to the `production` branch and review the output.
688
+
1. Open a merge request in GitLab https://gitlab.com/GITLAB-OWNER/GITLAB-NETWORKS-REPO/-/merge_requests?scope=all&state=opened from the `production` branch to the `development` branch and review the output.
656
689
657
690
> NOTE: Development and Non-production branches depends on the production branch to be deployed first, for the `3-networks-dual-svpc`.
658
691
659
-
1. The merge request will trigger a GitLab pipelines that will run Terraform `init`/`plan`/`validate` in the `production` environment.
660
-
1. Review the GitLab pipelines output in GitLab https://gitlab.com/GITLAB-OWNER/GITLAB-NETWORKS-REPO/-/pipelines.
661
-
1. If the GitLab pipelines is successful, merge the merge request in to the `production` branch.
662
-
1. The merge will trigger a GitLab pipelines that will apply the terraform configuration for the `production` environment.
663
-
1. Review merge output in GitLab https://gitlab.com/GITLAB-OWNER/GITLAB-NETWORKS-REPO/-/pipelines under `tf-apply`.
664
-
665
-
1. Open a merge request in GitLab https://gitlab.com/GITLAB-OWNER/GITLAB-NETWORKS-REPO/-/merge_requests?scope=all&state=opened from the `plan` branch to the `development` branch and review the output.
666
692
1. The merge request will trigger a GitLab pipelines that will run Terraform `init`/`plan`/`validate` in the `development` environment.
667
693
1. Review the GitLab pipelines output in GitLab https://gitlab.com/GITLAB-OWNER/GITLAB-NETWORKS-REPO/-/pipelines.
668
694
1. If the GitLab pipelines is successful, merge the merge request in to the `development` branch.
669
695
1. The merge will trigger a GitLab pipelines that will apply the terraform configuration for the `development` environment.
670
696
1. Review merge output in GitLab https://gitlab.com/GITLAB-OWNER/GITLAB-NETWORKS-REPO/-/pipelines under `tf-apply`.
671
-
1. If the GitLab pipelines is successful, apply the next environment.
672
697
673
-
1. Open a merge request in GitLab https://gitlab.com/GITLAB-OWNER/GITLAB-NETWORKS-REPO/-/merge_requests?scope=all&state=opened from the `development` branch to the `nonproduction` branch and review the output.
698
+
1. Open a merge request in GitLab https://gitlab.com/GITLAB-OWNER/GITLAB-NETWORKS-REPO/-/merge_requests?scope=all&state=opened from the `production` branch to the `nonproduction` branch and review the output.
674
699
1. The merge request will trigger a GitLab pipelines that will run Terraform `init`/`plan`/`validate` in the `nonproduction` environment.
675
700
1. Review the GitLab pipelines output in GitLab https://gitlab.com/GITLAB-OWNER/GITLAB-NETWORKS-REPO/-/pipelines.
676
701
1. If the GitLab pipelines is successful, merge the merge request in to the `nonproduction` branch.
677
702
1. The merge will trigger a GitLab pipelines that will apply the terraform configuration for the `nonproduction` environment.
678
703
1. Review merge output in GitLab https://gitlab.com/GITLAB-OWNER/GITLAB-NETWORKS-REPO/-/pipelines under `tf-apply`.
679
-
1. If the GitLab pipelines is successful, apply the next environment.
680
704
681
705
1. Before executing the next steps, unset the `GOOGLE_IMPERSONATE_SERVICE_ACCOUNT` environment variable.
682
706
@@ -728,7 +752,7 @@ An environment variable `GOOGLE_IMPERSONATE_SERVICE_ACCOUNT` will be set with th
728
752
729
753
1. Update `common.auto.tfvars` file with values from your GCP environment.
730
754
See any of the envs folder [README.md](../3-networks-hub-and-spoke/envs/production/README.md#inputs) files for additional information on the values in the `common.auto.tfvars` file.
731
-
1. You must add your user email in the variable `perimeter_additional_members` to be able to see the resources created in the restricted project.
755
+
1. You must add your user email in the variable `perimeter_additional_members` to be able to see the resources created in the project.
732
756
1. Update the `remote_state_bucket` variable with the backend bucket from step Bootstrap in the `common.auto.tfvars` file.
0 commit comments