upup/pkg/fi/cloudup/alitasks/rampolicy: Fix ineffectual assignment to policyRequest

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
This commit is contained in:
Li Zhijian 2021-02-05 16:40:39 +08:00
parent d39f196292
commit f1484df4b8
1 changed files with 1 additions and 3 deletions

View File

@ -103,12 +103,10 @@ func (_ *RAMPolicy) RenderALI(t *aliup.ALIAPITarget, a, e, changes *RAMPolicy) e
return fmt.Errorf("error rendering PolicyDocument: %v", err)
}
policyRequest := ram.PolicyRequest{}
if a == nil {
klog.V(2).Infof("Creating RAMPolicy with Name:%q", fi.StringValue(e.Name))
policyRequest = ram.PolicyRequest{
policyRequest := ram.PolicyRequest{
PolicyName: fi.StringValue(e.Name),
PolicyDocument: policy,
PolicyType: ram.Type(fi.StringValue(e.PolicyType)),