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

added browser site to device and app management #96

Merged
merged 4 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
page_title: "Data Source: microsoft365_graph_beta_device_and_app_management_assignment_filter"
description: |-

---

# Data Source: microsoft365_graph_beta_device_and_app_management_assignment_filter





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `display_name` (String) The display name of the assignment filter.

### Read-Only

- `assignment_filter_management_type` (String) Indicates filter is applied to either 'devices' or 'apps' management type.
- `created_date_time` (String) The creation time of the assignment filter.
- `description` (String) The description of the assignment filter.
- `id` (String) The unique identifier of the assignment filter.
- `last_modified_date_time` (String) Last modified time of the assignment filter.
- `platform` (String) The Intune device management type (platform) for the assignment filter.
- `role_scope_tags` (List of String) Indicates role scope tags assigned for the assignment filter.
- `rule` (String) Rule definition of the assignment filter.

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
page_title: "Data Source: microsoft365_graph_beta_device_and_app_management_device_management_script"
description: |-
Retrieves information about a device management script.
---

# Data Source: microsoft365_graph_beta_device_and_app_management_device_management_script

Retrieves information about a device management script.



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) Unique identifier for the device management script.

### Read-Only

- `assignments` (Attributes List) The assignments of the device management script. (see [below for nested schema](#nestedatt--assignments))
- `created_date_time` (String) The date and time the device management script was created.
- `description` (String) Description of the device management script.
- `display_name` (String) Name of the device management script.
- `enforce_signature_check` (Boolean) Indicate whether the script signature needs be checked.
- `file_name` (String) Script file name.
- `group_assignments` (Attributes List) The group assignments of the device management script. (see [below for nested schema](#nestedatt--group_assignments))
- `last_modified_date_time` (String) The date and time the device management script was last modified.
- `role_scope_tag_ids` (List of String) List of Scope Tag IDs for this PowerShellScript instance.
- `run_as_32_bit` (Boolean) A value indicating whether the PowerShell script should run as 32-bit.
- `run_as_account` (String) Indicates the type of execution context.
- `script_content` (String, Sensitive) The script content.

<a id="nestedatt--assignments"></a>
### Nested Schema for `assignments`

Read-Only:

- `id` (String) Key of the device management script assignment entity.
- `target` (Attributes) The target of the assignment. (see [below for nested schema](#nestedatt--assignments--target))

<a id="nestedatt--assignments--target"></a>
### Nested Schema for `assignments.target`

Read-Only:

- `device_and_app_management_assignment_filter_id` (String) The Id of the filter for the target assignment.
- `device_and_app_management_assignment_filter_type` (String) The type of filter of the target assignment.
- `entra_object_id` (String) The ID of the Azure Active Directory object.
- `target_type` (String) The target type of the assignment.



<a id="nestedatt--group_assignments"></a>
### Nested Schema for `group_assignments`

Read-Only:

- `id` (String) Key of the device management script group assignment entity.
- `target_group_id` (String) The Id of the Azure Active Directory group we are targeting the script to.

32 changes: 32 additions & 0 deletions docs/data-sources/graph_cloud_pc_device_image.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
page_title: "Data Source: microsoft365_graph_cloud_pc_device_image"
description: |-

---

# Data Source: microsoft365_graph_cloud_pc_device_image





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) The unique identifier (ID) of the image resource on the Cloud PC.

### Read-Only

- `display_name` (String) The display name of the associated device image.
- `error_code` (String) The error code of the status of the image that indicates why the upload failed, if applicable.
- `expiration_date` (String) The date when the image became unavailable.
- `last_modified_date_time` (String) The date and time when the image was last modified.
- `operating_system` (String) The operating system (OS) of the image.
- `os_build_number` (String) The OS build version of the image.
- `os_status` (String) The OS status of this image.
- `source_image_resource_id` (String) The unique identifier (ID) of the source image resource on Azure.
- `status` (String) The status of the image on the Cloud PC.
- `version` (String) The image version.

146 changes: 6 additions & 140 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,150 +1,16 @@
---
page_title: "Provider: m365"
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "microsoft365 Provider"
subcategory: ""
description: |-
The m365 provider is used to manage m365 resources.

---

# m365 Provider
# microsoft365 Provider

The Terraform m365 msgraph provider is a plugin for Terraform that allows for the
management of [m365](https://github.com/microsoftgraph/msgraph-metadata) resources.

## Example Usage

```terraform
# Example backend
terraform {
required_providers {
microsoft365 = {
source = "deploymenttheory/terraform-provider-microsoft365"
version = "~> 1.0.0"
}
}
}

# Example provider
provider "microsoft365" {
tenant_id = var.tenant_id
auth_method = var.auth_method
client_id = var.client_id
client_secret = var.client_secret
client_certificate = var.client_certificate
client_certificate_password = var.client_certificate_password
username = var.username
password = var.password
redirect_url = var.redirect_url
use_proxy = var.use_proxy
proxy_url = var.proxy_url
cloud = var.cloud
enable_chaos = var.enable_chaos
telemetry_optout = var.telemetry_optout
debug_mode = var.debug_mode
}


# Example resource
resource "microsoft365_graph_beta_device_and_app_management_assignment_filter" "example" {
display_name = "Example Filter"
description = "This is an example filter"
platform = "windows10"
rule = "(device.manufacturer -eq \"Microsoft\")"
}

# Variables
variable "cloud" {
description = "The cloud to use for authentication and Graph / Graph Beta API requests. Default is `public`. Valid values are `public`, `gcc`, `gcchigh`, `china`, `dod`, `ex`, `rx`. Can also be set using the `M365_CLOUD` environment variable."
type = string
default = "public"
}

variable "tenant_id" {
description = "The M365 tenant ID for the Entra ID application. This ID uniquely identifies your Entra ID (EID) instance. It can be found in the Azure portal under Entra ID > Properties. Can also be set using the `M365_TENANT_ID` environment variable."
type = string
default = ""
}

variable "auth_method" {
description = "The authentication method to use for the Entra ID application to authenticate the provider. Options: 'device_code', 'client_secret', 'client_certificate', 'interactive_browser', 'username_password'. Can also be set using the `M365_AUTH_METHOD` environment variable."
type = string
default = "client_secret"
}

variable "client_id" {
description = "The client ID for the Entra ID application. This ID is generated when you register an application in the Entra ID (Azure AD) and can be found under App registrations > YourApp > Overview. Can also be set using the `M365_CLIENT_ID` environment variable."
type = string
default = ""
}

variable "client_secret" {
description = "The client secret for the Entra ID application. This secret is generated in the Entra ID (Azure AD) and is required for authentication flows such as client credentials and on-behalf-of flows. It can be found under App registrations > YourApp > Certificates & secrets. Required for client credentials and on-behalf-of flows. Can also be set using the `M365_CLIENT_SECRET` environment variable."
type = string
sensitive = true
default = ""
}

variable "client_certificate" {
description = "The path to the Client Certificate associated with the Service Principal for use when authenticating as a Service Principal using a Client Certificate. Can also be set using the `M365_CLIENT_CERTIFICATE_FILE_PATH` environment variable."
type = string
sensitive = true
default = ""
}

variable "client_certificate_password" {
description = "The password associated with the Client Certificate. For use when authenticating as a Service Principal using a Client Certificate. Can also be set using the `M365_CLIENT_CERTIFICATE_PASSWORD` environment variable."
type = string
sensitive = true
default = ""
}

variable "username" {
description = "The username for username/password authentication. Can also be set using the `M365_USERNAME` environment variable."
type = string
default = ""
}

variable "password" {
description = "The password for username/password authentication. Can also be set using the `M365_PASSWORD` environment variable."
type = string
sensitive = true
default = ""
}

variable "redirect_url" {
description = "The redirect URL for interactive browser authentication. Can also be set using the `M365_REDIRECT_URL` environment variable."
type = string
default = ""
}

variable "use_proxy" {
description = "Enables the use of an HTTP proxy for network requests. When set to true, the provider will route all HTTP requests through the specified proxy server. This can be useful for environments that require proxy access for internet connectivity or for monitoring and logging HTTP traffic. Can also be set using the `M365_USE_PROXY` environment variable."
type = bool
default = false
}

variable "proxy_url" {
description = "Specifies the URL of the HTTP proxy server. This URL should be in a valid URL format (e.g., 'http://proxy.example.com:8080'). When 'use_proxy' is enabled, this URL is used to configure the HTTP client to route requests through the proxy. Ensure the proxy server is reachable and correctly configured to handle the network traffic. Can also be set using the `M365_PROXY_URL` environment variable."
type = string
default = ""
}

variable "enable_chaos" {
description = "Enable the chaos handler for testing purposes. When enabled, the chaos handler can simulate specific failure scenarios and random errors in API responses to help test the robustness and resilience of the terraform provider against intermittent issues. This is particularly useful for testing how the provider handles various error conditions and ensures it can recover gracefully. Use with caution in production environments. Can also be set using the `M365_ENABLE_CHAOS` environment variable."
type = bool
default = false
}

variable "telemetry_optout" {
description = "Flag to indicate whether to opt out of telemetry. Default is `false`. Can also be set using the `M365_TELEMETRY_OPTOUT` environment variable."
type = bool
default = false
}

variable "debug_mode" {
description = "Flag to enable debug mode for the provider. When enabled, the provider will output additional debug information to the console to help diagnose issues. Can also be set using the `M365_DEBUG_MODE` environment variable."
type = bool
default = false
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -363,4 +229,4 @@ Usage:
- Typically, this is the user's email address or User Principal Name (UPN)
- Ensure the user has appropriate permissions for the required operations

Can be set using the `M365_USERNAME` environment variable.
Can be set using the `M365_USERNAME` environment variable.
File renamed without changes.
Loading
Loading