mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
provider/aws: Change aws_iam_role description to not pass empty string
This commit is contained in:
parent
410fdad2cb
commit
fff5fed0f0
@ -82,7 +82,7 @@ func resourceAwsIamRole() *schema.Resource {
|
||||
ForceNew: true,
|
||||
},
|
||||
|
||||
"description": &schema.Schema{
|
||||
"description": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
},
|
||||
@ -117,10 +117,13 @@ func resourceAwsIamRoleCreate(d *schema.ResourceData, meta interface{}) error {
|
||||
request := &iam.CreateRoleInput{
|
||||
Path: aws.String(d.Get("path").(string)),
|
||||
RoleName: aws.String(name),
|
||||
Description: aws.String(d.Get("description").(string)),
|
||||
AssumeRolePolicyDocument: aws.String(d.Get("assume_role_policy").(string)),
|
||||
}
|
||||
|
||||
if v, ok := d.GetOk("description"); ok {
|
||||
request.Description = aws.String(v.(string))
|
||||
}
|
||||
|
||||
var createResp *iam.CreateRoleOutput
|
||||
err := resource.Retry(30*time.Second, func() *resource.RetryError {
|
||||
var err error
|
||||
|
Loading…
Reference in New Issue
Block a user