diff --git a/tests/common/access_policy.tf b/tests/common/access_policy.tf new file mode 100644 index 0000000000..649e29c020 --- /dev/null +++ b/tests/common/access_policy.tf @@ -0,0 +1,16 @@ +resource "intersight_access_policy" "access1" { + name = "access1" + description = "demo imc access policy" + organization { + object_type = "organization.Organization" + moid = data.intersight_organization_organization.default.results.0.moid + } + configuration_type{ + configure_inband = false + configure_out_of_band = true + } + out_of_band_ip_pool { + object_type = "ippool.Pool" + moid = intersight_ippool_pool.ippool_pool_tf.moid + } +} diff --git a/tests/common/ippool_pool.tf b/tests/common/ippool_pool.tf new file mode 100644 index 0000000000..048d91bbac --- /dev/null +++ b/tests/common/ippool_pool.tf @@ -0,0 +1,25 @@ +resource "intersight_ippool_pool" "ippool_pool_tf" { + name = "ippool_pool_tf" + description = "ippool test" + assignment_order = "sequential" + + ip_v4_blocks { + class_id = "ippool.IpV4Block" + object_type = "ippool.IpV4Block" + from = "10.1.1.1" + to = "10.1.1.3" + } + + ip_v4_config { + object_type = "ippool.IpV4Config" + class_id = "ippool.IpV4Config" + gateway = "10.1.1.1" + netmask = "255.0.0.0" + primary_dns = "8.8.8.8" + } + + organization { + object_type = "organization.Organization" + moid = data.intersight_organization_organization.default.results.0.moid + } +} diff --git a/tests/common/kubernetes_virtual_machine_infra_config_policy.tf b/tests/common/kubernetes_virtual_machine_infra_config_policy.tf new file mode 100644 index 0000000000..eef206a3f1 --- /dev/null +++ b/tests/common/kubernetes_virtual_machine_infra_config_policy.tf @@ -0,0 +1,17 @@ +resource "intersight_kubernetes_virtual_machine_infra_config_policy" "vm_infra_config_policy" { + name = "TFC-Test-1" + description = "VM Infrastructure Config Policy used for Kubernetes deployment to vSphere" + organization { + object_type = "organization.Organization" + moid = data.intersight_organization_organization.default.results[0].moid + } + vm_config { + object_type = "kubernetes.EsxiVirtualMachineInfraConfig" + interfaces = ["8", "4"] + additional_properties = jsonencode({ + Cluster = "abc" + Datastore = "datastore" + Passphrase = "password123" + }) + } +} diff --git a/tests/common/snmp_policy.tf b/tests/common/snmp_policy.tf new file mode 100644 index 0000000000..5bd335a0ce --- /dev/null +++ b/tests/common/snmp_policy.tf @@ -0,0 +1,6 @@ +resource "intersight_snmp_policy" "snmp_tf" { + name = "snmp_tf" + enabled = false + v2_enabled = false + v3_enabled = false +} diff --git a/tests/common/storage_storage_policy.tf b/tests/common/storage_storage_policy.tf new file mode 100644 index 0000000000..34fcdf80f1 --- /dev/null +++ b/tests/common/storage_storage_policy.tf @@ -0,0 +1,27 @@ +resource "intersight_storage_storage_policy" "storage_storage1" { + name = "storage_storage_policy-testing" + description = "storage policy test" + unused_disks_state = "UnconfiguredGood" + organization { + object_type = "organization.Organization" + moid = data.intersight_organization_organization.default.results[0].moid + } + use_jbod_for_vd_creation = false + m2_virtual_drive { + enable = false + object_type = "storage.M2VirtualDriveConfig" + } + raid0_drive { + enable = true + drive_slots = "2" + object_type = "storage.R0Drive" + virtual_drive_policy { + strip_size = 64 + access_policy = "Default" + read_policy = "Default" + write_policy = "Default" + drive_cache = "Default" + object_type = "storage.VirtualDrivePolicy" + } + } +} diff --git a/tests/common/workflow_workflow_definition.tf b/tests/common/workflow_workflow_definition.tf new file mode 100644 index 0000000000..8aa32b0f16 --- /dev/null +++ b/tests/common/workflow_workflow_definition.tf @@ -0,0 +1,34 @@ +resource "intersight_workflow_workflow_definition" "ProvisionNetwork" { + name = "ProvisionNetwork" + label = "TF Testing" + default_version = true + output_definition { + object_type = "workflow.PrimitiveDataType" + name = "status" + label = "status" + required = false + default { + object_type = "workflow.DefaultValue" + override = false + value = null + } + display_meta { + object_type = "workflow.DisplayMeta" + inventory_selector = true + } + } + tasks { + description = "Create a vm" + label = "StartTask" + name = "StartTask" + object_type = "workflow.StartTask" + } + ui_rendering_data = jsonencode({ + Positions = { + Name = "StartTask" + X = 209 + Y = 79 + } + Version = 1 + }) +}