Skip to content

Commit

Permalink
Remove account_id from input
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajesh-Pirati committed Aug 29, 2023
1 parent e8f60b8 commit 784e0a2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions ibm/service/iampolicy/data_source_ibm_iam_policy_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ func DataSourceIBMIAMPolicyTemplate() *schema.Resource {
ReadContext: dataSourceIBMPolicyTemplateRead,

Schema: map[string]*schema.Schema{
"account_id": {
Type: schema.TypeString,
Computed: true,
Description: "The account GUID that the policy templates belong to.",
},
"policy_templates": {
Type: schema.TypeList,
Computed: true,
Expand Down Expand Up @@ -209,7 +204,7 @@ func dataSourceIBMPolicyTemplateRead(context context.Context, d *schema.Resource
return diag.FromErr(fmt.Errorf("ListPolicyTemplatesWithContext failed %s\n%s", err, response))
}

d.SetId(d.Get("account_id").(string))
d.SetId(accountID)

policyTemplates := []map[string]interface{}{}
if policyTemplateCollection.PolicyTemplates != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ func TestAccIBMPolicyTemplateDataSourceBasic(t *testing.T) {
Config: testAccCheckIBMPolicyTemplateDataSourceConfigBasic(),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet("data.ibm_iam_policy_template.policy_template", "id"),
resource.TestCheckResourceAttrSet("data.ibm_iam_policy_template.policy_template", "account_id"),
resource.TestCheckResourceAttrSet("data.ibm_iam_policy_template.policy_template", "policy_templates.#"),
),
},
Expand Down

0 comments on commit 784e0a2

Please sign in to comment.