Skip to content

Commit

Permalink
[DEVOPS-282] Set access restrictions on Container app ingress (#65)
Browse files Browse the repository at this point in the history
<details open>
<summary><a href="https://amuniversal.atlassian.net/browse/DEVOPS-282"
title="DEVOPS-282" target="_blank">DEVOPS-282</a></summary>
  <br />
  <table>
    <tr>
      <th>Summary</th>
<td>Add network access restrictions to ephemeral deployments
workflow</td>
    </tr>
    <tr>
      <th>Type</th>
      <td>
<img alt="Story"
src="https://amuniversal.atlassian.net/images/icons/issuetypes/story.png"
/>
        Story
      </td>
    </tr>
    <tr>
      <th>Status</th>
      <td>To Do</td>
    </tr>
    <tr>
      <th>Points</th>
      <td>N/A</td>
    </tr>
    <tr>
      <th>Labels</th>
      <td>-</td>
    </tr>
  </table>
</details>
<!--
do not remove this marker as it will break action-jira-linter's
functionality.
  added_by_jira_lint
-->
---

<!--
We appreciate the effort for this pull request but before that please
make sure you read the contribution guidelines, then fill out the blanks
below.

Please format the PR title appropriately based on the type of change:
  [<issue>]: <description>
Where <issue> is the related Jira Issue Key.
-->

## Description

- Set access restrictions on Container app ingress.
  - Added `ingressWhitelist` input to ephemeral deployments workflow.

## Related Issues

<!-- List any related Jira issues here -->

- Jira Issue: DEVOPS-282
  • Loading branch information
ebronson68 authored Oct 12, 2023
1 parent 06527c0 commit a25e697
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ephemeral-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ on:
type: string
description: "Location of resources in Azure"
default: "centralus"
ingressWhitelist:
required: false
type: string
description: "IP address that will be allowed to access the ephemeral deployment"
default: "207.67.20.252/32"
secrets:
azureCredentials:
required: true
Expand Down Expand Up @@ -182,6 +187,10 @@ jobs:
ingress: external
disableTelemetry: true

- name: Add access restrictions to Container App ingress
run: |
az containerapp ingress access-restriction set --action Allow --ip-address "${{ inputs.ingressWhitelist }}" --rule-name allow-range --name "${{ needs.prepare.outputs.repositoryName }}-${{ needs.prepare.outputs.jiraTicketIdLc }}" --resource-group "${{ inputs.clusterResourceGroup }}"
- name: Get Container App Hostname
id: hostname
run: |
Expand Down

0 comments on commit a25e697

Please sign in to comment.