Skip to content

Commit

Permalink
remove update from request/response
Browse files Browse the repository at this point in the history
Signed-off-by: HARI K ARLA <hariarla@in.ibm.com>
  • Loading branch information
hariarla authored and hkantare committed Sep 12, 2023
1 parent 29d1b8b commit 563da56
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 97 deletions.
4 changes: 0 additions & 4 deletions examples/ibm-iam-accessgroups-templates/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ resource "ibm_iam_access_group_template" "iam_access_group_template_instance" {
}
action_controls {
remove = true
update = true
}
}
action_controls {
add = true
remove = true
update = true
}
}
action_controls {
Expand Down Expand Up @@ -80,13 +78,11 @@ resource "ibm_iam_access_group_template_version" "iam_access_group_template_vers
}
action_controls {
remove = true
update = true
}
}
action_controls {
add = true
remove = true
update = true
}
}
action_controls {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ require (
github.com/IBM/continuous-delivery-go-sdk v1.1.2
github.com/IBM/event-notifications-go-admin-sdk v0.2.4
github.com/IBM/eventstreams-go-sdk v1.2.0
github.com/IBM/go-sdk-core/v5 v5.13.4
github.com/IBM/go-sdk-core/v5 v5.14.1
github.com/IBM/ibm-cos-sdk-go v1.10.0
github.com/IBM/ibm-cos-sdk-go-config v1.2.0
github.com/IBM/ibm-hpcs-tke-sdk v0.0.0-20211109141421-a4b61b05f7d1
github.com/IBM/ibm-hpcs-uko-sdk v0.0.20-beta
github.com/IBM/keyprotect-go-client v0.10.0
github.com/IBM/networking-go-sdk v0.42.2
github.com/IBM/platform-services-go-sdk v0.47.0
github.com/IBM/platform-services-go-sdk v0.48.1
github.com/IBM/push-notifications-go-sdk v0.0.0-20210310100607-5790b96c47f5
github.com/IBM/scc-go-sdk/v3 v3.1.6
github.com/IBM/scc-go-sdk/v4 v4.0.2
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ github.com/IBM/go-sdk-core/v5 v5.7.0/go.mod h1:+YbdhrjCHC84ls4MeBp+Hj4NZCni+tDAc
github.com/IBM/go-sdk-core/v5 v5.9.2/go.mod h1:YlOwV9LeuclmT/qi/LAK2AsobbAP42veV0j68/rlZsE=
github.com/IBM/go-sdk-core/v5 v5.9.5/go.mod h1:YlOwV9LeuclmT/qi/LAK2AsobbAP42veV0j68/rlZsE=
github.com/IBM/go-sdk-core/v5 v5.10.2/go.mod h1:WZPFasUzsKab/2mzt29xPcfruSk5js2ywAPwW4VJjdI=
github.com/IBM/go-sdk-core/v5 v5.13.4 h1:kJvBNQOwhFRkXCPapjNvKVC7n7n2vd1Nr6uUtDZGcfo=
github.com/IBM/go-sdk-core/v5 v5.13.4/go.mod h1:gKRSB+YyKsGlRQW7v5frlLbue5afulSvrRa4O26o4MM=
github.com/IBM/go-sdk-core/v5 v5.14.1 h1:WR1r0zz+gDW++xzZjF41r9ueY4JyjS2vgZjiYs8lO3c=
github.com/IBM/go-sdk-core/v5 v5.14.1/go.mod h1:MUvIr/1mgGh198ZXL+ByKz9Qs1JoEh80v/96x8jPXNY=
github.com/IBM/ibm-cos-sdk-go v1.3.1/go.mod h1:YLBAYobEA8bD27P7xpMwSQeNQu6W3DNBtBComXrRzRY=
github.com/IBM/ibm-cos-sdk-go v1.10.0 h1:/2VIev2/jBei39OqU2+nSZQnoWJ+KtkiSAIDkqsd7uU=
github.com/IBM/ibm-cos-sdk-go v1.10.0/go.mod h1:C8KRTRaoD3CWPPBOa6FCOpdh0ZMlUjKAAA4i3F+Q/sc=
Expand All @@ -153,8 +153,8 @@ github.com/IBM/keyprotect-go-client v0.10.0 h1:UdVOwJfyVNmL4O3Aw2eGluiEr5FpV5h8E
github.com/IBM/keyprotect-go-client v0.10.0/go.mod h1:yr8h2noNgU8vcbs+vhqoXp3Lmv73PI0zAc6VMgFvWwM=
github.com/IBM/networking-go-sdk v0.42.2 h1:caqjx4jyFHi10Vlf3skHvlL6K3YJRVstsmCBmvdyqkA=
github.com/IBM/networking-go-sdk v0.42.2/go.mod h1:lTUZwtUkMANMnrLHFIgRhHrkBfwASY/Iho1fabaPHxo=
github.com/IBM/platform-services-go-sdk v0.47.0 h1:W6jVvgAUzmwiu0naM3Pgwfg5WXmMyLiVrnrww7XrvAk=
github.com/IBM/platform-services-go-sdk v0.47.0/go.mod h1:Z2wRxuj5oxIm+Czqg8TqnvCAkhNp+Sbxgy2j2qx+DxE=
github.com/IBM/platform-services-go-sdk v0.48.1 h1:TT+v28xaaFDolswhFLc+2ut6KXukoNyJGhlhuJupV7g=
github.com/IBM/platform-services-go-sdk v0.48.1/go.mod h1:6LxcUhIaSLP4SuQJXF9oLXBamSQogs5D9BcVwr4hmfU=
github.com/IBM/project-go-sdk v0.0.10 h1:vHSuemwZ4S4c6BEb22tzsEcPTs/5LnZ0yKpP3GG/GL8=
github.com/IBM/project-go-sdk v0.0.10/go.mod h1:lqe0M4cKvABI1iHR1b+KfasVcxQL6nl2VJ8eOyQs8Ig=
github.com/IBM/push-notifications-go-sdk v0.0.0-20210310100607-5790b96c47f5 h1:NPUhkoOCRuv3OFWt19PmwjXGGTKlvmbuPg9fUrBUNe4=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,6 @@ func DataSourceIBMIAMAccessGroupTemplateVersions() *schema.Resource {
Computed: true,
Description: "Action control for removing this enterprise-managed dynamic rule.",
},
"update": {
Type: schema.TypeBool,
Computed: true,
Description: "Action control for updating this enterprise-managed dynamic rule.",
},
},
},
},
Expand All @@ -236,7 +231,7 @@ func DataSourceIBMIAMAccessGroupTemplateVersions() *schema.Resource {
"action_controls": {
Type: schema.TypeList,
Computed: true,
Description: "Control whether or not access group administrators in child accounts can add, remove, and update dynamic rules for the enterprise-managed access group in their account. The inner level RuleActionControls override these `remove` and `update` action controls.",
Description: "Control whether or not access group administrators in child accounts can add and remove dynamic rules for the enterprise-managed access group in their account. The inner level RuleActionControls override these action controls.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"add": {
Expand All @@ -249,11 +244,6 @@ func DataSourceIBMIAMAccessGroupTemplateVersions() *schema.Resource {
Computed: true,
Description: "Action control for removing enterprise-managed dynamic rules in an enterprise-managed access group.",
},
"update": {
Type: schema.TypeBool,
Computed: true,
Description: "Action control for updating enterprise-managed dynamic rules in an enterprise-managed access group.",
},
},
},
},
Expand Down Expand Up @@ -552,9 +542,6 @@ func dataSourceIBMIAMAccessGroupTemplateVersionRuleActionControlsToMap(model *ia
if model.Remove != nil {
modelMap["remove"] = model.Remove
}
if model.Update != nil {
modelMap["update"] = model.Update
}
return modelMap, nil
}

Expand All @@ -566,9 +553,6 @@ func dataSourceIBMIAMAccessGroupTemplateVersionAssertionsActionControlsToMap(mod
if model.Remove != nil {
modelMap["remove"] = model.Remove
}
if model.Update != nil {
modelMap["update"] = model.Update
}
return modelMap, nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,6 @@ func ResourceIBMIAMAccessGroupTemplate() *schema.Resource {
Optional: true,
Description: "Action control for removing this enterprise-managed dynamic rule.",
},
"update": {
Type: schema.TypeBool,
Optional: true,
Description: "Action control for updating this enterprise-managed dynamic rule.",
},
},
},
},
Expand All @@ -194,7 +189,7 @@ func ResourceIBMIAMAccessGroupTemplate() *schema.Resource {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
Description: "Control whether or not access group administrators in child accounts can add, remove, and update dynamic rules for the enterprise-managed access group in their account. The inner level RuleActionControls override these `remove` and `update` action controls.",
Description: "Control whether or not access group administrators in child accounts can add, remove, and update dynamic rules for the enterprise-managed access group in their account. The inner level RuleActionControls override these action controls.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"add": {
Expand All @@ -207,11 +202,6 @@ func ResourceIBMIAMAccessGroupTemplate() *schema.Resource {
Optional: true,
Description: "Action control for removing enterprise-managed dynamic rules in an enterprise-managed access group.",
},
"update": {
Type: schema.TypeBool,
Optional: true,
Description: "Action control for updating enterprise-managed dynamic rules in an enterprise-managed access group.",
},
},
},
},
Expand Down Expand Up @@ -544,9 +534,6 @@ func resourceIBMIAMAccessGroupTemplateMapToRuleActionControls(modelMap map[strin
if modelMap["remove"] != nil {
model.Remove = core.BoolPtr(modelMap["remove"].(bool))
}
if modelMap["update"] != nil {
model.Update = core.BoolPtr(modelMap["update"].(bool))
}
return model, nil
}

Expand All @@ -558,9 +545,6 @@ func resourceIBMIAMAccessGroupTemplateMapToAssertionsActionControls(modelMap map
if modelMap["remove"] != nil {
model.Remove = core.BoolPtr(modelMap["remove"].(bool))
}
if modelMap["update"] != nil {
model.Update = core.BoolPtr(modelMap["update"].(bool))
}
return model, nil
}

Expand Down Expand Up @@ -728,9 +712,6 @@ func resourceIBMIAMAccessGroupTemplateRuleActionControlsToMap(model *iamaccessgr
if model.Remove != nil {
modelMap["remove"] = model.Remove
}
if model.Update != nil {
modelMap["update"] = model.Update
}
return modelMap, nil
}

Expand All @@ -742,9 +723,6 @@ func resourceIBMIAMAccessGroupTemplateAssertionsActionControlsToMap(model *iamac
if model.Remove != nil {
modelMap["remove"] = model.Remove
}
if model.Update != nil {
modelMap["update"] = model.Update
}
return modelMap, nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ func testAccCheckIBMIAMAccessGroupTemplateConfig(name string, description string
action_controls {
add = true
remove = true
update = true
}
}
action_controls {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,6 @@ func ResourceIBMIAMAccessGroupTemplateVersion() *schema.Resource {
Optional: true,
Description: "Action control for removing this enterprise-managed dynamic rule.",
},
"update": {
Type: schema.TypeBool,
Optional: true,
Description: "Action control for updating this enterprise-managed dynamic rule.",
},
},
},
},
Expand All @@ -207,11 +202,6 @@ func ResourceIBMIAMAccessGroupTemplateVersion() *schema.Resource {
Optional: true,
Description: "Action control for removing enterprise-managed dynamic rules in an enterprise-managed access group.",
},
"update": {
Type: schema.TypeBool,
Optional: true,
Description: "Action control for updating enterprise-managed dynamic rules in an enterprise-managed access group.",
},
},
},
},
Expand Down Expand Up @@ -757,9 +747,6 @@ func resourceIBMIAMAccessGroupTemplateVersionMapToRuleActionControls(modelMap ma
if modelMap["remove"] != nil {
model.Remove = core.BoolPtr(modelMap["remove"].(bool))
}
if modelMap["update"] != nil {
model.Update = core.BoolPtr(modelMap["update"].(bool))
}
return model, nil
}

Expand All @@ -771,9 +758,6 @@ func resourceIBMIAMAccessGroupTemplateVersionMapToAssertionsActionControls(model
if modelMap["remove"] != nil {
model.Remove = core.BoolPtr(modelMap["remove"].(bool))
}
if modelMap["update"] != nil {
model.Update = core.BoolPtr(modelMap["update"].(bool))
}
return model, nil
}

Expand Down Expand Up @@ -941,9 +925,6 @@ func resourceIBMIAMAccessGroupTemplateVersionRuleActionControlsToMap(model *iama
if model.Remove != nil {
modelMap["remove"] = model.Remove
}
if model.Update != nil {
modelMap["update"] = model.Update
}
return modelMap, nil
}

Expand All @@ -955,9 +936,6 @@ func resourceIBMIAMAccessGroupTemplateVersionAssertionsActionControlsToMap(model
if model.Remove != nil {
modelMap["remove"] = model.Remove
}
if model.Update != nil {
modelMap["update"] = model.Update
}
return modelMap, nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func testAccCheckIBMIAMAccessGroupTemplateVersionConfigBasic(name string, agName
action_controls {
add = false
remove = true
update = true
}
}
}
Expand Down Expand Up @@ -125,7 +124,6 @@ func testAccCheckIBMIAMAccessGroupTemplateVersionUpdateWithCommit(name string, a
action_controls {
add = true
remove = true
update = true
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions website/docs/d/iam_access_group_template.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,15 @@ Nested schema for **group**:
* `remove` - (Boolean) Action control for removing enterprise-managed members from an enterprise-managed access group.
* `assertions` - (List) Assertions Input Component.
Nested schema for **assertions**:
* `action_controls` - (List) Control whether or not access group administrators in child accounts can add, remove, and update dynamic rules for the enterprise-managed access group in their account. The inner level RuleActionControls override these `remove` and `update` action controls.
* `action_controls` - (List) Control whether or not access group administrators in child accounts can add, remove, and update dynamic rules for the enterprise-managed access group in their account. The inner level RuleActionControls override these action controls.
Nested schema for **action_controls**:
* `add` - (Boolean) Action control for adding dynamic rules to an enterprise-managed access group. If an access group administrator in a child account adds a dynamic rule, they can always update or remove it.
* `remove` - (Boolean) Action control for removing enterprise-managed dynamic rules in an enterprise-managed access group.
* `update` - (Boolean) Action control for updating enterprise-managed dynamic rules in an enterprise-managed access group.
* `rules` - (List) Dynamic rules to automatically add federated users to access groups based on specific identity attributes.
Nested schema for **rules**:
* `action_controls` - (List) Control whether or not access group administrators in child accounts can update and remove this dynamic rule in the enterprise-managed access group in their account.This overrides outer level AssertionsActionControls.
Nested schema for **action_controls**:
* `remove` - (Boolean) Action control for removing this enterprise-managed dynamic rule.
* `update` - (Boolean) Action control for updating this enterprise-managed dynamic rule.
* `conditions` - (List) Conditions of membership. You can think of this as a key:value pair.
Nested schema for **conditions**:
* `claim` - (String) The key in the key:value pair.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,15 @@ Nested schema for **group**:
* `remove` - (Boolean) Action control for removing enterprise-managed members from an enterprise-managed access group.
* `assertions` - (List) Assertions Input Component.
Nested schema for **assertions**:
* `action_controls` - (List) Control whether or not access group administrators in child accounts can add, remove, and update dynamic rules for the enterprise-managed access group in their account. The inner level RuleActionControls override these `remove` and `update` action controls.
* `action_controls` - (List) Control whether or not access group administrators in child accounts can add, remove, and update dynamic rules for the enterprise-managed access group in their account. The inner level RuleActionControls override these action controls.
Nested schema for **action_controls**:
* `add` - (Boolean) Action control for adding dynamic rules to an enterprise-managed access group. If an access group administrator in a child account adds a dynamic rule, they can always update or remove it.
* `remove` - (Boolean) Action control for removing enterprise-managed dynamic rules in an enterprise-managed access group.
* `update` - (Boolean) Action control for updating enterprise-managed dynamic rules in an enterprise-managed access group.
* `rules` - (List) Dynamic rules to automatically add federated users to access groups based on specific identity attributes.
Nested schema for **rules**:
* `action_controls` - (List) Control whether or not access group administrators in child accounts can update and remove this dynamic rule in the enterprise-managed access group in their account.This overrides outer level AssertionsActionControls.
Nested schema for **action_controls**:
* `remove` - (Boolean) Action control for removing this enterprise-managed dynamic rule.
* `update` - (Boolean) Action control for updating this enterprise-managed dynamic rule.
* `conditions` - (List) Conditions of membership. You can think of this as a key:value pair.
Nested schema for **conditions**:
* `claim` - (String) The key in the key:value pair.
Expand Down
Loading

0 comments on commit 563da56

Please sign in to comment.