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

feat(resource-import-script): script to automate import of existing users into groups as terraform resource #2778

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

Aashirwadjain
Copy link
Collaborator

@Aashirwadjain Aashirwadjain commented Nov 25, 2024

Description

This feature builds a Golang script that automates the importation of existing users into Terraform and their addition to specified groups. The script will streamline the process for customers who wish to transition from UI-based management to Terraform.

  • The script retrieves existing users and groups using the NerdGraph API.
  • The script will manage file operations necessary for generating and updating Terraform configuration files.
  • The generated configuration will ensure that all imported users are correctly referenced in their respective group.
  • The script automatically runs terraform import command to import the generated configuration.

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

Please delete options that are not relevant.

  • My commit message follows conventional commits
  • My code is formatted to Go standards
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes. Go here for instructions on running tests locally.

How to test this change?

  • go run main.go groupId apiKey path

@pranav-new-relic pranav-new-relic merged commit 882ec35 into main Nov 26, 2024
11 of 12 checks passed
@pranav-new-relic pranav-new-relic deleted the terraform-import-resources-script branch November 26, 2024 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants