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

Add documentation for connection values and secrets to resource reference pages #659

Merged
merged 21 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0847dd0
add more details about env variables
willtsai Aug 1, 2023
3d9a152
add more details about env variables
willtsai Aug 1, 2023
12f4673
update spell check exceptions
willtsai Aug 1, 2023
a8e561d
rebase to v0.23
willtsai Aug 4, 2023
b577117
rebase to v0.23
willtsai Aug 4, 2023
03fad8e
changes added to new app graph page
willtsai Aug 4, 2023
e7440a4
add environment variables related to connections
willtsai Aug 7, 2023
27771d8
address feedback
willtsai Aug 8, 2023
fe9e1b0
add spellcheck excp
willtsai Aug 8, 2023
b9d9404
Merge branch 'v0.23' into willtsai/connection-values-secrets
willtsai Aug 8, 2023
137fc75
correct Azure SQL connection string
willtsai Aug 8, 2023
8cd4bd9
Merge branch 'willtsai/connection-values-secrets' of https://github.c…
willtsai Aug 8, 2023
bb4e180
Merge branch 'v0.23' into willtsai/connection-values-secrets
willtsai Aug 9, 2023
8ea0f20
Apply suggestions from rynowak@ code review
willtsai Aug 9, 2023
ef72366
address rynowak@ feedback
willtsai Aug 9, 2023
47f695e
Merge branch 'v0.23' into willtsai/connection-values-secrets
willtsai Aug 14, 2023
2044fe0
Merge branch 'edge' into willtsai/connection-values-secrets
willtsai Aug 14, 2023
211cd6f
move connections content
willtsai Aug 14, 2023
21123ec
Merge branch 'edge' into willtsai/connection-values-secrets
willtsai Aug 17, 2023
3ba978b
address feedback re: deployment simplification, fix tabs in delete-ap…
willtsai Aug 17, 2023
d8a2a23
Merge branch 'edge' into willtsai/connection-values-secrets
willtsai Aug 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/config/en-custom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -424,3 +424,6 @@ httpGet
tcp
BucketName
Balancer
authSource
mongodb
MYCONNECTION
13 changes: 10 additions & 3 deletions docs/content/concepts/appmodel-concept/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,20 @@ The use cases for connections are flexible, and include features like:

### Injected values

Declaring a connection between two resources also injects information in the form of environment variables based on the name of the connection and its kind. This is a form of *cloud-native service discovery* and makes it easy for you to decouple your application code from the environment where its deployed.
When a connection between two resources is declared, Radius injects resource related information into environment variables that are then used to access the respective resource without having to hard code URIs, connection strings, secrets, etc. into your application code. This is a form of *cloud-native service discovery* and makes it easy for you to decouple your application code from the environment where its deployed.

These environment variables follow a naming convention that makes their use predictable. The naming pattern includes the connection name, which is part of the consuming component. This way the code that needs to read the values gets to define how they are named.
These environment variables follow a naming convention that makes their use predictable. The naming pattern is derived from the name given to the connection and its type, which determines what values are required. This way the code that needs to read the values gets to define how they are named. For example, adding a connection called `myconnection` that connects to a MongoDB resource would result in the following environment variables being injected:

```bash
# the connection string to the resource, e.g. 'mongodb://mongo:27017/mongo?authSource=admin'
CONNECTION_MYCONNECTION_CONNECTIONSTRING
# the type of connection, e.g. 'mongo-connector'
CONNECTION_MYCONNECTION_DATABASE
```

Each kind of connection defines values that are useful for communication. These could be URIs, connection strings, access keys, or anything that application code needs to successfully communicate. Refer to each [resource's reference documentation]({{< ref resource-schema >}}) for more information.

The values provided through connections are a convenience and are also available as properties and functions (for secrets) when authoring your IaC files. You can ignore the values generated by a connection if you prefer to be explicit, or if you already have a convention you like to follow.
The values provided through connections are a convenience and are also available as properties and functions (for secrets) when authoring your IaC files. You can ignore the values generated by a connection if you prefer to be explicit, or if you already have another convention you would like to follow.

Adding connections to the above IaC file, it becomes:

Expand Down
Loading