From 3f28d4b11028505eeaca4fb670727fde5728e5d5 Mon Sep 17 00:00:00 2001 From: michaelkad Date: Tue, 5 Mar 2024 10:46:39 -0600 Subject: [PATCH] Add support_systems for sap profile --- go.sum | 2 - .../power/data_source_ibm_pi_sap_profile.go | 30 ++++++++++++++ .../power/data_source_ibm_pi_sap_profiles.go | 40 ++++++++++++++++--- website/docs/d/pi_sap_profile.html.markdown | 27 +++++++++---- website/docs/d/pi_sap_profiles.html.markdown | 26 ++++++++---- 5 files changed, 102 insertions(+), 23 deletions(-) diff --git a/go.sum b/go.sum index ced7445dbe..6c3b571924 100644 --- a/go.sum +++ b/go.sum @@ -1653,10 +1653,8 @@ github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= -github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= diff --git a/ibm/service/power/data_source_ibm_pi_sap_profile.go b/ibm/service/power/data_source_ibm_pi_sap_profile.go index 1f53d1ad72..a1e04e803f 100644 --- a/ibm/service/power/data_source_ibm_pi_sap_profile.go +++ b/ibm/service/power/data_source_ibm_pi_sap_profile.go @@ -43,16 +43,42 @@ func DataSourceIBMPISAPProfile() *schema.Resource { Description: "Amount of cores.", Type: schema.TypeInt, }, + Attr_FullSystemProfile: { + Computed: true, + Description: "Requires full system for deployment.", + Type: schema.TypeBool, + }, Attr_Memory: { Computed: true, Description: "Amount of memory (in GB).", Type: schema.TypeInt, }, + Attr_SAPS: { + Computed: true, + Description: "SAP Application Performance Standard", + Type: schema.TypeInt, + }, + Attr_SupportedSystems: { + Computed: true, + Description: "List of supported systems.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, Attr_Type: { Computed: true, Description: "Type of profile.", Type: schema.TypeString, }, + Attr_WorkloadType: { + Computed: true, + Description: "Workload Type.", + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Type: schema.TypeList, + }, }, } } @@ -76,8 +102,12 @@ func dataSourceIBMPISAPProfileRead(ctx context.Context, d *schema.ResourceData, d.SetId(*sapProfile.ProfileID) d.Set(Attr_Certified, *sapProfile.Certified) d.Set(Attr_Cores, *sapProfile.Cores) + d.Set(Attr_FullSystemProfile, sapProfile.FullSystemProfile) d.Set(Attr_Memory, *sapProfile.Memory) + d.Set(Attr_SAPS, sapProfile.Saps) + d.Set(Attr_SupportedSystems, sapProfile.SupportedSystems) d.Set(Attr_Type, *sapProfile.Type) + d.Set(Attr_WorkloadType, *&sapProfile.WorkloadTypes) return nil } diff --git a/ibm/service/power/data_source_ibm_pi_sap_profiles.go b/ibm/service/power/data_source_ibm_pi_sap_profiles.go index a3c3c5f5a6..7517694019 100644 --- a/ibm/service/power/data_source_ibm_pi_sap_profiles.go +++ b/ibm/service/power/data_source_ibm_pi_sap_profiles.go @@ -43,6 +43,11 @@ func DataSourceIBMPISAPProfiles() *schema.Resource { Description: "Amount of cores.", Type: schema.TypeInt, }, + Attr_FullSystemProfile: { + Computed: true, + Description: "Requires full system for deployment.", + Type: schema.TypeBool, + }, Attr_Memory: { Computed: true, Description: "Amount of memory (in GB).", @@ -53,11 +58,32 @@ func DataSourceIBMPISAPProfiles() *schema.Resource { Description: "SAP Profile ID.", Type: schema.TypeString, }, + Attr_SAPS: { + Computed: true, + Description: "SAP Application Performance Standard", + Type: schema.TypeInt, + }, + Attr_SupportedSystems: { + Computed: true, + Description: "List of supported systems.", + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, Attr_Type: { Computed: true, Description: "Type of profile.", Type: schema.TypeString, }, + Attr_WorkloadType: { + Computed: true, + Description: "Workload Type.", + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Type: schema.TypeList, + }, }, }, Type: schema.TypeList, @@ -84,11 +110,15 @@ func dataSourceIBMPISAPProfilesRead(ctx context.Context, d *schema.ResourceData, result := make([]map[string]interface{}, 0, len(sapProfiles.Profiles)) for _, sapProfile := range sapProfiles.Profiles { profile := map[string]interface{}{ - Attr_Certified: *sapProfile.Certified, - Attr_Cores: *sapProfile.Cores, - Attr_Memory: *sapProfile.Memory, - Attr_ProfileID: *sapProfile.ProfileID, - Attr_Type: *sapProfile.Type, + Attr_Certified: *sapProfile.Certified, + Attr_Cores: *sapProfile.Cores, + Attr_FullSystemProfile: sapProfile.FullSystemProfile, + Attr_Memory: *sapProfile.Memory, + Attr_ProfileID: *sapProfile.ProfileID, + Attr_SAPS: sapProfile.Saps, + Attr_SupportedSystems: sapProfile.SupportedSystems, + Attr_Type: *sapProfile.Type, + Attr_WorkloadType: *&sapProfile.WorkloadTypes, } result = append(result, profile) } diff --git a/website/docs/d/pi_sap_profile.html.markdown b/website/docs/d/pi_sap_profile.html.markdown index 32717c17f7..d94339198f 100644 --- a/website/docs/d/pi_sap_profile.html.markdown +++ b/website/docs/d/pi_sap_profile.html.markdown @@ -7,9 +7,11 @@ description: |- --- # ibm_pi_sap_profile + Retrieve information about a SAP profile. For more information, see [getting started with IBM Power Systems Virtual Servers](https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-getting-started). ## Example usage + ```terraform data "ibm_pi_sap_profile" "example" { pi_cloud_instance_id = "" @@ -17,30 +19,39 @@ data "ibm_pi_sap_profile" "example" { } ``` -**Notes** +### Notes + - Please find [supported Regions](https://cloud.ibm.com/apidocs/power-cloud#endpoint) for endpoints. - If a Power cloud instance is provisioned at `lon04`, The provider level attributes should be as follows: - `region` - `lon` - `zone` - `lon04` -Example usage: - ```terraform - provider "ibm" { - region = "lon" - zone = "lon04" - } - ``` + Example usage: + + ```terraform + provider "ibm" { + region = "lon" + zone = "lon04" + } + ``` ## Argument reference + Review the argument references that you can specify for your data source. - `pi_cloud_instance_id` - (Required, String) The GUID of the service instance associated with an account. - `pi_sap_profile_id` - (Required, String) SAP Profile ID. ## Attribute reference + In addition to all argument reference list, you can access the following attribute references after your data source is created. - `certified` - (Boolean) Has certification been performed on profile. - `cores` - (Integer) Amount of cores. +- `full_system_profile` - (Boolean) Requires full system for deployment. - `memory` - (Integer) Amount of memory (in GB). +- `saps` - (Integer) SAP application performance standard. +- `supported_systems` - (List) List of supported systems. - `type` - (String) Type of profile. +- `workload_type` - (List) List of workload types. + \ No newline at end of file diff --git a/website/docs/d/pi_sap_profiles.html.markdown b/website/docs/d/pi_sap_profiles.html.markdown index 630242ee68..9c1c124f97 100644 --- a/website/docs/d/pi_sap_profiles.html.markdown +++ b/website/docs/d/pi_sap_profiles.html.markdown @@ -7,35 +7,41 @@ description: |- --- # ibm_pi_sap_profiles + Retrieve information about all SAP profiles. For more information, see [getting started with IBM Power Systems Virtual Servers](https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-getting-started). ## Example usage + ```terraform data "ibm_pi_sap_profiles" "example" { pi_cloud_instance_id = "" } ``` -**Notes** +### Notes + - Please find [supported Regions](https://cloud.ibm.com/apidocs/power-cloud#endpoint) for endpoints. - If a Power cloud instance is provisioned at `lon04`, The provider level attributes should be as follows: - `region` - `lon` - `zone` - `lon04` -Example usage: - ```terraform - provider "ibm" { - region = "lon" - zone = "lon04" - } - ``` + Example usage: + + ```terraform + provider "ibm" { + region = "lon" + zone = "lon04" + } + ``` ## Argument reference + Review the argument references that you can specify for your data source. - `pi_cloud_instance_id` - (Required, String) The GUID of the service instance associated with an account. ## Attribute reference + In addition to all argument reference list, you can access the following attribute references after your data source is created. - `profiles` - (List) List of all the SAP Profiles. @@ -43,6 +49,10 @@ In addition to all argument reference list, you can access the following attribu Nested scheme for `profiles`: - `certified` - (Boolean) Has certification been performed on profile. - `cores` - (Integer) Amount of cores. + - `full_system_profile` - (Boolean) Requires full system for deployment. - `memory` - (Integer) Amount of memory (in GB). - `profile_id` - (String) SAP Profile ID. + - `saps` - (Integer) SAP application performance standard. + - `supported_systems` - (List) List of supported systems. - `type` - (String) Type of profile. + - `workload_type` - (List) List of workload types.