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 import support to okta_profile_mapping #1955

Open
exitcode0 opened this issue Apr 5, 2024 · 9 comments · Fixed by #2004
Open

Add import support to okta_profile_mapping #1955

exitcode0 opened this issue Apr 5, 2024 · 9 comments · Fixed by #2004
Labels
enhancement Asking for new behavior or feature triaged Triaged into internal Jira

Comments

@exitcode0
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Currently the documentation states that there is "no reason" to import okta_profile_mapping

I disagree with this perspective and think that this resource should support import

Adding import support to this resource will make it easier to bring existing configuration under TF management
It means that the terraform plan can be used to align your HCl with the current state of the resource regardless of how you craft your HCL


New or Affected Resource(s)

  • okta_profile_mapping

References


Other information

This is a duplicate of #888 I figured I should raise a new issue rather than necro-post on the old issue, if you feel differently we can close this one and re-open the original

@exitcode0 exitcode0 added the enhancement Asking for new behavior or feature label Apr 5, 2024
@duytiennguyen-okta duytiennguyen-okta added the triaged Triaged into internal Jira label Apr 9, 2024
@duytiennguyen-okta
Copy link
Contributor

OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-717456

@duytiennguyen-okta
Copy link
Contributor

That statement was made 4 years ago and probably not true anymore

@duytiennguyen-okta
Copy link
Contributor

@exitcode0 I have to revert this because of the weird behaviour surrounding d.GetOK()

@exitcode0
Copy link
Contributor Author

@duytiennguyen-okta did the importer not work without the problematic changes to d.GetOK()?

@duytiennguyen-okta
Copy link
Contributor

It is related to delete_when_absent, which impact mappings. I will need to convert from sdk-plugin to plugin-framework to addess the issue

@exitcode0
Copy link
Contributor Author

Is that the only way to work around this?
I'm happy to contribute a PR to get this back into the provider if there is a simpler MVP fix that we can do here, perhaps we can lift inspiration from another resource in the provider?

@duytiennguyen-okta
Copy link
Contributor

duytiennguyen-okta commented Aug 20, 2024

I don't know there is another way, since GetOK() get confused false with null for delete_when_absent, which lead to all kind of issue. The plugin-frameworks will be able to differentiate between these 2 values

@exitcode0
Copy link
Contributor Author

I'm not super familiar with provider development yet, something i'd like to improve so I can contribute more here

Do we have access to d.GetOkExists() easily in this file?

@duytiennguyen-okta
Copy link
Contributor

Yeah. Here is the thread with the same problem that we currently having https://discuss.hashicorp.com/t/terraform-sdk-usage-which-out-of-get-getok-getokexists-with-boolean/41815/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Asking for new behavior or feature triaged Triaged into internal Jira
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants