damondouglas commented on a change in pull request #16822:
URL: https://github.com/apache/beam/pull/16822#discussion_r823061143
##########
File path: playground/terraform/README.md
##########
@@ -28,14 +28,64 @@ The following items need to be setup for the Playground
cluster deployment on GC
# Deployment steps
+## 0. Create GCS bucket for state
+
+```bash
+$ gsutil mb -p ${PROJECT_ID} gs://state-bucket-name
+$ gsutil versioning set on gs://state-bucket-name
+```
+
+## 1. Create new environment
+
+To provide informantion about terraform backend, please create:
+
+* New environment folder
+
+```bash
+mkdir environment/env-name
+```
+
+* Backend config
+
+```bash
+echo 'bucket = "put your state bucket name here"' >
environment/env-name/state.tfbackend
+```
+
+* Terraform variables config and provide necessary variables
+
+```bash
+touch environment/env-name/terraform.tfvars
+```
+
+Then provide necesarry variables.
+
## 1. Provision infrastructure
Review comment:
`## 2. Provision infrastructure`
##########
File path: playground/terraform/README.md
##########
@@ -28,14 +28,64 @@ The following items need to be setup for the Playground
cluster deployment on GC
# Deployment steps
+## 0. Create GCS bucket for state
+
+```bash
+$ gsutil mb -p ${PROJECT_ID} gs://state-bucket-name
+$ gsutil versioning set on gs://state-bucket-name
+```
+
+## 1. Create new environment
+
+To provide informantion about terraform backend, please create:
+
+* New environment folder
+
+```bash
+mkdir environment/env-name
+```
+
+* Backend config
+
+```bash
+echo 'bucket = "put your state bucket name here"' >
environment/env-name/state.tfbackend
+```
+
+* Terraform variables config and provide necessary variables
+
+```bash
+touch environment/env-name/terraform.tfvars
+```
+
+Then provide necesarry variables.
+
## 1. Provision infrastructure
-To deploy Playground infrastructure follow
[README.md](./infrastructure/README.md) for infrastructure module.
+To deploy Playground infrastructure follow
[README.md](./infrastructure/README.md) for infrastructure module or run
+gradle task:
+
+```bash
+./gradlew playground:terraform:InitInfrastructure
-Pproject_environment="env-name" -Pdocker-tag="tag"
+```
+
+## 2. Deploy application
Review comment:
`## 3. Deploy application`
##########
File path: playground/terraform/README.md
##########
@@ -28,14 +28,64 @@ The following items need to be setup for the Playground
cluster deployment on GC
# Deployment steps
+## 0. Create GCS bucket for state
+
+```bash
+$ gsutil mb -p ${PROJECT_ID} gs://state-bucket-name
+$ gsutil versioning set on gs://state-bucket-name
+```
+
+## 1. Create new environment
+
+To provide informantion about terraform backend, please create:
+
+* New environment folder
+
+```bash
+mkdir environment/env-name
+```
+
+* Backend config
+
+```bash
+echo 'bucket = "put your state bucket name here"' >
environment/env-name/state.tfbackend
+```
+
+* Terraform variables config and provide necessary variables
+
+```bash
+touch environment/env-name/terraform.tfvars
+```
+
+Then provide necesarry variables.
Review comment:
How would someone know the necessary variables? When I use `*.tfvars`
file in the same module as my terraform code by convention both visual studio
code and IntelliJ parse the variables file and prompt a developer to fill out
the right variables via auto completion. By having this file in
`env-name/terraform.tfvars` it makes it challenging for someone to know what to
do unless they run through the solution and copy/paste variable names.
##########
File path: playground/terraform/README.md
##########
@@ -28,14 +28,64 @@ The following items need to be setup for the Playground
cluster deployment on GC
# Deployment steps
+## 0. Create GCS bucket for state
+
+```bash
+$ gsutil mb -p ${PROJECT_ID} gs://state-bucket-name
+$ gsutil versioning set on gs://state-bucket-name
+```
+
+## 1. Create new environment
+
+To provide informantion about terraform backend, please create:
+
+* New environment folder
+
+```bash
+mkdir environment/env-name
+```
+
+* Backend config
+
+```bash
+echo 'bucket = "put your state bucket name here"' >
environment/env-name/state.tfbackend
+```
+
+* Terraform variables config and provide necessary variables
+
+```bash
+touch environment/env-name/terraform.tfvars
+```
+
+Then provide necesarry variables.
+
## 1. Provision infrastructure
-To deploy Playground infrastructure follow
[README.md](./infrastructure/README.md) for infrastructure module.
+To deploy Playground infrastructure follow
[README.md](./infrastructure/README.md) for infrastructure module or run
+gradle task:
+
+```bash
+./gradlew playground:terraform:InitInfrastructure
-Pproject_environment="env-name" -Pdocker-tag="tag"
Review comment:
I get the error:
```
Error: Failed to get existing workspaces: querying Cloud Storage failed:
storage: bucket doesn't exist
```
##########
File path: playground/terraform/README.md
##########
@@ -28,14 +28,64 @@ The following items need to be setup for the Playground
cluster deployment on GC
# Deployment steps
+## 0. Create GCS bucket for state
+
+```bash
+$ gsutil mb -p ${PROJECT_ID} gs://state-bucket-name
+$ gsutil versioning set on gs://state-bucket-name
+```
+
+## 1. Create new environment
+
+To provide informantion about terraform backend, please create:
Review comment:
May we consider: 'To provide information about the terraform backend,
run the following commands.'
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]