Skip to content

Commit fae8551

Browse files
committed
Update readme
- Update the referenced nginx actions to 0.3.1 as cert actions do not work for 0.3.0. - Add an excerpt around Azure RBAC describing the access that the service principal will need in order for the action to work.
1 parent 835b0f9 commit fae8551

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

github-action/README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
uses: actions/checkout@v2
3030

3131
- name: 'Run Azure Login using an Azure service principal with a secret'
32-
uses: azure/login@v1
32+
uses: azure/login@v2
3333
with:
3434
creds: ${{ secrets.AZURE_CREDENTIALS }}
3535

3636
- name: 'Sync the NGINX configuration from the GitHub repository to the NGINXaaS for Azure deployment'
37-
uses: nginxinc/[email protected].0
37+
uses: nginxinc/[email protected].1
3838
with:
3939
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
4040
resource-group-name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
@@ -69,14 +69,14 @@ jobs:
6969
uses: actions/checkout@v2
7070

7171
- name: 'Run Azure Login using OIDC'
72-
uses: azure/login@v1
72+
uses: azure/login@v2
7373
with:
7474
client-id: ${{ secrets.AZURE_CLIENT_ID }}
7575
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
7676
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
7777

7878
- name: 'Sync the NGINX configuration from the GitHub repository to the NGINXaaS for Azure deployment'
79-
uses: nginxinc/[email protected].0
79+
uses: nginxinc/[email protected].1
8080
with:
8181
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
8282
resource-group-name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
@@ -86,6 +86,9 @@ jobs:
8686
transformed-nginx-config-directory-path: /etc/nginx/
8787
```
8888
89+
> **Note:**
90+
The service principal being used for authenticating with Azure should have access to manage the NGINXaaS deployment. For simplicity, this guide assumes that the service principal has `Contributor` role to manage the deployment. Refer [prerequisites](https://docs.nginx.com/nginxaas/azure/getting-started/prerequisites/) for details.
91+
8992
## Handling NGINX configuration file paths
9093

9194
To facilitate the migration of the existing NGINX configuration, NGINXaaS for Azure supports multiple-files configuration with each file uniquely identified by a file path, just like how NGINX configuration files are created and used in a self-hosting machine. An NGINX configuration file can include another file using the [include directive](https://docs.nginx.com/nginx/admin-guide/basic-functionality/managing-configuration-files/). The file path used in an `include` directive can either be an absolute path or a relative path to the [prefix path](https://www.nginx.com/resources/wiki/start/topics/tutorials/installoptions/).
@@ -101,7 +104,7 @@ To use this action to sync the configuration files from this example, the direct
101104

102105
```yaml
103106
- name: 'Sync the NGINX configuration from the GitHub repository to the NGINXaaS for Azure deployment'
104-
uses: nginxinc/[email protected].0
107+
uses: nginxinc/[email protected].1
105108
with:
106109
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
107110
resource-group-name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
@@ -133,7 +136,7 @@ The action supports an optional input `transformed-nginx-config-directory-path`
133136

134137
```yaml
135138
- name: 'Sync the NGINX configuration from the Git repository to the NGINXaaS for Azure deployment'
136-
uses: nginxinc/[email protected].0
139+
uses: nginxinc/[email protected].1
137140
with:
138141
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
139142
resource-group-name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
@@ -151,11 +154,11 @@ The transformed paths of the two configuration files in the NGINXaaS for Azure d
151154

152155
## Handling NGINX certificates
153156

154-
Since certificates are secrets, it is assumed they are stored in Azure key vault. One can provide multiple certificate entries to the github action as an array of JSON objects with keys:
157+
Since certificates are secrets, it is assumed they are stored in Azure key vault. One can provide multiple certificate entries to the github action as an array of JSON objects with keys:
155158

156159
`certificateName`- A unique name for the certificate entry
157160

158-
`keyvaultSecret`- The secret ID for the certificate on Azure key vault
161+
`keyvaultSecret`- The secret ID for the certificate on Azure key vault
159162

160163
`certificateVirtualPath`- This path must match one or more ssl_certificate directive file arguments in your Nginx configuration; and must be unique between certificates within the same deployment
161164

@@ -165,7 +168,7 @@ See the example below
165168

166169
```yaml
167170
- name: "Sync NGINX certificates to NGINXaaS for Azure"
168-
uses: nginxinc/[email protected].0
171+
uses: nginxinc/[email protected].1
169172
with:
170173
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
171174
resource-group-name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
@@ -178,7 +181,7 @@ See the example below
178181

179182
```yaml
180183
- name: "Sync NGINX configuration- multi file and certificate to NGINXaaS for Azure"
181-
uses: nginxinc/[email protected].0
184+
uses: nginxinc/[email protected].1
182185
with:
183186
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
184187
resource-group-name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
@@ -188,4 +191,4 @@ See the example below
188191
nginx-root-config-file: nginx.conf
189192
transformed-nginx-config-directory-path: /etc/nginx/
190193
nginx-certificates: '[{"certificateName": "$NGINX_CERT_NAME", "keyvaultSecret": "https://$NGINX_VAULT_NAME.vault.azure.net/secrets/$NGINX_CERT_NAME", "certificateVirtualPath": "/etc/nginx/ssl/my-cert.crt", "keyVirtualPath": "/etc/nginx/ssl/my-cert.key" } ]'
191-
```
194+
```

0 commit comments

Comments
 (0)