Skip to content

Commit

Permalink
feat(infra): Enable fedramp endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
amolero-nr committed Jan 30, 2024
1 parent 54e835d commit c42c658
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 1 deletion.
10 changes: 10 additions & 0 deletions recipes/newrelic/infrastructure/awslinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ install:
- task: cleanup
- task: setup_license
- task: setup_proxy
- task: setup_fedramp
- task: install_infra
- task: restart
- task: assert_agent_status_ok
Expand Down Expand Up @@ -189,6 +190,15 @@ install:
echo 'proxy: {{.HTTPS_PROXY}}' >> /etc/newrelic-infra.yml
fi
setup_fedramp:
cmds:
- |
FEDRAMP={{.FEDRAMP}}
sed -i "/^fedramp:/d" /etc/newrelic-infra.yml 2>/dev/null
if [[ "${FEDRAMP,,}" == "true" && -f /etc/newrelic-infra.yml ]]; then
echo 'fedramp: true' >> /etc/newrelic-infra.yml
fi
install_infra:
cmds:
- |
Expand Down
10 changes: 10 additions & 0 deletions recipes/newrelic/infrastructure/centos_rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ install:
- task: cleanup
- task: setup_license
- task: setup_proxy
- task: setup_fedramp
- task: install_infra
- task: restart
- task: assert_agent_status_ok
Expand Down Expand Up @@ -171,6 +172,15 @@ install:
fi
fi
setup_fedramp:
cmds:
- |
FEDRAMP={{.FEDRAMP}}
sed -i "/^fedramp:/d" /etc/newrelic-infra.yml 2>/dev/null
if [[ "${FEDRAMP,,}" == "true" && -f /etc/newrelic-infra.yml ]]; then
echo 'fedramp: true' >> /etc/newrelic-infra.yml
fi
install_infra:
cmds:
- |
Expand Down
10 changes: 10 additions & 0 deletions recipes/newrelic/infrastructure/darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ install:
- task: cleanup
- task: setup_license
- task: setup_proxy
- task: setup_fedramp
- task: install_infra
- task: restart
- task: assert_agent_status_ok
Expand Down Expand Up @@ -156,6 +157,15 @@ install:
sudo echo 'proxy: {{.HTTPS_PROXY}}' >> "{{.V2_CONFIG_FILE}}"
fi
setup_fedramp:
cmds:
- |
FEDRAMP={{.FEDRAMP}}
sed -i "/^fedramp:/d" /etc/newrelic-infra.yml 2>/dev/null
if [[ "${FEDRAMP,,}" == "true" && -f /etc/newrelic-infra.yml ]]; then
echo 'fedramp: true' >> /etc/newrelic-infra.yml
fi
install_infra:
cmds:
- |
Expand Down
10 changes: 10 additions & 0 deletions recipes/newrelic/infrastructure/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ install:
- task: cleanup
- task: setup_license
- task: setup_proxy
- task: setup_fedramp
- task: log_ssl_ciphers
- task: update_apt
- task: install_gnupg
Expand Down Expand Up @@ -186,6 +187,15 @@ install:
echo 'proxy: {{.HTTPS_PROXY}}' >> /etc/newrelic-infra.yml
fi
setup_fedramp:
cmds:
- |
FEDRAMP={{.FEDRAMP}}
sed -i "/^fedramp:/d" /etc/newrelic-infra.yml 2>/dev/null
if [[ "${FEDRAMP,,}" == "true" && -f /etc/newrelic-infra.yml ]]; then
echo 'fedramp: true' >> /etc/newrelic-infra.yml
fi
log_ssl_ciphers:
cmds:
- |
Expand Down
10 changes: 10 additions & 0 deletions recipes/newrelic/infrastructure/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ install:
- task: cleanup
- task: setup_license
- task: setup_proxy
- task: setup_fedramp
- task: install_infra
- task: restart
- task: assert_agent_status_ok
Expand Down Expand Up @@ -167,6 +168,15 @@ install:
echo 'proxy: {{.HTTPS_PROXY}}' >> /etc/newrelic-infra.yml
fi
setup_fedramp:
cmds:
- |
FEDRAMP={{.FEDRAMP}}
sed -i "/^fedramp:/d" /etc/newrelic-infra.yml 2>/dev/null
if [[ "${FEDRAMP,,}" == "true" && -f /etc/newrelic-infra.yml ]]; then
echo 'fedramp: true' >> /etc/newrelic-infra.yml
fi
install_infra:
cmds:
- |
Expand Down
11 changes: 10 additions & 1 deletion recipes/newrelic/infrastructure/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ install:
- task: cleanup
- task: setup_license
- task: setup_proxy
- task: setup_fedramp
- task: log_ssl_ciphers
- task: update_apt
- task: install_gnupg
Expand Down Expand Up @@ -162,7 +163,6 @@ install:
echo 'license_key: {{.NEW_RELIC_LICENSE_KEY}}' >> /etc/newrelic-infra.yml
echo '{{.NRIA_CUSTOM_ATTRIBUTES}}' >> /etc/newrelic-infra.yml
setup_proxy:
cmds:
- |
Expand All @@ -171,6 +171,15 @@ install:
echo 'proxy: {{.HTTPS_PROXY}}' >> /etc/newrelic-infra.yml
fi
setup_fedramp:
cmds:
- |
FEDRAMP={{.FEDRAMP}}
sed -i "/^fedramp:/d" /etc/newrelic-infra.yml 2>/dev/null
if [[ "${FEDRAMP,,}" == "true" && -f /etc/newrelic-infra.yml ]]; then
echo 'fedramp: true' >> /etc/newrelic-infra.yml
fi
log_ssl_ciphers:
cmds:
- |
Expand Down
8 changes: 8 additions & 0 deletions recipes/newrelic/infrastructure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ install:
"@
Add-Content -Path $InfraConfig -Value $customAttributes -Force
# Enable fedramp endpoints
(Get-Content $InfraConfig) | Where-Object {
$_ -notmatch "^fedramp:"
} | Set-Content $InfraConfig | Out-Null
if ($Env:FEDRAMP -eq $true) {
Add-Content -Path $InfraConfig -Value "fedramp: true" -Force
}
'
start_infra:
Expand Down

0 comments on commit c42c658

Please sign in to comment.