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

INTMDB-546: [Terraform] Feature Add: Shared-Tier Restore Job #1324

Merged
merged 22 commits into from
Jul 21, 2023

Conversation

andreaangiolillo
Copy link
Collaborator

@andreaangiolillo andreaangiolillo commented Jul 17, 2023

Description

Ticket: INTMDB-546

This PR adds support for mongodbatlas_shared_tier_restore_job and mongodbatlas_shared_tier_restore_jobs

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

terraform state show data.mongodbatlas_shared_tier_restore_job.test

# data.mongodbatlas_shared_tier_restore_job.test:
data "mongodbatlas_shared_tier_restore_job" "test" {
    cluster_name                = "Cluster0"
    delivery_type               = "RESTORE"
    expiration_date             = "2023-07-18 17:53:28 +0000 UTC"
    id                          = "64b67d380c6a23266c1c3519"
    job_id                      = "64b67d380c6a23266c1c3519"
    project_id                  = "63dcfc256af00a5934e60924"
    restore_finished_date       = "2023-07-18 11:54:43 +0000 UTC"
    restore_scheduled_date      = "2023-07-18 11:53:28 +0000 UTC"
    snapshot_finished_date      = "2023-07-18 07:33:54 +0000 UTC"
    snapshot_id                 = "64b63fb50288d52922020d24"
    status                      = "COMPLETED"
    target_deployment_item_name = "Cluster1"
    target_project_id           = "63dcfc256af00a5934e60924"
}
terraform state show data.mongodbatlas_shared_tier_restore_jobs.test

# data.mongodbatlas_shared_tier_restore_jobs.test:
data "mongodbatlas_shared_tier_restore_jobs" "test" {
    cluster_name = "Cluster0"
    id           = "terraform-20230718115856427600000001"
    project_id   = "63dcfc256af00a5934e60924"
    results      = [
        {
            delivery_type               = "RESTORE"
            expiration_date             = "2023-07-18 17:53:28 +0000 UTC"
            job_id                      = "64b67d380c6a23266c1c3519"
            restore_finished_date       = "2023-07-18 11:54:43 +0000 UTC"
            restore_scheduled_date      = "2023-07-18 11:53:28 +0000 UTC"
            snapshot_finished_date      = "2023-07-18 07:33:54 +0000 UTC"
            snapshot_id                 = "64b63fb50288d52922020d24"
            snapshot_url                = ""
            status                      = "COMPLETED"
            target_deployment_item_name = "Cluster1"
            target_project_id           = "63dcfc256af00a5934e60924"
        },
    ]
    total_count  = 1
}

@andreaangiolillo andreaangiolillo changed the title INTMDB-546: INTMDB-546: [Terraform] Feature Add: Shared-Tier Snapshots Jul 18, 2023
@andreaangiolillo andreaangiolillo changed the title INTMDB-546: [Terraform] Feature Add: Shared-Tier Snapshots INTMDB-546: [Terraform] Feature Add: Shared-Tier Restore Job Jul 18, 2023
@wtrocki
Copy link
Member

wtrocki commented Jul 19, 2023

Excellent PR! thank you so much. I left a couple of open-ended questions for your consideration.
No blockers.

@andreaangiolillo andreaangiolillo marked this pull request as ready for review July 19, 2023 10:25
@andreaangiolillo andreaangiolillo requested a review from a team as a code owner July 19, 2023 10:25
Copy link
Member

@wtrocki wtrocki left a comment

Choose a reason for hiding this comment

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

LGTM from SDK point of view. I haven't verified the changes.

Copy link
Collaborator

@maastha maastha left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Few comments on docs, feel free to merge after addressing. After that LGTM

andreaangiolillo and others added 4 commits July 20, 2023 08:08
…kdown

Co-authored-by: Zuhair Ahmed <zuhair.ahmed@mongodb.com>
…rkdown

Co-authored-by: Zuhair Ahmed <zuhair.ahmed@mongodb.com>
…kdown

Co-authored-by: Zuhair Ahmed <zuhair.ahmed@mongodb.com>
…rkdown

Co-authored-by: Zuhair Ahmed <zuhair.ahmed@mongodb.com>
@andreaangiolillo andreaangiolillo merged commit 7f06cac into master Jul 21, 2023
17 checks passed
@andreaangiolillo andreaangiolillo deleted the INTMDB-546 branch July 21, 2023 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants