Skip to content

Commit

Permalink
Update docs fro email notifications and env moved to terraform output
Browse files Browse the repository at this point in the history
  • Loading branch information
SachinSogoduRaju committed Sep 29, 2023
1 parent bf43e99 commit 3e8ea66
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 17 deletions.
16 changes: 0 additions & 16 deletions docs/docs/rad-lab-ui/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,3 @@ sidebar_position: 4

Please feel free to reach out and to create a [GitHub issue](https://github.com/GoogleCloudPlatform/rad-lab/issues) in case of any issues or concerns.

## Email Notifications
You can optionally enable RAD Lab notification for deployment events. This includes deployment creations, updates, and deletions.

If enabled, the following users/groups (defined in the module's Terraform variables) will receive email notifications:
- The individual taking the action
- `trusted_users`
- `trusted_groups`
- `owner_users`
- `owner_groups`

Currently only sending via gmail is supported. It is recommended to [create a new gmail address](https://support.google.com/mail/answer/56256?hl=en) for this purpose only and generate an `App Password` to authenticate it by following [these directions](https://support.google.com/mail/answer/185833?hl=en).

You will then provide this email and its password to RAD Lab UI via the `Global Variables` setup.

The email address will be store in Firestore, and email password will be securely stored in Google's [Secret Manager](https://cloud.google.com/secret-manager)

19 changes: 18 additions & 1 deletion docs/docs/rad-lab-ui/ui_installation/publishing-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,23 @@ Some variables are common to all modules. Upon first log in, and Admin will set
- Billing ID
- Organization ID (without `organizations/`-prefix)
- Folder ID (without `folders/`-prefix)
- Preferred Google Cloud Region and Zone
- Email Notification(enable/disable email notifications)

#### Email Notifications
You can optionally enable RAD Lab notification for deployment events. This includes deployment creations, updates, and deletions.

If enabled, the following users/groups (defined in the module's Terraform variables) will receive email notifications:
- The individual taking the action
- `trusted_users`
- `trusted_groups`
- `owner_users`
- `owner_groups`

Currently only sending via gmail is supported. It is recommended to [create a new gmail address](https://support.google.com/mail/answer/56256?hl=en) for this purpose only and generate an `App Password` to authenticate it by following [these directions](https://support.google.com/mail/answer/185833?hl=en).

You will then provide this email and its password to RAD Lab UI via the `Global Variables` setup.

The email address will be store in Firestore, and email password will be securely stored in Google's [Secret Manager](https://cloud.google.com/secret-manager)

## Module Admin Variables

Expand All @@ -25,3 +41,4 @@ Lastly, some modules have specific requirements for variables that typical Users
Once an Admin tries to publish a module, if the module requires any of these variables, the Admin will be prompted. These values will be saved in Firestore and inaccessible to Users.

When a User deploys a module, Global and Module Admin Variables will be combined with the variables the User provided and passed to Terraform for execution (User variables supersede all other variables of the same name, and Module Admin variable supersede Global Admin variables of the same name).

4 changes: 4 additions & 0 deletions radlab-ui/automation/terraform/infrastructure/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ output "admin_group_name" {
value = var.admin_group_name
}

output "secret_manager_location" {
value = var.secret_manager_location
}

output "app_engine_url" {
value = google_app_engine_application.radlab_ui.default_hostname
}
Expand Down
6 changes: 6 additions & 0 deletions radlab-ui/automation/terraform/infrastructure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ variable "admin_group_name" {
default = "rad-lab-admins"
}

variable "secret_manager_location" {
description = "The location where the secret is stored in the Secret Manager."
type = string
default = "us-central1"
}

variable "app_engine_location" {
description = "The location where the App Engine project will be created."
type = string
Expand Down
2 changes: 2 additions & 0 deletions radlab-ui/webapp/gen_local_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ MODULE_DEPLOYMENT_BUCKET_NAME=$(echo "${TERRAFORM_OUTPUT}" | jq -r .values.outpu
GITHUB_URL=$(echo "${TERRAFORM_OUTPUT}" | jq -r .values.outputs.git_repo_url.value)
GITHUB_BRANCH=$(echo "${TERRAFORM_OUTPUT}" | jq -r .values.outputs.git_repo_branch.value)
GIT_TOKEN_SECRET_KEY_NAME=$(echo "${TERRAFORM_OUTPUT}" | jq -r .values.outputs.git_personal_access_token_secret_id.value)
SECRET_MANAGER_LOCATION=$(echo "${TERRAFORM_OUTPUT}" | jq -r .values.outputs.secret_manager_location.value)
cd $WEBAPP_DIR

FIREBASE_CONFIG_OUTPUT=$(firebase apps:sdkconfig web --project ${PROJECT_ID} --json)
Expand Down Expand Up @@ -90,5 +91,6 @@ NEXT_PUBLIC_RAD_LAB_USER_GROUP=${USER_GROUP_NAME}
MODULE_DEPLOYMENT_BUCKET_NAME=${MODULE_DEPLOYMENT_BUCKET_NAME}
GIT_TOKEN_SECRET_KEY_NAME=${GIT_TOKEN_SECRET_KEY_NAME}
SECRET_MANAGER_LOCATION=${SECRET_MANAGER_LOCATION}
EOT
done

0 comments on commit 3e8ea66

Please sign in to comment.