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

aws-cdk-lib: SplunkLogDriverProps does not accept token value #21744

Closed
karlkranich opened this issue Aug 24, 2022 · 5 comments · Fixed by #21745
Closed

aws-cdk-lib: SplunkLogDriverProps does not accept token value #21744

karlkranich opened this issue Aug 24, 2022 · 5 comments · Fixed by #21745
Assignees
Labels
aws-cdk-lib Related to the aws-cdk-lib package documentation This is a problem with documentation. effort/small Small work item – less than a day of effort p2

Comments

@karlkranich
Copy link

Describe the bug

When trying to provide a token to the SplunkLogDriver, I would like to provide the token as a string value as I did with CDKv1. CDK 2.38.1 internal errors say "Please provide either token or secretToken" and that if "secretToken" is not provided, that "token" will be used. But if token is provided, it says," 'token' does not exist in type 'SplunkLogDriverProps' ".

Expected Behavior

Should be able to provide "token" or "secretToken" in SplunkLogDriver props.

Current Behavior

If "token" is provided, get: Object literal may only specify known properties, and 'token' does not exist in type 'SplunkLogDriverProps'.

Reproduction Steps

Provide a token to SplunkLogDriver, and do not provide secretToken.

Possible Solution

Allow specifying "token" as with CDK v1.

Additional Information/Context

No response

CDK CLI Version

2.38.1

Framework Version

No response

Node.js Version

16.16.0

OS

macOS 12.5.1

Language

Typescript

Language Version

TypeScript 4.7.4

Other information

No response

@karlkranich karlkranich added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 24, 2022
@github-actions github-actions bot added the aws-cdk-lib Related to the aws-cdk-lib package label Aug 24, 2022
@peterwoodworth
Copy link
Contributor

peterwoodworth commented Aug 25, 2022

Are you making use of the secretToken prop? The token prop doesn't exist anymore on v2. Could you share reproduction code?

@peterwoodworth peterwoodworth added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Aug 25, 2022
@karlkranich
Copy link
Author

I’m trying to use “token” because the error messages say that token will be used if secretToken is not specified. If that’s not the case, the messages should be updated.

@peterwoodworth
Copy link
Contributor

I've created a PR for this @karlkranich

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Aug 25, 2022
@peterwoodworth peterwoodworth added p2 effort/small Small work item – less than a day of effort documentation This is a problem with documentation. and removed bug This issue is a bug. labels Aug 25, 2022
@karlkranich
Copy link
Author

Thank you!

@mergify mergify bot closed this as completed in #21745 Aug 26, 2022
mergify bot pushed a commit that referenced this issue Aug 26, 2022
`token` is no longer a valid option in v2, so `secretToken` is required by virtue of needing to provide at least one of `token` or `secretToken`

Removed test which checks for error because `secretToken` is now required so we cannot check for error, even with `testDeprecated` to my knowledge

fixes #21744 

----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

josephedward pushed a commit to josephedward/aws-cdk that referenced this issue Aug 30, 2022
`token` is no longer a valid option in v2, so `secretToken` is required by virtue of needing to provide at least one of `token` or `secretToken`

Removed test which checks for error because `secretToken` is now required so we cannot check for error, even with `testDeprecated` to my knowledge

fixes aws#21744 

----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws-cdk-lib Related to the aws-cdk-lib package documentation This is a problem with documentation. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants