Skip to content

Commit 5a1cd10

Browse files
committed
Fix partial formatting
1 parent 551b23e commit 5a1cd10

File tree

1 file changed

+42
-38
lines changed

1 file changed

+42
-38
lines changed

src/content/partials/cloudflare-one/access/add-infrastructure-app.mdx

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,43 @@ import { Tabs, TabItem, Render } from "~/components";
66

77
<Tabs syncKey="dashPlusAPI">
88
<TabItem label="Dashboard">
9+
910
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Access** > **Applications**.
1011
2. Select **Add an application**.
1112
3. Select **Infrastructure**.
1213
4. Enter any name for the application.
1314
5. In **Target criteria**, select the target hostname(s) that will represent the application. The application definition will apply to all targets that share the selected hostname, including any targets added in the future.
1415
6. Enter the **Protocol** and **Port** that will be used to connect to the server.
1516
7. (Optional) If a protocol runs on more than one port, select **Add new target criteria** and reconfigure the same target hostname and protocol with a different port number.
16-
:::note
17-
Access for Infrastructure only supports assigning one protocol per port. You can reuse a port/protocol pairing across infrastructure applications, but the port cannot be reassigned to another protocol.
18-
:::
17+
:::note
18+
Access for Infrastructure only supports assigning one protocol per port. You can reuse a port/protocol pairing across infrastructure applications, but the port cannot be reassigned to another protocol.
19+
:::
1920
8. Select **Next**.
2021
9. To secure your targets, configure a policy that defines who can connect and how they can connect:
21-
1. Enter any name for your policy.
22-
2. Create a rule that matches the users who are allowed to reach the targets. For more information, refer to [Access policies](/cloudflare-one/policies/access/) and review the list of [infrastructure policy selectors](/cloudflare-one/applications/non-http/infrastructure-apps/#infrastructure-policy-selectors).
23-
3. In **Connection context**, configure the following settings:
24-
- **SSH user**: Enter the UNIX usernames that users can log in as (for example, `root` or `ec2-user`).
25-
- **Allow users to log in as their email alias**: (Optional) When selected, users who match your policy definition will be able to access the target using their email address prefix. For example, `[email protected]` could log in as `jdoe`.
2622

27-
:::note
28-
Cloudflare will not create new users on the target. UNIX users must already be present on the server.
29-
:::
23+
1. Enter any name for your policy.
24+
2. Create a rule that matches the users who are allowed to reach the targets. For more information, refer to [Access policies](/cloudflare-one/policies/access/) and review the list of [infrastructure policy selectors](/cloudflare-one/applications/non-http/infrastructure-apps/#infrastructure-policy-selectors).
25+
3. In **Connection context**, configure the following settings:
26+
27+
- **SSH user**: Enter the UNIX usernames that users can log in as (for example, `root` or `ec2-user`).
28+
- **Allow users to log in as their email alias**: (Optional) When selected, users who match your policy definition will be able to access the target using their email address prefix. For example, `[email protected]` could log in as `jdoe`.
3029

31-
4. Select **Add application**.
30+
:::note
31+
Cloudflare will not create new users on the target. UNIX users must already be present on the server.
32+
:::
3233

33-
</TabItem>
34+
10. Select **Add application**.
35+
36+
</TabItem>
3437
<TabItem label="API">
3538

3639
1. [Create an API token](/fundamentals/api/get-started/create-token/) with the following permissions:
37-
| Type | Item | Permission |
38-
| ------- | ---------------- | ---------- |
39-
| Account | Access: Apps & Policies | Edit |
4040

41-
1. Make a `POST` request to the [Access applications](/api/resources/zero_trust/subresources/access/subresources/applications/methods/create/) endpoint:
41+
| Type | Item | Permission |
42+
| ------- | ----------------------- | ---------- |
43+
| Account | Access: Apps & Policies | Edit |
44+
45+
2. Make a `POST` request to the [Access applications](/api/resources/zero_trust/subresources/access/subresources/applications/methods/create/) endpoint:
4246

4347
```sh
4448
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/apps \
@@ -110,27 +114,27 @@ import { Tabs, TabItem, Render } from "~/components";
110114

111115
3. Use the [`cloudflare_zero_trust_access_policy`](https://registry.terraform.io/providers/cloudflare/cloudflare/4.45.0/docs/resources/zero_trust_access_policy) resource to add an infrastructure policy to the application:
112116

113-
```tf
114-
resource "cloudflare_zero_trust_access_policy" "infra-app-policy" {
115-
application_id = cloudflare_zero_trust_access_application.infra-app.id
116-
account_id = var.cloudflare_account_id
117-
name = "Allow a specific email"
118-
decision = "allow"
119-
precedence = 1
120-
121-
include {
122-
email = ["[email protected]"]
123-
}
124-
125-
connection_rules {
126-
ssh {
127-
usernames = ["root", "ec2-user"]
128-
}
129-
}
130-
}
131-
```
132-
133-
</TabItem>
117+
```tf
118+
resource "cloudflare_zero_trust_access_policy" "infra-app-policy" {
119+
application_id = cloudflare_zero_trust_access_application.infra-app.id
120+
account_id = var.cloudflare_account_id
121+
name = "Allow a specific email"
122+
decision = "allow"
123+
precedence = 1
124+
125+
include {
126+
email = ["[email protected]"]
127+
}
128+
129+
connection_rules {
130+
ssh {
131+
usernames = ["root", "ec2-user"]
132+
}
133+
}
134+
}
135+
```
136+
137+
</TabItem>
134138
</Tabs>
135139

136140
The targets in this application are now secured by your infrastructure policies.

0 commit comments

Comments
 (0)