-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add create_date as an attribute to aws_iam_instance_profile resource #4932
add create_date as an attribute to aws_iam_instance_profile resource #4932
Conversation
@@ -307,6 +307,9 @@ func instanceProfileReadResult(d *schema.ResourceData, result *iam.InstanceProfi | |||
if err := d.Set("arn", result.Arn); err != nil { | |||
return err | |||
} | |||
if err := d.Set("create_date", result.CreateDate); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bootswithdefer the *time.Time
value needs to be turned into a string
:
=== RUN TestAccAWSIAMInstanceProfile_basic
--- FAIL: TestAccAWSIAMInstanceProfile_basic (4.90s)
testing.go:518: Step 0 error: Error applying: 1 error(s) occurred:
* aws_iam_instance_profile.test: 1 error(s) occurred:
* aws_iam_instance_profile.test: Error creating IAM instance profile test: create_date: '' expected type 'string', got unconvertible type '*time.Time'
e.g. result.CreateDate.Format(time.RFC3339)
17eaa86
to
f4be339
Compare
Fixed. Also got my acceptance testing environment set up.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @bootswithdefer! 🚀
(For those curious about such the small change, the attribute was already defined in the schema and in the documentation)
5 tests passed (all tests)
=== RUN TestAccAWSIAMInstanceProfile_missingRoleThrowsError
--- PASS: TestAccAWSIAMInstanceProfile_missingRoleThrowsError (2.71s)
=== RUN TestAccAWSIAMInstanceProfile_basic
--- PASS: TestAccAWSIAMInstanceProfile_basic (11.23s)
=== RUN TestAccAWSIAMInstanceProfile_withRoleNotRoles
--- PASS: TestAccAWSIAMInstanceProfile_withRoleNotRoles (11.53s)
=== RUN TestAccAWSIAMInstanceProfile_namePrefix
--- PASS: TestAccAWSIAMInstanceProfile_namePrefix (12.00s)
=== RUN TestAccAWSIAMInstanceProfile_importBasic
--- PASS: TestAccAWSIAMInstanceProfile_importBasic (12.75s)
This has been released in version 1.25.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Fixes #3527
Changes proposed in this pull request:
Acceptance testing not run. Manually tested on an existing instance profile in my environment.