Skip to content

Commit 0fa5ca2

Browse files
authored
feat: added resource microsoft365_graph_beta_agents_agent_identity_blueprint , microsoft365_graph_beta_agents_agent_identity_blueprint_federated_identity_credential , microsoft365_graph_beta_agents_agent_identity_blueprint_identifier_uri , microsoft365_graph_beta_agents_agent_identity_blueprint_password_credential and microsoft365_graph_beta_agents_agent_identity_blueprint_service_principal (#1291)
* fix: added MEM to datasource utilityMicrosoft365EndpointReference * chore: updated docs * fix: replace hardcoded regex for UUID and UPN validation with constants * feat: added numerous agents resources
1 parent 9628c6e commit 0fa5ca2

File tree

218 files changed

+13806
-984
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+13806
-984
lines changed

.github/workflows/bi-weekly-tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ jobs:
101101
fail-fast: false # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstrategyfail-fast
102102
matrix:
103103
include:
104+
- service: agents
105+
runner: ubuntu-24.04-arm
104106
- service: applications
105107
runner: ubuntu-24.04-arm
106108
- service: backup_storage
@@ -216,6 +218,8 @@ jobs:
216218
fail-fast: false
217219
matrix:
218220
include: # testing both ubuntu-24.04-arm and ubuntu-24.04-arm
221+
- service: agents
222+
runner: ubuntu-24.04-arm
219223
- service: applications
220224
runner: ubuntu-24.04-arm
221225
- service: device_and_app_management
@@ -266,6 +270,8 @@ jobs:
266270

267271
- name: Set service credentials
268272
env:
273+
M365_CLIENT_ID_AGENTS: ${{ secrets.M365_CLIENT_ID_AGENTS }}
274+
M365_CLIENT_SECRET_AGENTS: ${{ secrets.M365_CLIENT_SECRET_AGENTS }}
269275
M365_CLIENT_ID_APPLICATIONS: ${{ secrets.M365_CLIENT_ID_APPLICATIONS }}
270276
M365_CLIENT_SECRET_APPLICATIONS: ${{ secrets.M365_CLIENT_SECRET_APPLICATIONS }}
271277
M365_CLIENT_ID_DEVICE_AND_APP_MGMT: ${{ secrets.M365_CLIENT_ID_DEVICE_AND_APP_MGMT }}
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
---
2+
page_title: "microsoft365_graph_beta_agents_agent_identity_blueprint Resource - terraform-provider-microsoft365"
3+
subcategory: "Agents"
4+
5+
description: |-
6+
Manages an Agent Identity Blueprint in Microsoft Entra ID using the /applications/microsoft.graph.agentIdentityBlueprint endpoint. An agent identity blueprint serves as a template for creating agent identities within the Microsoft Entra ID ecosystem. This resource inherits from the application resource type.
7+
---
8+
9+
# microsoft365_graph_beta_agents_agent_identity_blueprint (Resource)
10+
11+
Manages an Agent Identity Blueprint in Microsoft Entra ID using the `/applications/microsoft.graph.agentIdentityBlueprint` endpoint. An agent identity blueprint serves as a template for creating agent identities within the Microsoft Entra ID ecosystem. This resource inherits from the application resource type.
12+
13+
## Microsoft Documentation
14+
15+
- [agentIdentityBlueprint resource type](https://learn.microsoft.com/en-us/graph/api/resources/agentidentityblueprint?view=graph-rest-beta)
16+
- [Create agentIdentityBlueprint](https://learn.microsoft.com/en-us/graph/api/agentidentityblueprint-post?view=graph-rest-beta&tabs=http)
17+
- [Update agentIdentityBlueprint](https://learn.microsoft.com/en-us/graph/api/agentidentityblueprint-update?view=graph-rest-beta&tabs=http)
18+
- [Delete agentIdentityBlueprint](https://learn.microsoft.com/en-us/graph/api/agentidentityblueprint-delete?view=graph-rest-beta&tabs=http)
19+
20+
## API Permissions
21+
22+
The following API permissions are required in order to use this resource.
23+
24+
### Microsoft Graph
25+
26+
- **Application**: `AgentIdentityBlueprint.Read.All`, `AgentIdentityBlueprint.ReadWrite.All`, `AgentIdentityBlueprint.Create`, `AgentIdentityBlueprint.AddRemoveCreds.All`, `AgentIdentityBlueprint.UpdateBranding.All`, `Directory.Read.All`, `Directory.ReadWrite.All`
27+
28+
Find out more about the permissions required for managing agent identities at microsoft learn [here](https://learn.microsoft.com/en-us/graph/api/resources/agentid-platform-overview?view=graph-rest-beta#permissions-for-managing-agent-identities).
29+
30+
## Version History
31+
32+
| Version | Status | Notes |
33+
|---------|--------|-------|
34+
| v0.38.0 | Experimental | Initial release |
35+
36+
## Example Usage
37+
38+
### Minimal Example
39+
40+
```terraform
41+
# Minimal Agent Identity Blueprint configuration
42+
# Creates an agent identity blueprint with required fields only
43+
resource "microsoft365_graph_beta_agents_agent_identity_blueprint" "minimal" {
44+
display_name = "My Agent Blueprint"
45+
46+
sponsor_user_ids = ["00000000-0000-0000-0000-000000000000"]
47+
owner_user_ids = ["00000000-0000-0000-0000-000000000000"]
48+
}
49+
```
50+
51+
### Maximal Example
52+
53+
```terraform
54+
# Maximal Agent Identity Blueprint configuration
55+
# Creates an agent identity blueprint with all available fields configured
56+
resource "microsoft365_graph_beta_agents_agent_identity_blueprint" "maximal" {
57+
display_name = "Production AI Agent Blueprint"
58+
description = "Blueprint for AI agents used in production workloads with full governance controls"
59+
60+
sponsor_user_ids = [
61+
"00000000-0000-0000-0000-000000000001",
62+
"00000000-0000-0000-0000-000000000002",
63+
]
64+
65+
owner_user_ids = [
66+
"00000000-0000-0000-0000-000000000001",
67+
"00000000-0000-0000-0000-000000000002",
68+
]
69+
70+
tags = [
71+
"production",
72+
"ai-agent",
73+
"managed-by-terraform"
74+
]
75+
76+
timeouts = {
77+
create = "10m"
78+
read = "5m"
79+
update = "10m"
80+
delete = "5m"
81+
}
82+
}
83+
```
84+
85+
<!-- schema generated by tfplugindocs -->
86+
## Schema
87+
88+
### Required
89+
90+
- `display_name` (String) The display name for the agent identity blueprint. Maximum length is 256 characters. Required.
91+
- `owner_user_ids` (Set of String) The user IDs of the owners for the agent identity blueprint. At least one owner is required when creating an agent identity blueprint. Owners are users who have full control over the blueprint.
92+
- `sponsor_user_ids` (Set of String) The user IDs of the sponsors for the agent identity blueprint. At least one sponsor is required when creating an agent identity blueprint. Sponsors are users who can approve or oversee the blueprint.
93+
94+
### Optional
95+
96+
- `description` (String) Free text field to provide a description of the agent identity blueprint to end users. Maximum length is 1,024 characters.
97+
- `sign_in_audience` (String) Specifies the Microsoft accounts that are supported for the current application. Supported values are: `AzureADMyOrg` (Single tenant), the following values from testing don't work: `AzureADMultipleOrgs` (Multi-tenant), `AzureADandPersonalMicrosoftAccount` (Multi-tenant and personal accounts), `PersonalMicrosoftAccount` (Personal accounts only).
98+
- `tags` (Set of String) Custom strings that can be used to categorize and identify the agent identity blueprint.
99+
- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts))
100+
101+
### Read-Only
102+
103+
- `app_id` (String) The unique identifier for the application that is assigned to the agent identity blueprint by Microsoft Entra ID. Also known as Application (client) ID. Read-only.
104+
- `id` (String) The unique identifier for the agent identity blueprint. This property is referred to as Object ID in the Microsoft Entra admin center. Read-only.
105+
106+
<a id="nestedatt--timeouts"></a>
107+
### Nested Schema for `timeouts`
108+
109+
Optional:
110+
111+
- `create` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
112+
- `delete` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
113+
- `read` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
114+
- `update` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
115+
116+
## Import
117+
118+
Import is supported using the following syntax:
119+
120+
```shell
121+
#!/bin/bash
122+
123+
# Import an existing Agent Identity Blueprint using the Object ID (id)
124+
# The ID can be found in the Microsoft Entra admin center under:
125+
# Applications > App registrations > [Your Blueprint] > Overview > Object ID
126+
terraform import microsoft365_graph_beta_agents_agent_identity_blueprint.example 00000000-0000-0000-0000-000000000000
127+
```
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "microsoft365_graph_beta_agents_agent_identity_blueprint_certificate_credential Resource - Microsoft 365"
4+
subcategory: ""
5+
description: |-
6+
Manages a certificate credential for an Agent Identity Blueprint application using the Microsoft Graph Beta API. This resource uses PATCH on the application's keyCredentials property with OData type cast to microsoft.graph.agentIdentityBlueprint.
7+
---
8+
9+
# microsoft365_graph_beta_agents_agent_identity_blueprint_certificate_credential (Resource)
10+
11+
Manages a certificate credential for an Agent Identity Blueprint application using the Microsoft Graph Beta API. This resource uses PATCH on the application's keyCredentials property with OData type cast to microsoft.graph.agentIdentityBlueprint.
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- `blueprint_id` (String) The unique identifier of the agent identity blueprint application.
21+
- `key` (String, Sensitive) The certificate's raw data in PEM format. Use `file("path/to/cert.pem")` to read the certificate file.
22+
23+
### Optional
24+
25+
- `display_name` (String) Friendly name for the certificate. Optional.
26+
- `end_date_time` (String) The date and time at which the credential expires. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2025 is 2025-01-01T00:00:00Z. Required.
27+
- `replace_existing_certificates` (Boolean) When `true`, replaces all existing certificates on the application. When `false` (default), preserves existing certificates and adds the new one.
28+
- `start_date_time` (String) The date and time at which the credential becomes valid. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. If not specified, defaults to the current time.
29+
- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts))
30+
- `type` (String) The type of key credential. Must be `AsymmetricX509Cert`.
31+
- `usage` (String) A string that describes the purpose for which the key can be used. Must be `Verify`.
32+
33+
### Read-Only
34+
35+
- `custom_key_identifier` (String) A 40-character binary type that can be used to identify the credential. Optional. When not provided in the payload, defaults to the thumbprint of the certificate.
36+
- `key_id` (String) The unique identifier (GUID) for the key credential.
37+
- `thumbprint` (String) The thumbprint (SHA-1 hash) of the certificate.
38+
39+
<a id="nestedatt--timeouts"></a>
40+
### Nested Schema for `timeouts`
41+
42+
Optional:
43+
44+
- `create` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
45+
- `delete` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
46+
- `read` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
47+
- `update` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

0 commit comments

Comments
 (0)