Skip to content

Commit

Permalink
Merge pull request #27 from remerge/CORE-556
Browse files Browse the repository at this point in the history
Remove Okta enrollment token from Google instance template
  • Loading branch information
hollow authored Feb 29, 2024
2 parents 01e36d9 + 268a333 commit d6755d6
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions google/compute/template/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,10 @@ resource "google_compute_instance_template" "default" {
"http://metadata.google.internal/computeMetadata/v1/instance/$${1}"
}
if [[ ! -e /var/lib/sftd/device.token ]]; then
mkdir -p /var/lib/sftd
gcloud secrets versions access latest \
--secret=okta-enrollment-token \
>/var/lib/sftd/enrollment.token
chmod 0600 /var/lib/sftd/enrollment.token
fi
if [[ ! -e /etc/sft/sftd.yaml ]]; then
mkdir -p /etc/sft
cat >/etc/sft/sftd.yaml <<EOF
---
EnrollmentTokenFile: /var/lib/sftd/enrollment.token
AccessAddress: "$(metadata network-interfaces/0/ip)"
CanonicalName: "$(metadata hostname)"
EOF
Expand Down

0 comments on commit d6755d6

Please sign in to comment.