Skip to content
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

d/lambda_layer_version: Add Lambda Layer Version datasource #8577

Merged
merged 1 commit into from
May 9, 2019

Conversation

acburdine
Copy link
Contributor

refs #6651

  • add lambda_layer_version datasource & related documentation

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Release note for CHANGELOG:

**New Data Source:** `aws_lambda_layer_version`

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccDataSourceAWSLambdaLayerVersion'
--- PASS: TestAccDataSourceAWSLambdaLayerVersion_basic (22.10s)
--- PASS: TestAccDataSourceAWSLambdaLayerVersion_version (30.01s)
--- PASS: TestAccDataSourceAWSLambdaLayerVersion_runtime (35.94s)
PASS

refs hashicorp#6651
- add lambda_layer_version datasource & related documentation
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. service/lambda Issues and PRs that pertain to the lambda service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels May 9, 2019
@acburdine acburdine mentioned this pull request May 9, 2019
@bflad bflad added the new-data-source Introduces a new data source. label May 9, 2019
@bflad bflad added this to the v2.10.0 milestone May 9, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, @acburdine, thanks so much for a well put together pull request with nicely implemented acceptance testing. 🚀 Will add the sidebar link post-merge so this can get released today.

Output from acceptance testing:

--- PASS: TestAccDataSourceAWSLambdaLayerVersion_version (20.14s)
--- PASS: TestAccDataSourceAWSLambdaLayerVersion_basic (27.37s)
--- PASS: TestAccDataSourceAWSLambdaLayerVersion_runtime (35.73s)

}

log.Printf("[DEBUG] Looking up latest version for lambda layer %s", layerName)
listOutput, err := conn.ListLayerVersions(listInput)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To prevent potential problems in the future, this API call should likely be updated to use the Marker parameter for paginated results since the SDK does not provide a paginated function. 👍 I don't want to hold up this pull request on this for an initial release though.

Copy link
Contributor Author

@acburdine acburdine May 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something I noticed is that the ListLayerVersions api returns versions in descending order, and we only ever get the first result - would it still need pagination in that case?

---
layout: "aws"
page_title: "AWS: aws_lambda_layer_version"
sidebar_current: "docs-aws-datasource-lambda-layer-version"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing easy-to-forget sidebar link in website/aws.erb 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops yeah, sorry about that 😬

@bflad bflad merged commit fe316ac into hashicorp:master May 9, 2019
bflad added a commit that referenced this pull request May 9, 2019
@acburdine acburdine deleted the d/lambda_layer branch May 9, 2019 18:13
@bflad
Copy link
Contributor

bflad commented May 10, 2019

This has been released in version 2.10.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Mar 30, 2020

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!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. new-data-source Introduces a new data source. provider Pertains to the provider itself, rather than any interaction with AWS. service/lambda Issues and PRs that pertain to the lambda service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants