You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request introduces significant updates to the OneLogin
Terraform provider, primarily focused on adding support for User
Mappings, upgrading dependencies, and improving examples and
documentation. Key changes include the addition of a new
`onelogin_user_mappings` resource with full CRUD operations, updates to
the OneLogin SDK, and enhancements to code organization and examples.
### New Feature: User Mappings Support
* Added the `onelogin_user_mappings` resource, enabling full CRUD
operations for user mappings, including support for conditions and
actions. This involved changes to
`onelogin/resource_onelogin_user_mappings.go` and the addition of helper
functions for flattening conditions and actions
(`[[1]](diffhunk://#diff-ce3ef94c410a70a22a90ba56073b17b14984c1d1b782de5fc363bbd923d4c830L1-L3)`,
`[[2]](diffhunk://#diff-ce3ef94c410a70a22a90ba56073b17b14984c1d1b782de5fc363bbd923d4c830L37-R41)`,
`[[3]](diffhunk://#diff-ce3ef94c410a70a22a90ba56073b17b14984c1d1b782de5fc363bbd923d4c830L100-R137)`,
`[[4]](diffhunk://#diff-2db7de13637ce2a17759f61145cb5530c9b761a804ff577d690853867a4c0d47R113-R145)`).
* Updated the `Inflate` function to return an error for better error
handling during user mapping creation
(`[[1]](diffhunk://#diff-2db7de13637ce2a17759f61145cb5530c9b761a804ff577d690853867a4c0d47L57-R57)`,
`[[2]](diffhunk://#diff-2db7de13637ce2a17759f61145cb5530c9b761a804ff577d690853867a4c0d47L94-R94)`).
* Re-enabled the `onelogin_user_mappings` resource in the provider
configuration
(`[onelogin/provider.goL71-R71](diffhunk://#diff-67f9eb98d74e43b0177e4868b4575c740c8fed94dc98974964d3601c3c609b94L71-R71)`).
### Dependency Upgrades
* Upgraded the OneLogin SDK to version `v4.4.0` to support the new User
Mappings functionality
(`[go.modL9-R9](diffhunk://#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6L9-R9)`).
* Updated the `VERSION` in `GNUmakefile` to `0.8.0` to reflect the new
release
(`[GNUmakefileL13-R13](diffhunk://#diff-e3445fc75aa9c3e4a60fbe5394dcce12693022018216a8fbe0000fe9952850a6L13-R13)`).
### Documentation and Examples
* Updated `README.md` to include details about the new `v0.8.0` release,
including User Mappings support and examples for configuration
(`[[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R7-R15)`,
`[[2]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L67-R76)`).
* Added and updated examples for User Mappings in
`examples/onelogin_user_mapping_example.tf` and
`examples/onelogin_user_mapping_updated_example.tf`, showcasing basic
and advanced configurations
(`[[1]](diffhunk://#diff-2f572e4f691157993ece38eeb8b411a2016c0432171ca314669411e89abcaeabL1-R68)`,
`[[2]](diffhunk://#diff-34377eac802fb69d90811104fba7331a3df19103ce5ecace4d014229ae4dc2cdL1-R71)`).
* Updated the `getting-started/README.md` and `main.tf` files to reflect
the new provider version `0.8.0` and provide installation instructions
(`[[1]](diffhunk://#diff-ce2a8ca7a1f56da427e3b975745401cf814bdec361bd98d5b149338042b1bc94L49-R73)`,
`[[2]](diffhunk://#diff-ce2a8ca7a1f56da427e3b975745401cf814bdec361bd98d5b149338042b1bc94L85-R99)`,
`[[3]](diffhunk://#diff-686c7e2608ae0ae77dda823d90c8802afb9823cbe9c86c8b37e31a8968079d0aL5-R13)`).
### Code Quality and Testing
* Added new test cases to validate the `Inflate` function changes and
ensure proper error handling
(`[ol_schema/user_mapping/user_mapping_test.goL129-R130](diffhunk://#diff-ac10ab9fd6d69c7ffbdfdec6dc7262d4390f8a106a7805d377f20ffa7b942060L129-R130)`).
* Improved code organization and naming consistency by removing unused
imports and simplifying logic in `resource_onelogin_user_mappings.go`
(`[onelogin/resource_onelogin_user_mappings.goL16-L19](diffhunk://#diff-ce3ef94c410a70a22a90ba56073b17b14984c1d1b782de5fc363bbd923d4c830L16-L19)`).
These updates collectively enhance the functionality, usability, and
maintainability of the OneLogin Terraform provider.
> **Note:** The exact structure and filenames inside the zip may vary between releases. After extraction, check the actual contents with `ls` or `Get-ChildItem` and adjust the copy commands accordingly. The binary may be in a subdirectory or have a slightly different name.
Copy file name to clipboardExpand all lines: getting-started/main.tf
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,15 @@ terraform {
2
2
required_providers {
3
3
onelogin={
4
4
source ="onelogin/onelogin"
5
-
version ="0.7.0"
5
+
version ="0.8.0"
6
6
}
7
7
}
8
8
}
9
9
10
10
provider"onelogin" {
11
11
client_id="YOUR_CLIENT_ID"# Replace with your OneLogin Client ID
12
12
client_secret="YOUR_CLIENT_SECRET"# Replace with your OneLogin Client Secret
13
-
url="YOUR_API_URL"# Replace with your OneLogin API URL (e.g., "https://company.onelogin.com"). Note: The 'subdomain' attribute has been replaced by 'url' in version 0.6.0. Update your configuration by replacing 'subdomain = "company"' with 'url = "https://company.onelogin.com"'.
13
+
url="YOUR_API_URL"# Replace with your OneLogin API URL (e.g., "https://company.onelogin.com")
0 commit comments