-
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
New Datasource: aws_ssm_document #6479
Conversation
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.
Thanks as usual for the submission @saravanan30erd. Some little things then we should be able to get this in. 👍
{ | ||
Config: testAccCheckAwsSsmDocumentDataSourceConfig(name, "JSON"), | ||
Check: resource.ComposeAggregateTestCheckFunc( | ||
resource.TestMatchResourceAttr(resourceName, "arn", |
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.
Nit: Generally its easier to check data sources via resource.TestCheckResourceAttrPair()
where possible, rather than re-implementing the test check logic. 👍
website/aws.erb
Outdated
@@ -346,6 +346,9 @@ | |||
<li<%= sidebar_current("docs-aws-datasource-sns-topic") %>> | |||
<a href="/docs/providers/aws/d/sns_topic.html">aws_sns_topic</a> | |||
</li> | |||
<li<%= sidebar_current("docs-aws-datasource-ssm-document") %>> | |||
<a href="/docs/providers/aws/d/ssm_document.html">aws_ssm_parameter</a> |
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.
😎 small copypasta typo here
<a href="/docs/providers/aws/d/ssm_document.html">aws_ssm_parameter</a> | |
<a href="/docs/providers/aws/d/ssm_document.html">aws_ssm_document</a> |
To get the contents of the custom document. | ||
|
||
```hcl | ||
resource "aws_ssm_document" "test" { |
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.
Nit: I'm not sure showing an example of the resource is valuable here and generally tends to be more of a maintenance burden than anything. It'd be much better to show how the data source gets used downstream if we are going to include additional configuration in the example. 😄
@bflad changes are done 👍
|
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.
LGTM with one non-blocking note, thanks @saravanan30erd! 🚀
--- PASS: TestAccAWSSsmDocumentDataSource_basic (6.84s)
|
||
func TestAccAWSSsmDocumentDataSource_basic(t *testing.T) { | ||
resourceName := "data.aws_ssm_document.test" | ||
name := "test_document" |
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.
Nit: We should randomize the naming to prevent testing collisions and enable future parallel testing.
This was released (4 days ago) in version 1.47.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 #6418
Change1:
Output from acceptance testing: