Update op-scim-bridge.yaml #379
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using default service account is against security policies. So, it is better to use a custom service account. The modification was done in order to create a generic repo others can use by giving them the opportunity to input their custom service account with validation check. I did also create custom script that can allow user to deploy this, while inputting their custom service account. - How to Use This YAML You can deploy it using a script like this:
#!/bin/bash
Usage: ./deploy-scim.sh [email protected]
SERVICE_ACCOUNT="$1"
if [ -z "$SERVICE_ACCOUNT" ]; then
echo "❌ Please provide a service account email."
exit 1
fi
curl --silent --show-error
https://raw.githubusercontent.com/YOUR_GITHUB_USERNAME/YOUR_NEW_REPO/main/op-scim-bridge-custom.yaml |
SERVICE_ACCOUNT_NAME="$SERVICE_ACCOUNT" envsubst |
gcloud run services replace - --region=us-central1 &&
gcloud run services add-iam-policy-binding op-scim-bridge
--member=allUsers
--role=roles/run.invoker
--region=us-central1 &&
gcloud run services describe op-scim-bridge
--region=us-central1
--format="value(status.url)"