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::Monitors::Monitor] Add backward compatibility for TypeConfiguration and ID parsing #200

Open
wants to merge 3 commits into
base: datadog-monitors-monitor-3.1.0
Choose a base branch
from

Conversation

skarimo
Copy link
Member

@skarimo skarimo commented Feb 22, 2022

Note This PR is not intended to be merged.

S3 link: s3://datadog-cloudformation-resources/datadog-monitors-monitor/datadog-monitors-monitor-3.1.0b2.zip

The 2 main changes in the PR are:

  1. Support both TypeConfiguration and DatadogCredentials in single version
  2. Handle previous resource id format for the monitor resource.

Upgrade instructions for resource major versions v2/v3 --> v3.1.0 --> v4:

  1. Register the above version using the steps outline here and set the newly registered resource version as default. If you would like to manually build and submit the resource using cfn cli, checkout the branch and follow the steps outlined here
  2. Set the TypeConfiguration for the newly registered resource version. AWS docs for setting Type Configuration:
{
  "DatadogCredentials": {
      "ApiKey": "{{resolve:secretsmanager:MySecret:SecretString:SecretAPIKey}}",
      "ApplicationKey": "{{resolve:secretsmanager:MySecret:SecretString:SecretAppKey}}"
  }
}
  1. Remove the DatadogCredentials property from the monitor resource definition.
  2. Apply the changes.
    • Note: When upgrading from 2.x.x -> v3.1.0, the first apply will fail with an error Handler returned a new physical resource identifier during update.. This is expected as the format of the resources physical id changes from str -> int. However the second apply will succeed.
  3. You can now upgrade to latest major version v4.

@skarimo skarimo added resource/monitor Impacts the datadog-monitors-monitor-handler package changelog/Added Added features results into a minor version bump labels Feb 22, 2022
@skarimo skarimo requested a review from a team as a code owner February 22, 2022 20:52
@github-actions github-actions bot added the documentation Documentation related changes label Feb 22, 2022
@skarimo skarimo force-pushed the sherz/monitor-backward-compatibility branch from c9cf88c to dc2090d Compare February 22, 2022 21:28
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days.
Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity.

@github-actions github-actions bot added the stale Stale - Bot reminder label Mar 25, 2022
@skarimo skarimo changed the title Add backward compatibility for TypeConfiguration and ID parsing [Datadog::Monitors::Monitor] Add backward compatibility for TypeConfiguration and ID parsing Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/Added Added features results into a minor version bump documentation Documentation related changes resource/monitor Impacts the datadog-monitors-monitor-handler package stale Stale - Bot reminder
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant