Skip to content

Commit

Permalink
fix: Refactor user data handling in Oracle DB instance module and upd…
Browse files Browse the repository at this point in the history
…ate scripts for SSH key setup (#8950)

* fix: Refactor user data handling in Oracle DB instance module and update scripts for SSH key setup

* fix: path typo
  • Loading branch information
georgepstaylor authored Jan 10, 2025
1 parent 8ec5860 commit a410def
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,16 @@ module "instance" {
iam_resource_names_prefix = "instance"
instance_profile_policies = var.instance_profile_policies

user_data_raw = base64encode(var.user_data)
user_data_raw = base64encode(
templatefile(
"${path.module}/templates/concatenated_user_data.sh",
{
default = var.user_data,
ssh_setup = file("${path.module}/templates/ssh_key_setup.sh"),
}
)
)


business_unit = var.account_info.business_unit
application_name = var.account_info.application_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ cat > ~/mycron << EOF
*/10 * * * * /usr/bin/db/sync_s3
EOF
crontab ~/mycron
rm ~/mycron
rm ~/mycron
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ EOF

chmod 700 /usr/bin/db/sync_users

./usr/bin/db/sync_users
./usr/bin/db/sync_users

0 comments on commit a410def

Please sign in to comment.