Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jvb): instance configuration includes common tags #577

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,14 @@ resource "oci_core_instance_configuration" "oci_instance_configuration" {
file("${path.cwd}/${var.user_data_lib_path}/postinstall-header.sh"), # load the header
file("${path.cwd}/${var.user_data_lib_path}/postinstall-lib.sh"), # load the lib
file("${path.cwd}/${var.user_data_lib_path}/postinstall-eip-lib.sh"), # load the EIP lib
"\nexport INFRA_CONFIGURATION_REPO=${var.infra_configuration_repo}\nexport INFRA_CUSTOMIZATIONS_REPO=${var.infra_customizations_repo}\n", #repo variables
"\nexport NOMAD_FLAG=${var.nomad_flag}\n", # nomad variable
<<EOT
export INFRA_CONFIGURATION_REPO=${var.infra_configuration_repo}
export INFRA_CUSTOMIZATIONS_REPO=${var.infra_customizations_repo}
export NOMAD_FLAG=${var.nomad_flag}
INSTANCE_ID=$(curl -s curl http://169.254.169.254/opc/v1/instance/ | jq -r .id)
echo "${jsonencode(local.common_tags)}" | sed -e 's/${var.tag_namespace}\.//' > /tmp/oracle_cache-${INSTANCE_ID}
EOT
, # write the common tags to a file
file("${path.cwd}/${var.user_data_file}"), # load our customizations
file("${path.cwd}/${var.user_data_lib_path}/postinstall-footer.sh") # load the footer
]))
Expand Down