Skip to content

Commit

Permalink
Fixes business_unit_2 commands
Browse files Browse the repository at this point in the history
  • Loading branch information
amandakarina committed Aug 16, 2024
1 parent 5f1fd0f commit 8a98d1b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
12 changes: 6 additions & 6 deletions 4-projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,10 @@ For example, to create a new business unit similar to business_unit_1, run the f
# search all files under the folder `business_unit_2` and replace strings for business_unit_1 with strings for business_unit_2
grep -rl bu1 business_unit_2/ | xargs sed -i 's/bu1/bu2/g'
grep -rl business_unit_1 business_unit_2/ | xargs sed -i 's/business_unit_1/business_unit_2/g'
# search subnet_ip_range 10.3.64.0 and replace for the new range 10.4.64.0
grep -rl 10.3.64.0 business_unit_2/ | xargs sed -i 's/10.3.64.0/10.4.64.0/g'
```


1. Commit changes.

```bash
Expand Down Expand Up @@ -187,14 +188,14 @@ For example, to create a new business unit similar to business_unit_1, run the f

1. Push your plan branch to trigger a plan for all environments. Because the
_plan_ branch is not a [named environment branch](../docs/FAQ.md#what-is-a-named-branch)), pushing your _plan_
branch triggers _terraform plan_ but not _terraform apply_. Review the plan output in your Cloud Build project https://console.cloud.google.com/cloud-build/builds;region=DEFAULT_REGION?project=YOUR_CLOUD_BUILD_PROJECT_ID
branch triggers _terraform plan_ but not _terraform apply_. Review the plan output in your Cloud Build project <https://console.cloud.google.com/cloud-build/builds;region=DEFAULT_REGION?project=YOUR_CLOUD_BUILD_PROJECT_ID>

```bash
git push --set-upstream origin plan
```

1. Merge changes to production. Because this is a [named environment branch](../docs/FAQ.md#what-is-a-named-branch),
pushing to this branch triggers both _terraform plan_ and _terraform apply_. Review the apply output in your Cloud Build project. https://console.cloud.google.com/cloud-build/builds;region=DEFAULT_REGION?project=YOUR_CLOUD_BUILD_PROJECT_ID
pushing to this branch triggers both _terraform plan_ and _terraform apply_. Review the apply output in your Cloud Build project. <https://console.cloud.google.com/cloud-build/builds;region=DEFAULT_REGION?project=YOUR_CLOUD_BUILD_PROJECT_ID>

```bash
git checkout -b production
Expand All @@ -203,7 +204,7 @@ For example, to create a new business unit similar to business_unit_1, run the f

1. After production has been applied, apply development.
1. Merge changes to development. Because this is a [named environment branch](../docs/FAQ.md#what-is-a-named-branch),
pushing to this branch triggers both _terraform plan_ and _terraform apply_. Review the apply output in your Cloud Build project https://console.cloud.google.com/cloud-build/builds;region=DEFAULT_REGION?project=YOUR_CLOUD_BUILD_PROJECT_ID
pushing to this branch triggers both _terraform plan_ and _terraform apply_. Review the apply output in your Cloud Build project <https://console.cloud.google.com/cloud-build/builds;region=DEFAULT_REGION?project=YOUR_CLOUD_BUILD_PROJECT_ID>

```bash
git checkout -b development
Expand All @@ -212,7 +213,7 @@ For example, to create a new business unit similar to business_unit_1, run the f

1. After development has been applied, apply nonproduction.
1. Merge changes to nonproduction. Because this is a [named environment branch](../docs/FAQ.md#what-is-a-named-branch),
pushing to this branch triggers both _terraform plan_ and _terraform apply_. Review the apply output in your Cloud Build project. https://console.cloud.google.com/cloud-build/builds;region=DEFAULT_REGION?project=YOUR_CLOUD_BUILD_PROJECT_ID
pushing to this branch triggers both _terraform plan_ and _terraform apply_. Review the apply output in your Cloud Build project. <https://console.cloud.google.com/cloud-build/builds;region=DEFAULT_REGION?project=YOUR_CLOUD_BUILD_PROJECT_ID>

```bash
git checkout -b nonproduction
Expand Down Expand Up @@ -294,7 +295,6 @@ For example, to create a new business unit similar to business_unit_1, run the f
grep -rl business_unit_1 business_unit_2/ | xargs sed -i 's/business_unit_1/business_unit_2/g'
```


1. Run `init` and `plan` and review output for environment shared.

```bash
Expand Down
1 change: 1 addition & 0 deletions 4-projects/business_unit_1/development/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module "env" {
remote_state_bucket = var.remote_state_bucket
location_kms = coalesce(var.location_kms, local.default_region_kms)
location_gcs = coalesce(var.location_gcs, local.default_region_gcs)
keyring_name = "bu1-sample-keyring"
gcs_custom_placement_config = {
data_locations = [
upper(local.default_region),
Expand Down
1 change: 1 addition & 0 deletions 4-projects/business_unit_1/nonproduction/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module "env" {
business_unit = "business_unit_1"
remote_state_bucket = var.remote_state_bucket
location_kms = coalesce(var.location_kms, local.default_region_kms)
keyring_name = "bu1-sample-keyring"
location_gcs = coalesce(var.location_gcs, local.default_region_gcs)
gcs_custom_placement_config = {
data_locations = [
Expand Down
1 change: 1 addition & 0 deletions 4-projects/business_unit_1/production/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module "env" {
business_unit = "business_unit_1"
remote_state_bucket = var.remote_state_bucket
location_kms = coalesce(var.location_kms, local.default_region_kms)
keyring_name = "bu1-sample-keyring"
location_gcs = coalesce(var.location_gcs, local.default_region_gcs)
gcs_custom_placement_config = {
data_locations = [
Expand Down

0 comments on commit 8a98d1b

Please sign in to comment.