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

Consistent IAM resource imports. #835

Merged
merged 6 commits into from
Dec 11, 2017

Conversation

nat-henderson
Copy link
Contributor

@nat-henderson nat-henderson commented Dec 9, 2017

  • Anything with IAM resources can implement a simple ID parser method and begin working.
  • Added ID parser methods for folders, projects, organizations, kms crypto keys, and kms key rings.
  • Added docs and tests for the imports.

Fixes #756

- Projects and folders can have bindings, members, and policies imported.
- Anything else with IAM can implement a simple method and begin working immediately.

Still TODO:
- tests
- documentation
- KMS crypto key
- KMS key ring
@nat-henderson nat-henderson requested a review from rosbo December 9, 2017 00:02
@nat-henderson
Copy link
Contributor Author

The import tests pass on my machine with my org / project combo.

google/iam.go Outdated

type resourceIdParserFunc func(d *schema.ResourceData, config *Config) error

func iamPolicyImport(resourceIdParser resourceIdParserFunc) schema.StateFunc {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider moving the iamPolicyImport, iamPolicyBinding and iamPolicyMember functions into their respective resource_iam_* file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call! Done.

@rosbo
Copy link
Contributor

rosbo commented Dec 11, 2017

Build is failing because of unused or missing imports after the move.

@nat-henderson
Copy link
Contributor Author

Fixed that - should have tried a test after that. :)

@nat-henderson nat-henderson merged commit ced8cb5 into hashicorp:master Dec 11, 2017
@nat-henderson nat-henderson deleted the import_iam branch December 11, 2017 18:24
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
Add consistency for for IAM imports.
- Adds imports for projects, folders, crypto keys, organizations, and key rings.
- Anything else with IAM can implement a simple method and begin working immediately.
- Add tests for all the IAM imports.
- Import documentation for IAM resources.
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this pull request Sep 27, 2019
@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add import support for iam resource.
2 participants