Skip to content

Conversation

@SunithaGudisagarIBM1
Copy link
Collaborator

@SunithaGudisagarIBM1 SunithaGudisagarIBM1 commented Sep 11, 2024

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

@SunithaGudisagarIBM1 SunithaGudisagarIBM1 changed the title feat(Image): development of image usage constraint feat(Image): development of image usage constraints (Allowed use) Nov 4, 2024
@SunithaGudisagarIBM1
Copy link
Collaborator Author

SunithaGudisagarIBM1 commented Dec 2, 2024

data "ibm_is_snapshot" "testacc_snapshot" {
  identifier = "r134-d72184df-c6ab-4c01-9b54-e1c9b3d64e99"
}
Screenshot 2024-12-02 at 12 07 19 PM
data "ibm_is_snapshots" "testacc_snapshots" {
}
Screenshot 2024-12-02 at 12 09 02 PM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

data "ibm_is_image" "testacc_image" {
  identifier = "r134-0950e619-325e-446e-b895-e0bdd21dd1ea"
}
Screenshot 2024-12-02 at 12 12 47 PM
data "ibm_is_images" "testacc_images" {
  name = "ibm-centos-stream-9-amd64-9"
}
Screenshot 2024-12-02 at 12 14 49 PM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

data "ibm_is_image_instance_profiles" "testacc_image_instance_profiles" {
  identifier = "r134-0950e619-325e-446e-b895-e0bdd21dd1ea"
}
Screenshot 2024-12-02 at 12 16 52 PM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

data "ibm_is_image_bare_metal_server_profiles" "testacc_image_bare_metal_server_profiles" {
  identifier = "r134-0950e619-325e-446e-b895-e0bdd21dd1ea"
}
Screenshot 2024-12-02 at 12 18 11 PM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

SunithaGudisagarIBM1 commented Dec 2, 2024

resource "ibm_is_volume" "storage" {
  name            = "tfp-test-image-cap1"
  profile         = "general-purpose"
  zone            = "us-south-2"
  source_snapshot = "r134-d72184df-c6ab-4c01-9b54-e1c9b3d64e99"
  allowed_use {
    api_version       = "2020-12-02"
    bare_metal_server = "enable_secure_boot>=true"
    instance          = "enable_secure_boot==true"
  }
}
Screenshot 2024-12-02 at 2 44 39 PM Screenshot 2024-12-02 at 2 44 56 PM
resource "ibm_is_volume" "storage" {
  name            = "tfp-test-image-cap1"
  profile         = "general-purpose"
  zone            = "us-south-2"
  source_snapshot = "r134-d72184df-c6ab-4c01-9b54-e1c9b3d64e99"
  allowed_use {
    api_version       = "2024-12-02"
    bare_metal_server = "enable_secure_boot==true"
    instance          = "enable_secure_boot==true"
  }
}
Screenshot 2024-12-02 at 2 45 53 PM Screenshot 2024-12-02 at 2 46 10 PM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

SunithaGudisagarIBM1 commented Jul 7, 2025

resource "ibm_is_snapshot" "testacc_snapshot" {
  name          = "tfp-snapshot"
  source_volume = "r006-d7bfffb7-c53d-41e8-b25e-08b257a90959"
    allowed_use {
    api_version       = "2025-02-31"
    bare_metal_server = "true"
    instance          = "enable_secure_boot==true"
  }
}

data "ibm_is_snapshot" "datasource_testacc_snapshot" {
  identifier = ibm_is_snapshot.testacc_snapshot.id
}
data "ibm_is_snapshots" "testacc_snapshots" {
}
Screenshot 2025-07-07 at 7 21 04 PM Screenshot 2025-07-07 at 7 22 13 PM Screenshot 2025-07-07 at 7 22 36 PM Screenshot 2025-07-07 at 7 52 12 PM Screenshot 2025-07-07 at 7 52 29 PM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

SunithaGudisagarIBM1 commented Jul 7, 2025

resource "ibm_is_volume" "storage" {
  name            = "tfp-volume"
  profile         = "general-purpose"
  zone            = "us-south-1"
  source_snapshot = ibm_is_snapshot.testacc_snapshot.id
  allowed_use {
    api_version       = "2025-04-01"
    bare_metal_server = "enable_secure_boot==true"
    instance          = "enable_secure_boot==true"
  }
}
resource "ibm_is_volume" "storage" {
  name            = "tfp-volume"
  profile         = "general-purpose"
  zone            = "us-south-1"
  source_snapshot = ibm_is_snapshot.testacc_snapshot.id
  allowed_use {
    api_version       = "2025-04-02"
    bare_metal_server = "true"
    instance          = "gpu.count > 0 && enable_secure_boot == true"
  }
}
data "ibm_is_volume" "datasource_testacc_volume" {
  identifier = ibm_is_volume.storage.id
}

data "ibm_is_volumes" "datasource_testacc_volumes" {
  identifier = ibm_is_volume.storage.id
}
Screenshot 2025-07-07 at 7 45 56 PM Screenshot 2025-07-07 at 7 49 32 PM Screenshot 2025-07-07 at 7 50 23 PM Screenshot 2025-07-07 at 7 53 58 PM Screenshot 2025-07-07 at 8 00 50 PM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

SunithaGudisagarIBM1 commented Jul 7, 2025

resource "ibm_is_image" "isExampleImageFromVolume" {
  name          = "tfp-image"
  source_volume = "r006-d7bfffb7-c53d-41e8-b25e-08b257a90959"
  timeouts {
    create = "45m"
  }
  allowed_use {
    api_version       = "2025-04-02"
    bare_metal_server = "true"
    instance          = "gpu.count > 0 && enable_secure_boot == true"
  }
}
resource "ibm_is_image" "isExampleImageFromVolume" {
  name          = "tfp-image"
  source_volume = "r006-d7bfffb7-c53d-41e8-b25e-08b257a90959"
  timeouts {
    create = "45m"
  }
  allowed_use {
    api_version       = "2025-04-03"
    bare_metal_server = "enable_secure_boot == true"
    instance          = "enable_secure_boot == true"
  }
}

data "ibm_is_image" "datasource_testacc_image" {
  identifier = ibm_is_image.isExampleImageFromVolume.id
}

data "ibm_is_images" "datasource_testacc_images" {
  name = "tfp-image"
}

Screenshot 2025-07-07 at 8 28 25 PM Screenshot 2025-07-07 at 8 29 19 PM Screenshot 2025-07-07 at 8 31 03 PM Screenshot 2025-07-07 at 8 32 24 PM Screenshot 2025-07-07 at 8 34 15 PM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

resource "ibm_is_instance_template" "instancetemplate1" {
  name    = "tfp-instance-temp"
  image   = "r006-ab99a406-f1fe-492e-9036-d402e585c630"
  profile = "bx2-8x32"

  primary_network_interface {
    subnet = "0727-a9581079-97a9-4048-a207-69e86e77e981"
  }
  volume_attachments {
    delete_volume_on_instance_delete = true
    name                             = "vol-attach-tfp"
    volume_prototype {
      iops     = 6000
      profile  = "custom"
      capacity = 100
      allowed_use {
        api_version       = "2025-04-03"
        bare_metal_server = "true"
        instance          = "true"
      }
    }
  }
  vpc  = "r006-9c3dfae3-c3e8-43e7-8a26-5c71c9ac8a9c"
  zone = "us-south-2"
  keys = ["r006-e551a8fe-98da-41e3-8aa8-7117f8f27dae"]
}

@SunithaGudisagarIBM1
Copy link
Collaborator Author

SunithaGudisagarIBM1 commented Jul 15, 2025

Image Changes:

Screenshot 2025-07-15 at 5 43 33 PM Screenshot 2025-07-15 at 5 49 43 PM Screenshot 2025-07-15 at 5 53 37 PM

Snapshot Changes:

Screenshot 2025-07-15 at 6 08 34 PM Screenshot 2025-07-15 at 6 14 04 PM Screenshot 2025-07-15 at 6 25 46 PM

Volume Changes:

Screenshot 2025-07-15 at 6 30 53 PM Screenshot 2025-07-15 at 8 28 41 PM Screenshot 2025-07-15 at 8 37 46 PM

Instance Changes:
Not applicable for datasources

Screenshot 2025-07-15 at 9 47 47 PM

Instance Template:

Screenshot 2025-07-15 at 11 01 45 PM Screenshot 2025-07-15 at 11 42 49 PM Screenshot 2025-07-15 at 11 58 05 PM

ibm_is_image_instance_profiles, ibm_is_image_bare_metal_server_profiles, ibm_is_volume_instance_profiles, ibm_is_snapshot_instance_profiles

Screenshot 2025-07-17 at 10 54 40 AM Screenshot 2025-07-17 at 11 00 08 AM Screenshot 2025-07-17 at 11 31 47 AM Screenshot 2025-07-17 at 11 54 38 AM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

SunithaGudisagarIBM1 commented Jul 15, 2025

resource "ibm_is_instance_template" "instancetemplate1" {
  name    = "tfp-tmplate"
  image   = "r006-ab99a406-f1fe-492e-9036-d402e585c630"
  profile = "bx2-8x32"

  primary_network_interface {
    subnet = "0727-576f4aff-86d6-42c8-bed0-1c3648494d5b"
  }
  boot_volume {
    profile = "general-purpose"
    size    = 100
    allowed_use {
      api_version       = "2025-07-10"
      bare_metal_server = "true"
      instance          = "true"
    }
  }
  vpc  = "r006-90e7ede6-52ae-4674-a17f-59fcef636973"
  zone = "us-south-2"
  keys = ["r006-d53c4558-fa33-4f81-b036-cc7988d8010f"]
}

data "ibm_is_instance_template" "instance_template_data" {
  name = ibm_is_instance_template.instancetemplate1.name
}

data "ibm_is_instance_templates" "instance_templates_data" {
}
Screenshot 2025-07-15 at 11 18 24 PM Screenshot 2025-07-15 at 11 28 31 PM Screenshot 2025-07-15 at 11 30 27 PM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

SunithaGudisagarIBM1 commented Jul 15, 2025

resource "ibm_is_instance_volume_attachment" "testacc_att" {
  instance = ibm_is_instance.testacc_instance.id

  name     = "volume-attachement"
  profile  = "custom"
  capacity = 100
  iops     = 100

  delete_volume_on_instance_delete = true
  snapshot                         = "r006-d7cb1a9b-2bfe-440f-b19a-cc3e8d5ebda6"
resource "ibm_is_instance_template" "instancetemplate1" {
  name    = "tfp-tmplate"
  image   = "r006-ab99a406-f1fe-492e-9036-d402e585c630"
  profile = "bx2-8x32"

  primary_network_interface {
    subnet = "0727-576f4aff-86d6-42c8-bed0-1c3648494d5b"
  }

  volume_attachments {
    delete_volume_on_instance_delete = true
    name                             = "volume-attachment-tfp"
    volume_prototype {
      iops     = 6000
      profile  = "custom"
      capacity = 100
      source_snapshot = "r006-d7cb1a9b-2bfe-440f-b19a-cc3e8d5ebda6"
      allowed_use {
        api_version       = "2025-04-03"
        bare_metal_server = "true"
        instance          = "true"
      }
    }
  }

  vpc  = "r006-90e7ede6-52ae-4674-a17f-59fcef636973"
  zone = "us-south-2"
  keys = ["r006-d53c4558-fa33-4f81-b036-cc7988d8010f"]
}

data "ibm_is_instance_template" "instance_template_data" {
  name = ibm_is_instance_template.instancetemplate1.name
}

data "ibm_is_instance_templates" "instance_templates_data" {
}
Screenshot 2025-07-16 at 1 27 00 AM Screenshot 2025-07-16 at 2 17 24 AM Screenshot 2025-07-16 at 1 29 06 AM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

SunithaGudisagarIBM1 commented Jul 17, 2025

resource "ibm_is_bare_metal_server" "testacc_bms" {
  profile = "bx2-metal-96x384"
  name    = "tfp-bm-metal-server"
  image   = "r010-c8f22aac-1d04-4941-b9c0-f92ec88a4033"
  zone    = "eu-de-1"
  keys    = ["r010-0efcab1d-ba04-4642-a98b-036b7afa052c"]
  primary_network_interface {
    subnet = "02b7-e9b924b7-9192-4288-91be-c00566a4d2f7"
  }
  vpc = "r010-3fbb2b64-2b39-455a-bc69-fe819584689a"
}

resource "ibm_is_bare_metal_server_disk" "testacc_bms_disk" {
  bare_metal_server = ibm_is_bare_metal_server.testacc_bms.id
  disk              = ibm_is_bare_metal_server.testacc_bms.disks.0.id
  name              = "tfp-bm-disk"
}

data "ibm_is_bare_metal_server_disks" "ds_bmserver_disks" {
  bare_metal_server = ibm_is_bare_metal_server.testacc_bms.id
}

data "ibm_is_bare_metal_server_disk" "ds_bms_disk" {
  bare_metal_server         = ibm_is_bare_metal_server.testacc_bms.id
  disk                      = ibm_is_bare_metal_server.testacc_bms.disks.0.id
}

data "ibm_is_bare_metal_server" "example" {
  name        = "tfp-bm-metal-server"
}

data "ibm_is_bare_metal_servers" "example" {
}
Screenshot 2025-07-17 at 2 07 47 PM Screenshot 2025-07-17 at 2 08 06 PM Screenshot 2025-07-17 at 2 08 48 PM Screenshot 2025-07-17 at 2 10 19 PM Screenshot 2025-07-17 at 2 10 32 PM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

resource "ibm_is_instance_template" "instancetemplate1" {
  name    = "tfp-tmplate"
  profile = "bx2-8x32"
  primary_network_interface {
    subnet = "0727-576f4aff-86d6-42c8-bed0-1c3648494d5b"
  }
  boot_volume {
    profile         = "general-purpose"
    size            = 100
    source_snapshot = "r006-d7cb1a9b-2bfe-440f-b19a-cc3e8d5ebda6"
    allowed_use {
      api_version       = "2025-07-10"
      bare_metal_server = "true"
      instance          = "true"
    }
  }
  volume_attachments {
    delete_volume_on_instance_delete = true
    name                             = "volume-attachment-tfp"
    volume_prototype {
      iops            = 6000
      profile         = "custom"
      capacity        = 100
      source_snapshot = "r006-d7cb1a9b-2bfe-440f-b19a-cc3e8d5ebda6"
      allowed_use {
        api_version       = "2025-04-03"
        bare_metal_server = "true"
        instance          = "true"
      }
    }
  }

  vpc  = "r006-90e7ede6-52ae-4674-a17f-59fcef636973"
  zone = "us-south-2"
  keys = ["r006-d53c4558-fa33-4f81-b036-cc7988d8010f"]
}
Screenshot 2025-07-18 at 8 08 05 AM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

SunithaGudisagarIBM1 commented Jul 18, 2025

Screenshot 2025-07-18 at 8 46 22 AM Screenshot 2025-07-18 at 8 52 21 AM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

Screenshot 2025-07-18 at 10 24 52 AM

@SunithaGudisagarIBM1
Copy link
Collaborator Author

Screenshot 2025-07-18 at 10 31 13 AM

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.

4 participants