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

[datadog_application_key] use plan modifiers for app keys #2763

Merged
merged 3 commits into from
Jan 13, 2025

Conversation

amaskara-dd
Copy link
Contributor

@amaskara-dd amaskara-dd commented Jan 13, 2025

App keys are not returned by the API after creation, so we should save the previous state values to avoid the Provider returned invalid result object after apply and overwrite of state value with null

Tested by creating an application key and updating its name

@amaskara-dd amaskara-dd changed the title use plan modifiers for api and app keys [datadog_application_key] [datadog_api_key] use plan modifiers for api and app keys Jan 13, 2025
@amaskara-dd amaskara-dd changed the title [datadog_application_key] [datadog_api_key] use plan modifiers for api and app keys [datadog_application_key] use plan modifiers for api and app keys Jan 13, 2025
@amaskara-dd amaskara-dd changed the title [datadog_application_key] use plan modifiers for api and app keys [datadog_application_key] use plan modifiers app keys Jan 13, 2025
@amaskara-dd amaskara-dd changed the title [datadog_application_key] use plan modifiers app keys [datadog_application_key] use plan modifiers for app keys Jan 13, 2025
@amaskara-dd amaskara-dd merged commit 18af081 into master Jan 13, 2025
15 checks passed
@amaskara-dd amaskara-dd deleted the amask/api-app-key branch January 13, 2025 20:19
@jackakeller
Copy link
Contributor

jackakeller commented Jan 13, 2025

@amaskara-dd Why is this needed if we already check whether the response from the API has a copy of the key here? Did you notice the key getting overwritten in practice?

@amaskara-dd
Copy link
Contributor Author

amaskara-dd commented Jan 14, 2025

@jackakeller We noticed the overwrite when updating the name of the application key after creation. The check in updateState was not sufficient as the Create and Update functions use Plan.Get to update the state prior to the API call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants