Skip to content

Commit

Permalink
Scc v1 removal (#4689)
Browse files Browse the repository at this point in the history
* initial commit

* removing v1 refereneces

* review comments updated

---------

Co-authored-by: jayvyas <Jay.Vyas1@ibm.com>
  • Loading branch information
jayvyas2 and jayvyas authored Jul 18, 2023
1 parent 1bf4eb5 commit a8336a1
Show file tree
Hide file tree
Showing 57 changed files with 80 additions and 10,263 deletions.
51 changes: 0 additions & 51 deletions examples/ibm-scc/posture-management/main.tf
Original file line number Diff line number Diff line change
@@ -1,54 +1,3 @@
provider "ibm" {
ibmcloud_api_key = var.ibmcloud_api_key
}

// Create list_scopes data source
data "ibm_scc_posture_scopes" "list_scopes_instance" {
scope_id = var.list_scopes_scope_id
}

// Create list_profiles data source
data "ibm_scc_posture_profiles" "list_profiles_instance" {
profile_id = var.list_profiles_profile_id
}

// Create list_credentials data source
data "ibm_scc_posture_credentials" "list_credentials_instance" {
}

// Create list_collectors data source
data "ibm_scc_posture_collectors" "list_collectors_instance" {
}

// Create list_latest_scans data source
data "ibm_scc_posture_latest_scans" "list_latest_scans_instance" {
scan_id = var.list_latest_scans_scan_id
}

// Create scans_summary data source
data "ibm_scc_posture_scan_summary" "scans_summary_instance" {
scan_id = var.scans_summary_scan_id
profile_id = var.scans_summary_profile_id
}

// Create scan_summaries data source
data "ibm_scc_posture_scan_summaries" "scan_summaries_instance" {
profile_id = var.scan_summaries_profile_id
scope_id = var.scan_summaries_scope_id
scan_id = var.scan_summaries_scan_id
}

// Create scope data source
data "ibm_scc_posture_scope" "scope_instance" {
scope_id = var.scope_id
}

// Create collector data source
data "ibm_scc_posture_collector" "collector_instance" {
collector_id = var.collector_id
}

// Create credential data source
data "ibm_scc_posture_credential" "credential_instance" {
credential_id = var.credential_id
}
85 changes: 0 additions & 85 deletions ibm/acctest/acctest.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,22 +211,6 @@ var Scc_resource_group_id string
// Security and Compliance Center, SI
var Scc_si_account string

// Security and Compliance Center, Posture Management
var Scc_posture_scope_id string
var Scc_posture_scan_id string
var Scc_posture_profile_id string
var Scc_posture_group_profile_id string
var Scc_posture_correlation_id string
var Scc_posture_report_setting_id string
var Scc_posture_profile_id_scansummary string
var Scc_posture_scan_id_scansummary string
var Scc_posture_credential_id_scope string
var Scc_posture_credential_id_scope_update string
var Scc_posture_collector_id_scope []string
var Scc_posture_collector_id_scope_update []string
var Scc_posture_collector_id string
var Scc_posture_credential_id string

// ROKS Cluster
var ClusterName string

Expand Down Expand Up @@ -1192,75 +1176,6 @@ func init() {
fmt.Println("[INFO] Set the environment variable SCC_SI_ACCOUNT for testing SCC SI resources resource else tests will fail if this is not set correctly")
}

Scc_posture_scope_id = os.Getenv("SCC_POSTURE_SCOPE_ID")
if Scc_posture_scope_id == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_SCOPE_ID for testing SCC Posture resources or datasource resource else tests will fail if this is not set correctly")
}

Scc_posture_scan_id = os.Getenv("SCC_POSTURE_SCAN_ID")
if Scc_posture_scan_id == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_SCAN_ID for testing SCC Posture resource or datasource else tests will fail if this is not set correctly")
}

Scc_posture_profile_id = os.Getenv("SCC_POSTURE_PROFILE_ID")
if Scc_posture_profile_id == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_PROFILE_ID for testing SCC Posture resource or datasource else tests will fail if this is not set correctly")
}
Scc_posture_group_profile_id = os.Getenv("SCC_POSTURE_GROUP_PROFILE_ID")
if Scc_posture_group_profile_id == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_GROUP_PROFILE_ID for testing SCC Posture resource or datasource else tests will fail if this is not set correctly")
}

Scc_posture_correlation_id = os.Getenv("SCC_POSTURE_CORRELATION_ID")
if Scc_posture_correlation_id == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_CORRELATION_ID for testing SCC Posture resource or datasource else tests will fail if this is not set correctly")
}

Scc_posture_report_setting_id = os.Getenv("SCC_POSTURE_REPORT_SETTING_ID")
if Scc_posture_report_setting_id == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_REPORT_SETTING_ID for testing SCC Posture resource or datasource else tests will fail if this is not set correctly")
}

Scc_posture_profile_id_scansummary = os.Getenv("SCC_POSTURE_PROFILE_ID_SCANSUMMARY")
if Scc_posture_profile_id_scansummary == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_PROFILE_ID_SCANSUMMARY for testing SCC Posture resource or datasource else tests will fail if this is not set correctly")
}

Scc_posture_scan_id_scansummary = os.Getenv("SCC_POSTURE_SCAN_ID_SCANSUMMARY")
if Scc_posture_scan_id_scansummary == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_SCAN_ID_SCANSUMMARY for testing SCC Posture resource or datasource else tests will fail if this is not set correctly")
}

Scc_posture_credential_id_scope = os.Getenv("SCC_POSTURE_CREDENTIAL_ID_SCOPE")
if Scc_posture_credential_id_scope == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_CREDENTIAL_ID_SCOPE for testing SCC Posture resource or datasource else tests will fail if this is not set correctly")
}

Scc_posture_credential_id_scope_update = os.Getenv("SCC_POSTURE_CREDENTIAL_ID_SCOPE_UPDATE")
if Scc_posture_credential_id_scope_update == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_CREDENTIAL_ID_SCOPE_UPDATE for testing SCC Posture resource or datasource else tests will fail if this is not set correctly")
}

Scc_posture_collector_id_scope = []string{os.Getenv("SCC_POSTURE_COLLECTOR_ID_SCOPE")}
if os.Getenv("SCC_POSTURE_COLLECTOR_ID_SCOPE") == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_COLLECTOR_ID_SCOPE for testing SCC Posture resource or datasource else tests will fail if this is not set correctly")
}

Scc_posture_collector_id_scope_update = []string{os.Getenv("SCC_POSTURE_COLLECTOR_ID_SCOPE_UPDATE")}
if os.Getenv("SCC_POSTURE_COLLECTOR_ID_SCOPE_UPDATE") == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_COLLECTOR_ID_SCOPE_UPDATE for testing SCC Posture resource or datasource else tests will fail if this is not set correctly")
}

Scc_posture_collector_id = os.Getenv("SCC_POSTURE_COLLECTOR_ID")
if Scc_posture_collector_id == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_COLLECTOR_ID for testing SCC Posture resources or datasource resource else tests will fail if this is not set correctly")
}

Scc_posture_credential_id = os.Getenv("SCC_POSTURE_CREDENTIAL_ID")
if Scc_posture_credential_id == "" {
fmt.Println("[INFO] Set the environment variable SCC_POSTURE_CREDENTIAL_ID for testing SCC Posture resources or datasource resource else tests will fail if this is not set correctly")
}

CloudShellAccountID = os.Getenv("IBM_CLOUD_SHELL_ACCOUNT_ID")
if CloudShellAccountID == "" {
fmt.Println("[INFO] Set the environment variable IBM_CLOUD_SHELL_ACCOUNT_ID for ibm-cloud-shell resource or datasource else tests will fail if this is not set correctly")
Expand Down
Loading

0 comments on commit a8336a1

Please sign in to comment.