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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ebaas) enterprise BaaS #4845

Merged
merged 2 commits into from Oct 17, 2023
Merged

feat(ebaas) enterprise BaaS #4845

merged 2 commits into from Oct 17, 2023

Conversation

sreekarbvibm
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 馃憤 reaction to the original pull request comment 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 pull request followers and do not help prioritize the request

Relates OR Closes #0000

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

@sreekarbvibm sreekarbvibm marked this pull request as ready for review October 6, 2023 07:27
@deepaksibm
Copy link
Contributor

Prod testing output


bp_dat = {
  "created_at" = "2023-10-06T09:28:13.000Z"
  "crn" = "crn:v1:bluemix:public:is:au-syd:a/ea1ef237216e4f9e8e6f76eccec761f8::backup-policy:r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
  "health_reasons" = tolist([])
  "health_state" = "ok"
  "href" = "https://au-syd.iaas.cloud.ibm.com/v1/backup_policies/r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
  "id" = "r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
  "identifier" = tostring(null)
  "last_job_completed_at" = tostring(null)
  "lifecycle_state" = "stable"
  "match_resource_types" = tolist([
    "volume",
  ])
  "match_user_tags" = tolist([
    "dev:test",
  ])
  "name" = "tfp-ebaas-test-policy"
  "plans" = tolist([])
  "resource_group" = tolist([
    {
      "href" = "https://resource-controller.cloud.ibm.com/v2/resource_groups/61429488cd724d77bdec07f394324a87"
      "id" = "61429488cd724d77bdec07f394324a87"
      "name" = "Default"
    },
  ])
  "resource_type" = "backup_policy"
  "scope" = tolist([
    {
      "crn" = "crn:v1:bluemix:public:enterprise::a/ea1ef237216e4f9e8e6f76eccec761f8::enterprise:b039819424b341bc8b5f4df16c4f1460"
      "id" = "b039819424b341bc8b5f4df16c4f1460"
      "resource_type" = "enterprise"
    },
  ])
}
bp_dats = {
  "backup_policies" = tolist([
    {
      "created_at" = "2023-10-06T09:28:13.000Z"
      "crn" = "crn:v1:bluemix:public:is:au-syd:a/ea1ef237216e4f9e8e6f76eccec761f8::backup-policy:r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
      "health_reasons" = tolist([])
      "health_state" = "ok"
      "href" = "https://au-syd.iaas.cloud.ibm.com/v1/backup_policies/r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
      "id" = "r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
      "last_job_completed_at" = ""
      "lifecycle_state" = "stable"
      "match_resource_types" = tolist([
        "volume",
      ])
      "match_user_tags" = tolist([
        "dev:test",
      ])
      "name" = "tfp-ebaas-test-policy"
      "plans" = tolist([])
      "resource_group" = tolist([
        {
          "href" = "https://resource-controller.cloud.ibm.com/v2/resource_groups/61429488cd724d77bdec07f394324a87"
          "id" = "61429488cd724d77bdec07f394324a87"
          "name" = "Default"
        },
      ])
      "resource_type" = "backup_policy"
      "scope" = tolist([
        {
          "crn" = "crn:v1:bluemix:public:enterprise::a/ea1ef237216e4f9e8e6f76eccec761f8::enterprise:b039819424b341bc8b5f4df16c4f1460"
          "id" = "b039819424b341bc8b5f4df16c4f1460"
          "resource_type" = "enterprise"
        },
      ])
    },
  ])
  "id" = "2023-10-06 09:30:05.421109 +0000 UTC"
  "name" = tostring(null)
  "resource_group" = tostring(null)
  "tag" = tostring(null)
}
bp_res = {
  "created_at" = "2023-10-06T09:28:13.000Z"
  "crn" = "crn:v1:bluemix:public:is:au-syd:a/ea1ef237216e4f9e8e6f76eccec761f8::backup-policy:r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
  "health_reasons" = tolist([])
  "health_state" = "ok"
  "href" = "https://au-syd.iaas.cloud.ibm.com/v1/backup_policies/r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
  "id" = "r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
  "last_job_completed_at" = tostring(null)
  "lifecycle_state" = "stable"
  "match_resource_types" = toset([
    "volume",
  ])
  "match_user_tags" = toset([
    "dev:test",
  ])
  "name" = "tfp-ebaas-test-policy"
  "resource_group" = "61429488cd724d77bdec07f394324a87"
  "resource_type" = "backup_policy"
  "scope" = tolist([
    {
      "crn" = "crn:v1:bluemix:public:enterprise::a/ea1ef237216e4f9e8e6f76eccec761f8::enterprise:b039819424b341bc8b5f4df16c4f1460"
      "id" = "b039819424b341bc8b5f4df16c4f1460"
      "resource_type" = "enterprise"
    },
  ])
  "version" = "W/af39259ab442aa9a5cfb3b4f8e4af15f82a854692be82e7f9555d6007a26555d"
}

@deepaksibm
Copy link
Contributor

data "ibm_is_backup_policies" "policies" {
    backup_policies = [
        {
            created_at            = "2023-10-06T09:28:13.000Z"
            crn                   = "crn:v1:bluemix:public:is:au-syd:a/ea1ef237216e4f9e8e6f76eccec761f8::backup-policy:r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
            health_reasons        = []
            health_state          = "ok"
            href                  = "https://au-syd.iaas.cloud.ibm.com/v1/backup_policies/r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
            id                    = "r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
            last_job_completed_at = ""
            lifecycle_state       = "stable"
            match_resource_types  = [
                "volume",
            ]
            match_user_tags       = [
                "dev:test",
            ]
            name                  = "tfp-ebaas-test-policy"
            plans                 = []
            resource_group        = [
                {
                    href = "https://resource-controller.cloud.ibm.com/v2/resource_groups/61429488cd724d77bdec07f394324a87"
                    id   = "61429488cd724d77bdec07f394324a87"
                    name = "Default"
                },
            ]
            resource_type         = "backup_policy"
            scope                 = [
                {
                    crn           = "crn:v1:bluemix:public:enterprise::a/ea1ef237216e4f9e8e6f76eccec761f8::enterprise:b039819424b341bc8b5f4df16c4f1460"
                    id            = "b039819424b341bc8b5f4df16c4f1460"
                    resource_type = "enterprise"
                },
            ]
        },
    ]
    id              = "2023-10-06 09:30:05.421109 +0000 UTC"
}

# data.ibm_is_backup_policy.policy:
data "ibm_is_backup_policy" "policy" {
    created_at           = "2023-10-06T09:28:13.000Z"
    crn                  = "crn:v1:bluemix:public:is:au-syd:a/ea1ef237216e4f9e8e6f76eccec761f8::backup-policy:r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
    health_reasons       = []
    health_state         = "ok"
    href                 = "https://au-syd.iaas.cloud.ibm.com/v1/backup_policies/r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
    id                   = "r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
    lifecycle_state      = "stable"
    match_resource_types = [
        "volume",
    ]
    match_user_tags      = [
        "dev:test",
    ]
    name                 = "tfp-ebaas-test-policy"
    plans                = []
    resource_group       = [
        {
            href = "https://resource-controller.cloud.ibm.com/v2/resource_groups/61429488cd724d77bdec07f394324a87"
            id   = "61429488cd724d77bdec07f394324a87"
            name = "Default"
        },
    ]
    resource_type        = "backup_policy"
    scope                = [
        {
            crn           = "crn:v1:bluemix:public:enterprise::a/ea1ef237216e4f9e8e6f76eccec761f8::enterprise:b039819424b341bc8b5f4df16c4f1460"
            id            = "b039819424b341bc8b5f4df16c4f1460"
            resource_type = "enterprise"
        },
    ]
}

# ibm_is_backup_policy.is_backup_policy:
resource "ibm_is_backup_policy" "is_backup_policy" {
    created_at           = "2023-10-06T09:28:13.000Z"
    crn                  = "crn:v1:bluemix:public:is:au-syd:a/ea1ef237216e4f9e8e6f76eccec761f8::backup-policy:r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
    health_reasons       = []
    health_state         = "ok"
    href                 = "https://au-syd.iaas.cloud.ibm.com/v1/backup_policies/r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
    id                   = "r026-936dd7d4-cca6-4022-9619-3e87fcc17339"
    lifecycle_state      = "stable"
    match_resource_types = [
        "volume",
    ]
    match_user_tags      = [
        "dev:test",
    ]
    name                 = "tfp-ebaas-test-policy"
    resource_group       = "61429488cd724d77bdec07f394324a87"
    resource_type        = "backup_policy"
    version              = "W/af39259ab442aa9a5cfb3b4f8e4af15f82a854692be82e7f9555d6007a26555d"

    scope {
        crn           = "crn:v1:bluemix:public:enterprise::a/ea1ef237216e4f9e8e6f76eccec761f8::enterprise:b039819424b341bc8b5f4df16c4f1460"
        id            = "b039819424b341bc8b5f4df16c4f1460"
        resource_type = "enterprise"
    }
}

@deepaksibm
Copy link
Contributor


$ tfpt TestAccIBMIsBackupPolicyBasicWithScope
--- PASS: TestAccIBMIsBackupPolicyBasicWithScope (45.91s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc	47.258s

@SunithaGudisagarIBM1
Copy link
Contributor

@hkantare Tested post rebasing, Can you please consider this PR for merging

$ make testacc TEST=./ibm/service/vpc TESTARGS='-run=TestAccIBMIsBackupPolicyBasicWithScope'

Screenshot 2023-10-16 at 8 14 43鈥疨M

@hkantare hkantare merged commit 78e76e8 into IBM-Cloud:master Oct 17, 2023
2 checks passed
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