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

refactor: Migrate Resource: mongodbatlas_project to Terraform Plugin Framework and remove api_keys attribute #1365

Merged

Conversation

maastha
Copy link
Collaborator

@maastha maastha commented Aug 2, 2023

Description

Migrate Resource: mongodbatlas_project to Terraform Plugin Framework.

  • This PR also removes api_keys attribute from project resource.

Link to any related issue(s): INTMDB-908

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contribution guidelines
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

@maastha maastha changed the base branch from master to CLOUDP-189585-plugin-framework-migration August 2, 2023 20:28
@maastha maastha changed the base branch from CLOUDP-189585-plugin-framework-migration to INTMDB-971 August 3, 2023 17:38
@maastha maastha marked this pull request as ready for review August 4, 2023 09:58
@maastha maastha requested a review from a team as a code owner August 4, 2023 09:58
@maastha maastha changed the title refactor: Migrate Resource: mongodbatlas_project to Terraform Plugin Framework refactor: Migrate Resource: mongodbatlas_project to Terraform Plugin Framework and remove api_keys attribute Aug 4, 2023
mongodbatlas/fw_data_source_mongodbatlas_project.go Outdated Show resolved Hide resolved
mongodbatlas/fw_data_source_mongodbatlas_project.go Outdated Show resolved Hide resolved
mongodbatlas/fw_data_source_mongodbatlas_project.go Outdated Show resolved Hide resolved
mongodbatlas/fw_data_source_mongodbatlas_project.go Outdated Show resolved Hide resolved
mongodbatlas/fw_resource_mongodbatlas_project.go Outdated Show resolved Hide resolved
mongodbatlas/fw_resource_mongodbatlas_project.go Outdated Show resolved Hide resolved
mongodbatlas/fw_resource_mongodbatlas_project.go Outdated Show resolved Hide resolved
mongodbatlas/provider_test.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@andreaangiolillo andreaangiolillo left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for addressing all the comments. (Make sure that the failing tests is not related to your changes)

@maastha
Copy link
Collaborator Author

maastha commented Aug 9, 2023

LGTM. Thanks for addressing all the comments. (Make sure that the failing tests is not related to your changes)

All project* acceptance tests passing.

@@ -0,0 +1,255 @@
package mongodbatlas

Copy link
Collaborator

Choose a reason for hiding this comment

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

does "fw_" ahead of each of the file names stand for "framework"? if so suggest we call out somewhere in repo README file to let users know which resources / data sources have been migrated to new Terraform Plugin Framework

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Zuhairahmed added to CONTRIBUTING.md

Copy link
Collaborator

@Zuhairahmed Zuhairahmed left a comment

Choose a reason for hiding this comment

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

minor suggestion comment, otherwise LGTM

Base automatically changed from INTMDB-971 to CLOUDP-189585-plugin-framework-migration August 10, 2023 07:07
AgustinBettati and others added 5 commits August 10, 2023 11:32
…rver with existing sdk v2 provider (#1366)

* feat: define new framework provider, configure main and acceptance tests to use mux server with existing sdk v2 provider

* fix ConflictsWith attribute validation and parsing of list values in assume role schema

* refactor: addressing PR comments for linting and code cleanup

* fix: define provider version in framework provider Metadata function

* doc: add description for AWS Secrets Manager provider config attributes

* refactor mux provider fractory method name and comments

* doc: inlcude terraform version requirement in docs

* refactor: remove redundant else statement

* refactor: improve readability of methods in fw_provider + comments
@maastha maastha merged commit e4cfa54 into CLOUDP-189585-plugin-framework-migration Aug 10, 2023
18 checks passed
@maastha maastha deleted the INTMDB-908-migrate-project branch August 10, 2023 12:08
resp.Diagnostics.Append(resp.State.Set(ctx, &projectPlanNew)...)
}

func (r *ProjectRS) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

.

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.

None yet

4 participants