-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1945 from oracle/release_gh
Releasing version 5.10.0
- Loading branch information
Showing
96 changed files
with
3,965 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
|
||
# Need to have this block even though it's empty; for import testing | ||
provider "oci" { | ||
} | ||
|
||
variable "tenancy_ocid" { | ||
} | ||
|
||
variable "ssh_public_key" { | ||
} | ||
|
||
variable "region" { | ||
default = "us-ashburn-1" | ||
} | ||
|
||
|
||
data "oci_bds_bds_instance_get_os_patch" "test_bds_instance_get_os_patch" { | ||
bds_instance_id = "${oci_bds_bds_instance.test_bds_instance.id}" | ||
os_patch_version = "${var.os_patch_version}" | ||
} | ||
variable "compartment_id" {} | ||
variable "subnet_id" { } | ||
variable "os_patch_version" { default = "ol7.9-x86_64-1.24.0.100-0.0" } | ||
|
||
resource "oci_bds_bds_instance" "test_bds_instance" { | ||
cluster_admin_password = "T3JhY2xlVGVhbVVTQSExMjM=" | ||
cluster_public_key = "${var.ssh_public_key}" | ||
cluster_version = "ODH1" | ||
compartment_id = "${var.compartment_id}" | ||
compute_only_worker_node { | ||
block_volume_size_in_gbs = "150" | ||
number_of_nodes = "2" | ||
shape = "VM.Standard.E4.Flex" | ||
shape_config { | ||
memory_in_gbs = "32" | ||
ocpus = "3" | ||
} | ||
subnet_id = "${var.subnet_id}" | ||
} | ||
display_name = "displayName" | ||
edge_node { | ||
block_volume_size_in_gbs = "150" | ||
number_of_nodes = "2" | ||
shape = "VM.Standard.E4.Flex" | ||
shape_config { | ||
memory_in_gbs = "32" | ||
ocpus = "3" | ||
} | ||
subnet_id = "${var.subnet_id}" | ||
} | ||
is_high_availability = "true" | ||
is_secure = "true" | ||
master_node { | ||
block_volume_size_in_gbs = "150" | ||
number_of_nodes = "2" | ||
shape = "VM.Standard.E4.Flex" | ||
shape_config { | ||
memory_in_gbs = "32" | ||
ocpus = "3" | ||
} | ||
subnet_id = "${var.subnet_id}" | ||
} | ||
util_node { | ||
block_volume_size_in_gbs = "150" | ||
number_of_nodes = "2" | ||
shape = "VM.Standard.E4.Flex" | ||
shape_config { | ||
memory_in_gbs = "32" | ||
ocpus = "3" | ||
} | ||
subnet_id = "${var.subnet_id}" | ||
} | ||
worker_node { | ||
block_volume_size_in_gbs = "150" | ||
number_of_nodes = "3" | ||
shape = "VM.Standard2.4" | ||
subnet_id = "${var.subnet_id}" | ||
} | ||
} | ||
|
||
resource "oci_core_subnet" "test_subnet" { | ||
cidr_block = "10.0.0.0/24" | ||
compartment_id = "${var.compartment_id}" | ||
lifecycle { | ||
ignore_changes = ["defined_tags"] | ||
} | ||
vcn_id = "${oci_core_vcn.test_vcn.id}" | ||
} | ||
|
||
resource "oci_core_vcn" "test_vcn" { | ||
cidr_block = "10.0.0.0/16" | ||
compartment_id = "${var.compartment_id}" | ||
lifecycle { | ||
ignore_changes = ["defined_tags"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
|
||
# Need to have this block even though it's empty; for import testing | ||
provider "oci" { | ||
} | ||
|
||
variable "tenancy_ocid" { | ||
} | ||
|
||
variable "ssh_public_key" { | ||
} | ||
|
||
variable "region" { | ||
default = "us-ashburn-1" | ||
} | ||
|
||
|
||
data "oci_bds_bds_instance_list_os_patches" "test_bds_instance_list_os_patches" { | ||
bds_instance_id = "${oci_bds_bds_instance.test_bds_instance.id}" | ||
} | ||
variable "compartment_id" { } | ||
variable "subnet_id" { } | ||
|
||
resource "oci_bds_bds_instance" "test_bds_instance" { | ||
cluster_admin_password = "T3JhY2xlVGVhbVVTQSExMjM=" | ||
cluster_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpUa4zUZKyU3AkW9yoJTBDO550wpWZOXdHswfRq75gbJ2ZYlMtifvwiO3qUL/RIZSC6e1wA5OL2LQ97UaHrLLPXgjvKGVIDRHqPkzTOayjJ4ZA7NPNhcu6f/OxhKkCYF3TAQObhMJmUSMrWSUeufaRIujDz1HHqazxOgFk09fj4i2dcGnfPcm32t8a9MzlsHSmgexYCUwxGisuuWTsnMgxbqsj6DaY51l+SEPi5tf10iFmUWqziF0eKDDQ/jHkwLJ8wgBJef9FSOmwJReHcBY+NviwFTatGj7Cwtnks6CVomsFD+rAMJ9uzM8SCv5agYunx07hnEXbR9r/TXqgXGfN [email protected]" | ||
cluster_version = "ODH1" | ||
compartment_id = "${var.compartment_id}" | ||
compute_only_worker_node { | ||
block_volume_size_in_gbs = "150" | ||
number_of_nodes = "2" | ||
shape = "VM.Standard.E4.Flex" | ||
shape_config { | ||
memory_in_gbs = "32" | ||
ocpus = "3" | ||
} | ||
subnet_id = "${var.subnet_id}" | ||
} | ||
display_name = "displayName" | ||
edge_node { | ||
block_volume_size_in_gbs = "150" | ||
number_of_nodes = "2" | ||
shape = "VM.Standard.E4.Flex" | ||
shape_config { | ||
memory_in_gbs = "32" | ||
ocpus = "3" | ||
} | ||
subnet_id = "${var.subnet_id}" | ||
} | ||
is_high_availability = "true" | ||
is_secure = "true" | ||
master_node { | ||
block_volume_size_in_gbs = "150" | ||
number_of_nodes = "2" | ||
shape = "VM.Standard.E4.Flex" | ||
shape_config { | ||
memory_in_gbs = "32" | ||
ocpus = "3" | ||
} | ||
subnet_id = "${var.subnet_id}" | ||
} | ||
util_node { | ||
block_volume_size_in_gbs = "150" | ||
number_of_nodes = "2" | ||
shape = "VM.Standard.E4.Flex" | ||
shape_config { | ||
memory_in_gbs = "32" | ||
ocpus = "3" | ||
} | ||
subnet_id = "${var.subnet_id}" | ||
} | ||
worker_node { | ||
block_volume_size_in_gbs = "150" | ||
number_of_nodes = "3" | ||
shape = "VM.Standard2.4" | ||
subnet_id = "${var.subnet_id}" | ||
} | ||
} | ||
|
||
resource "oci_core_subnet" "test_subnet" { | ||
cidr_block = "10.0.0.0/24" | ||
compartment_id = "${var.compartment_id}" | ||
lifecycle { | ||
ignore_changes = ["defined_tags"] | ||
} | ||
vcn_id = "${oci_core_vcn.test_vcn.id}" | ||
} | ||
|
||
resource "oci_core_vcn" "test_vcn" { | ||
cidr_block = "10.0.0.0/16" | ||
compartment_id = "${var.compartment_id}" | ||
lifecycle { | ||
ignore_changes = ["defined_tags"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
internal/integrationtest/bds_bds_instance_get_os_patch_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. | ||
// Licensed under the Mozilla Public License v2.0 | ||
|
||
package integrationtest | ||
|
||
import ( | ||
"fmt" | ||
"testing" | ||
|
||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" | ||
|
||
"github.com/oracle/terraform-provider-oci/httpreplay" | ||
"github.com/oracle/terraform-provider-oci/internal/acctest" | ||
|
||
"github.com/oracle/terraform-provider-oci/internal/utils" | ||
) | ||
|
||
var ( | ||
BdsBdsInstanceGetOsPatchDataSourceRepresentation = map[string]interface{}{ | ||
"bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_bds_bds_instance.test_bds_instance.id}`}, | ||
"os_patch_version": acctest.Representation{RepType: acctest.Required, Create: `${var.os_patch_version}`}, | ||
} | ||
|
||
BdsBdsInstanceGetOsPatchResourceConfig = acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Required, acctest.Create, bdsInstanceOdhRepresentation) + | ||
acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", acctest.Required, acctest.Create, CoreSubnetRepresentation) + | ||
acctest.GenerateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", acctest.Required, acctest.Create, CoreVcnRepresentation) | ||
) | ||
|
||
// issue-routing-tag: bds/default | ||
func TestBdsBdsInstanceGetOsPatchResource_basic(t *testing.T) { | ||
httpreplay.SetScenario("TestBdsBdsInstanceGetOsPatchResource_basic") | ||
defer httpreplay.SaveScenario() | ||
|
||
config := acctest.ProviderTestConfig() | ||
|
||
compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") | ||
compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) | ||
|
||
osPatchVersion := utils.GetEnvSettingWithBlankDefault("os_patch_version") | ||
osPatchVersionVariableStr := fmt.Sprintf("variable \"os_patch_version\" { default = \"%s\" }\n", osPatchVersion) | ||
|
||
subnetId := utils.GetEnvSettingWithBlankDefault("subnet_ocid") | ||
subnetIdVariableStr := fmt.Sprintf("variable \"subnet_id\" { default = \"%s\" }\n", subnetId) | ||
|
||
datasourceName := "data.oci_bds_bds_instance_get_os_patch.test_bds_instance_get_os_patch" | ||
|
||
acctest.SaveConfigContent("", "", "", t) | ||
|
||
acctest.ResourceTest(t, nil, []resource.TestStep{ | ||
// verify datasource | ||
{ | ||
Config: config + | ||
acctest.GenerateDataSourceFromRepresentationMap("oci_bds_bds_instance_get_os_patch", "test_bds_instance_get_os_patch", acctest.Required, acctest.Create, BdsBdsInstanceGetOsPatchDataSourceRepresentation) + | ||
compartmentIdVariableStr + subnetIdVariableStr + osPatchVersionVariableStr + BdsBdsInstanceGetOsPatchResourceConfig, | ||
Check: acctest.ComposeAggregateTestCheckFuncWrapper( | ||
resource.TestCheckResourceAttrSet(datasourceName, "bds_instance_id"), | ||
resource.TestCheckResourceAttr(datasourceName, "os_patch_version", "ol7.9-x86_64-1.24.0.100-0.0"), | ||
resource.TestCheckResourceAttrSet(datasourceName, "min_bds_version"), | ||
resource.TestCheckResourceAttrSet(datasourceName, "patch_type"), | ||
resource.TestCheckResourceAttrSet(datasourceName, "release_date"), | ||
), | ||
}, | ||
}) | ||
} |
Oops, something went wrong.