Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 46e39c1

Browse files
feat: add description config (#617)
1 parent e096140 commit 46e39c1

File tree

4 files changed

+66
-16
lines changed

4 files changed

+66
-16
lines changed

src/pages/apis.mdx

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,7 @@ By default APIs deployed by Nitric will be assigned a domain by the target cloud
766766

767767
<CodeGroup>
768768

769-
```yaml {{ title: "AWS", tag: "nitric-prod.yaml (stack file)" }}
770-
name: my-aws-stack
769+
```yaml {{ title: "AWS", tag: "nitric.prod.yaml" }}
771770
provider: nitric/[email protected]
772771
region: ap-southeast-2
773772

@@ -780,16 +779,61 @@ apis:
780779
- test.example.com
781780
```
782781
783-
```yaml {{ title: "Azure", tag: "nitric-prod.yaml (stack file)" }}
782+
```yaml {{ title: "Azure", tag: "nitric.prod.yaml" }}
784783
# currently unsupported - request support here: https://github.com/nitrictech/nitric/issues
785784
```
786785

787-
```yaml {{ title: "Google Cloud", tag: "nitric-prod.yaml (stack file)" }}
786+
```yaml {{ title: "Google Cloud", tag: "nitric.prod.yaml" }}
788787
# currently unsupported - request support here: https://github.com/nitrictech/nitric/issues
789788
```
790789

791790
</CodeGroup>
792791

792+
## Custom Descriptions
793+
794+
By default, APIs will not be deployed with a description. You can add a description using the following configuration in your stack file.
795+
796+
<CodeGroup>
797+
798+
```yaml {{ title: "AWS", tag: "nitric.prod.yaml" }}
799+
provider: nitric/[email protected]
800+
region: ap-southeast-2
801+
802+
# Add a key for configuring apis
803+
apis:
804+
# Target an API by its nitric name
805+
my-api-name:
806+
# provide domains to be used for the api
807+
description: An AWS API
808+
```
809+
810+
```yaml {{ title: "Azure", tag: "nitric.prod.yaml" }}
811+
provider: nitric/[email protected]
812+
region: Australia East
813+
org: example-org
814+
adminemail: [email protected]
815+
816+
apis:
817+
# Target an API by its nitric name
818+
my-api-name:
819+
# provide domains to be used for the api
820+
description: An Azure API
821+
```
822+
823+
```yaml {{ title: "Google Cloud", tag: "nitric.prod.yaml" }}
824+
provider: nitric/[email protected]
825+
region: australia-southeast1
826+
827+
# Add a key for configuring apis
828+
apis:
829+
# Target an API by its nitric name
830+
my-api-name:
831+
# provide domains to be used for the api
832+
description: A GCP API
833+
```
834+
835+
</CodeGroup>
836+
793837
### AWS Custom Domain Prerequisites
794838
795839
To support custom domains with APIs deployed to AWS your domain (or subdomain) will need to be setup as a [hosted zone](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html) in Route 53.

src/pages/reference/providers/aws/configuration.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ export const description = 'Configuring your AWS stacks'
77
<CodeGroup>
88

99
```yaml {{ title: "Pulumi" }}
10-
# The name of your AWS stack
11-
name: my-aws-stack-name
12-
1310
# The provider to use and it's published version
1411
# See releases:
1512
# https://github.com/nitrictech/nitric/tags
16-
provider: nitric/aws@1.1.0
13+
provider: nitric/aws@1.12.4
1714

1815
# The target aws region to deploy to
1916
# See available regions:
@@ -47,6 +44,7 @@ apis:
4744
# The domain or parent domain must have a hosted zone already in Route53
4845
domains:
4946
- api.example.com
47+
description: An AWS API
5048

5149
# Configure your deployed services
5250
config:

src/pages/reference/providers/azure/configuration.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ export const description = 'Configuring your Azure stacks'
55
# Complete Example with comments
66

77
```yaml
8-
# The name of your Azure stack
9-
name: my-azure-stack-name
10-
118
# The provider to use and it's published version
129
# See releases:
1310
# https://github.com/nitrictech/nitric/tags
14-
provider: nitric/azure@1.0.0
11+
provider: nitric/azure@1.12.4
1512

1613
# The target Azure region to deploy to
1714
# See available regions:
@@ -31,6 +28,13 @@ adminemail: [email protected]
3128

3229
# All configuration below is optional
3330

31+
# Apply configuration to nitric APIs
32+
apis:
33+
# Target an API by its nitric name
34+
my-api:
35+
# provide domains to be used for the api
36+
description: An Azure API
37+
3438
# Configure your deployed services
3539
config:
3640
# How services without a type will be deployed

src/pages/reference/providers/gcp/configuration.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ export const description = 'Configuring your Google Cloud stacks'
77
<CodeGroup>
88

99
```yaml {{ title: "Pulumi" }}
10-
# The name of your GCP stack
11-
name: my-gcp-stack-name
12-
1310
# The provider to use and it's published version
1411
# See releases:
1512
# https://github.com/nitrictech/nitric/tags
16-
provider: nitric/gcp@1.10.0
13+
provider: nitric/gcp@1.12.4
1714

1815
# The target GCP region to deploy to
1916
# See available regions:
@@ -41,6 +38,13 @@ import:
4138
# const mySecret = secret('my-secret');
4239
my-secret: existing-secret
4340

41+
# Apply configuration to nitric APIs
42+
apis:
43+
# Target an API by its nitric name
44+
my-api:
45+
# provide domains to be used for the api
46+
description: An Azure API
47+
4448
# Configure your deployed services
4549
config:
4650
# How services without a type will be deployed

0 commit comments

Comments
 (0)