From 1f2809a6d78f5c395efa101532f441c23b512f3e Mon Sep 17 00:00:00 2001 From: Christopher Haar Date: Thu, 14 Mar 2024 13:11:55 +0100 Subject: [PATCH] feat(bump): tf provider and crossplane deps update Signed-off-by: Christopher Haar --- .github/ISSUE_TEMPLATE/bug_report.md | 41 - .github/ISSUE_TEMPLATE/feature_request.md | 24 - .../ISSUE_TEMPLATE/new_resource_request.md | 32 - .github/renovate.json5 | 51 ++ .github/stale.yml | 38 - .github/workflows/backport.yml | 6 +- .github/workflows/ci.yml | 86 +-- .github/workflows/commands.yml | 31 - .github/workflows/promote.yaml | 4 +- .github/workflows/tag.yml | 6 +- Makefile | 9 +- README.md | 2 +- ...terraformed.go => zz_addon_terraformed.go} | 35 +- apis/addon/v1alpha1/zz_addon_types.go | 12 +- .../v1alpha1/zz_generated.conversion_hubs.go | 10 + apis/addon/v1alpha1/zz_generated.deepcopy.go | 1 - apis/addon/v1alpha1/zz_generated.managed.go | 16 - .../v1alpha1/zz_generated.conversion_hubs.go | 13 + .../v1alpha1/zz_generated.deepcopy.go | 31 +- .../business/v1alpha1/zz_generated.managed.go | 32 - .../v1alpha1/zz_generated.resolvers.go | 32 + .../v1alpha1/zz_service_terraformed.go | 129 ++++ apis/business/v1alpha1/zz_service_types.go | 22 +- ...go => zz_servicesubscriber_terraformed.go} | 119 +-- .../v1alpha1/zz_servicesubscriber_types.go | 24 +- .../v1alpha1/zz_generated.conversion_hubs.go | 10 + .../v1alpha1/zz_generated.deepcopy.go | 105 ++- .../v1alpha1/zz_generated.managed.go | 16 - .../v1alpha1/zz_generated.resolvers.go | 16 + ...erraformed.go => zz_policy_terraformed.go} | 35 +- apis/escalation/v1alpha1/zz_policy_types.go | 67 +- .../v1alpha1/zz_generated.conversion_hubs.go | 19 + apis/event/v1alpha1/zz_generated.deepcopy.go | 253 +++++- apis/event/v1alpha1/zz_generated.managed.go | 64 -- apis/event/v1alpha1/zz_generated.resolvers.go | 64 ++ .../v1alpha1/zz_generated_terraformed.go | 350 --------- .../v1alpha1/zz_orchestration_terraformed.go | 129 ++++ apis/event/v1alpha1/zz_orchestration_types.go | 22 +- .../zz_orchestrationrouter_terraformed.go | 129 ++++ .../v1alpha1/zz_orchestrationrouter_types.go | 36 +- .../zz_orchestrationservice_terraformed.go | 129 ++++ .../v1alpha1/zz_orchestrationservice_types.go | 192 +++-- .../zz_orchestrationunrouted_terraformed.go | 129 ++++ .../zz_orchestrationunrouted_types.go | 52 +- .../v1alpha1/zz_extension_terraformed.go | 129 ++++ .../extensions/v1alpha1/zz_extension_types.go | 25 +- .../v1alpha1/zz_generated.conversion_hubs.go | 13 + .../v1alpha1/zz_generated.deepcopy.go | 24 +- .../v1alpha1/zz_generated.managed.go | 32 - .../v1alpha1/zz_generated.resolvers.go | 16 + ...formed.go => zz_servicenow_terraformed.go} | 119 +-- .../v1alpha1/zz_servicenow_types.go | 27 +- apis/generate.go | 2 +- .../v1alpha1/zz_generated.conversion_hubs.go | 10 + .../v1alpha1/zz_generated.deepcopy.go | 24 +- .../v1alpha1/zz_generated.managed.go | 16 - .../v1alpha1/zz_generated.resolvers.go | 16 + ...erraformed.go => zz_window_terraformed.go} | 35 +- apis/maintenance/v1alpha1/zz_window_types.go | 29 +- .../v1alpha1/zz_generated.conversion_hubs.go | 10 + .../v1alpha1/zz_generated.deepcopy.go | 1 - .../response/v1alpha1/zz_generated.managed.go | 16 - ..._terraformed.go => zz_play_terraformed.go} | 35 +- apis/response/v1alpha1/zz_play_types.go | 12 +- .../v1alpha1/zz_generated.conversion_hubs.go | 13 + .../ruleset/v1alpha1/zz_generated.deepcopy.go | 35 +- apis/ruleset/v1alpha1/zz_generated.managed.go | 32 - .../v1alpha1/zz_generated.resolvers.go | 34 + apis/ruleset/v1alpha1/zz_rule_terraformed.go | 129 ++++ apis/ruleset/v1alpha1/zz_rule_types.go | 20 +- ...rraformed.go => zz_ruleset_terraformed.go} | 103 +-- apis/ruleset/v1alpha1/zz_ruleset_types.go | 22 +- .../v1alpha1/zz_generated.conversion_hubs.go | 10 + .../v1alpha1/zz_generated.deepcopy.go | 47 +- .../schedule/v1alpha1/zz_generated.managed.go | 16 - .../v1alpha1/zz_generated.resolvers.go | 34 + ...raformed.go => zz_schedule_terraformed.go} | 35 +- apis/schedule/v1alpha1/zz_schedule_types.go | 52 +- .../v1alpha1/zz_dependency_terraformed.go | 129 ++++ apis/service/v1alpha1/zz_dependency_types.go | 22 +- .../v1alpha1/zz_eventrule_terraformed.go | 129 ++++ apis/service/v1alpha1/zz_eventrule_types.go | 20 +- .../v1alpha1/zz_generated.conversion_hubs.go | 19 + .../service/v1alpha1/zz_generated.deepcopy.go | 61 +- apis/service/v1alpha1/zz_generated.managed.go | 64 -- .../v1alpha1/zz_generated.resolvers.go | 48 ++ .../v1alpha1/zz_generated_terraformed.go | 354 --------- .../v1alpha1/zz_integration_terraformed.go | 131 ++++ apis/service/v1alpha1/zz_integration_types.go | 46 +- .../v1alpha1/zz_service_terraformed.go | 131 ++++ apis/service/v1alpha1/zz_service_types.go | 34 +- ...formed.go => zz_connection_terraformed.go} | 35 +- apis/slack/v1alpha1/zz_connection_types.go | 22 +- .../v1alpha1/zz_generated.conversion_hubs.go | 10 + apis/slack/v1alpha1/zz_generated.deepcopy.go | 1 - apis/slack/v1alpha1/zz_generated.managed.go | 16 - ...formed.go => zz_assignment_terraformed.go} | 119 +-- apis/tag/v1alpha1/zz_assignment_types.go | 14 +- .../v1alpha1/zz_generated.conversion_hubs.go | 13 + apis/tag/v1alpha1/zz_generated.deepcopy.go | 1 - apis/tag/v1alpha1/zz_generated.managed.go | 32 - apis/tag/v1alpha1/zz_tag_terraformed.go | 129 ++++ apis/tag/v1alpha1/zz_tag_types.go | 10 +- .../v1alpha1/zz_generated.conversion_hubs.go | 13 + apis/team/v1alpha1/zz_generated.deepcopy.go | 46 +- apis/team/v1alpha1/zz_generated.managed.go | 32 - apis/team/v1alpha1/zz_generated.resolvers.go | 32 + ...formed.go => zz_membership_terraformed.go} | 119 +-- apis/team/v1alpha1/zz_membership_types.go | 32 +- apis/team/v1alpha1/zz_team_terraformed.go | 129 ++++ apis/team/v1alpha1/zz_team_types.go | 20 +- .../v1alpha1/zz_contactmethod_terraformed.go | 129 ++++ apis/user/v1alpha1/zz_contactmethod_types.go | 26 +- .../v1alpha1/zz_generated.conversion_hubs.go | 16 + apis/user/v1alpha1/zz_generated.deepcopy.go | 40 +- apis/user/v1alpha1/zz_generated.managed.go | 48 -- apis/user/v1alpha1/zz_generated.resolvers.go | 32 + .../user/v1alpha1/zz_generated_terraformed.go | 266 ------- .../zz_notificationrule_terraformed.go | 129 ++++ .../v1alpha1/zz_notificationrule_types.go | 29 +- apis/user/v1alpha1/zz_user_terraformed.go | 129 ++++ apis/user/v1alpha1/zz_user_types.go | 13 +- apis/v1alpha1/zz_generated.deepcopy.go | 1 - apis/v1beta1/zz_generated.deepcopy.go | 1 - .../v1alpha1/zz_generated.conversion_hubs.go | 10 + .../webhook/v1alpha1/zz_generated.deepcopy.go | 1 - apis/webhook/v1alpha1/zz_generated.managed.go | 16 - ...rmed.go => zz_subscription_terraformed.go} | 35 +- .../webhook/v1alpha1/zz_subscription_types.go | 20 +- build | 2 +- cmd/generator/main.go | 2 +- cmd/provider/main.go | 64 +- config/addon/config.go | 2 +- config/business/config.go | 2 +- config/escalation/config.go | 2 +- config/event/config.go | 2 +- config/extensions/config.go | 2 +- config/external_name.go | 2 +- config/maintenance/config.go | 2 +- config/provider-metadata.yaml | 244 ++---- config/provider.go | 2 +- config/response/config.go | 2 +- config/ruleset/config.go | 2 +- config/schedule/config.go | 2 +- config/schema.json | 2 +- config/service/config.go | 2 +- config/slack/config.go | 2 +- config/tag/config.go | 2 +- config/team/config.go | 2 +- config/user/config.go | 2 +- config/webhook/config.go | 2 +- .../addon/{ => v1alpha1}/addon.yaml | 0 .../business/{ => v1alpha1}/service.yaml | 0 .../{ => v1alpha1}/servicesubscriber.yaml | 0 .../escalation/{ => v1alpha1}/policy.yaml | 0 .../event/{ => v1alpha1}/orchestration.yaml | 0 .../{ => v1alpha1}/orchestrationrouter.yaml | 0 .../{ => v1alpha1}/orchestrationservice.yaml | 29 +- .../{ => v1alpha1}/orchestrationunrouted.yaml | 0 .../extensions/{ => v1alpha1}/extension.yaml | 0 .../extensions/{ => v1alpha1}/servicenow.yaml | 0 .../maintenance/{ => v1alpha1}/window.yaml | 0 .../response/{ => v1alpha1}/play.yaml | 0 .../ruleset/{ => v1alpha1}/rule.yaml | 0 .../ruleset/{ => v1alpha1}/ruleset.yaml | 0 .../schedule/{ => v1alpha1}/schedule.yaml | 0 .../service/{ => v1alpha1}/dependency.yaml | 0 .../service/{ => v1alpha1}/eventrule.yaml | 0 .../service/{ => v1alpha1}/integration.yaml | 0 .../service/{ => v1alpha1}/service.yaml | 0 .../slack/{ => v1alpha1}/connection.yaml | 0 .../tag/{ => v1alpha1}/assignment.yaml | 0 .../tag/{ => v1alpha1}/tag.yaml | 0 .../team/{ => v1alpha1}/membership.yaml | 0 .../team/{ => v1alpha1}/team.yaml | 0 .../user/{ => v1alpha1}/contactmethod.yaml | 0 .../user/{ => v1alpha1}/notificationrule.yaml | 0 .../user/{ => v1alpha1}/user.yaml | 0 .../webhook/{ => v1alpha1}/subscription.yaml | 0 go.mod | 139 ++-- go.sum | 730 ++++-------------- internal/clients/pagerduty.go | 2 +- .../controller/addon/addon/zz_controller.go | 29 +- .../business/service/zz_controller.go | 29 +- .../servicesubscriber/zz_controller.go | 29 +- .../escalation/policy/zz_controller.go | 29 +- .../event/orchestration/zz_controller.go | 29 +- .../orchestrationrouter/zz_controller.go | 29 +- .../orchestrationservice/zz_controller.go | 29 +- .../orchestrationunrouted/zz_controller.go | 29 +- .../extensions/extension/zz_controller.go | 29 +- .../extensions/servicenow/zz_controller.go | 29 +- .../maintenance/window/zz_controller.go | 29 +- internal/controller/providerconfig/config.go | 2 +- .../controller/response/play/zz_controller.go | 29 +- .../controller/ruleset/rule/zz_controller.go | 29 +- .../ruleset/ruleset/zz_controller.go | 29 +- .../schedule/schedule/zz_controller.go | 29 +- .../service/dependency/zz_controller.go | 29 +- .../service/eventrule/zz_controller.go | 29 +- .../service/integration/zz_controller.go | 29 +- .../service/service/zz_controller.go | 29 +- .../slack/connection/zz_controller.go | 29 +- .../tag/assignment/zz_controller.go | 29 +- internal/controller/tag/tag/zz_controller.go | 29 +- .../team/membership/zz_controller.go | 29 +- .../controller/team/team/zz_controller.go | 29 +- .../user/contactmethod/zz_controller.go | 29 +- .../user/notificationrule/zz_controller.go | 29 +- .../controller/user/user/zz_controller.go | 29 +- .../webhook/subscription/zz_controller.go | 29 +- internal/controller/zz_setup.go | 6 +- internal/features/features.go | 6 +- .../addon.pagerduty.crossplane.io_addons.yaml | 244 +++--- ...ness.pagerduty.crossplane.io_services.yaml | 362 +++++---- ...duty.crossplane.io_servicesubscribers.yaml | 366 +++++---- ...tion.pagerduty.crossplane.io_policies.yaml | 415 ++++++---- ...ty.crossplane.io_orchestrationrouters.yaml | 367 +++++---- ...agerduty.crossplane.io_orchestrations.yaml | 363 +++++---- ...y.crossplane.io_orchestrationservices.yaml | 520 +++++++++---- ....crossplane.io_orchestrationunrouteds.yaml | 367 +++++---- ...ns.pagerduty.crossplane.io_extensions.yaml | 380 +++++---- ...s.pagerduty.crossplane.io_servicenows.yaml | 269 +++---- ...nance.pagerduty.crossplane.io_windows.yaml | 376 +++++---- ...gerduty.crossplane.io_providerconfigs.yaml | 52 +- ...ty.crossplane.io_providerconfigusages.yaml | 37 +- .../pagerduty.crossplane.io_storeconfigs.yaml | 214 ++--- ...esponse.pagerduty.crossplane.io_plays.yaml | 244 +++--- ...ruleset.pagerduty.crossplane.io_rules.yaml | 358 +++++---- ...eset.pagerduty.crossplane.io_rulesets.yaml | 366 +++++---- ...ule.pagerduty.crossplane.io_schedules.yaml | 547 ++++++++----- ....pagerduty.crossplane.io_dependencies.yaml | 240 +++--- ...ce.pagerduty.crossplane.io_eventrules.yaml | 358 +++++---- ....pagerduty.crossplane.io_integrations.yaml | 638 +++++++++------ ...vice.pagerduty.crossplane.io_services.yaml | 410 ++++++---- ...k.pagerduty.crossplane.io_connections.yaml | 260 +++---- ...g.pagerduty.crossplane.io_assignments.yaml | 248 +++--- .../tag.pagerduty.crossplane.io_tags.yaml | 240 +++--- ...m.pagerduty.crossplane.io_memberships.yaml | 498 +++++++----- .../team.pagerduty.crossplane.io_teams.yaml | 255 +++--- ...agerduty.crossplane.io_contactmethods.yaml | 370 +++++---- ...rduty.crossplane.io_notificationrules.yaml | 373 +++++---- .../user.pagerduty.crossplane.io_users.yaml | 263 +++---- ...pagerduty.crossplane.io_subscriptions.yaml | 248 +++--- 244 files changed, 11121 insertions(+), 7951 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/ISSUE_TEMPLATE/new_resource_request.md create mode 100644 .github/renovate.json5 delete mode 100644 .github/stale.yml delete mode 100644 .github/workflows/commands.yml rename apis/addon/v1alpha1/{zz_generated_terraformed.go => zz_addon_terraformed.go} (69%) create mode 100755 apis/addon/v1alpha1/zz_generated.conversion_hubs.go create mode 100755 apis/business/v1alpha1/zz_generated.conversion_hubs.go create mode 100755 apis/business/v1alpha1/zz_service_terraformed.go rename apis/business/v1alpha1/{zz_generated_terraformed.go => zz_servicesubscriber_terraformed.go} (53%) create mode 100755 apis/escalation/v1alpha1/zz_generated.conversion_hubs.go rename apis/escalation/v1alpha1/{zz_generated_terraformed.go => zz_policy_terraformed.go} (69%) create mode 100755 apis/event/v1alpha1/zz_generated.conversion_hubs.go delete mode 100755 apis/event/v1alpha1/zz_generated_terraformed.go create mode 100755 apis/event/v1alpha1/zz_orchestration_terraformed.go create mode 100755 apis/event/v1alpha1/zz_orchestrationrouter_terraformed.go create mode 100755 apis/event/v1alpha1/zz_orchestrationservice_terraformed.go create mode 100755 apis/event/v1alpha1/zz_orchestrationunrouted_terraformed.go create mode 100755 apis/extensions/v1alpha1/zz_extension_terraformed.go create mode 100755 apis/extensions/v1alpha1/zz_generated.conversion_hubs.go rename apis/extensions/v1alpha1/{zz_generated_terraformed.go => zz_servicenow_terraformed.go} (52%) create mode 100755 apis/maintenance/v1alpha1/zz_generated.conversion_hubs.go rename apis/maintenance/v1alpha1/{zz_generated_terraformed.go => zz_window_terraformed.go} (69%) create mode 100755 apis/response/v1alpha1/zz_generated.conversion_hubs.go rename apis/response/v1alpha1/{zz_generated_terraformed.go => zz_play_terraformed.go} (69%) create mode 100755 apis/ruleset/v1alpha1/zz_generated.conversion_hubs.go create mode 100755 apis/ruleset/v1alpha1/zz_rule_terraformed.go rename apis/ruleset/v1alpha1/{zz_generated_terraformed.go => zz_ruleset_terraformed.go} (52%) create mode 100755 apis/schedule/v1alpha1/zz_generated.conversion_hubs.go rename apis/schedule/v1alpha1/{zz_generated_terraformed.go => zz_schedule_terraformed.go} (69%) create mode 100755 apis/service/v1alpha1/zz_dependency_terraformed.go create mode 100755 apis/service/v1alpha1/zz_eventrule_terraformed.go create mode 100755 apis/service/v1alpha1/zz_generated.conversion_hubs.go delete mode 100755 apis/service/v1alpha1/zz_generated_terraformed.go create mode 100755 apis/service/v1alpha1/zz_integration_terraformed.go create mode 100755 apis/service/v1alpha1/zz_service_terraformed.go rename apis/slack/v1alpha1/{zz_generated_terraformed.go => zz_connection_terraformed.go} (69%) create mode 100755 apis/slack/v1alpha1/zz_generated.conversion_hubs.go rename apis/tag/v1alpha1/{zz_generated_terraformed.go => zz_assignment_terraformed.go} (53%) create mode 100755 apis/tag/v1alpha1/zz_generated.conversion_hubs.go create mode 100755 apis/tag/v1alpha1/zz_tag_terraformed.go create mode 100755 apis/team/v1alpha1/zz_generated.conversion_hubs.go rename apis/team/v1alpha1/{zz_generated_terraformed.go => zz_membership_terraformed.go} (53%) create mode 100755 apis/team/v1alpha1/zz_team_terraformed.go create mode 100755 apis/user/v1alpha1/zz_contactmethod_terraformed.go create mode 100755 apis/user/v1alpha1/zz_generated.conversion_hubs.go delete mode 100755 apis/user/v1alpha1/zz_generated_terraformed.go create mode 100755 apis/user/v1alpha1/zz_notificationrule_terraformed.go create mode 100755 apis/user/v1alpha1/zz_user_terraformed.go create mode 100755 apis/webhook/v1alpha1/zz_generated.conversion_hubs.go rename apis/webhook/v1alpha1/{zz_generated_terraformed.go => zz_subscription_terraformed.go} (70%) rename examples-generated/addon/{ => v1alpha1}/addon.yaml (100%) rename examples-generated/business/{ => v1alpha1}/service.yaml (100%) rename examples-generated/business/{ => v1alpha1}/servicesubscriber.yaml (100%) rename examples-generated/escalation/{ => v1alpha1}/policy.yaml (100%) rename examples-generated/event/{ => v1alpha1}/orchestration.yaml (100%) rename examples-generated/event/{ => v1alpha1}/orchestrationrouter.yaml (100%) rename examples-generated/event/{ => v1alpha1}/orchestrationservice.yaml (85%) rename examples-generated/event/{ => v1alpha1}/orchestrationunrouted.yaml (100%) rename examples-generated/extensions/{ => v1alpha1}/extension.yaml (100%) rename examples-generated/extensions/{ => v1alpha1}/servicenow.yaml (100%) rename examples-generated/maintenance/{ => v1alpha1}/window.yaml (100%) rename examples-generated/response/{ => v1alpha1}/play.yaml (100%) rename examples-generated/ruleset/{ => v1alpha1}/rule.yaml (100%) rename examples-generated/ruleset/{ => v1alpha1}/ruleset.yaml (100%) rename examples-generated/schedule/{ => v1alpha1}/schedule.yaml (100%) rename examples-generated/service/{ => v1alpha1}/dependency.yaml (100%) rename examples-generated/service/{ => v1alpha1}/eventrule.yaml (100%) rename examples-generated/service/{ => v1alpha1}/integration.yaml (100%) rename examples-generated/service/{ => v1alpha1}/service.yaml (100%) rename examples-generated/slack/{ => v1alpha1}/connection.yaml (100%) rename examples-generated/tag/{ => v1alpha1}/assignment.yaml (100%) rename examples-generated/tag/{ => v1alpha1}/tag.yaml (100%) rename examples-generated/team/{ => v1alpha1}/membership.yaml (100%) rename examples-generated/team/{ => v1alpha1}/team.yaml (100%) rename examples-generated/user/{ => v1alpha1}/contactmethod.yaml (100%) rename examples-generated/user/{ => v1alpha1}/notificationrule.yaml (100%) rename examples-generated/user/{ => v1alpha1}/user.yaml (100%) rename examples-generated/webhook/{ => v1alpha1}/subscription.yaml (100%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index d72ac2d..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -name: Bug Report -about: Help us diagnose and fix bugs in PagerDuty Provider. -labels: bug ---- - - -### What happened? - - - -### How can we reproduce it? - - -### What environment did it happen in? -Crossplane version: -Provider version: - - diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 052c107..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Feature Request -about: Help us make PagerDuty Provider more useful -labels: enhancement ---- - - -### What problem are you facing? - - -### How could PagerDuty Provider help solve your problem? - diff --git a/.github/ISSUE_TEMPLATE/new_resource_request.md b/.github/ISSUE_TEMPLATE/new_resource_request.md deleted file mode 100644 index 3fa43c3..0000000 --- a/.github/ISSUE_TEMPLATE/new_resource_request.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: New Resource Request -about: Help us know what resource you need is missing. -labels: new-resource ---- - - -### What resource do you need? - - - -### What is your use case? - - -### Would you be willing to contribute it using [Terrajet](https://github.com/crossplane/terrajet)? - - \ No newline at end of file diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 0000000..982ee79 --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,51 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended", + "helpers:pinGitHubActionDigests", + ":semanticCommits" + ], + "rebaseWhen": "conflicted", + "prConcurrentLimit": 5, + "baseBranches": ["main"], + "labels": ["automated"], + // only possible in self-hosted renovate instances + // "postUpgradeTasks": { + // "commands": ["make submodules", "make generate"], + // "fileFilters": ["Makefile"], + // "executionMode": "update" + // }, + "customManagers": [ + { + "customType": "regex", + "description": "Bump pagerduty terraform provider version in the Makefile", + "fileMatch": ["^Makefile$"], + "matchStrings": [ + "export TERRAFORM_PROVIDER_VERSION \\?= (?.*?)\\n", + "export TERRAFORM_PROVIDER_DOWNLOAD_URL_PREFIX \\?= https://github.com/PagerDuty/terraform-provider-pagerduty/releases/download/v(?.*?)\\n" + ], + "datasourceTemplate": "github-releases", + "extractVersionTemplate": "^v?(?.*)$", + "depNameTemplate": "PagerDuty/terraform-provider-pagerduty", + }, + { + "customType": "regex", + "description": "Bump up version in the Makefile", + "fileMatch": ["^Makefile$"], + "matchStrings": [ + "UP_VERSION = (?.*?)\\n" + ], + "datasourceTemplate": "github-releases", + "depNameTemplate": "upbound/up", + }, { + "customType": "regex", + "description": "Bump uptest version in the Makefile", + "fileMatch": ["^Makefile$"], + "matchStrings": [ + "UPTEST_VERSION = (?.*?)\\n" + ], + "datasourceTemplate": "github-releases", + "depNameTemplate": "upbound/uptest", + } + ] +} \ No newline at end of file diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index f6c6e0a..0000000 --- a/.github/stale.yml +++ /dev/null @@ -1,38 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 90 - -# Number of days of inactivity before a stale Issue or Pull Request is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 7 - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - security - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: false - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: false - -# Label to use when marking as stale -staleLabel: wontfix - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. - -# Comment to post when closing a stale Issue or Pull Request. -closeComment: > - This issue has been automatically closed due to inactivity. Please re-open - if this still requires investigation. - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - -# Limit to only `issues` or `pulls` -only: issues diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index b1e8d50..b58fca2 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -22,13 +22,13 @@ jobs: if: github.event.pull_request.merged steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: fetch-depth: 0 - name: Open Backport PR - uses: zeebe-io/backport-action@v0.0.8 + uses: zeebe-io/backport-action@e8161d6a0dbfa2651b7daa76cbb75bc7c925bbf3 # v2.4.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} github_workspace: ${{ github.workspace }} - version: v0.0.8 \ No newline at end of file + version: v0.0.8 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cfb53c2..782411f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,15 +10,15 @@ on: env: # Common versions - GO_VERSION: '1.19' - GOLANGCI_VERSION: 'v1.50.0' + GO_VERSION: '1.20' + GOLANGCI_VERSION: 'v1.53.3' DOCKER_BUILDX_VERSION: 'v0.8.2' # Common users. We can't run a step 'if secrets.AWS_USR != ""' but we can run # a step 'if env.AWS_USR' != ""', so we copy these to succinctly test whether # credentials have been provided before trying to run steps that need them. - CONTRIB_DOCKER_USR: ${{ secrets.CONTRIB_DOCKER_USR }} XPKG_ACCESS_ID: ${{ secrets.XPKG_ACCESS_ID }} + DOCKER_USR: ${{ secrets.DOCKER_USR }} AWS_USR: ${{ secrets.AWS_USR }} jobs: @@ -29,7 +29,7 @@ jobs: steps: - name: Detect No-op Changes id: noop - uses: fkirc/skip-duplicate-actions@v2.0.0 + uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} paths_ignore: '["**.md", "**.png", "**.jpg"]' @@ -42,12 +42,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: submodules: true - name: Setup Go - uses: actions/setup-go@v2 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5 with: go-version: ${{ env.GO_VERSION }} @@ -56,14 +56,14 @@ jobs: run: echo "::set-output name=cache::$(make go.cachedir)" - name: Cache the Go Build Cache - uses: actions/cache@v2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4 with: path: ${{ steps.go.outputs.cache }} key: ${{ runner.os }}-build-lint-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-build-lint- - name: Cache Go Dependencies - uses: actions/cache@v2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4 with: path: .work/pkg key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} @@ -75,7 +75,7 @@ jobs: # We could run 'make lint' but we prefer this action because it leaves # 'annotations' (i.e. it comments on PRs to point out linter violations). - name: Lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4 with: version: ${{ env.GOLANGCI_VERSION }} @@ -86,12 +86,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: submodules: true - name: Setup Go - uses: actions/setup-go@v2 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5 with: go-version: ${{ env.GO_VERSION }} @@ -103,14 +103,14 @@ jobs: run: echo "::set-output name=cache::$(make go.cachedir)" - name: Cache the Go Build Cache - uses: actions/cache@v2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4 with: path: ${{ steps.go.outputs.cache }} key: ${{ runner.os }}-build-check-diff-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-build-check-diff- - name: Cache Go Dependencies - uses: actions/cache@v2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4 with: path: .work/pkg key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} @@ -129,7 +129,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: submodules: true @@ -137,7 +137,7 @@ jobs: run: git fetch --prune --unshallow - name: Setup Go - uses: actions/setup-go@v2 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5 with: go-version: ${{ env.GO_VERSION }} @@ -146,14 +146,14 @@ jobs: run: echo "::set-output name=cache::$(make go.cachedir)" - name: Cache the Go Build Cache - uses: actions/cache@v2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4 with: path: ${{ steps.go.outputs.cache }} key: ${{ runner.os }}-build-unit-tests-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-build-unit-tests- - name: Cache Go Dependencies - uses: actions/cache@v2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4 with: path: .work/pkg key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} @@ -166,7 +166,7 @@ jobs: run: make -j2 test - name: Publish Unit Test Coverage - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4 with: flags: unittests file: _output/tests/linux_amd64/coverage.txt @@ -178,18 +178,18 @@ jobs: steps: - name: Setup QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3 with: platforms: all - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3 with: version: ${{ env.DOCKER_BUILDX_VERSION }} install: true - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: submodules: true @@ -197,7 +197,7 @@ jobs: run: git fetch --prune --unshallow - name: Setup Go - uses: actions/setup-go@v2 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5 with: go-version: ${{ env.GO_VERSION }} @@ -206,14 +206,14 @@ jobs: run: echo "::set-output name=cache::$(make go.cachedir)" - name: Cache the Go Build Cache - uses: actions/cache@v2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4 with: path: ${{ steps.go.outputs.cache }} key: ${{ runner.os }}-build-publish-artifacts-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-build-publish-artifacts- - name: Cache Go Dependencies - uses: actions/cache@v2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4 with: path: .work/pkg key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} @@ -230,39 +230,29 @@ jobs: BUILD_ARGS: "--load" - name: Publish Artifacts to GitHub - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4 with: name: output path: _output/** - - - name: Login to Docker - uses: docker/login-action@v1 - if: env.CONTRIB_DOCKER_USR != '' - with: - username: ${{ secrets.CONTRIB_DOCKER_USR }} - password: ${{ secrets.CONTRIB_DOCKER_PSW }} - name: Login to Upbound - uses: docker/login-action@v1 + uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3 if: env.XPKG_ACCESS_ID != '' with: registry: xpkg.upbound.io username: ${{ secrets.XPKG_ACCESS_ID }} password: ${{ secrets.XPKG_TOKEN }} - - name: Publish Artifacts to S3 and Docker Hub - run: make -j2 publish BRANCH_NAME=${GITHUB_REF##*/} - if: env.AWS_USR != '' && env.CONTRIB_DOCKER_USR != '' - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_USR }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PSW }} - GIT_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Promote Artifacts in S3 and Docker Hub - if: github.ref == 'refs/heads/main' && env.AWS_USR != '' && env.CONTRIB_DOCKER_USR != '' - run: make -j2 promote + - name: Login to Docker + uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3 + if: env.DOCKER_USR != '' + with: + username: ${{ secrets.DOCKER_USR }} + password: ${{ secrets.DOCKER_PSW }} + + - name: Publish Artifacts + run: make publish BRANCH_NAME=${GITHUB_REF##*/} + if: env.XPKG_ACCESS_ID != '' env: - BRANCH_NAME: main - CHANNEL: main - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_USR }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PSW }} \ No newline at end of file + UPBOUND_MARKETPLACE_PUSH_ROBOT_USR: ${{ secrets.XPKG_ACCESS_ID }} + UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW: ${{ secrets.XPKG_TOKEN }} diff --git a/.github/workflows/commands.yml b/.github/workflows/commands.yml deleted file mode 100644 index 63101a3..0000000 --- a/.github/workflows/commands.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Comment Commands - -on: issue_comment - -jobs: - backport: - runs-on: ubuntu-22.04 - if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/backport') - steps: - - name: Extract Command - id: command - uses: xt0rted/slash-command-action@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - command: backport - reaction: "true" - reaction-type: "eyes" - allow-edits: "false" - permission-level: write - - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Open Backport PR - uses: zeebe-io/backport-action@v0.0.4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - github_workspace: ${{ github.workspace }} - version: v0.0.4 \ No newline at end of file diff --git a/.github/workflows/promote.yaml b/.github/workflows/promote.yaml index 69ef400..4ec1244 100644 --- a/.github/workflows/promote.yaml +++ b/.github/workflows/promote.yaml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: submodules: true @@ -32,7 +32,7 @@ jobs: run: git fetch --prune --unshallow - name: Login to Docker - uses: docker/login-action@v1 + uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3 if: env.CONTRIB_DOCKER_USR != '' with: username: ${{ secrets.CONTRIB_DOCKER_USR }} diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 24c5cb1..6f12ffd 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -16,11 +16,11 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - name: Create Tag - uses: negz/create-tag@v1 + uses: negz/create-tag@39bae1e0932567a58c20dea5a1a0d18358503320 # v1 with: version: ${{ github.event.inputs.version }} message: ${{ github.event.inputs.message }} - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index 8f8ab31..a2c69b2 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,9 @@ PROJECT_REPO := github.com/crossplane-contrib/$(PROJECT_NAME) export TERRAFORM_VERSION := 1.3.3 export TERRAFORM_PROVIDER_SOURCE := PagerDuty/pagerduty -export TERRAFORM_PROVIDER_VERSION := 2.15.1 +export TERRAFORM_PROVIDER_VERSION := 3.9.0 export TERRAFORM_PROVIDER_DOWNLOAD_NAME := terraform-provider-pagerduty -export TERRAFORM_PROVIDER_DOWNLOAD_URL_PREFIX := https://github.com/PagerDuty/terraform-provider-pagerduty/releases/download/v2.15.1 +export TERRAFORM_PROVIDER_DOWNLOAD_URL_PREFIX := https://github.com/PagerDuty/terraform-provider-pagerduty/releases/download/v3.9.0 export TERRAFORM_PROVIDER_REPO ?= https://github.com/PagerDuty/terraform-provider-pagerduty export TERRAFORM_DOCS_PATH := website/docs/r @@ -38,8 +38,7 @@ NPROCS ?= 1 # to half the number of CPU cores. GO_TEST_PARALLEL := $(shell echo $$(( $(NPROCS) / 2 ))) -GO_REQUIRED_VERSION ?= 1.19 -GOLANGCILINT_VERSION ?= 1.50.0 +GO_REQUIRED_VERSION ?= 1.20 GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/provider $(GO_PROJECT)/cmd/generator GO_LDFLAGS += -X $(GO_PROJECT)/internal/version.Version=$(VERSION) GO_SUBDIRS += cmd internal apis @@ -50,7 +49,7 @@ GO111MODULE = on # Setup Kubernetes tools KIND_VERSION = v0.15.0 -UP_VERSION = v0.14.0 +UP_VERSION = v0.24.1 UP_CHANNEL = stable -include build/makelib/k8s_tools.mk diff --git a/README.md b/README.md index 59f2b47..ca761a8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Provider PagerDuty `provider-pagerduty` is a [Crossplane](https://crossplane.io/) provider that -is built using [Upjet](https://github.com/upbound/upjet) code +is built using [Upjet](https://github.com/crossplane/upjet) code generation tools and exposes XRM-conformant managed resources for the PagerDuty API. diff --git a/apis/addon/v1alpha1/zz_generated_terraformed.go b/apis/addon/v1alpha1/zz_addon_terraformed.go similarity index 69% rename from apis/addon/v1alpha1/zz_generated_terraformed.go rename to apis/addon/v1alpha1/zz_addon_terraformed.go index 015a721..01cc0e2 100755 --- a/apis/addon/v1alpha1/zz_generated_terraformed.go +++ b/apis/addon/v1alpha1/zz_addon_terraformed.go @@ -7,10 +7,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Addon @@ -79,6 +80,36 @@ func (tr *Addon) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Addon +func (tr *Addon) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Addon using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Addon) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/addon/v1alpha1/zz_addon_types.go b/apis/addon/v1alpha1/zz_addon_types.go index 2d23e59..9491f8f 100755 --- a/apis/addon/v1alpha1/zz_addon_types.go +++ b/apis/addon/v1alpha1/zz_addon_types.go @@ -49,9 +49,8 @@ type AddonParameters struct { type AddonSpec struct { v1.ResourceSpec `json:",inline"` ForProvider AddonParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -70,19 +69,20 @@ type AddonStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Addon is the Schema for the Addons API. Creates and manages an add-on in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Addon struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || has(self.initProvider.name)",message="name is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.src) || has(self.initProvider.src)",message="src is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.src) || (has(self.initProvider) && has(self.initProvider.src))",message="spec.forProvider.src is a required parameter" Spec AddonSpec `json:"spec"` Status AddonStatus `json:"status,omitempty"` } diff --git a/apis/addon/v1alpha1/zz_generated.conversion_hubs.go b/apis/addon/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..028931a --- /dev/null +++ b/apis/addon/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,10 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Addon) Hub() {} diff --git a/apis/addon/v1alpha1/zz_generated.deepcopy.go b/apis/addon/v1alpha1/zz_generated.deepcopy.go index 279141a..9605225 100644 --- a/apis/addon/v1alpha1/zz_generated.deepcopy.go +++ b/apis/addon/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. diff --git a/apis/addon/v1alpha1/zz_generated.managed.go b/apis/addon/v1alpha1/zz_generated.managed.go index 3b6e098..a2bf60e 100644 --- a/apis/addon/v1alpha1/zz_generated.managed.go +++ b/apis/addon/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Addon) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Addon. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Addon) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Addon. func (mg *Addon) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Addon) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Addon. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Addon) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Addon. func (mg *Addon) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/business/v1alpha1/zz_generated.conversion_hubs.go b/apis/business/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..9012579 --- /dev/null +++ b/apis/business/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,13 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Service) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *ServiceSubscriber) Hub() {} diff --git a/apis/business/v1alpha1/zz_generated.deepcopy.go b/apis/business/v1alpha1/zz_generated.deepcopy.go index 652b70a..f248fb0 100644 --- a/apis/business/v1alpha1/zz_generated.deepcopy.go +++ b/apis/business/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -59,6 +58,21 @@ func (in *ServiceInitParameters) DeepCopyInto(out *ServiceInitParameters) { *out = new(string) **out = **in } + if in.Team != nil { + in, out := &in.Team, &out.Team + *out = new(string) + **out = **in + } + if in.TeamRef != nil { + in, out := &in.TeamRef, &out.TeamRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.TeamSelector != nil { + in, out := &in.TeamSelector, &out.TeamSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceInitParameters. @@ -273,6 +287,21 @@ func (in *ServiceSubscriber) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceSubscriberInitParameters) DeepCopyInto(out *ServiceSubscriberInitParameters) { *out = *in + if in.BusinessServiceID != nil { + in, out := &in.BusinessServiceID, &out.BusinessServiceID + *out = new(string) + **out = **in + } + if in.BusinessServiceIDRef != nil { + in, out := &in.BusinessServiceIDRef, &out.BusinessServiceIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.BusinessServiceIDSelector != nil { + in, out := &in.BusinessServiceIDSelector, &out.BusinessServiceIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SubscriberID != nil { in, out := &in.SubscriberID, &out.SubscriberID *out = new(string) diff --git a/apis/business/v1alpha1/zz_generated.managed.go b/apis/business/v1alpha1/zz_generated.managed.go index 4f0b28d..526d213 100644 --- a/apis/business/v1alpha1/zz_generated.managed.go +++ b/apis/business/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Service) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Service. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Service) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Service. func (mg *Service) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Service) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Service. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Service) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Service. func (mg *Service) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -103,14 +87,6 @@ func (mg *ServiceSubscriber) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ServiceSubscriber. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ServiceSubscriber) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ServiceSubscriber. func (mg *ServiceSubscriber) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -141,14 +117,6 @@ func (mg *ServiceSubscriber) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ServiceSubscriber. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ServiceSubscriber) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ServiceSubscriber. func (mg *ServiceSubscriber) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/business/v1alpha1/zz_generated.resolvers.go b/apis/business/v1alpha1/zz_generated.resolvers.go index fc984c4..8a99221 100644 --- a/apis/business/v1alpha1/zz_generated.resolvers.go +++ b/apis/business/v1alpha1/zz_generated.resolvers.go @@ -36,6 +36,22 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.Team = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TeamRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Team), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.TeamRef, + Selector: mg.Spec.InitProvider.TeamSelector, + To: reference.To{ + List: &v1alpha1.TeamList{}, + Managed: &v1alpha1.Team{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Team") + } + mg.Spec.InitProvider.Team = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.TeamRef = rsp.ResolvedReference + return nil } @@ -62,5 +78,21 @@ func (mg *ServiceSubscriber) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.BusinessServiceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BusinessServiceIDRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.BusinessServiceID), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.BusinessServiceIDRef, + Selector: mg.Spec.InitProvider.BusinessServiceIDSelector, + To: reference.To{ + List: &ServiceList{}, + Managed: &Service{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.BusinessServiceID") + } + mg.Spec.InitProvider.BusinessServiceID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.BusinessServiceIDRef = rsp.ResolvedReference + return nil } diff --git a/apis/business/v1alpha1/zz_service_terraformed.go b/apis/business/v1alpha1/zz_service_terraformed.go new file mode 100755 index 0000000..4528135 --- /dev/null +++ b/apis/business/v1alpha1/zz_service_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Service +func (mg *Service) GetTerraformResourceType() string { + return "pagerduty_business_service" +} + +// GetConnectionDetailsMapping for this Service +func (tr *Service) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Service +func (tr *Service) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Service +func (tr *Service) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Service +func (tr *Service) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Service +func (tr *Service) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Service +func (tr *Service) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Service +func (tr *Service) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Service +func (tr *Service) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Service using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Service) LateInitialize(attrs []byte) (bool, error) { + params := &ServiceParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Service) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/business/v1alpha1/zz_service_types.go b/apis/business/v1alpha1/zz_service_types.go index 2a1349b..110c27c 100755 --- a/apis/business/v1alpha1/zz_service_types.go +++ b/apis/business/v1alpha1/zz_service_types.go @@ -23,6 +23,18 @@ type ServiceInitParameters struct { // The owner of the business service. PointOfContact *string `json:"pointOfContact,omitempty" tf:"point_of_contact,omitempty"` + + // ID of the team that owns the business service. + // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/team/v1alpha1.Team + Team *string `json:"team,omitempty" tf:"team,omitempty"` + + // Reference to a Team in team to populate team. + // +kubebuilder:validation:Optional + TeamRef *v1.Reference `json:"teamRef,omitempty" tf:"-"` + + // Selector for a Team in team to populate team. + // +kubebuilder:validation:Optional + TeamSelector *v1.Selector `json:"teamSelector,omitempty" tf:"-"` } type ServiceObservation struct { @@ -87,9 +99,8 @@ type ServiceParameters struct { type ServiceSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ServiceParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -108,18 +119,19 @@ type ServiceStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Service is the Schema for the Services API. Creates and manages a business service in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Service struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || has(self.initProvider.name)",message="name is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" Spec ServiceSpec `json:"spec"` Status ServiceStatus `json:"status,omitempty"` } diff --git a/apis/business/v1alpha1/zz_generated_terraformed.go b/apis/business/v1alpha1/zz_servicesubscriber_terraformed.go similarity index 53% rename from apis/business/v1alpha1/zz_generated_terraformed.go rename to apis/business/v1alpha1/zz_servicesubscriber_terraformed.go index dac7056..f18eead 100755 --- a/apis/business/v1alpha1/zz_generated_terraformed.go +++ b/apis/business/v1alpha1/zz_servicesubscriber_terraformed.go @@ -7,96 +7,13 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) -// GetTerraformResourceType returns Terraform resource type for this Service -func (mg *Service) GetTerraformResourceType() string { - return "pagerduty_business_service" -} - -// GetConnectionDetailsMapping for this Service -func (tr *Service) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this Service -func (tr *Service) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this Service -func (tr *Service) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this Service -func (tr *Service) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this Service -func (tr *Service) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this Service -func (tr *Service) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this Service -func (tr *Service) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this Service using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *Service) LateInitialize(attrs []byte) (bool, error) { - params := &ServiceParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Service) GetTerraformSchemaVersion() int { - return 0 -} - // GetTerraformResourceType returns Terraform resource type for this ServiceSubscriber func (mg *ServiceSubscriber) GetTerraformResourceType() string { return "pagerduty_business_service_subscriber" @@ -163,6 +80,36 @@ func (tr *ServiceSubscriber) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this ServiceSubscriber +func (tr *ServiceSubscriber) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ServiceSubscriber using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ServiceSubscriber) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/business/v1alpha1/zz_servicesubscriber_types.go b/apis/business/v1alpha1/zz_servicesubscriber_types.go index 4957bf0..5e59b94 100755 --- a/apis/business/v1alpha1/zz_servicesubscriber_types.go +++ b/apis/business/v1alpha1/zz_servicesubscriber_types.go @@ -15,6 +15,18 @@ import ( type ServiceSubscriberInitParameters struct { + // The ID of the business service to subscribe to. + // +crossplane:generate:reference:type=Service + BusinessServiceID *string `json:"businessServiceId,omitempty" tf:"business_service_id,omitempty"` + + // Reference to a Service to populate businessServiceId. + // +kubebuilder:validation:Optional + BusinessServiceIDRef *v1.Reference `json:"businessServiceIdRef,omitempty" tf:"-"` + + // Selector for a Service to populate businessServiceId. + // +kubebuilder:validation:Optional + BusinessServiceIDSelector *v1.Selector `json:"businessServiceIdSelector,omitempty" tf:"-"` + // The ID of the subscriber entity. SubscriberID *string `json:"subscriberId,omitempty" tf:"subscriber_id,omitempty"` @@ -65,9 +77,8 @@ type ServiceSubscriberParameters struct { type ServiceSubscriberSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ServiceSubscriberParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -86,19 +97,20 @@ type ServiceSubscriberStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // ServiceSubscriber is the Schema for the ServiceSubscribers API. Creates and manages a business service subscriber in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type ServiceSubscriber struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.subscriberId) || has(self.initProvider.subscriberId)",message="subscriberId is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.subscriberType) || has(self.initProvider.subscriberType)",message="subscriberType is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.subscriberId) || (has(self.initProvider) && has(self.initProvider.subscriberId))",message="spec.forProvider.subscriberId is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.subscriberType) || (has(self.initProvider) && has(self.initProvider.subscriberType))",message="spec.forProvider.subscriberType is a required parameter" Spec ServiceSubscriberSpec `json:"spec"` Status ServiceSubscriberStatus `json:"status,omitempty"` } diff --git a/apis/escalation/v1alpha1/zz_generated.conversion_hubs.go b/apis/escalation/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..8de3d5b --- /dev/null +++ b/apis/escalation/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,10 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Policy) Hub() {} diff --git a/apis/escalation/v1alpha1/zz_generated.deepcopy.go b/apis/escalation/v1alpha1/zz_generated.deepcopy.go index 5017443..0003bb8 100644 --- a/apis/escalation/v1alpha1/zz_generated.deepcopy.go +++ b/apis/escalation/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -14,6 +13,66 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EscalationRuleAssignmentStrategyInitParameters) DeepCopyInto(out *EscalationRuleAssignmentStrategyInitParameters) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EscalationRuleAssignmentStrategyInitParameters. +func (in *EscalationRuleAssignmentStrategyInitParameters) DeepCopy() *EscalationRuleAssignmentStrategyInitParameters { + if in == nil { + return nil + } + out := new(EscalationRuleAssignmentStrategyInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EscalationRuleAssignmentStrategyObservation) DeepCopyInto(out *EscalationRuleAssignmentStrategyObservation) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EscalationRuleAssignmentStrategyObservation. +func (in *EscalationRuleAssignmentStrategyObservation) DeepCopy() *EscalationRuleAssignmentStrategyObservation { + if in == nil { + return nil + } + out := new(EscalationRuleAssignmentStrategyObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EscalationRuleAssignmentStrategyParameters) DeepCopyInto(out *EscalationRuleAssignmentStrategyParameters) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EscalationRuleAssignmentStrategyParameters. +func (in *EscalationRuleAssignmentStrategyParameters) DeepCopy() *EscalationRuleAssignmentStrategyParameters { + if in == nil { + return nil + } + out := new(EscalationRuleAssignmentStrategyParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Policy) DeepCopyInto(out *Policy) { *out = *in @@ -66,6 +125,29 @@ func (in *PolicyInitParameters) DeepCopyInto(out *PolicyInitParameters) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.TeamRefs != nil { + in, out := &in.TeamRefs, &out.TeamRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.TeamSelector != nil { + in, out := &in.TeamSelector, &out.TeamSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyInitParameters. @@ -266,6 +348,13 @@ func (in *RuleInitParameters) DeepCopyInto(out *RuleInitParameters) { *out = new(float64) **out = **in } + if in.EscalationRuleAssignmentStrategy != nil { + in, out := &in.EscalationRuleAssignmentStrategy, &out.EscalationRuleAssignmentStrategy + *out = make([]EscalationRuleAssignmentStrategyInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Target != nil { in, out := &in.Target, &out.Target *out = make([]TargetInitParameters, len(*in)) @@ -293,6 +382,13 @@ func (in *RuleObservation) DeepCopyInto(out *RuleObservation) { *out = new(float64) **out = **in } + if in.EscalationRuleAssignmentStrategy != nil { + in, out := &in.EscalationRuleAssignmentStrategy, &out.EscalationRuleAssignmentStrategy + *out = make([]EscalationRuleAssignmentStrategyObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.ID != nil { in, out := &in.ID, &out.ID *out = new(string) @@ -325,6 +421,13 @@ func (in *RuleParameters) DeepCopyInto(out *RuleParameters) { *out = new(float64) **out = **in } + if in.EscalationRuleAssignmentStrategy != nil { + in, out := &in.EscalationRuleAssignmentStrategy, &out.EscalationRuleAssignmentStrategy + *out = make([]EscalationRuleAssignmentStrategyParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Target != nil { in, out := &in.Target, &out.Target *out = make([]TargetParameters, len(*in)) diff --git a/apis/escalation/v1alpha1/zz_generated.managed.go b/apis/escalation/v1alpha1/zz_generated.managed.go index a29e31b..4bca39f 100644 --- a/apis/escalation/v1alpha1/zz_generated.managed.go +++ b/apis/escalation/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Policy) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Policy. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Policy) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Policy. func (mg *Policy) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Policy) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Policy. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Policy) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Policy. func (mg *Policy) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/escalation/v1alpha1/zz_generated.resolvers.go b/apis/escalation/v1alpha1/zz_generated.resolvers.go index 4e72d48..559428c 100644 --- a/apis/escalation/v1alpha1/zz_generated.resolvers.go +++ b/apis/escalation/v1alpha1/zz_generated.resolvers.go @@ -36,5 +36,21 @@ func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.Teams = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.TeamRefs = mrsp.ResolvedReferences + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.Teams), + Extract: reference.ExternalName(), + References: mg.Spec.InitProvider.TeamRefs, + Selector: mg.Spec.InitProvider.TeamSelector, + To: reference.To{ + List: &v1alpha1.TeamList{}, + Managed: &v1alpha1.Team{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Teams") + } + mg.Spec.InitProvider.Teams = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.TeamRefs = mrsp.ResolvedReferences + return nil } diff --git a/apis/escalation/v1alpha1/zz_generated_terraformed.go b/apis/escalation/v1alpha1/zz_policy_terraformed.go similarity index 69% rename from apis/escalation/v1alpha1/zz_generated_terraformed.go rename to apis/escalation/v1alpha1/zz_policy_terraformed.go index 1531df1..765b1f6 100755 --- a/apis/escalation/v1alpha1/zz_generated_terraformed.go +++ b/apis/escalation/v1alpha1/zz_policy_terraformed.go @@ -7,10 +7,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Policy @@ -79,6 +80,36 @@ func (tr *Policy) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Policy +func (tr *Policy) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Policy using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Policy) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/escalation/v1alpha1/zz_policy_types.go b/apis/escalation/v1alpha1/zz_policy_types.go index 46435e4..88c8aca 100755 --- a/apis/escalation/v1alpha1/zz_policy_types.go +++ b/apis/escalation/v1alpha1/zz_policy_types.go @@ -13,6 +13,25 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type EscalationRuleAssignmentStrategyInitParameters struct { + + // Can be round_robin or assign_to_everyone. + Type *string `json:"type,omitempty" tf:"type,omitempty"` +} + +type EscalationRuleAssignmentStrategyObservation struct { + + // Can be round_robin or assign_to_everyone. + Type *string `json:"type,omitempty" tf:"type,omitempty"` +} + +type EscalationRuleAssignmentStrategyParameters struct { + + // Can be round_robin or assign_to_everyone. + // +kubebuilder:validation:Optional + Type *string `json:"type,omitempty" tf:"type,omitempty"` +} + type PolicyInitParameters struct { // A human-friendly description of the escalation policy. @@ -26,6 +45,20 @@ type PolicyInitParameters struct { // An Escalation rule block. Escalation rules documented below. Rule []RuleInitParameters `json:"rule,omitempty" tf:"rule,omitempty"` + + // References to Team in team to populate teams. + // +kubebuilder:validation:Optional + TeamRefs []v1.Reference `json:"teamRefs,omitempty" tf:"-"` + + // Selector for a list of Team in team to populate teams. + // +kubebuilder:validation:Optional + TeamSelector *v1.Selector `json:"teamSelector,omitempty" tf:"-"` + + // Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the teams ability to use this parameter. + // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/team/v1alpha1.Team + // +crossplane:generate:reference:refFieldName=TeamRefs + // +crossplane:generate:reference:selectorFieldName=TeamSelector + Teams []*string `json:"teams,omitempty" tf:"teams,omitempty"` } type PolicyObservation struct { @@ -88,6 +121,9 @@ type RuleInitParameters struct { // The number of minutes before an unacknowledged incident escalates away from this rule. EscalationDelayInMinutes *float64 `json:"escalationDelayInMinutes,omitempty" tf:"escalation_delay_in_minutes,omitempty"` + // The strategy used to assign the escalation rule to an incident. Documented below. + EscalationRuleAssignmentStrategy []EscalationRuleAssignmentStrategyInitParameters `json:"escalationRuleAssignmentStrategy,omitempty" tf:"escalation_rule_assignment_strategy,omitempty"` + Target []TargetInitParameters `json:"target,omitempty" tf:"target,omitempty"` } @@ -96,6 +132,9 @@ type RuleObservation struct { // The number of minutes before an unacknowledged incident escalates away from this rule. EscalationDelayInMinutes *float64 `json:"escalationDelayInMinutes,omitempty" tf:"escalation_delay_in_minutes,omitempty"` + // The strategy used to assign the escalation rule to an incident. Documented below. + EscalationRuleAssignmentStrategy []EscalationRuleAssignmentStrategyObservation `json:"escalationRuleAssignmentStrategy,omitempty" tf:"escalation_rule_assignment_strategy,omitempty"` + // A target ID ID *string `json:"id,omitempty" tf:"id,omitempty"` @@ -106,10 +145,14 @@ type RuleParameters struct { // The number of minutes before an unacknowledged incident escalates away from this rule. // +kubebuilder:validation:Optional - EscalationDelayInMinutes *float64 `json:"escalationDelayInMinutes,omitempty" tf:"escalation_delay_in_minutes,omitempty"` + EscalationDelayInMinutes *float64 `json:"escalationDelayInMinutes" tf:"escalation_delay_in_minutes,omitempty"` + + // The strategy used to assign the escalation rule to an incident. Documented below. + // +kubebuilder:validation:Optional + EscalationRuleAssignmentStrategy []EscalationRuleAssignmentStrategyParameters `json:"escalationRuleAssignmentStrategy,omitempty" tf:"escalation_rule_assignment_strategy,omitempty"` // +kubebuilder:validation:Optional - Target []TargetParameters `json:"target,omitempty" tf:"target,omitempty"` + Target []TargetParameters `json:"target" tf:"target,omitempty"` } type TargetInitParameters struct { @@ -117,7 +160,7 @@ type TargetInitParameters struct { // A target ID ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Can be user_reference or schedule_reference. Defaults to user_reference. For multiple users as example, repeat the target. + // Can be round_robin or assign_to_everyone. Type *string `json:"type,omitempty" tf:"type,omitempty"` } @@ -126,7 +169,7 @@ type TargetObservation struct { // A target ID ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Can be user_reference or schedule_reference. Defaults to user_reference. For multiple users as example, repeat the target. + // Can be round_robin or assign_to_everyone. Type *string `json:"type,omitempty" tf:"type,omitempty"` } @@ -134,9 +177,9 @@ type TargetParameters struct { // A target ID // +kubebuilder:validation:Optional - ID *string `json:"id,omitempty" tf:"id,omitempty"` + ID *string `json:"id" tf:"id,omitempty"` - // Can be user_reference or schedule_reference. Defaults to user_reference. For multiple users as example, repeat the target. + // Can be round_robin or assign_to_everyone. // +kubebuilder:validation:Optional Type *string `json:"type,omitempty" tf:"type,omitempty"` } @@ -145,9 +188,8 @@ type TargetParameters struct { type PolicySpec struct { v1.ResourceSpec `json:",inline"` ForProvider PolicyParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -166,19 +208,20 @@ type PolicyStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Policy is the Schema for the Policys API. Creates and manages an escalation policy in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Policy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || has(self.initProvider.name)",message="name is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.rule) || has(self.initProvider.rule)",message="rule is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.rule) || (has(self.initProvider) && has(self.initProvider.rule))",message="spec.forProvider.rule is a required parameter" Spec PolicySpec `json:"spec"` Status PolicyStatus `json:"status,omitempty"` } diff --git a/apis/event/v1alpha1/zz_generated.conversion_hubs.go b/apis/event/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..298f3cf --- /dev/null +++ b/apis/event/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,19 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Orchestration) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *OrchestrationRouter) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *OrchestrationService) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *OrchestrationUnrouted) Hub() {} diff --git a/apis/event/v1alpha1/zz_generated.deepcopy.go b/apis/event/v1alpha1/zz_generated.deepcopy.go index acee6c7..a73d838 100644 --- a/apis/event/v1alpha1/zz_generated.deepcopy.go +++ b/apis/event/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -251,6 +250,81 @@ func (in *ActionsExtractionParameters) DeepCopy() *ActionsExtractionParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ActionsIncidentCustomFieldUpdateInitParameters) DeepCopyInto(out *ActionsIncidentCustomFieldUpdateInitParameters) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionsIncidentCustomFieldUpdateInitParameters. +func (in *ActionsIncidentCustomFieldUpdateInitParameters) DeepCopy() *ActionsIncidentCustomFieldUpdateInitParameters { + if in == nil { + return nil + } + out := new(ActionsIncidentCustomFieldUpdateInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ActionsIncidentCustomFieldUpdateObservation) DeepCopyInto(out *ActionsIncidentCustomFieldUpdateObservation) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionsIncidentCustomFieldUpdateObservation. +func (in *ActionsIncidentCustomFieldUpdateObservation) DeepCopy() *ActionsIncidentCustomFieldUpdateObservation { + if in == nil { + return nil + } + out := new(ActionsIncidentCustomFieldUpdateObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ActionsIncidentCustomFieldUpdateParameters) DeepCopyInto(out *ActionsIncidentCustomFieldUpdateParameters) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionsIncidentCustomFieldUpdateParameters. +func (in *ActionsIncidentCustomFieldUpdateParameters) DeepCopy() *ActionsIncidentCustomFieldUpdateParameters { + if in == nil { + return nil + } + out := new(ActionsIncidentCustomFieldUpdateParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ActionsInitParameters) DeepCopyInto(out *ActionsInitParameters) { *out = *in @@ -890,6 +964,13 @@ func (in *CatchAllActionsInitParameters) DeepCopyInto(out *CatchAllActionsInitPa (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.IncidentCustomFieldUpdate != nil { + in, out := &in.IncidentCustomFieldUpdate, &out.IncidentCustomFieldUpdate + *out = make([]IncidentCustomFieldUpdateInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.PagerdutyAutomationAction != nil { in, out := &in.PagerdutyAutomationAction, &out.PagerdutyAutomationAction *out = make([]PagerdutyAutomationActionInitParameters, len(*in)) @@ -968,6 +1049,13 @@ func (in *CatchAllActionsObservation) DeepCopyInto(out *CatchAllActionsObservati (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.IncidentCustomFieldUpdate != nil { + in, out := &in.IncidentCustomFieldUpdate, &out.IncidentCustomFieldUpdate + *out = make([]IncidentCustomFieldUpdateObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.PagerdutyAutomationAction != nil { in, out := &in.PagerdutyAutomationAction, &out.PagerdutyAutomationAction *out = make([]PagerdutyAutomationActionObservation, len(*in)) @@ -1046,6 +1134,13 @@ func (in *CatchAllActionsParameters) DeepCopyInto(out *CatchAllActionsParameters (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.IncidentCustomFieldUpdate != nil { + in, out := &in.IncidentCustomFieldUpdate, &out.IncidentCustomFieldUpdate + *out = make([]IncidentCustomFieldUpdateParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.PagerdutyAutomationAction != nil { in, out := &in.PagerdutyAutomationAction, &out.PagerdutyAutomationAction *out = make([]PagerdutyAutomationActionParameters, len(*in)) @@ -1508,6 +1603,81 @@ func (in *HeaderParameters) DeepCopy() *HeaderParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IncidentCustomFieldUpdateInitParameters) DeepCopyInto(out *IncidentCustomFieldUpdateInitParameters) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IncidentCustomFieldUpdateInitParameters. +func (in *IncidentCustomFieldUpdateInitParameters) DeepCopy() *IncidentCustomFieldUpdateInitParameters { + if in == nil { + return nil + } + out := new(IncidentCustomFieldUpdateInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IncidentCustomFieldUpdateObservation) DeepCopyInto(out *IncidentCustomFieldUpdateObservation) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IncidentCustomFieldUpdateObservation. +func (in *IncidentCustomFieldUpdateObservation) DeepCopy() *IncidentCustomFieldUpdateObservation { + if in == nil { + return nil + } + out := new(IncidentCustomFieldUpdateObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IncidentCustomFieldUpdateParameters) DeepCopyInto(out *IncidentCustomFieldUpdateParameters) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IncidentCustomFieldUpdateParameters. +func (in *IncidentCustomFieldUpdateParameters) DeepCopy() *IncidentCustomFieldUpdateParameters { + if in == nil { + return nil + } + out := new(IncidentCustomFieldUpdateParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IntegrationInitParameters) DeepCopyInto(out *IntegrationInitParameters) { *out = *in @@ -1615,6 +1785,21 @@ func (in *OrchestrationInitParameters) DeepCopyInto(out *OrchestrationInitParame *out = new(string) **out = **in } + if in.Team != nil { + in, out := &in.Team, &out.Team + *out = new(string) + **out = **in + } + if in.TeamRef != nil { + in, out := &in.TeamRef, &out.TeamRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.TeamSelector != nil { + in, out := &in.TeamSelector, &out.TeamSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrchestrationInitParameters. @@ -1788,6 +1973,21 @@ func (in *OrchestrationRouterInitParameters) DeepCopyInto(out *OrchestrationRout (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.EventOrchestration != nil { + in, out := &in.EventOrchestration, &out.EventOrchestration + *out = new(string) + **out = **in + } + if in.EventOrchestrationRef != nil { + in, out := &in.EventOrchestrationRef, &out.EventOrchestrationRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.EventOrchestrationSelector != nil { + in, out := &in.EventOrchestrationSelector, &out.EventOrchestrationSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Set != nil { in, out := &in.Set, &out.Set *out = make([]SetInitParameters, len(*in)) @@ -2065,6 +2265,21 @@ func (in *OrchestrationServiceInitParameters) DeepCopyInto(out *OrchestrationSer *out = new(bool) **out = **in } + if in.Service != nil { + in, out := &in.Service, &out.Service + *out = new(string) + **out = **in + } + if in.ServiceRef != nil { + in, out := &in.ServiceRef, &out.ServiceRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ServiceSelector != nil { + in, out := &in.ServiceSelector, &out.ServiceSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Set != nil { in, out := &in.Set, &out.Set *out = make([]OrchestrationServiceSetInitParameters, len(*in)) @@ -2585,6 +2800,21 @@ func (in *OrchestrationUnroutedInitParameters) DeepCopyInto(out *OrchestrationUn (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.EventOrchestration != nil { + in, out := &in.EventOrchestration, &out.EventOrchestration + *out = new(string) + **out = **in + } + if in.EventOrchestrationRef != nil { + in, out := &in.EventOrchestrationRef, &out.EventOrchestrationRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.EventOrchestrationSelector != nil { + in, out := &in.EventOrchestrationSelector, &out.EventOrchestrationSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Set != nil { in, out := &in.Set, &out.Set *out = make([]OrchestrationUnroutedSetInitParameters, len(*in)) @@ -3839,6 +4069,13 @@ func (in *SetRuleActionsInitParameters) DeepCopyInto(out *SetRuleActionsInitPara (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.IncidentCustomFieldUpdate != nil { + in, out := &in.IncidentCustomFieldUpdate, &out.IncidentCustomFieldUpdate + *out = make([]ActionsIncidentCustomFieldUpdateInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.PagerdutyAutomationAction != nil { in, out := &in.PagerdutyAutomationAction, &out.PagerdutyAutomationAction *out = make([]ActionsPagerdutyAutomationActionInitParameters, len(*in)) @@ -3917,6 +4154,13 @@ func (in *SetRuleActionsObservation) DeepCopyInto(out *SetRuleActionsObservation (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.IncidentCustomFieldUpdate != nil { + in, out := &in.IncidentCustomFieldUpdate, &out.IncidentCustomFieldUpdate + *out = make([]ActionsIncidentCustomFieldUpdateObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.PagerdutyAutomationAction != nil { in, out := &in.PagerdutyAutomationAction, &out.PagerdutyAutomationAction *out = make([]ActionsPagerdutyAutomationActionObservation, len(*in)) @@ -3995,6 +4239,13 @@ func (in *SetRuleActionsParameters) DeepCopyInto(out *SetRuleActionsParameters) (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.IncidentCustomFieldUpdate != nil { + in, out := &in.IncidentCustomFieldUpdate, &out.IncidentCustomFieldUpdate + *out = make([]ActionsIncidentCustomFieldUpdateParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.PagerdutyAutomationAction != nil { in, out := &in.PagerdutyAutomationAction, &out.PagerdutyAutomationAction *out = make([]ActionsPagerdutyAutomationActionParameters, len(*in)) diff --git a/apis/event/v1alpha1/zz_generated.managed.go b/apis/event/v1alpha1/zz_generated.managed.go index bd565a8..2efbb63 100644 --- a/apis/event/v1alpha1/zz_generated.managed.go +++ b/apis/event/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Orchestration) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Orchestration. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Orchestration) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Orchestration. func (mg *Orchestration) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Orchestration) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Orchestration. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Orchestration) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Orchestration. func (mg *Orchestration) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -103,14 +87,6 @@ func (mg *OrchestrationRouter) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this OrchestrationRouter. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *OrchestrationRouter) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this OrchestrationRouter. func (mg *OrchestrationRouter) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -141,14 +117,6 @@ func (mg *OrchestrationRouter) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this OrchestrationRouter. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *OrchestrationRouter) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this OrchestrationRouter. func (mg *OrchestrationRouter) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -179,14 +147,6 @@ func (mg *OrchestrationService) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this OrchestrationService. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *OrchestrationService) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this OrchestrationService. func (mg *OrchestrationService) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -217,14 +177,6 @@ func (mg *OrchestrationService) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this OrchestrationService. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *OrchestrationService) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this OrchestrationService. func (mg *OrchestrationService) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -255,14 +207,6 @@ func (mg *OrchestrationUnrouted) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this OrchestrationUnrouted. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *OrchestrationUnrouted) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this OrchestrationUnrouted. func (mg *OrchestrationUnrouted) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -293,14 +237,6 @@ func (mg *OrchestrationUnrouted) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this OrchestrationUnrouted. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *OrchestrationUnrouted) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this OrchestrationUnrouted. func (mg *OrchestrationUnrouted) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/event/v1alpha1/zz_generated.resolvers.go b/apis/event/v1alpha1/zz_generated.resolvers.go index 7a0ef9a..4be05e5 100644 --- a/apis/event/v1alpha1/zz_generated.resolvers.go +++ b/apis/event/v1alpha1/zz_generated.resolvers.go @@ -37,6 +37,22 @@ func (mg *Orchestration) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.Team = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TeamRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Team), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.TeamRef, + Selector: mg.Spec.InitProvider.TeamSelector, + To: reference.To{ + List: &v1alpha1.TeamList{}, + Managed: &v1alpha1.Team{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Team") + } + mg.Spec.InitProvider.Team = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.TeamRef = rsp.ResolvedReference + return nil } @@ -63,6 +79,22 @@ func (mg *OrchestrationRouter) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.EventOrchestration = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EventOrchestrationRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EventOrchestration), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.EventOrchestrationRef, + Selector: mg.Spec.InitProvider.EventOrchestrationSelector, + To: reference.To{ + List: &OrchestrationList{}, + Managed: &Orchestration{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.EventOrchestration") + } + mg.Spec.InitProvider.EventOrchestration = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.EventOrchestrationRef = rsp.ResolvedReference + return nil } @@ -89,6 +121,22 @@ func (mg *OrchestrationService) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.Service = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServiceRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Service), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.ServiceRef, + Selector: mg.Spec.InitProvider.ServiceSelector, + To: reference.To{ + List: &v1alpha11.ServiceList{}, + Managed: &v1alpha11.Service{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Service") + } + mg.Spec.InitProvider.Service = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.ServiceRef = rsp.ResolvedReference + return nil } @@ -115,5 +163,21 @@ func (mg *OrchestrationUnrouted) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.EventOrchestration = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EventOrchestrationRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EventOrchestration), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.EventOrchestrationRef, + Selector: mg.Spec.InitProvider.EventOrchestrationSelector, + To: reference.To{ + List: &OrchestrationList{}, + Managed: &Orchestration{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.EventOrchestration") + } + mg.Spec.InitProvider.EventOrchestration = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.EventOrchestrationRef = rsp.ResolvedReference + return nil } diff --git a/apis/event/v1alpha1/zz_generated_terraformed.go b/apis/event/v1alpha1/zz_generated_terraformed.go deleted file mode 100755 index 94995ce..0000000 --- a/apis/event/v1alpha1/zz_generated_terraformed.go +++ /dev/null @@ -1,350 +0,0 @@ -/* -Copyright 2022 Upbound Inc. -*/ - -// Code generated by upjet. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/pkg/errors" - - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" -) - -// GetTerraformResourceType returns Terraform resource type for this Orchestration -func (mg *Orchestration) GetTerraformResourceType() string { - return "pagerduty_event_orchestration" -} - -// GetConnectionDetailsMapping for this Orchestration -func (tr *Orchestration) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this Orchestration -func (tr *Orchestration) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this Orchestration -func (tr *Orchestration) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this Orchestration -func (tr *Orchestration) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this Orchestration -func (tr *Orchestration) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this Orchestration -func (tr *Orchestration) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this Orchestration -func (tr *Orchestration) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this Orchestration using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *Orchestration) LateInitialize(attrs []byte) (bool, error) { - params := &OrchestrationParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Orchestration) GetTerraformSchemaVersion() int { - return 0 -} - -// GetTerraformResourceType returns Terraform resource type for this OrchestrationRouter -func (mg *OrchestrationRouter) GetTerraformResourceType() string { - return "pagerduty_event_orchestration_router" -} - -// GetConnectionDetailsMapping for this OrchestrationRouter -func (tr *OrchestrationRouter) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this OrchestrationRouter -func (tr *OrchestrationRouter) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this OrchestrationRouter -func (tr *OrchestrationRouter) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this OrchestrationRouter -func (tr *OrchestrationRouter) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this OrchestrationRouter -func (tr *OrchestrationRouter) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this OrchestrationRouter -func (tr *OrchestrationRouter) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this OrchestrationRouter -func (tr *OrchestrationRouter) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this OrchestrationRouter using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *OrchestrationRouter) LateInitialize(attrs []byte) (bool, error) { - params := &OrchestrationRouterParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *OrchestrationRouter) GetTerraformSchemaVersion() int { - return 0 -} - -// GetTerraformResourceType returns Terraform resource type for this OrchestrationService -func (mg *OrchestrationService) GetTerraformResourceType() string { - return "pagerduty_event_orchestration_service" -} - -// GetConnectionDetailsMapping for this OrchestrationService -func (tr *OrchestrationService) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this OrchestrationService -func (tr *OrchestrationService) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this OrchestrationService -func (tr *OrchestrationService) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this OrchestrationService -func (tr *OrchestrationService) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this OrchestrationService -func (tr *OrchestrationService) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this OrchestrationService -func (tr *OrchestrationService) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this OrchestrationService -func (tr *OrchestrationService) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this OrchestrationService using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *OrchestrationService) LateInitialize(attrs []byte) (bool, error) { - params := &OrchestrationServiceParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *OrchestrationService) GetTerraformSchemaVersion() int { - return 0 -} - -// GetTerraformResourceType returns Terraform resource type for this OrchestrationUnrouted -func (mg *OrchestrationUnrouted) GetTerraformResourceType() string { - return "pagerduty_event_orchestration_unrouted" -} - -// GetConnectionDetailsMapping for this OrchestrationUnrouted -func (tr *OrchestrationUnrouted) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this OrchestrationUnrouted -func (tr *OrchestrationUnrouted) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this OrchestrationUnrouted -func (tr *OrchestrationUnrouted) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this OrchestrationUnrouted -func (tr *OrchestrationUnrouted) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this OrchestrationUnrouted -func (tr *OrchestrationUnrouted) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this OrchestrationUnrouted -func (tr *OrchestrationUnrouted) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this OrchestrationUnrouted -func (tr *OrchestrationUnrouted) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this OrchestrationUnrouted using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *OrchestrationUnrouted) LateInitialize(attrs []byte) (bool, error) { - params := &OrchestrationUnroutedParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *OrchestrationUnrouted) GetTerraformSchemaVersion() int { - return 0 -} diff --git a/apis/event/v1alpha1/zz_orchestration_terraformed.go b/apis/event/v1alpha1/zz_orchestration_terraformed.go new file mode 100755 index 0000000..a2739bd --- /dev/null +++ b/apis/event/v1alpha1/zz_orchestration_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Orchestration +func (mg *Orchestration) GetTerraformResourceType() string { + return "pagerduty_event_orchestration" +} + +// GetConnectionDetailsMapping for this Orchestration +func (tr *Orchestration) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Orchestration +func (tr *Orchestration) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Orchestration +func (tr *Orchestration) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Orchestration +func (tr *Orchestration) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Orchestration +func (tr *Orchestration) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Orchestration +func (tr *Orchestration) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Orchestration +func (tr *Orchestration) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Orchestration +func (tr *Orchestration) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Orchestration using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Orchestration) LateInitialize(attrs []byte) (bool, error) { + params := &OrchestrationParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Orchestration) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/event/v1alpha1/zz_orchestration_types.go b/apis/event/v1alpha1/zz_orchestration_types.go index 91dea26..0782e7e 100755 --- a/apis/event/v1alpha1/zz_orchestration_types.go +++ b/apis/event/v1alpha1/zz_orchestration_types.go @@ -39,6 +39,18 @@ type OrchestrationInitParameters struct { // Name of the Event Orchestration. Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // ID of the team that owns the Event Orchestration. If none is specified, only admins have access. + // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/team/v1alpha1.Team + Team *string `json:"team,omitempty" tf:"team,omitempty"` + + // Reference to a Team in team to populate team. + // +kubebuilder:validation:Optional + TeamRef *v1.Reference `json:"teamRef,omitempty" tf:"-"` + + // Selector for a Team in team to populate team. + // +kubebuilder:validation:Optional + TeamSelector *v1.Selector `json:"teamSelector,omitempty" tf:"-"` } type OrchestrationObservation struct { @@ -108,9 +120,8 @@ type ParametersParameters struct { type OrchestrationSpec struct { v1.ResourceSpec `json:",inline"` ForProvider OrchestrationParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -129,18 +140,19 @@ type OrchestrationStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Orchestration is the Schema for the Orchestrations API. Creates and manages an Event Orchestration in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Orchestration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || has(self.initProvider.name)",message="name is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" Spec OrchestrationSpec `json:"spec"` Status OrchestrationStatus `json:"status,omitempty"` } diff --git a/apis/event/v1alpha1/zz_orchestrationrouter_terraformed.go b/apis/event/v1alpha1/zz_orchestrationrouter_terraformed.go new file mode 100755 index 0000000..4cea2b0 --- /dev/null +++ b/apis/event/v1alpha1/zz_orchestrationrouter_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this OrchestrationRouter +func (mg *OrchestrationRouter) GetTerraformResourceType() string { + return "pagerduty_event_orchestration_router" +} + +// GetConnectionDetailsMapping for this OrchestrationRouter +func (tr *OrchestrationRouter) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this OrchestrationRouter +func (tr *OrchestrationRouter) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this OrchestrationRouter +func (tr *OrchestrationRouter) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this OrchestrationRouter +func (tr *OrchestrationRouter) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this OrchestrationRouter +func (tr *OrchestrationRouter) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this OrchestrationRouter +func (tr *OrchestrationRouter) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this OrchestrationRouter +func (tr *OrchestrationRouter) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this OrchestrationRouter +func (tr *OrchestrationRouter) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this OrchestrationRouter using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *OrchestrationRouter) LateInitialize(attrs []byte) (bool, error) { + params := &OrchestrationRouterParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *OrchestrationRouter) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/event/v1alpha1/zz_orchestrationrouter_types.go b/apis/event/v1alpha1/zz_orchestrationrouter_types.go index 9439399..6398446 100755 --- a/apis/event/v1alpha1/zz_orchestrationrouter_types.go +++ b/apis/event/v1alpha1/zz_orchestrationrouter_types.go @@ -29,7 +29,7 @@ type ActionsParameters struct { // The ID of the target Service for the resulting alert. // +kubebuilder:validation:Optional - RouteTo *string `json:"routeTo,omitempty" tf:"route_to,omitempty"` + RouteTo *string `json:"routeTo" tf:"route_to,omitempty"` } type CatchAllInitParameters struct { @@ -48,7 +48,7 @@ type CatchAllParameters struct { // Actions that will be taken to change the resulting alert and incident, when an event matches this rule. // +kubebuilder:validation:Optional - Actions []ActionsParameters `json:"actions,omitempty" tf:"actions,omitempty"` + Actions []ActionsParameters `json:"actions" tf:"actions,omitempty"` } type ConditionInitParameters struct { @@ -67,7 +67,7 @@ type ConditionParameters struct { // A PCL condition string. // +kubebuilder:validation:Optional - Expression *string `json:"expression,omitempty" tf:"expression,omitempty"` + Expression *string `json:"expression" tf:"expression,omitempty"` } type OrchestrationRouterInitParameters struct { @@ -75,6 +75,18 @@ type OrchestrationRouterInitParameters struct { // When none of the rules match an event, the event will be routed according to the catch_all settings. CatchAll []CatchAllInitParameters `json:"catchAll,omitempty" tf:"catch_all,omitempty"` + // ID of the Event Orchestration to which the Router belongs. + // +crossplane:generate:reference:type=Orchestration + EventOrchestration *string `json:"eventOrchestration,omitempty" tf:"event_orchestration,omitempty"` + + // Reference to a Orchestration to populate eventOrchestration. + // +kubebuilder:validation:Optional + EventOrchestrationRef *v1.Reference `json:"eventOrchestrationRef,omitempty" tf:"-"` + + // Selector for a Orchestration to populate eventOrchestration. + // +kubebuilder:validation:Optional + EventOrchestrationSelector *v1.Selector `json:"eventOrchestrationSelector,omitempty" tf:"-"` + // The Router contains a single set of rules (the "start" set). Set []SetInitParameters `json:"set,omitempty" tf:"set,omitempty"` } @@ -134,7 +146,7 @@ type RuleActionsParameters struct { // The ID of the target Service for the resulting alert. // +kubebuilder:validation:Optional - RouteTo *string `json:"routeTo,omitempty" tf:"route_to,omitempty"` + RouteTo *string `json:"routeTo" tf:"route_to,omitempty"` } type RuleInitParameters struct { @@ -174,7 +186,7 @@ type RuleParameters struct { // Actions that will be taken to change the resulting alert and incident, when an event matches this rule. // +kubebuilder:validation:Optional - Actions []RuleActionsParameters `json:"actions,omitempty" tf:"actions,omitempty"` + Actions []RuleActionsParameters `json:"actions" tf:"actions,omitempty"` // Each of these conditions is evaluated to check if an event matches this rule. The rule is considered a match if any of these conditions match. If none are provided, the event will always match against the rule. // +kubebuilder:validation:Optional @@ -211,7 +223,7 @@ type SetParameters struct { // ID of the start set. Router supports only one set and it's id has to be start // +kubebuilder:validation:Optional - ID *string `json:"id,omitempty" tf:"id,omitempty"` + ID *string `json:"id" tf:"id,omitempty"` // The Router evaluates Events against these Rules, one at a time, and routes each Event to a specific Service based on the first rule that matches. // +kubebuilder:validation:Optional @@ -222,9 +234,8 @@ type SetParameters struct { type OrchestrationRouterSpec struct { v1.ResourceSpec `json:",inline"` ForProvider OrchestrationRouterParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -243,19 +254,20 @@ type OrchestrationRouterStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // OrchestrationRouter is the Schema for the OrchestrationRouters API. Creates and manages a Router for Global Event Orchestration in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type OrchestrationRouter struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.catchAll) || has(self.initProvider.catchAll)",message="catchAll is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.set) || has(self.initProvider.set)",message="set is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.catchAll) || (has(self.initProvider) && has(self.initProvider.catchAll))",message="spec.forProvider.catchAll is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.set) || (has(self.initProvider) && has(self.initProvider.set))",message="spec.forProvider.set is a required parameter" Spec OrchestrationRouterSpec `json:"spec"` Status OrchestrationRouterStatus `json:"status,omitempty"` } diff --git a/apis/event/v1alpha1/zz_orchestrationservice_terraformed.go b/apis/event/v1alpha1/zz_orchestrationservice_terraformed.go new file mode 100755 index 0000000..d25acc6 --- /dev/null +++ b/apis/event/v1alpha1/zz_orchestrationservice_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this OrchestrationService +func (mg *OrchestrationService) GetTerraformResourceType() string { + return "pagerduty_event_orchestration_service" +} + +// GetConnectionDetailsMapping for this OrchestrationService +func (tr *OrchestrationService) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this OrchestrationService +func (tr *OrchestrationService) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this OrchestrationService +func (tr *OrchestrationService) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this OrchestrationService +func (tr *OrchestrationService) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this OrchestrationService +func (tr *OrchestrationService) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this OrchestrationService +func (tr *OrchestrationService) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this OrchestrationService +func (tr *OrchestrationService) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this OrchestrationService +func (tr *OrchestrationService) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this OrchestrationService using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *OrchestrationService) LateInitialize(attrs []byte) (bool, error) { + params := &OrchestrationServiceParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *OrchestrationService) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/event/v1alpha1/zz_orchestrationservice_types.go b/apis/event/v1alpha1/zz_orchestrationservice_types.go index b76bec4..1f8936e 100755 --- a/apis/event/v1alpha1/zz_orchestrationservice_types.go +++ b/apis/event/v1alpha1/zz_orchestrationservice_types.go @@ -61,7 +61,7 @@ type ActionsAutomationActionParameters struct { // Name of this Webhook. // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` + Name *string `json:"name" tf:"name,omitempty"` // Specify custom key/value pairs that'll be included in the webhook request's JSON payload. // +kubebuilder:validation:Optional @@ -69,7 +69,7 @@ type ActionsAutomationActionParameters struct { // The API endpoint where PagerDuty's servers will send the webhook request. // +kubebuilder:validation:Optional - URL *string `json:"url,omitempty" tf:"url,omitempty"` + URL *string `json:"url" tf:"url,omitempty"` } type ActionsExtractionInitParameters struct { @@ -114,13 +114,42 @@ type ActionsExtractionParameters struct { // The PagerDuty Common Event Format PD-CEF field that will be set with the value from the template or based on regex and source fields. // +kubebuilder:validation:Optional - Target *string `json:"target,omitempty" tf:"target,omitempty"` + Target *string `json:"target" tf:"target,omitempty"` // A string that will be used to populate the target field. You can reference variables or event data within your template using double curly braces. For example: // +kubebuilder:validation:Optional Template *string `json:"template,omitempty" tf:"template,omitempty"` } +type ActionsIncidentCustomFieldUpdateInitParameters struct { + + // The ID of this set of rules. Rules in other sets can route events into this set using the rule's route_to property. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The value to assign to this custom field + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + +type ActionsIncidentCustomFieldUpdateObservation struct { + + // The ID of this set of rules. Rules in other sets can route events into this set using the rule's route_to property. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The value to assign to this custom field + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + +type ActionsIncidentCustomFieldUpdateParameters struct { + + // The ID of this set of rules. Rules in other sets can route events into this set using the rule's route_to property. + // +kubebuilder:validation:Optional + ID *string `json:"id" tf:"id,omitempty"` + + // The value to assign to this custom field + // +kubebuilder:validation:Optional + Value *string `json:"value" tf:"value,omitempty"` +} + type ActionsPagerdutyAutomationActionInitParameters struct { // Id of the Process Automation action to be triggered. @@ -137,7 +166,7 @@ type ActionsPagerdutyAutomationActionParameters struct { // Id of the Process Automation action to be triggered. // +kubebuilder:validation:Optional - ActionID *string `json:"actionId,omitempty" tf:"action_id,omitempty"` + ActionID *string `json:"actionId" tf:"action_id,omitempty"` } type ActionsVariableInitParameters struct { @@ -151,7 +180,7 @@ type ActionsVariableInitParameters struct { // Only regex is supported Type *string `json:"type,omitempty" tf:"type,omitempty"` - // Value of this header + // The value to assign to this custom field Value *string `json:"value,omitempty" tf:"value,omitempty"` } @@ -166,7 +195,7 @@ type ActionsVariableObservation struct { // Only regex is supported Type *string `json:"type,omitempty" tf:"type,omitempty"` - // Value of this header + // The value to assign to this custom field Value *string `json:"value,omitempty" tf:"value,omitempty"` } @@ -174,19 +203,19 @@ type ActionsVariableParameters struct { // Name of this Webhook. // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` + Name *string `json:"name" tf:"name,omitempty"` // Path to a field in an event, in dot-notation. This supports both PagerDuty Common Event Format PD-CEF and non-CEF fields. Eg: Use event.summary for the summary CEF field. Use raw_event.fieldname to read from the original event fieldname data. You can use any valid PCL path. // +kubebuilder:validation:Optional - Path *string `json:"path,omitempty" tf:"path,omitempty"` + Path *string `json:"path" tf:"path,omitempty"` // Only regex is supported // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + Type *string `json:"type" tf:"type,omitempty"` - // Value of this header + // The value to assign to this custom field // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty" tf:"value,omitempty"` + Value *string `json:"value" tf:"value,omitempty"` } type AutomationActionHeaderInitParameters struct { @@ -194,7 +223,7 @@ type AutomationActionHeaderInitParameters struct { // Name to identify the header Key *string `json:"key,omitempty" tf:"key,omitempty"` - // Value of this header + // The value to assign to this custom field Value *string `json:"value,omitempty" tf:"value,omitempty"` } @@ -203,7 +232,7 @@ type AutomationActionHeaderObservation struct { // Name to identify the header Key *string `json:"key,omitempty" tf:"key,omitempty"` - // Value of this header + // The value to assign to this custom field Value *string `json:"value,omitempty" tf:"value,omitempty"` } @@ -211,11 +240,11 @@ type AutomationActionHeaderParameters struct { // Name to identify the header // +kubebuilder:validation:Optional - Key *string `json:"key,omitempty" tf:"key,omitempty"` + Key *string `json:"key" tf:"key,omitempty"` - // Value of this header + // The value to assign to this custom field // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty" tf:"value,omitempty"` + Value *string `json:"value" tf:"value,omitempty"` } type AutomationActionInitParameters struct { @@ -259,7 +288,7 @@ type AutomationActionParameterInitParameters struct { // Name to identify the header Key *string `json:"key,omitempty" tf:"key,omitempty"` - // Value of this header + // The value to assign to this custom field Value *string `json:"value,omitempty" tf:"value,omitempty"` } @@ -268,7 +297,7 @@ type AutomationActionParameterObservation struct { // Name to identify the header Key *string `json:"key,omitempty" tf:"key,omitempty"` - // Value of this header + // The value to assign to this custom field Value *string `json:"value,omitempty" tf:"value,omitempty"` } @@ -276,11 +305,11 @@ type AutomationActionParameterParameters struct { // Name to identify the header // +kubebuilder:validation:Optional - Key *string `json:"key,omitempty" tf:"key,omitempty"` + Key *string `json:"key" tf:"key,omitempty"` - // Value of this header + // The value to assign to this custom field // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty" tf:"value,omitempty"` + Value *string `json:"value" tf:"value,omitempty"` } type AutomationActionParameters struct { @@ -295,7 +324,7 @@ type AutomationActionParameters struct { // Name of this Webhook. // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` + Name *string `json:"name" tf:"name,omitempty"` // Specify custom key/value pairs that'll be included in the webhook request's JSON payload. // +kubebuilder:validation:Optional @@ -303,7 +332,7 @@ type AutomationActionParameters struct { // The API endpoint where PagerDuty's servers will send the webhook request. // +kubebuilder:validation:Optional - URL *string `json:"url,omitempty" tf:"url,omitempty"` + URL *string `json:"url" tf:"url,omitempty"` } type CatchAllActionsInitParameters struct { @@ -320,6 +349,9 @@ type CatchAllActionsInitParameters struct { // Replace any CEF field or Custom Details object field using custom variables. Extraction []ExtractionInitParameters `json:"extraction,omitempty" tf:"extraction,omitempty"` + // Assign a custom field to the resulting incident. + IncidentCustomFieldUpdate []IncidentCustomFieldUpdateInitParameters `json:"incidentCustomFieldUpdate,omitempty" tf:"incident_custom_field_update,omitempty"` + // Configure a Process Automation associated with the resulting incident. PagerdutyAutomationAction []PagerdutyAutomationActionInitParameters `json:"pagerdutyAutomationAction,omitempty" tf:"pagerduty_automation_action,omitempty"` @@ -356,6 +388,9 @@ type CatchAllActionsObservation struct { // Replace any CEF field or Custom Details object field using custom variables. Extraction []ExtractionObservation `json:"extraction,omitempty" tf:"extraction,omitempty"` + // Assign a custom field to the resulting incident. + IncidentCustomFieldUpdate []IncidentCustomFieldUpdateObservation `json:"incidentCustomFieldUpdate,omitempty" tf:"incident_custom_field_update,omitempty"` + // Configure a Process Automation associated with the resulting incident. PagerdutyAutomationAction []PagerdutyAutomationActionObservation `json:"pagerdutyAutomationAction,omitempty" tf:"pagerduty_automation_action,omitempty"` @@ -396,6 +431,10 @@ type CatchAllActionsParameters struct { // +kubebuilder:validation:Optional Extraction []ExtractionParameters `json:"extraction,omitempty" tf:"extraction,omitempty"` + // Assign a custom field to the resulting incident. + // +kubebuilder:validation:Optional + IncidentCustomFieldUpdate []IncidentCustomFieldUpdateParameters `json:"incidentCustomFieldUpdate,omitempty" tf:"incident_custom_field_update,omitempty"` + // Configure a Process Automation associated with the resulting incident. // +kubebuilder:validation:Optional PagerdutyAutomationAction []PagerdutyAutomationActionParameters `json:"pagerdutyAutomationAction,omitempty" tf:"pagerduty_automation_action,omitempty"` @@ -467,7 +506,7 @@ type ExtractionParameters struct { // The PagerDuty Common Event Format PD-CEF field that will be set with the value from the template or based on regex and source fields. // +kubebuilder:validation:Optional - Target *string `json:"target,omitempty" tf:"target,omitempty"` + Target *string `json:"target" tf:"target,omitempty"` // A string that will be used to populate the target field. You can reference variables or event data within your template using double curly braces. For example: // +kubebuilder:validation:Optional @@ -479,7 +518,7 @@ type HeaderInitParameters struct { // Name to identify the header Key *string `json:"key,omitempty" tf:"key,omitempty"` - // Value of this header + // The value to assign to this custom field Value *string `json:"value,omitempty" tf:"value,omitempty"` } @@ -488,7 +527,7 @@ type HeaderObservation struct { // Name to identify the header Key *string `json:"key,omitempty" tf:"key,omitempty"` - // Value of this header + // The value to assign to this custom field Value *string `json:"value,omitempty" tf:"value,omitempty"` } @@ -496,13 +535,42 @@ type HeaderParameters struct { // Name to identify the header // +kubebuilder:validation:Optional - Key *string `json:"key,omitempty" tf:"key,omitempty"` + Key *string `json:"key" tf:"key,omitempty"` - // Value of this header + // The value to assign to this custom field // +kubebuilder:validation:Optional + Value *string `json:"value" tf:"value,omitempty"` +} + +type IncidentCustomFieldUpdateInitParameters struct { + + // The ID of this set of rules. Rules in other sets can route events into this set using the rule's route_to property. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The value to assign to this custom field Value *string `json:"value,omitempty" tf:"value,omitempty"` } +type IncidentCustomFieldUpdateObservation struct { + + // The ID of this set of rules. Rules in other sets can route events into this set using the rule's route_to property. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The value to assign to this custom field + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + +type IncidentCustomFieldUpdateParameters struct { + + // The ID of this set of rules. Rules in other sets can route events into this set using the rule's route_to property. + // +kubebuilder:validation:Optional + ID *string `json:"id" tf:"id,omitempty"` + + // The value to assign to this custom field + // +kubebuilder:validation:Optional + Value *string `json:"value" tf:"value,omitempty"` +} + type OrchestrationServiceCatchAllInitParameters struct { // Actions that will be taken to change the resulting alert and incident, when an event matches this rule. @@ -519,7 +587,7 @@ type OrchestrationServiceCatchAllParameters struct { // Actions that will be taken to change the resulting alert and incident, when an event matches this rule. // +kubebuilder:validation:Optional - Actions []CatchAllActionsParameters `json:"actions,omitempty" tf:"actions,omitempty"` + Actions []CatchAllActionsParameters `json:"actions" tf:"actions,omitempty"` } type OrchestrationServiceInitParameters struct { @@ -530,6 +598,18 @@ type OrchestrationServiceInitParameters struct { // Opt-in/out for switching the Service to Service Orchestrations. EnableEventOrchestrationForService *bool `json:"enableEventOrchestrationForService,omitempty" tf:"enable_event_orchestration_for_service,omitempty"` + // ID of the Service to which this Service Orchestration belongs to. + // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/service/v1alpha1.Service + Service *string `json:"service,omitempty" tf:"service,omitempty"` + + // Reference to a Service in service to populate service. + // +kubebuilder:validation:Optional + ServiceRef *v1.Reference `json:"serviceRef,omitempty" tf:"-"` + + // Selector for a Service in service to populate service. + // +kubebuilder:validation:Optional + ServiceSelector *v1.Selector `json:"serviceSelector,omitempty" tf:"-"` + // A Service Orchestration must contain at least a "start" set, but can contain any number of additional sets that are routed to by other rules to form a directional graph. Set []OrchestrationServiceSetInitParameters `json:"set,omitempty" tf:"set,omitempty"` } @@ -602,7 +682,7 @@ type OrchestrationServiceSetParameters struct { // The ID of this set of rules. Rules in other sets can route events into this set using the rule's route_to property. // +kubebuilder:validation:Optional - ID *string `json:"id,omitempty" tf:"id,omitempty"` + ID *string `json:"id" tf:"id,omitempty"` // The service orchestration evaluates Events against these Rules, one at a time, and applies all the actions for first rule it finds where the event matches the rule's conditions. // +kubebuilder:validation:Optional @@ -625,7 +705,7 @@ type PagerdutyAutomationActionParameters struct { // Id of the Process Automation action to be triggered. // +kubebuilder:validation:Optional - ActionID *string `json:"actionId,omitempty" tf:"action_id,omitempty"` + ActionID *string `json:"actionId" tf:"action_id,omitempty"` } type ParameterInitParameters struct { @@ -633,7 +713,7 @@ type ParameterInitParameters struct { // Name to identify the header Key *string `json:"key,omitempty" tf:"key,omitempty"` - // Value of this header + // The value to assign to this custom field Value *string `json:"value,omitempty" tf:"value,omitempty"` } @@ -642,7 +722,7 @@ type ParameterObservation struct { // Name to identify the header Key *string `json:"key,omitempty" tf:"key,omitempty"` - // Value of this header + // The value to assign to this custom field Value *string `json:"value,omitempty" tf:"value,omitempty"` } @@ -650,11 +730,11 @@ type ParameterParameters struct { // Name to identify the header // +kubebuilder:validation:Optional - Key *string `json:"key,omitempty" tf:"key,omitempty"` + Key *string `json:"key" tf:"key,omitempty"` - // Value of this header + // The value to assign to this custom field // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty" tf:"value,omitempty"` + Value *string `json:"value" tf:"value,omitempty"` } type RuleConditionInitParameters struct { @@ -673,7 +753,7 @@ type RuleConditionParameters struct { // A PCL condition string. // +kubebuilder:validation:Optional - Expression *string `json:"expression,omitempty" tf:"expression,omitempty"` + Expression *string `json:"expression" tf:"expression,omitempty"` } type SetRuleActionsInitParameters struct { @@ -690,6 +770,9 @@ type SetRuleActionsInitParameters struct { // Replace any CEF field or Custom Details object field using custom variables. Extraction []ActionsExtractionInitParameters `json:"extraction,omitempty" tf:"extraction,omitempty"` + // Assign a custom field to the resulting incident. + IncidentCustomFieldUpdate []ActionsIncidentCustomFieldUpdateInitParameters `json:"incidentCustomFieldUpdate,omitempty" tf:"incident_custom_field_update,omitempty"` + // Configure a Process Automation associated with the resulting incident. PagerdutyAutomationAction []ActionsPagerdutyAutomationActionInitParameters `json:"pagerdutyAutomationAction,omitempty" tf:"pagerduty_automation_action,omitempty"` @@ -726,6 +809,9 @@ type SetRuleActionsObservation struct { // Replace any CEF field or Custom Details object field using custom variables. Extraction []ActionsExtractionObservation `json:"extraction,omitempty" tf:"extraction,omitempty"` + // Assign a custom field to the resulting incident. + IncidentCustomFieldUpdate []ActionsIncidentCustomFieldUpdateObservation `json:"incidentCustomFieldUpdate,omitempty" tf:"incident_custom_field_update,omitempty"` + // Configure a Process Automation associated with the resulting incident. PagerdutyAutomationAction []ActionsPagerdutyAutomationActionObservation `json:"pagerdutyAutomationAction,omitempty" tf:"pagerduty_automation_action,omitempty"` @@ -766,6 +852,10 @@ type SetRuleActionsParameters struct { // +kubebuilder:validation:Optional Extraction []ActionsExtractionParameters `json:"extraction,omitempty" tf:"extraction,omitempty"` + // Assign a custom field to the resulting incident. + // +kubebuilder:validation:Optional + IncidentCustomFieldUpdate []ActionsIncidentCustomFieldUpdateParameters `json:"incidentCustomFieldUpdate,omitempty" tf:"incident_custom_field_update,omitempty"` + // Configure a Process Automation associated with the resulting incident. // +kubebuilder:validation:Optional PagerdutyAutomationAction []ActionsPagerdutyAutomationActionParameters `json:"pagerdutyAutomationAction,omitempty" tf:"pagerduty_automation_action,omitempty"` @@ -832,7 +922,7 @@ type SetRuleParameters struct { // Actions that will be taken to change the resulting alert and incident, when an event matches this rule. // +kubebuilder:validation:Optional - Actions []SetRuleActionsParameters `json:"actions,omitempty" tf:"actions,omitempty"` + Actions []SetRuleActionsParameters `json:"actions" tf:"actions,omitempty"` // Each of these conditions is evaluated to check if an event matches this rule. The rule is considered a match if any of these conditions match. If none are provided, the event will always match against the rule. // +kubebuilder:validation:Optional @@ -858,7 +948,7 @@ type VariableInitParameters struct { // Only regex is supported Type *string `json:"type,omitempty" tf:"type,omitempty"` - // Value of this header + // The value to assign to this custom field Value *string `json:"value,omitempty" tf:"value,omitempty"` } @@ -873,7 +963,7 @@ type VariableObservation struct { // Only regex is supported Type *string `json:"type,omitempty" tf:"type,omitempty"` - // Value of this header + // The value to assign to this custom field Value *string `json:"value,omitempty" tf:"value,omitempty"` } @@ -881,28 +971,27 @@ type VariableParameters struct { // Name of this Webhook. // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` + Name *string `json:"name" tf:"name,omitempty"` // Path to a field in an event, in dot-notation. This supports both PagerDuty Common Event Format PD-CEF and non-CEF fields. Eg: Use event.summary for the summary CEF field. Use raw_event.fieldname to read from the original event fieldname data. You can use any valid PCL path. // +kubebuilder:validation:Optional - Path *string `json:"path,omitempty" tf:"path,omitempty"` + Path *string `json:"path" tf:"path,omitempty"` // Only regex is supported // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + Type *string `json:"type" tf:"type,omitempty"` - // Value of this header + // The value to assign to this custom field // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty" tf:"value,omitempty"` + Value *string `json:"value" tf:"value,omitempty"` } // OrchestrationServiceSpec defines the desired state of OrchestrationService type OrchestrationServiceSpec struct { v1.ResourceSpec `json:",inline"` ForProvider OrchestrationServiceParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -921,19 +1010,20 @@ type OrchestrationServiceStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // OrchestrationService is the Schema for the OrchestrationServices API. Creates and manages a Service Orchestration for a Service. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type OrchestrationService struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.catchAll) || has(self.initProvider.catchAll)",message="catchAll is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.set) || has(self.initProvider.set)",message="set is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.catchAll) || (has(self.initProvider) && has(self.initProvider.catchAll))",message="spec.forProvider.catchAll is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.set) || (has(self.initProvider) && has(self.initProvider.set))",message="spec.forProvider.set is a required parameter" Spec OrchestrationServiceSpec `json:"spec"` Status OrchestrationServiceStatus `json:"status,omitempty"` } diff --git a/apis/event/v1alpha1/zz_orchestrationunrouted_terraformed.go b/apis/event/v1alpha1/zz_orchestrationunrouted_terraformed.go new file mode 100755 index 0000000..73a15a8 --- /dev/null +++ b/apis/event/v1alpha1/zz_orchestrationunrouted_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this OrchestrationUnrouted +func (mg *OrchestrationUnrouted) GetTerraformResourceType() string { + return "pagerduty_event_orchestration_unrouted" +} + +// GetConnectionDetailsMapping for this OrchestrationUnrouted +func (tr *OrchestrationUnrouted) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this OrchestrationUnrouted +func (tr *OrchestrationUnrouted) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this OrchestrationUnrouted +func (tr *OrchestrationUnrouted) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this OrchestrationUnrouted +func (tr *OrchestrationUnrouted) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this OrchestrationUnrouted +func (tr *OrchestrationUnrouted) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this OrchestrationUnrouted +func (tr *OrchestrationUnrouted) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this OrchestrationUnrouted +func (tr *OrchestrationUnrouted) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this OrchestrationUnrouted +func (tr *OrchestrationUnrouted) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this OrchestrationUnrouted using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *OrchestrationUnrouted) LateInitialize(attrs []byte) (bool, error) { + params := &OrchestrationUnroutedParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *OrchestrationUnrouted) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/event/v1alpha1/zz_orchestrationunrouted_types.go b/apis/event/v1alpha1/zz_orchestrationunrouted_types.go index 2ab7032..3128b0b 100755 --- a/apis/event/v1alpha1/zz_orchestrationunrouted_types.go +++ b/apis/event/v1alpha1/zz_orchestrationunrouted_types.go @@ -55,7 +55,7 @@ type CatchAllActionsExtractionParameters struct { // The PagerDuty Common Event Format PD-CEF field that will be set with the value from the template or based on regex and source fields. // +kubebuilder:validation:Optional - Target *string `json:"target,omitempty" tf:"target,omitempty"` + Target *string `json:"target" tf:"target,omitempty"` // A string that will be used to populate the target field. You can reference variables or event data within your template using double curly braces. For example: // +kubebuilder:validation:Optional @@ -96,19 +96,19 @@ type CatchAllActionsVariableParameters struct { // The name of the variable // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` + Name *string `json:"name" tf:"name,omitempty"` // Path to a field in an event, in dot-notation. This supports both PD-CEF and non-CEF fields. Eg: Use event.summary for the summary CEF field. Use raw_event.fieldname to read from the original event fieldname data. // +kubebuilder:validation:Optional - Path *string `json:"path,omitempty" tf:"path,omitempty"` + Path *string `json:"path" tf:"path,omitempty"` // Only regex is supported // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + Type *string `json:"type" tf:"type,omitempty"` // The Regex expression to match against. Must use valid RE2 regular expression syntax. // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty" tf:"value,omitempty"` + Value *string `json:"value" tf:"value,omitempty"` } type OrchestrationUnroutedCatchAllActionsInitParameters struct { @@ -178,7 +178,7 @@ type OrchestrationUnroutedCatchAllParameters struct { // Actions that will be taken to change the resulting alert and incident, when an event matches this rule. // +kubebuilder:validation:Optional - Actions []OrchestrationUnroutedCatchAllActionsParameters `json:"actions,omitempty" tf:"actions,omitempty"` + Actions []OrchestrationUnroutedCatchAllActionsParameters `json:"actions" tf:"actions,omitempty"` } type OrchestrationUnroutedInitParameters struct { @@ -186,6 +186,18 @@ type OrchestrationUnroutedInitParameters struct { // the catch_all actions will be applied if an Event reaches the end of any set without matching any rules in that set. CatchAll []OrchestrationUnroutedCatchAllInitParameters `json:"catchAll,omitempty" tf:"catch_all,omitempty"` + // The Event Orchestration to which this Unrouted Orchestration belongs to. + // +crossplane:generate:reference:type=Orchestration + EventOrchestration *string `json:"eventOrchestration,omitempty" tf:"event_orchestration,omitempty"` + + // Reference to a Orchestration to populate eventOrchestration. + // +kubebuilder:validation:Optional + EventOrchestrationRef *v1.Reference `json:"eventOrchestrationRef,omitempty" tf:"-"` + + // Selector for a Orchestration to populate eventOrchestration. + // +kubebuilder:validation:Optional + EventOrchestrationSelector *v1.Selector `json:"eventOrchestrationSelector,omitempty" tf:"-"` + // An Unrouted Orchestration must contain at least a "start" set, but can contain any number of additional sets that are routed to by other rules to form a directional graph. Set []OrchestrationUnroutedSetInitParameters `json:"set,omitempty" tf:"set,omitempty"` } @@ -251,7 +263,7 @@ type OrchestrationUnroutedSetParameters struct { // The ID of this set of rules. Rules in other sets can route events into this set using the rule's route_to property. // +kubebuilder:validation:Optional - ID *string `json:"id,omitempty" tf:"id,omitempty"` + ID *string `json:"id" tf:"id,omitempty"` // The Unrouted Orchestration evaluates Events against these Rules, one at a time, and applies all the actions for first rule it finds where the event matches the rule's conditions. // +kubebuilder:validation:Optional @@ -354,7 +366,7 @@ type OrchestrationUnroutedSetRuleParameters struct { // Actions that will be taken to change the resulting alert and incident, when an event matches this rule. // +kubebuilder:validation:Optional - Actions []OrchestrationUnroutedSetRuleActionsParameters `json:"actions,omitempty" tf:"actions,omitempty"` + Actions []OrchestrationUnroutedSetRuleActionsParameters `json:"actions" tf:"actions,omitempty"` // Each of these conditions is evaluated to check if an event matches this rule. The rule is considered a match if any of these conditions match. If none are provided, the event will always match against the rule. // +kubebuilder:validation:Optional @@ -411,7 +423,7 @@ type RuleActionsExtractionParameters struct { // The PagerDuty Common Event Format PD-CEF field that will be set with the value from the template or based on regex and source fields. // +kubebuilder:validation:Optional - Target *string `json:"target,omitempty" tf:"target,omitempty"` + Target *string `json:"target" tf:"target,omitempty"` // A string that will be used to populate the target field. You can reference variables or event data within your template using double curly braces. For example: // +kubebuilder:validation:Optional @@ -452,19 +464,19 @@ type RuleActionsVariableParameters struct { // The name of the variable // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` + Name *string `json:"name" tf:"name,omitempty"` // Path to a field in an event, in dot-notation. This supports both PD-CEF and non-CEF fields. Eg: Use event.summary for the summary CEF field. Use raw_event.fieldname to read from the original event fieldname data. // +kubebuilder:validation:Optional - Path *string `json:"path,omitempty" tf:"path,omitempty"` + Path *string `json:"path" tf:"path,omitempty"` // Only regex is supported // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + Type *string `json:"type" tf:"type,omitempty"` // The Regex expression to match against. Must use valid RE2 regular expression syntax. // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty" tf:"value,omitempty"` + Value *string `json:"value" tf:"value,omitempty"` } type SetRuleConditionInitParameters struct { @@ -483,16 +495,15 @@ type SetRuleConditionParameters struct { // A PCL condition string. // +kubebuilder:validation:Optional - Expression *string `json:"expression,omitempty" tf:"expression,omitempty"` + Expression *string `json:"expression" tf:"expression,omitempty"` } // OrchestrationUnroutedSpec defines the desired state of OrchestrationUnrouted type OrchestrationUnroutedSpec struct { v1.ResourceSpec `json:",inline"` ForProvider OrchestrationUnroutedParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -511,19 +522,20 @@ type OrchestrationUnroutedStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // OrchestrationUnrouted is the Schema for the OrchestrationUnrouteds API. Creates and manages an Unrouted Orchestration for a Global Event Orchestration in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type OrchestrationUnrouted struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.catchAll) || has(self.initProvider.catchAll)",message="catchAll is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.set) || has(self.initProvider.set)",message="set is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.catchAll) || (has(self.initProvider) && has(self.initProvider.catchAll))",message="spec.forProvider.catchAll is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.set) || (has(self.initProvider) && has(self.initProvider.set))",message="spec.forProvider.set is a required parameter" Spec OrchestrationUnroutedSpec `json:"spec"` Status OrchestrationUnroutedStatus `json:"status,omitempty"` } diff --git a/apis/extensions/v1alpha1/zz_extension_terraformed.go b/apis/extensions/v1alpha1/zz_extension_terraformed.go new file mode 100755 index 0000000..77c4185 --- /dev/null +++ b/apis/extensions/v1alpha1/zz_extension_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Extension +func (mg *Extension) GetTerraformResourceType() string { + return "pagerduty_extension" +} + +// GetConnectionDetailsMapping for this Extension +func (tr *Extension) GetConnectionDetailsMapping() map[string]string { + return map[string]string{"endpoint_url": "spec.forProvider.endpointUrlSecretRef"} +} + +// GetObservation of this Extension +func (tr *Extension) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Extension +func (tr *Extension) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Extension +func (tr *Extension) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Extension +func (tr *Extension) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Extension +func (tr *Extension) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Extension +func (tr *Extension) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Extension +func (tr *Extension) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Extension using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Extension) LateInitialize(attrs []byte) (bool, error) { + params := &ExtensionParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Extension) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/extensions/v1alpha1/zz_extension_types.go b/apis/extensions/v1alpha1/zz_extension_types.go index a9787ac..eb963e0 100755 --- a/apis/extensions/v1alpha1/zz_extension_types.go +++ b/apis/extensions/v1alpha1/zz_extension_types.go @@ -18,6 +18,19 @@ type ExtensionInitParameters struct { // The configuration of the service extension as string containing plain JSON-encoded data. Config *string `json:"config,omitempty" tf:"config,omitempty"` + // This is the objects for which the extension applies (An array of service ids). + // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/service/v1alpha1.Service + // +listType=set + ExtensionObjects []*string `json:"extensionObjects,omitempty" tf:"extension_objects,omitempty"` + + // References to Service in service to populate extensionObjects. + // +kubebuilder:validation:Optional + ExtensionObjectsRefs []v1.Reference `json:"extensionObjectsRefs,omitempty" tf:"-"` + + // Selector for a list of Service in service to populate extensionObjects. + // +kubebuilder:validation:Optional + ExtensionObjectsSelector *v1.Selector `json:"extensionObjectsSelector,omitempty" tf:"-"` + // This is the schema for this extension. ExtensionSchema *string `json:"extensionSchema,omitempty" tf:"extension_schema,omitempty"` @@ -33,6 +46,7 @@ type ExtensionObservation struct { Config *string `json:"config,omitempty" tf:"config,omitempty"` // This is the objects for which the extension applies (An array of service ids). + // +listType=set ExtensionObjects []*string `json:"extensionObjects,omitempty" tf:"extension_objects,omitempty"` // This is the schema for this extension. @@ -67,6 +81,7 @@ type ExtensionParameters struct { // This is the objects for which the extension applies (An array of service ids). // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/service/v1alpha1.Service // +kubebuilder:validation:Optional + // +listType=set ExtensionObjects []*string `json:"extensionObjects,omitempty" tf:"extension_objects,omitempty"` // References to Service in service to populate extensionObjects. @@ -93,9 +108,8 @@ type ExtensionParameters struct { type ExtensionSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ExtensionParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -114,18 +128,19 @@ type ExtensionStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Extension is the Schema for the Extensions API. Creates and manages a service extension in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Extension struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.extensionSchema) || has(self.initProvider.extensionSchema)",message="extensionSchema is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.extensionSchema) || (has(self.initProvider) && has(self.initProvider.extensionSchema))",message="spec.forProvider.extensionSchema is a required parameter" Spec ExtensionSpec `json:"spec"` Status ExtensionStatus `json:"status,omitempty"` } diff --git a/apis/extensions/v1alpha1/zz_generated.conversion_hubs.go b/apis/extensions/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..3db5ec0 --- /dev/null +++ b/apis/extensions/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,13 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Extension) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *Servicenow) Hub() {} diff --git a/apis/extensions/v1alpha1/zz_generated.deepcopy.go b/apis/extensions/v1alpha1/zz_generated.deepcopy.go index e1379c0..e67084e 100644 --- a/apis/extensions/v1alpha1/zz_generated.deepcopy.go +++ b/apis/extensions/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -49,6 +48,29 @@ func (in *ExtensionInitParameters) DeepCopyInto(out *ExtensionInitParameters) { *out = new(string) **out = **in } + if in.ExtensionObjects != nil { + in, out := &in.ExtensionObjects, &out.ExtensionObjects + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.ExtensionObjectsRefs != nil { + in, out := &in.ExtensionObjectsRefs, &out.ExtensionObjectsRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ExtensionObjectsSelector != nil { + in, out := &in.ExtensionObjectsSelector, &out.ExtensionObjectsSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.ExtensionSchema != nil { in, out := &in.ExtensionSchema, &out.ExtensionSchema *out = new(string) diff --git a/apis/extensions/v1alpha1/zz_generated.managed.go b/apis/extensions/v1alpha1/zz_generated.managed.go index a583202..ee146da 100644 --- a/apis/extensions/v1alpha1/zz_generated.managed.go +++ b/apis/extensions/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Extension) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Extension. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Extension) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Extension. func (mg *Extension) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Extension) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Extension. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Extension) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Extension. func (mg *Extension) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -103,14 +87,6 @@ func (mg *Servicenow) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Servicenow. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Servicenow) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Servicenow. func (mg *Servicenow) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -141,14 +117,6 @@ func (mg *Servicenow) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Servicenow. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Servicenow) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Servicenow. func (mg *Servicenow) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/extensions/v1alpha1/zz_generated.resolvers.go b/apis/extensions/v1alpha1/zz_generated.resolvers.go index 696ad2f..933d2f4 100644 --- a/apis/extensions/v1alpha1/zz_generated.resolvers.go +++ b/apis/extensions/v1alpha1/zz_generated.resolvers.go @@ -36,5 +36,21 @@ func (mg *Extension) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.ExtensionObjects = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.ExtensionObjectsRefs = mrsp.ResolvedReferences + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.ExtensionObjects), + Extract: reference.ExternalName(), + References: mg.Spec.InitProvider.ExtensionObjectsRefs, + Selector: mg.Spec.InitProvider.ExtensionObjectsSelector, + To: reference.To{ + List: &v1alpha1.ServiceList{}, + Managed: &v1alpha1.Service{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.ExtensionObjects") + } + mg.Spec.InitProvider.ExtensionObjects = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.ExtensionObjectsRefs = mrsp.ResolvedReferences + return nil } diff --git a/apis/extensions/v1alpha1/zz_generated_terraformed.go b/apis/extensions/v1alpha1/zz_servicenow_terraformed.go similarity index 52% rename from apis/extensions/v1alpha1/zz_generated_terraformed.go rename to apis/extensions/v1alpha1/zz_servicenow_terraformed.go index 2a71001..fb9b889 100755 --- a/apis/extensions/v1alpha1/zz_generated_terraformed.go +++ b/apis/extensions/v1alpha1/zz_servicenow_terraformed.go @@ -7,96 +7,13 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) -// GetTerraformResourceType returns Terraform resource type for this Extension -func (mg *Extension) GetTerraformResourceType() string { - return "pagerduty_extension" -} - -// GetConnectionDetailsMapping for this Extension -func (tr *Extension) GetConnectionDetailsMapping() map[string]string { - return map[string]string{"endpoint_url": "spec.forProvider.endpointUrlSecretRef"} -} - -// GetObservation of this Extension -func (tr *Extension) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this Extension -func (tr *Extension) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this Extension -func (tr *Extension) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this Extension -func (tr *Extension) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this Extension -func (tr *Extension) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this Extension -func (tr *Extension) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this Extension using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *Extension) LateInitialize(attrs []byte) (bool, error) { - params := &ExtensionParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Extension) GetTerraformSchemaVersion() int { - return 0 -} - // GetTerraformResourceType returns Terraform resource type for this Servicenow func (mg *Servicenow) GetTerraformResourceType() string { return "pagerduty_extension_servicenow" @@ -163,6 +80,36 @@ func (tr *Servicenow) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Servicenow +func (tr *Servicenow) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Servicenow using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Servicenow) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/extensions/v1alpha1/zz_servicenow_types.go b/apis/extensions/v1alpha1/zz_servicenow_types.go index 62d4243..32f6cfc 100755 --- a/apis/extensions/v1alpha1/zz_servicenow_types.go +++ b/apis/extensions/v1alpha1/zz_servicenow_types.go @@ -16,6 +16,7 @@ import ( type ServicenowInitParameters struct { // This is the objects for which the extension applies (An array of service ids). + // +listType=set ExtensionObjects []*string `json:"extensionObjects,omitempty" tf:"extension_objects,omitempty"` // This is the schema for this extension. @@ -48,6 +49,7 @@ type ServicenowInitParameters struct { type ServicenowObservation struct { // This is the objects for which the extension applies (An array of service ids). + // +listType=set ExtensionObjects []*string `json:"extensionObjects,omitempty" tf:"extension_objects,omitempty"` // This is the schema for this extension. @@ -90,6 +92,7 @@ type ServicenowParameters struct { // This is the objects for which the extension applies (An array of service ids). // +kubebuilder:validation:Optional + // +listType=set ExtensionObjects []*string `json:"extensionObjects,omitempty" tf:"extension_objects,omitempty"` // This is the schema for this extension. @@ -136,9 +139,8 @@ type ServicenowParameters struct { type ServicenowSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ServicenowParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -157,25 +159,26 @@ type ServicenowStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Servicenow is the Schema for the Servicenows API. Creates and manages a ServiceNow service extension in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Servicenow struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.extensionObjects) || has(self.initProvider.extensionObjects)",message="extensionObjects is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.extensionSchema) || has(self.initProvider.extensionSchema)",message="extensionSchema is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.referer) || has(self.initProvider.referer)",message="referer is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.snowPasswordSecretRef)",message="snowPasswordSecretRef is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.snowUser) || has(self.initProvider.snowUser)",message="snowUser is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.syncOptions) || has(self.initProvider.syncOptions)",message="syncOptions is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.target) || has(self.initProvider.target)",message="target is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.taskType) || has(self.initProvider.taskType)",message="taskType is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.extensionObjects) || (has(self.initProvider) && has(self.initProvider.extensionObjects))",message="spec.forProvider.extensionObjects is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.extensionSchema) || (has(self.initProvider) && has(self.initProvider.extensionSchema))",message="spec.forProvider.extensionSchema is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.referer) || (has(self.initProvider) && has(self.initProvider.referer))",message="spec.forProvider.referer is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.snowPasswordSecretRef)",message="spec.forProvider.snowPasswordSecretRef is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.snowUser) || (has(self.initProvider) && has(self.initProvider.snowUser))",message="spec.forProvider.snowUser is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.syncOptions) || (has(self.initProvider) && has(self.initProvider.syncOptions))",message="spec.forProvider.syncOptions is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.target) || (has(self.initProvider) && has(self.initProvider.target))",message="spec.forProvider.target is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.taskType) || (has(self.initProvider) && has(self.initProvider.taskType))",message="spec.forProvider.taskType is a required parameter" Spec ServicenowSpec `json:"spec"` Status ServicenowStatus `json:"status,omitempty"` } diff --git a/apis/generate.go b/apis/generate.go index 7dcd77d..233d170 100644 --- a/apis/generate.go +++ b/apis/generate.go @@ -19,7 +19,7 @@ Copyright 2021 Upbound Inc. //go:generate rm -rf ../examples-generated // Generate documentation from Terraform docs. -//go:generate go run github.com/upbound/upjet/cmd/scraper -n ${TERRAFORM_PROVIDER_SOURCE} -r ../.work/${TERRAFORM_PROVIDER_SOURCE}/${TERRAFORM_DOCS_PATH} -o ../config/provider-metadata.yaml +//go:generate go run github.com/crossplane/upjet/cmd/scraper -n ${TERRAFORM_PROVIDER_SOURCE} -r ../.work/${TERRAFORM_PROVIDER_SOURCE}/${TERRAFORM_DOCS_PATH} -o ../config/provider-metadata.yaml // Run Upjet generator //go:generate go run ../cmd/generator/main.go .. diff --git a/apis/maintenance/v1alpha1/zz_generated.conversion_hubs.go b/apis/maintenance/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..b1bdafc --- /dev/null +++ b/apis/maintenance/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,10 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Window) Hub() {} diff --git a/apis/maintenance/v1alpha1/zz_generated.deepcopy.go b/apis/maintenance/v1alpha1/zz_generated.deepcopy.go index cf61d32..f0a1b2c 100644 --- a/apis/maintenance/v1alpha1/zz_generated.deepcopy.go +++ b/apis/maintenance/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -54,6 +53,29 @@ func (in *WindowInitParameters) DeepCopyInto(out *WindowInitParameters) { *out = new(string) **out = **in } + if in.ServiceRefs != nil { + in, out := &in.ServiceRefs, &out.ServiceRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ServiceSelector != nil { + in, out := &in.ServiceSelector, &out.ServiceSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime *out = new(string) diff --git a/apis/maintenance/v1alpha1/zz_generated.managed.go b/apis/maintenance/v1alpha1/zz_generated.managed.go index a08e47d..04d0a0e 100644 --- a/apis/maintenance/v1alpha1/zz_generated.managed.go +++ b/apis/maintenance/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Window) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Window. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Window) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Window. func (mg *Window) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Window) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Window. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Window) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Window. func (mg *Window) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/maintenance/v1alpha1/zz_generated.resolvers.go b/apis/maintenance/v1alpha1/zz_generated.resolvers.go index 3f30b15..c14451c 100644 --- a/apis/maintenance/v1alpha1/zz_generated.resolvers.go +++ b/apis/maintenance/v1alpha1/zz_generated.resolvers.go @@ -36,5 +36,21 @@ func (mg *Window) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.Services = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.ServiceRefs = mrsp.ResolvedReferences + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.Services), + Extract: reference.ExternalName(), + References: mg.Spec.InitProvider.ServiceRefs, + Selector: mg.Spec.InitProvider.ServiceSelector, + To: reference.To{ + List: &v1alpha1.ServiceList{}, + Managed: &v1alpha1.Service{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Services") + } + mg.Spec.InitProvider.Services = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.ServiceRefs = mrsp.ResolvedReferences + return nil } diff --git a/apis/maintenance/v1alpha1/zz_generated_terraformed.go b/apis/maintenance/v1alpha1/zz_window_terraformed.go similarity index 69% rename from apis/maintenance/v1alpha1/zz_generated_terraformed.go rename to apis/maintenance/v1alpha1/zz_window_terraformed.go index a970911..52ffda1 100755 --- a/apis/maintenance/v1alpha1/zz_generated_terraformed.go +++ b/apis/maintenance/v1alpha1/zz_window_terraformed.go @@ -7,10 +7,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Window @@ -79,6 +80,36 @@ func (tr *Window) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Window +func (tr *Window) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Window using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Window) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/maintenance/v1alpha1/zz_window_types.go b/apis/maintenance/v1alpha1/zz_window_types.go index 8292aa2..7440d25 100755 --- a/apis/maintenance/v1alpha1/zz_window_types.go +++ b/apis/maintenance/v1alpha1/zz_window_types.go @@ -21,6 +21,21 @@ type WindowInitParameters struct { // The maintenance window's end time. This is when the services will start creating incidents again. This date must be in the future and after the start_time. EndTime *string `json:"endTime,omitempty" tf:"end_time,omitempty"` + // References to Service in service to populate services. + // +kubebuilder:validation:Optional + ServiceRefs []v1.Reference `json:"serviceRefs,omitempty" tf:"-"` + + // Selector for a list of Service in service to populate services. + // +kubebuilder:validation:Optional + ServiceSelector *v1.Selector `json:"serviceSelector,omitempty" tf:"-"` + + // A list of service IDs to include in the maintenance window. + // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/service/v1alpha1.Service + // +crossplane:generate:reference:refFieldName=ServiceRefs + // +crossplane:generate:reference:selectorFieldName=ServiceSelector + // +listType=set + Services []*string `json:"services,omitempty" tf:"services,omitempty"` + // The maintenance window's start time. This is when the services will stop creating incidents. If this date is in the past, it will be updated to be the current time. StartTime *string `json:"startTime,omitempty" tf:"start_time,omitempty"` } @@ -37,6 +52,7 @@ type WindowObservation struct { ID *string `json:"id,omitempty" tf:"id,omitempty"` // A list of service IDs to include in the maintenance window. + // +listType=set Services []*string `json:"services,omitempty" tf:"services,omitempty"` // The maintenance window's start time. This is when the services will stop creating incidents. If this date is in the past, it will be updated to be the current time. @@ -66,6 +82,7 @@ type WindowParameters struct { // +crossplane:generate:reference:refFieldName=ServiceRefs // +crossplane:generate:reference:selectorFieldName=ServiceSelector // +kubebuilder:validation:Optional + // +listType=set Services []*string `json:"services,omitempty" tf:"services,omitempty"` // The maintenance window's start time. This is when the services will stop creating incidents. If this date is in the past, it will be updated to be the current time. @@ -77,9 +94,8 @@ type WindowParameters struct { type WindowSpec struct { v1.ResourceSpec `json:",inline"` ForProvider WindowParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -98,19 +114,20 @@ type WindowStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Window is the Schema for the Windows API. Creates and manages a maintenance window in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Window struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endTime) || has(self.initProvider.endTime)",message="endTime is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startTime) || has(self.initProvider.startTime)",message="startTime is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endTime) || (has(self.initProvider) && has(self.initProvider.endTime))",message="spec.forProvider.endTime is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startTime) || (has(self.initProvider) && has(self.initProvider.startTime))",message="spec.forProvider.startTime is a required parameter" Spec WindowSpec `json:"spec"` Status WindowStatus `json:"status,omitempty"` } diff --git a/apis/response/v1alpha1/zz_generated.conversion_hubs.go b/apis/response/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..015971c --- /dev/null +++ b/apis/response/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,10 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Play) Hub() {} diff --git a/apis/response/v1alpha1/zz_generated.deepcopy.go b/apis/response/v1alpha1/zz_generated.deepcopy.go index d77ade3..4cf3894 100644 --- a/apis/response/v1alpha1/zz_generated.deepcopy.go +++ b/apis/response/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. diff --git a/apis/response/v1alpha1/zz_generated.managed.go b/apis/response/v1alpha1/zz_generated.managed.go index 7d0f11e..9929e1a 100644 --- a/apis/response/v1alpha1/zz_generated.managed.go +++ b/apis/response/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Play) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Play. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Play) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Play. func (mg *Play) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Play) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Play. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Play) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Play. func (mg *Play) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/response/v1alpha1/zz_generated_terraformed.go b/apis/response/v1alpha1/zz_play_terraformed.go similarity index 69% rename from apis/response/v1alpha1/zz_generated_terraformed.go rename to apis/response/v1alpha1/zz_play_terraformed.go index e69f168..fee70a0 100755 --- a/apis/response/v1alpha1/zz_generated_terraformed.go +++ b/apis/response/v1alpha1/zz_play_terraformed.go @@ -7,10 +7,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Play @@ -79,6 +80,36 @@ func (tr *Play) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Play +func (tr *Play) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Play using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Play) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/response/v1alpha1/zz_play_types.go b/apis/response/v1alpha1/zz_play_types.go index 2ad430b..ba25ebb 100755 --- a/apis/response/v1alpha1/zz_play_types.go +++ b/apis/response/v1alpha1/zz_play_types.go @@ -305,9 +305,8 @@ type TeamParameters struct { type PlaySpec struct { v1.ResourceSpec `json:",inline"` ForProvider PlayParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -326,19 +325,20 @@ type PlayStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Play is the Schema for the Plays API. Creates and manages a response play in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Play struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.from) || has(self.initProvider.from)",message="from is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || has(self.initProvider.name)",message="name is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.from) || (has(self.initProvider) && has(self.initProvider.from))",message="spec.forProvider.from is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" Spec PlaySpec `json:"spec"` Status PlayStatus `json:"status,omitempty"` } diff --git a/apis/ruleset/v1alpha1/zz_generated.conversion_hubs.go b/apis/ruleset/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..c070b57 --- /dev/null +++ b/apis/ruleset/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,13 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Ruleset) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *Rule) Hub() {} diff --git a/apis/ruleset/v1alpha1/zz_generated.deepcopy.go b/apis/ruleset/v1alpha1/zz_generated.deepcopy.go index 2711404..17c1761 100644 --- a/apis/ruleset/v1alpha1/zz_generated.deepcopy.go +++ b/apis/ruleset/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -937,6 +936,21 @@ func (in *RuleInitParameters) DeepCopyInto(out *RuleInitParameters) { *out = new(float64) **out = **in } + if in.Ruleset != nil { + in, out := &in.Ruleset, &out.Ruleset + *out = new(string) + **out = **in + } + if in.RulesetRef != nil { + in, out := &in.RulesetRef, &out.RulesetRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.RulesetSelector != nil { + in, out := &in.RulesetSelector, &out.RulesetSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.TimeFrame != nil { in, out := &in.TimeFrame, &out.TimeFrame *out = make([]TimeFrameInitParameters, len(*in)) @@ -1209,7 +1223,9 @@ func (in *RulesetInitParameters) DeepCopyInto(out *RulesetInitParameters) { if in.Team != nil { in, out := &in.Team, &out.Team *out = make([]TeamInitParameters, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } } @@ -1797,6 +1813,21 @@ func (in *SuspendParameters) DeepCopy() *SuspendParameters { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TeamInitParameters) DeepCopyInto(out *TeamInitParameters) { *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.IDRef != nil { + in, out := &in.IDRef, &out.IDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.IDSelector != nil { + in, out := &in.IDSelector, &out.IDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamInitParameters. diff --git a/apis/ruleset/v1alpha1/zz_generated.managed.go b/apis/ruleset/v1alpha1/zz_generated.managed.go index 5831780..5cafcf3 100644 --- a/apis/ruleset/v1alpha1/zz_generated.managed.go +++ b/apis/ruleset/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Rule) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Rule. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Rule) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Rule. func (mg *Rule) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Rule) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Rule. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Rule) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Rule. func (mg *Rule) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -103,14 +87,6 @@ func (mg *Ruleset) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Ruleset. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Ruleset) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Ruleset. func (mg *Ruleset) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -141,14 +117,6 @@ func (mg *Ruleset) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Ruleset. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Ruleset) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Ruleset. func (mg *Ruleset) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/ruleset/v1alpha1/zz_generated.resolvers.go b/apis/ruleset/v1alpha1/zz_generated.resolvers.go index 0cecde0..16e973e 100644 --- a/apis/ruleset/v1alpha1/zz_generated.resolvers.go +++ b/apis/ruleset/v1alpha1/zz_generated.resolvers.go @@ -36,6 +36,22 @@ func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.Ruleset = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RulesetRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Ruleset), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.RulesetRef, + Selector: mg.Spec.InitProvider.RulesetSelector, + To: reference.To{ + List: &RulesetList{}, + Managed: &Ruleset{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Ruleset") + } + mg.Spec.InitProvider.Ruleset = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.RulesetRef = rsp.ResolvedReference + return nil } @@ -63,6 +79,24 @@ func (mg *Ruleset) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.Team[i3].ID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.Team[i3].IDRef = rsp.ResolvedReference + } + for i3 := 0; i3 < len(mg.Spec.InitProvider.Team); i3++ { + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Team[i3].ID), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.Team[i3].IDRef, + Selector: mg.Spec.InitProvider.Team[i3].IDSelector, + To: reference.To{ + List: &v1alpha1.TeamList{}, + Managed: &v1alpha1.Team{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Team[i3].ID") + } + mg.Spec.InitProvider.Team[i3].ID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.Team[i3].IDRef = rsp.ResolvedReference + } return nil diff --git a/apis/ruleset/v1alpha1/zz_rule_terraformed.go b/apis/ruleset/v1alpha1/zz_rule_terraformed.go new file mode 100755 index 0000000..fe45223 --- /dev/null +++ b/apis/ruleset/v1alpha1/zz_rule_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Rule +func (mg *Rule) GetTerraformResourceType() string { + return "pagerduty_ruleset_rule" +} + +// GetConnectionDetailsMapping for this Rule +func (tr *Rule) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Rule +func (tr *Rule) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Rule +func (tr *Rule) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Rule +func (tr *Rule) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Rule +func (tr *Rule) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Rule +func (tr *Rule) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Rule +func (tr *Rule) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Rule +func (tr *Rule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Rule using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Rule) LateInitialize(attrs []byte) (bool, error) { + params := &RuleParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Rule) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/ruleset/v1alpha1/zz_rule_types.go b/apis/ruleset/v1alpha1/zz_rule_types.go index 2985ff1..ff8220c 100755 --- a/apis/ruleset/v1alpha1/zz_rule_types.go +++ b/apis/ruleset/v1alpha1/zz_rule_types.go @@ -345,6 +345,18 @@ type RuleInitParameters struct { // Position/index of the rule within the ruleset. Position *float64 `json:"position,omitempty" tf:"position,omitempty"` + // The ID of the ruleset that the rule belongs to. + // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/ruleset/v1alpha1.Ruleset + Ruleset *string `json:"ruleset,omitempty" tf:"ruleset,omitempty"` + + // Reference to a Ruleset in ruleset to populate ruleset. + // +kubebuilder:validation:Optional + RulesetRef *v1.Reference `json:"rulesetRef,omitempty" tf:"-"` + + // Selector for a Ruleset in ruleset to populate ruleset. + // +kubebuilder:validation:Optional + RulesetSelector *v1.Selector `json:"rulesetSelector,omitempty" tf:"-"` + // Settings for scheduling the rule. TimeFrame []TimeFrameInitParameters `json:"timeFrame,omitempty" tf:"time_frame,omitempty"` @@ -652,9 +664,8 @@ type VariableParameters struct { type RuleSpec struct { v1.ResourceSpec `json:",inline"` ForProvider RuleParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -673,13 +684,14 @@ type RuleStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Rule is the Schema for the Rules API. Creates and manages a ruleset rule in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Rule struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/ruleset/v1alpha1/zz_generated_terraformed.go b/apis/ruleset/v1alpha1/zz_ruleset_terraformed.go similarity index 52% rename from apis/ruleset/v1alpha1/zz_generated_terraformed.go rename to apis/ruleset/v1alpha1/zz_ruleset_terraformed.go index 5178109..4e4f5e7 100755 --- a/apis/ruleset/v1alpha1/zz_generated_terraformed.go +++ b/apis/ruleset/v1alpha1/zz_ruleset_terraformed.go @@ -7,10 +7,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Ruleset @@ -79,94 +80,40 @@ func (tr *Ruleset) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } -// LateInitialize this Ruleset using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *Ruleset) LateInitialize(attrs []byte) (bool, error) { - params := &RulesetParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Ruleset) GetTerraformSchemaVersion() int { - return 0 -} - -// GetTerraformResourceType returns Terraform resource type for this Rule -func (mg *Rule) GetTerraformResourceType() string { - return "pagerduty_ruleset_rule" -} - -// GetConnectionDetailsMapping for this Rule -func (tr *Rule) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this Rule -func (tr *Rule) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this Rule -func (tr *Rule) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) +// GetInitParameters of this Ruleset +func (tr *Ruleset) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() if err != nil { - return err + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this Rule -func (tr *Rule) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" + if !shouldMergeInitProvider { + return params, nil } - return *tr.Status.AtProvider.ID -} -// GetParameters of this Rule -func (tr *Rule) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + initParams, err := tr.GetInitParameters() if err != nil { - return nil, err + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} -// SetParameters for this Rule -func (tr *Rule) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) if err != nil { - return err + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} -// GetInitParameters of this Rule -func (tr *Rule) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) + return params, nil } -// LateInitialize this Rule using its observed tfState. +// LateInitialize this Ruleset using its observed tfState. // returns True if there are any spec changes for the resource. -func (tr *Rule) LateInitialize(attrs []byte) (bool, error) { - params := &RuleParameters{} +func (tr *Ruleset) LateInitialize(attrs []byte) (bool, error) { + params := &RulesetParameters{} if err := json.TFParser.Unmarshal(attrs, params); err != nil { return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") } @@ -177,6 +124,6 @@ func (tr *Rule) LateInitialize(attrs []byte) (bool, error) { } // GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Rule) GetTerraformSchemaVersion() int { +func (tr *Ruleset) GetTerraformSchemaVersion() int { return 0 } diff --git a/apis/ruleset/v1alpha1/zz_ruleset_types.go b/apis/ruleset/v1alpha1/zz_ruleset_types.go index 9d74b66..385f915 100755 --- a/apis/ruleset/v1alpha1/zz_ruleset_types.go +++ b/apis/ruleset/v1alpha1/zz_ruleset_types.go @@ -52,6 +52,18 @@ type RulesetParameters struct { } type TeamInitParameters struct { + + // The ID of the ruleset. + // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/team/v1alpha1.Team + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Reference to a Team in team to populate id. + // +kubebuilder:validation:Optional + IDRef *v1.Reference `json:"idRef,omitempty" tf:"-"` + + // Selector for a Team in team to populate id. + // +kubebuilder:validation:Optional + IDSelector *v1.Selector `json:"idSelector,omitempty" tf:"-"` } type TeamObservation struct { @@ -80,9 +92,8 @@ type TeamParameters struct { type RulesetSpec struct { v1.ResourceSpec `json:",inline"` ForProvider RulesetParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -101,18 +112,19 @@ type RulesetStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Ruleset is the Schema for the Rulesets API. Creates and manages an ruleset in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Ruleset struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || has(self.initProvider.name)",message="name is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" Spec RulesetSpec `json:"spec"` Status RulesetStatus `json:"status,omitempty"` } diff --git a/apis/schedule/v1alpha1/zz_generated.conversion_hubs.go b/apis/schedule/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..7a0a3d4 --- /dev/null +++ b/apis/schedule/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,10 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Schedule) Hub() {} diff --git a/apis/schedule/v1alpha1/zz_generated.deepcopy.go b/apis/schedule/v1alpha1/zz_generated.deepcopy.go index 330bf09..746af58 100644 --- a/apis/schedule/v1alpha1/zz_generated.deepcopy.go +++ b/apis/schedule/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -104,6 +103,29 @@ func (in *LayerInitParameters) DeepCopyInto(out *LayerInitParameters) { *out = new(string) **out = **in } + if in.UserRefs != nil { + in, out := &in.UserRefs, &out.UserRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.UserSelector != nil { + in, out := &in.UserSelector, &out.UserSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LayerInitParameters. @@ -411,6 +433,29 @@ func (in *ScheduleInitParameters) DeepCopyInto(out *ScheduleInitParameters) { *out = new(bool) **out = **in } + if in.TeamRefs != nil { + in, out := &in.TeamRefs, &out.TeamRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.TeamSelector != nil { + in, out := &in.TeamSelector, &out.TeamSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Teams != nil { + in, out := &in.Teams, &out.Teams + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } if in.TimeZone != nil { in, out := &in.TimeZone, &out.TimeZone *out = new(string) diff --git a/apis/schedule/v1alpha1/zz_generated.managed.go b/apis/schedule/v1alpha1/zz_generated.managed.go index 96076c2..8f74475 100644 --- a/apis/schedule/v1alpha1/zz_generated.managed.go +++ b/apis/schedule/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Schedule) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Schedule. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Schedule) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Schedule. func (mg *Schedule) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Schedule) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Schedule. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Schedule) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Schedule. func (mg *Schedule) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/schedule/v1alpha1/zz_generated.resolvers.go b/apis/schedule/v1alpha1/zz_generated.resolvers.go index 67f2992..8a10753 100644 --- a/apis/schedule/v1alpha1/zz_generated.resolvers.go +++ b/apis/schedule/v1alpha1/zz_generated.resolvers.go @@ -55,5 +55,39 @@ func (mg *Schedule) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.Teams = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.TeamRefs = mrsp.ResolvedReferences + for i3 := 0; i3 < len(mg.Spec.InitProvider.Layer); i3++ { + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.Layer[i3].Users), + Extract: reference.ExternalName(), + References: mg.Spec.InitProvider.Layer[i3].UserRefs, + Selector: mg.Spec.InitProvider.Layer[i3].UserSelector, + To: reference.To{ + List: &v1alpha1.UserList{}, + Managed: &v1alpha1.User{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Layer[i3].Users") + } + mg.Spec.InitProvider.Layer[i3].Users = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.Layer[i3].UserRefs = mrsp.ResolvedReferences + + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.Teams), + Extract: reference.ExternalName(), + References: mg.Spec.InitProvider.TeamRefs, + Selector: mg.Spec.InitProvider.TeamSelector, + To: reference.To{ + List: &v1alpha11.TeamList{}, + Managed: &v1alpha11.Team{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Teams") + } + mg.Spec.InitProvider.Teams = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.TeamRefs = mrsp.ResolvedReferences + return nil } diff --git a/apis/schedule/v1alpha1/zz_generated_terraformed.go b/apis/schedule/v1alpha1/zz_schedule_terraformed.go similarity index 69% rename from apis/schedule/v1alpha1/zz_generated_terraformed.go rename to apis/schedule/v1alpha1/zz_schedule_terraformed.go index a124dcb..8c4ff96 100755 --- a/apis/schedule/v1alpha1/zz_generated_terraformed.go +++ b/apis/schedule/v1alpha1/zz_schedule_terraformed.go @@ -7,10 +7,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Schedule @@ -79,6 +80,36 @@ func (tr *Schedule) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Schedule +func (tr *Schedule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Schedule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Schedule) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/schedule/v1alpha1/zz_schedule_types.go b/apis/schedule/v1alpha1/zz_schedule_types.go index d419fdd..b53beb9 100755 --- a/apis/schedule/v1alpha1/zz_schedule_types.go +++ b/apis/schedule/v1alpha1/zz_schedule_types.go @@ -46,6 +46,20 @@ type LayerInitParameters struct { // The start time of the schedule layer. Start *string `json:"start,omitempty" tf:"start,omitempty"` + + // References to User in user to populate users. + // +kubebuilder:validation:Optional + UserRefs []v1.Reference `json:"userRefs,omitempty" tf:"-"` + + // Selector for a list of User in user to populate users. + // +kubebuilder:validation:Optional + UserSelector *v1.Selector `json:"userSelector,omitempty" tf:"-"` + + // The ordered list of users on this layer. The position of the user on the list determines their order in the layer. + // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/user/v1alpha1.User + // +crossplane:generate:reference:refFieldName=UserRefs + // +crossplane:generate:reference:selectorFieldName=UserSelector + Users []*string `json:"users,omitempty" tf:"users,omitempty"` } type LayerObservation struct { @@ -93,15 +107,15 @@ type LayerParameters struct { // The duration of each on-call shift in seconds. // +kubebuilder:validation:Optional - RotationTurnLengthSeconds *float64 `json:"rotationTurnLengthSeconds,omitempty" tf:"rotation_turn_length_seconds,omitempty"` + RotationTurnLengthSeconds *float64 `json:"rotationTurnLengthSeconds" tf:"rotation_turn_length_seconds,omitempty"` // The effective start time of the schedule layer. This can be before the start time of the schedule. // +kubebuilder:validation:Optional - RotationVirtualStart *string `json:"rotationVirtualStart,omitempty" tf:"rotation_virtual_start,omitempty"` + RotationVirtualStart *string `json:"rotationVirtualStart" tf:"rotation_virtual_start,omitempty"` // The start time of the schedule layer. // +kubebuilder:validation:Optional - Start *string `json:"start,omitempty" tf:"start,omitempty"` + Start *string `json:"start" tf:"start,omitempty"` // References to User in user to populate users. // +kubebuilder:validation:Optional @@ -153,7 +167,7 @@ type RestrictionParameters struct { // The duration of the restriction in seconds. // +kubebuilder:validation:Optional - DurationSeconds *float64 `json:"durationSeconds,omitempty" tf:"duration_seconds,omitempty"` + DurationSeconds *float64 `json:"durationSeconds" tf:"duration_seconds,omitempty"` // Number of the day when restriction starts. From 1 to 7 where 1 is Monday and 7 is Sunday. // +kubebuilder:validation:Optional @@ -161,11 +175,11 @@ type RestrictionParameters struct { // The start time in HH:mm:ss format. // +kubebuilder:validation:Optional - StartTimeOfDay *string `json:"startTimeOfDay,omitempty" tf:"start_time_of_day,omitempty"` + StartTimeOfDay *string `json:"startTimeOfDay" tf:"start_time_of_day,omitempty"` // Can be daily_restriction or weekly_restriction. // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + Type *string `json:"type" tf:"type,omitempty"` } type ScheduleInitParameters struct { @@ -184,6 +198,20 @@ type ScheduleInitParameters struct { // If you do pass the overflow parameter, you will get one schedule entry returned with a start of 2011-06-01T00:00:00Z and end of 2011-06-02T00:00:00Z. Overflow *bool `json:"overflow,omitempty" tf:"overflow,omitempty"` + // References to Team in team to populate teams. + // +kubebuilder:validation:Optional + TeamRefs []v1.Reference `json:"teamRefs,omitempty" tf:"-"` + + // Selector for a list of Team in team to populate teams. + // +kubebuilder:validation:Optional + TeamSelector *v1.Selector `json:"teamSelector,omitempty" tf:"-"` + + // Teams associated with the schedule. + // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/team/v1alpha1.Team + // +crossplane:generate:reference:refFieldName=TeamRefs + // +crossplane:generate:reference:selectorFieldName=TeamSelector + Teams []*string `json:"teams,omitempty" tf:"teams,omitempty"` + // The time zone of the schedule (e.g. Europe/Berlin). TimeZone *string `json:"timeZone,omitempty" tf:"time_zone,omitempty"` } @@ -260,9 +288,8 @@ type ScheduleParameters struct { type ScheduleSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ScheduleParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -281,19 +308,20 @@ type ScheduleStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Schedule is the Schema for the Schedules API. Creates and manages a schedule in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Schedule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.layer) || has(self.initProvider.layer)",message="layer is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.timeZone) || has(self.initProvider.timeZone)",message="timeZone is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.layer) || (has(self.initProvider) && has(self.initProvider.layer))",message="spec.forProvider.layer is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.timeZone) || (has(self.initProvider) && has(self.initProvider.timeZone))",message="spec.forProvider.timeZone is a required parameter" Spec ScheduleSpec `json:"spec"` Status ScheduleStatus `json:"status,omitempty"` } diff --git a/apis/service/v1alpha1/zz_dependency_terraformed.go b/apis/service/v1alpha1/zz_dependency_terraformed.go new file mode 100755 index 0000000..236f376 --- /dev/null +++ b/apis/service/v1alpha1/zz_dependency_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Dependency +func (mg *Dependency) GetTerraformResourceType() string { + return "pagerduty_service_dependency" +} + +// GetConnectionDetailsMapping for this Dependency +func (tr *Dependency) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Dependency +func (tr *Dependency) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Dependency +func (tr *Dependency) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Dependency +func (tr *Dependency) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Dependency +func (tr *Dependency) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Dependency +func (tr *Dependency) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Dependency +func (tr *Dependency) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Dependency +func (tr *Dependency) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Dependency using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Dependency) LateInitialize(attrs []byte) (bool, error) { + params := &DependencyParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Dependency) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/service/v1alpha1/zz_dependency_types.go b/apis/service/v1alpha1/zz_dependency_types.go index ae30fd2..9626c81 100755 --- a/apis/service/v1alpha1/zz_dependency_types.go +++ b/apis/service/v1alpha1/zz_dependency_types.go @@ -41,11 +41,11 @@ type DependencyDependencyParameters struct { // The service that dependents on the supporting service. Dependency dependent service documented below. // +kubebuilder:validation:Optional - DependentService []DependentServiceParameters `json:"dependentService,omitempty" tf:"dependent_service,omitempty"` + DependentService []DependentServiceParameters `json:"dependentService" tf:"dependent_service,omitempty"` // The service that supports the dependent service. Dependency supporting service documented below. // +kubebuilder:validation:Optional - SupportingService []SupportingServiceParameters `json:"supportingService,omitempty" tf:"supporting_service,omitempty"` + SupportingService []SupportingServiceParameters `json:"supportingService" tf:"supporting_service,omitempty"` // Can be business_service, service, business_service_reference or technical_service_reference. // +kubebuilder:validation:Optional @@ -96,11 +96,11 @@ type DependentServiceParameters struct { // The ID of the service dependency. // +kubebuilder:validation:Optional - ID *string `json:"id,omitempty" tf:"id,omitempty"` + ID *string `json:"id" tf:"id,omitempty"` // Can be business_service, service, business_service_reference or technical_service_reference. // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + Type *string `json:"type" tf:"type,omitempty"` } type SupportingServiceInitParameters struct { @@ -125,20 +125,19 @@ type SupportingServiceParameters struct { // The ID of the service dependency. // +kubebuilder:validation:Optional - ID *string `json:"id,omitempty" tf:"id,omitempty"` + ID *string `json:"id" tf:"id,omitempty"` // Can be business_service, service, business_service_reference or technical_service_reference. // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + Type *string `json:"type" tf:"type,omitempty"` } // DependencySpec defines the desired state of Dependency type DependencySpec struct { v1.ResourceSpec `json:",inline"` ForProvider DependencyParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -157,18 +156,19 @@ type DependencyStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Dependency is the Schema for the Dependencys API. Creates and manages a business service dependency in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Dependency struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.dependency) || has(self.initProvider.dependency)",message="dependency is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.dependency) || (has(self.initProvider) && has(self.initProvider.dependency))",message="spec.forProvider.dependency is a required parameter" Spec DependencySpec `json:"spec"` Status DependencyStatus `json:"status,omitempty"` } diff --git a/apis/service/v1alpha1/zz_eventrule_terraformed.go b/apis/service/v1alpha1/zz_eventrule_terraformed.go new file mode 100755 index 0000000..8deedf7 --- /dev/null +++ b/apis/service/v1alpha1/zz_eventrule_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this EventRule +func (mg *EventRule) GetTerraformResourceType() string { + return "pagerduty_service_event_rule" +} + +// GetConnectionDetailsMapping for this EventRule +func (tr *EventRule) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this EventRule +func (tr *EventRule) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this EventRule +func (tr *EventRule) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this EventRule +func (tr *EventRule) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this EventRule +func (tr *EventRule) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this EventRule +func (tr *EventRule) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this EventRule +func (tr *EventRule) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this EventRule +func (tr *EventRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this EventRule using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *EventRule) LateInitialize(attrs []byte) (bool, error) { + params := &EventRuleParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *EventRule) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/service/v1alpha1/zz_eventrule_types.go b/apis/service/v1alpha1/zz_eventrule_types.go index fba32c3..a2cf2c2 100755 --- a/apis/service/v1alpha1/zz_eventrule_types.go +++ b/apis/service/v1alpha1/zz_eventrule_types.go @@ -202,6 +202,18 @@ type EventRuleInitParameters struct { // Position/index of the rule within the service. Position *float64 `json:"position,omitempty" tf:"position,omitempty"` + // The ID of the service that the rule belongs to. + // +crossplane:generate:reference:type=Service + Service *string `json:"service,omitempty" tf:"service,omitempty"` + + // Reference to a Service to populate service. + // +kubebuilder:validation:Optional + ServiceRef *v1.Reference `json:"serviceRef,omitempty" tf:"-"` + + // Selector for a Service to populate service. + // +kubebuilder:validation:Optional + ServiceSelector *v1.Selector `json:"serviceSelector,omitempty" tf:"-"` + // Settings for scheduling the rule. TimeFrame []TimeFrameInitParameters `json:"timeFrame,omitempty" tf:"time_frame,omitempty"` @@ -639,9 +651,8 @@ type VariableParameters struct { type EventRuleSpec struct { v1.ResourceSpec `json:",inline"` ForProvider EventRuleParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -660,13 +671,14 @@ type EventRuleStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // EventRule is the Schema for the EventRules API. Creates and manages a service event rule in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type EventRule struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/service/v1alpha1/zz_generated.conversion_hubs.go b/apis/service/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..d5f7353 --- /dev/null +++ b/apis/service/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,19 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Service) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *Dependency) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *EventRule) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *Integration) Hub() {} diff --git a/apis/service/v1alpha1/zz_generated.deepcopy.go b/apis/service/v1alpha1/zz_generated.deepcopy.go index 093fe72..99d3e25 100644 --- a/apis/service/v1alpha1/zz_generated.deepcopy.go +++ b/apis/service/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -672,6 +671,11 @@ func (in *ConfigInitParameters) DeepCopyInto(out *ConfigInitParameters) { } } } + if in.TimeWindow != nil { + in, out := &in.TimeWindow, &out.TimeWindow + *out = new(float64) + **out = **in + } if in.Timeout != nil { in, out := &in.Timeout, &out.Timeout *out = new(float64) @@ -708,6 +712,11 @@ func (in *ConfigObservation) DeepCopyInto(out *ConfigObservation) { } } } + if in.TimeWindow != nil { + in, out := &in.TimeWindow, &out.TimeWindow + *out = new(float64) + **out = **in + } if in.Timeout != nil { in, out := &in.Timeout, &out.Timeout *out = new(float64) @@ -744,6 +753,11 @@ func (in *ConfigParameters) DeepCopyInto(out *ConfigParameters) { } } } + if in.TimeWindow != nil { + in, out := &in.TimeWindow, &out.TimeWindow + *out = new(float64) + **out = **in + } if in.Timeout != nil { in, out := &in.Timeout, &out.Timeout *out = new(float64) @@ -1539,6 +1553,21 @@ func (in *EventRuleInitParameters) DeepCopyInto(out *EventRuleInitParameters) { *out = new(float64) **out = **in } + if in.Service != nil { + in, out := &in.Service, &out.Service + *out = new(string) + **out = **in + } + if in.ServiceRef != nil { + in, out := &in.ServiceRef, &out.ServiceRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ServiceSelector != nil { + in, out := &in.ServiceSelector, &out.ServiceSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.TimeFrame != nil { in, out := &in.TimeFrame, &out.TimeFrame *out = make([]TimeFrameInitParameters, len(*in)) @@ -2059,6 +2088,21 @@ func (in *IntegrationInitParameters) DeepCopyInto(out *IntegrationInitParameters *out = new(string) **out = **in } + if in.Service != nil { + in, out := &in.Service, &out.Service + *out = new(string) + **out = **in + } + if in.ServiceRef != nil { + in, out := &in.ServiceRef, &out.ServiceRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ServiceSelector != nil { + in, out := &in.ServiceSelector, &out.ServiceSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Type != nil { in, out := &in.Type, &out.Type *out = new(string) @@ -3176,6 +3220,21 @@ func (in *ServiceInitParameters) DeepCopyInto(out *ServiceInitParameters) { *out = new(string) **out = **in } + if in.EscalationPolicy != nil { + in, out := &in.EscalationPolicy, &out.EscalationPolicy + *out = new(string) + **out = **in + } + if in.EscalationPolicyRef != nil { + in, out := &in.EscalationPolicyRef, &out.EscalationPolicyRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.EscalationPolicySelector != nil { + in, out := &in.EscalationPolicySelector, &out.EscalationPolicySelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.IncidentUrgencyRule != nil { in, out := &in.IncidentUrgencyRule, &out.IncidentUrgencyRule *out = make([]IncidentUrgencyRuleInitParameters, len(*in)) diff --git a/apis/service/v1alpha1/zz_generated.managed.go b/apis/service/v1alpha1/zz_generated.managed.go index d2f97a9..fd43c5a 100644 --- a/apis/service/v1alpha1/zz_generated.managed.go +++ b/apis/service/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Dependency) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Dependency. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Dependency) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Dependency. func (mg *Dependency) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Dependency) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Dependency. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Dependency) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Dependency. func (mg *Dependency) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -103,14 +87,6 @@ func (mg *EventRule) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this EventRule. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *EventRule) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this EventRule. func (mg *EventRule) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -141,14 +117,6 @@ func (mg *EventRule) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this EventRule. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *EventRule) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this EventRule. func (mg *EventRule) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -179,14 +147,6 @@ func (mg *Integration) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Integration. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Integration) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Integration. func (mg *Integration) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -217,14 +177,6 @@ func (mg *Integration) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Integration. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Integration) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Integration. func (mg *Integration) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -255,14 +207,6 @@ func (mg *Service) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Service. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Service) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Service. func (mg *Service) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -293,14 +237,6 @@ func (mg *Service) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Service. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Service) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Service. func (mg *Service) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/service/v1alpha1/zz_generated.resolvers.go b/apis/service/v1alpha1/zz_generated.resolvers.go index 59f7e51..ee49c91 100644 --- a/apis/service/v1alpha1/zz_generated.resolvers.go +++ b/apis/service/v1alpha1/zz_generated.resolvers.go @@ -36,6 +36,22 @@ func (mg *EventRule) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.Service = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServiceRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Service), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.ServiceRef, + Selector: mg.Spec.InitProvider.ServiceSelector, + To: reference.To{ + List: &ServiceList{}, + Managed: &Service{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Service") + } + mg.Spec.InitProvider.Service = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.ServiceRef = rsp.ResolvedReference + return nil } @@ -62,6 +78,22 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.Service = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServiceRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Service), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.ServiceRef, + Selector: mg.Spec.InitProvider.ServiceSelector, + To: reference.To{ + List: &ServiceList{}, + Managed: &Service{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Service") + } + mg.Spec.InitProvider.Service = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.ServiceRef = rsp.ResolvedReference + return nil } @@ -88,5 +120,21 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.EscalationPolicy = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EscalationPolicyRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EscalationPolicy), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.EscalationPolicyRef, + Selector: mg.Spec.InitProvider.EscalationPolicySelector, + To: reference.To{ + List: &v1alpha1.PolicyList{}, + Managed: &v1alpha1.Policy{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.EscalationPolicy") + } + mg.Spec.InitProvider.EscalationPolicy = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.EscalationPolicyRef = rsp.ResolvedReference + return nil } diff --git a/apis/service/v1alpha1/zz_generated_terraformed.go b/apis/service/v1alpha1/zz_generated_terraformed.go deleted file mode 100755 index e3801a3..0000000 --- a/apis/service/v1alpha1/zz_generated_terraformed.go +++ /dev/null @@ -1,354 +0,0 @@ -/* -Copyright 2022 Upbound Inc. -*/ - -// Code generated by upjet. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/pkg/errors" - - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" -) - -// GetTerraformResourceType returns Terraform resource type for this Service -func (mg *Service) GetTerraformResourceType() string { - return "pagerduty_service" -} - -// GetConnectionDetailsMapping for this Service -func (tr *Service) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this Service -func (tr *Service) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this Service -func (tr *Service) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this Service -func (tr *Service) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this Service -func (tr *Service) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this Service -func (tr *Service) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this Service -func (tr *Service) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this Service using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *Service) LateInitialize(attrs []byte) (bool, error) { - params := &ServiceParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - opts = append(opts, resource.WithNameFilter("AlertGroupingParameters")) - opts = append(opts, resource.WithNameFilter("AlertGroupingTimeout")) - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Service) GetTerraformSchemaVersion() int { - return 0 -} - -// GetTerraformResourceType returns Terraform resource type for this Dependency -func (mg *Dependency) GetTerraformResourceType() string { - return "pagerduty_service_dependency" -} - -// GetConnectionDetailsMapping for this Dependency -func (tr *Dependency) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this Dependency -func (tr *Dependency) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this Dependency -func (tr *Dependency) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this Dependency -func (tr *Dependency) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this Dependency -func (tr *Dependency) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this Dependency -func (tr *Dependency) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this Dependency -func (tr *Dependency) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this Dependency using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *Dependency) LateInitialize(attrs []byte) (bool, error) { - params := &DependencyParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Dependency) GetTerraformSchemaVersion() int { - return 0 -} - -// GetTerraformResourceType returns Terraform resource type for this EventRule -func (mg *EventRule) GetTerraformResourceType() string { - return "pagerduty_service_event_rule" -} - -// GetConnectionDetailsMapping for this EventRule -func (tr *EventRule) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this EventRule -func (tr *EventRule) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this EventRule -func (tr *EventRule) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this EventRule -func (tr *EventRule) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this EventRule -func (tr *EventRule) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this EventRule -func (tr *EventRule) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this EventRule -func (tr *EventRule) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this EventRule using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *EventRule) LateInitialize(attrs []byte) (bool, error) { - params := &EventRuleParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *EventRule) GetTerraformSchemaVersion() int { - return 0 -} - -// GetTerraformResourceType returns Terraform resource type for this Integration -func (mg *Integration) GetTerraformResourceType() string { - return "pagerduty_service_integration" -} - -// GetConnectionDetailsMapping for this Integration -func (tr *Integration) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this Integration -func (tr *Integration) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this Integration -func (tr *Integration) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this Integration -func (tr *Integration) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this Integration -func (tr *Integration) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this Integration -func (tr *Integration) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this Integration -func (tr *Integration) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this Integration using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *Integration) LateInitialize(attrs []byte) (bool, error) { - params := &IntegrationParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - opts = append(opts, resource.WithNameFilter("Type")) - opts = append(opts, resource.WithNameFilter("Vendor")) - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Integration) GetTerraformSchemaVersion() int { - return 0 -} diff --git a/apis/service/v1alpha1/zz_integration_terraformed.go b/apis/service/v1alpha1/zz_integration_terraformed.go new file mode 100755 index 0000000..0239763 --- /dev/null +++ b/apis/service/v1alpha1/zz_integration_terraformed.go @@ -0,0 +1,131 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Integration +func (mg *Integration) GetTerraformResourceType() string { + return "pagerduty_service_integration" +} + +// GetConnectionDetailsMapping for this Integration +func (tr *Integration) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Integration +func (tr *Integration) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Integration +func (tr *Integration) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Integration +func (tr *Integration) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Integration +func (tr *Integration) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Integration +func (tr *Integration) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Integration +func (tr *Integration) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Integration +func (tr *Integration) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Integration using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Integration) LateInitialize(attrs []byte) (bool, error) { + params := &IntegrationParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + opts = append(opts, resource.WithNameFilter("Type")) + opts = append(opts, resource.WithNameFilter("Vendor")) + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Integration) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/service/v1alpha1/zz_integration_types.go b/apis/service/v1alpha1/zz_integration_types.go index d32c4bf..3298556 100755 --- a/apis/service/v1alpha1/zz_integration_types.go +++ b/apis/service/v1alpha1/zz_integration_types.go @@ -112,10 +112,10 @@ type EmailParserParameters struct { // Can be resolve or trigger. // +kubebuilder:validation:Optional - Action *string `json:"action,omitempty" tf:"action,omitempty"` + Action *string `json:"action" tf:"action,omitempty"` // +kubebuilder:validation:Optional - MatchPredicate []MatchPredicateParameters `json:"matchPredicate,omitempty" tf:"match_predicate,omitempty"` + MatchPredicate []MatchPredicateParameters `json:"matchPredicate" tf:"match_predicate,omitempty"` // +kubebuilder:validation:Optional ValueExtractor []ValueExtractorParameters `json:"valueExtractor,omitempty" tf:"value_extractor,omitempty"` @@ -138,12 +138,24 @@ type IntegrationInitParameters struct { // This is the unique fully-qualified email address used for routing emails to this integration for processing. IntegrationEmail *string `json:"integrationEmail,omitempty" tf:"integration_email,omitempty"` - // This is the unique key used to route events to this integration when received via the PagerDuty Events API. + // (Deprecated) This is the unique key used to route events to this integration when received via the PagerDuty Events API. IntegrationKey *string `json:"integrationKey,omitempty" tf:"integration_key,omitempty"` // The name of the service integration. Name *string `json:"name,omitempty" tf:"name,omitempty"` + // The ID of the service the integration should belong to. + // +crossplane:generate:reference:type=Service + Service *string `json:"service,omitempty" tf:"service,omitempty"` + + // Reference to a Service to populate service. + // +kubebuilder:validation:Optional + ServiceRef *v1.Reference `json:"serviceRef,omitempty" tf:"-"` + + // Selector for a Service to populate service. + // +kubebuilder:validation:Optional + ServiceSelector *v1.Selector `json:"serviceSelector,omitempty" tf:"-"` + // The service type. Can be: // aws_cloudwatch_inbound_integration, // cloudkick_inbound_integration, @@ -183,7 +195,7 @@ type IntegrationObservation struct { // This is the unique fully-qualified email address used for routing emails to this integration for processing. IntegrationEmail *string `json:"integrationEmail,omitempty" tf:"integration_email,omitempty"` - // This is the unique key used to route events to this integration when received via the PagerDuty Events API. + // (Deprecated) This is the unique key used to route events to this integration when received via the PagerDuty Events API. IntegrationKey *string `json:"integrationKey,omitempty" tf:"integration_key,omitempty"` // The name of the service integration. @@ -232,7 +244,7 @@ type IntegrationParameters struct { // +kubebuilder:validation:Optional IntegrationEmail *string `json:"integrationEmail,omitempty" tf:"integration_email,omitempty"` - // This is the unique key used to route events to this integration when received via the PagerDuty Events API. + // (Deprecated) This is the unique key used to route events to this integration when received via the PagerDuty Events API. // +kubebuilder:validation:Optional IntegrationKey *string `json:"integrationKey,omitempty" tf:"integration_key,omitempty"` @@ -319,7 +331,7 @@ type MatchPredicateParameters struct { // nagios_inbound_integration, // pingdom_inbound_integrationor sql_monitor_inbound_integration. // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + Type *string `json:"type" tf:"type,omitempty"` } type PredicateInitParameters struct { @@ -392,7 +404,7 @@ type PredicateParameters struct { // nagios_inbound_integration, // pingdom_inbound_integrationor sql_monitor_inbound_integration. // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + Type *string `json:"type" tf:"type,omitempty"` } type PredicatePredicateInitParameters struct { @@ -441,11 +453,11 @@ type PredicatePredicateParameters struct { // Predicate value or valid regex. // +kubebuilder:validation:Optional - Matcher *string `json:"matcher,omitempty" tf:"matcher,omitempty"` + Matcher *string `json:"matcher" tf:"matcher,omitempty"` // Can be subject, body or from_addresses. // +kubebuilder:validation:Optional - Part *string `json:"part,omitempty" tf:"part,omitempty"` + Part *string `json:"part" tf:"part,omitempty"` // The service type. Can be: // aws_cloudwatch_inbound_integration, @@ -458,7 +470,7 @@ type PredicatePredicateParameters struct { // nagios_inbound_integration, // pingdom_inbound_integrationor sql_monitor_inbound_integration. // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + Type *string `json:"type" tf:"type,omitempty"` } type ValueExtractorInitParameters struct { @@ -522,7 +534,7 @@ type ValueExtractorParameters struct { // Can be subject, body or from_addresses. // +kubebuilder:validation:Optional - Part *string `json:"part,omitempty" tf:"part,omitempty"` + Part *string `json:"part" tf:"part,omitempty"` // If type has value regex this value should contain valid regex. // +kubebuilder:validation:Optional @@ -542,20 +554,19 @@ type ValueExtractorParameters struct { // nagios_inbound_integration, // pingdom_inbound_integrationor sql_monitor_inbound_integration. // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + Type *string `json:"type" tf:"type,omitempty"` // First value extractor should have name incident_key other value extractors should contain custom names. // +kubebuilder:validation:Optional - ValueName *string `json:"valueName,omitempty" tf:"value_name,omitempty"` + ValueName *string `json:"valueName" tf:"value_name,omitempty"` } // IntegrationSpec defines the desired state of Integration type IntegrationSpec struct { v1.ResourceSpec `json:",inline"` ForProvider IntegrationParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -574,13 +585,14 @@ type IntegrationStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Integration is the Schema for the Integrations API. Creates and manages a service integration in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Integration struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/service/v1alpha1/zz_service_terraformed.go b/apis/service/v1alpha1/zz_service_terraformed.go new file mode 100755 index 0000000..8ce58e5 --- /dev/null +++ b/apis/service/v1alpha1/zz_service_terraformed.go @@ -0,0 +1,131 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Service +func (mg *Service) GetTerraformResourceType() string { + return "pagerduty_service" +} + +// GetConnectionDetailsMapping for this Service +func (tr *Service) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Service +func (tr *Service) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Service +func (tr *Service) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Service +func (tr *Service) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Service +func (tr *Service) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Service +func (tr *Service) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Service +func (tr *Service) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Service +func (tr *Service) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Service using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Service) LateInitialize(attrs []byte) (bool, error) { + params := &ServiceParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + opts = append(opts, resource.WithNameFilter("AlertGroupingParameters")) + opts = append(opts, resource.WithNameFilter("AlertGroupingTimeout")) + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Service) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/service/v1alpha1/zz_service_types.go b/apis/service/v1alpha1/zz_service_types.go index fc0909a..16543a3 100755 --- a/apis/service/v1alpha1/zz_service_types.go +++ b/apis/service/v1alpha1/zz_service_types.go @@ -108,6 +108,9 @@ type ConfigInitParameters struct { // Alerts will be grouped together if the content of these fields match. This setting applies only when type is set to content_based. Fields []*string `json:"fields,omitempty" tf:"fields,omitempty"` + // The maximum amount of time allowed between Alerts. This setting applies only when type is set to intelligent or content_based. Value must be between 300 and 3600. Any Alerts arriving greater than time_window seconds apart will not be grouped together. This is a rolling time window and is counted from the most recently grouped alert. The window is extended every time a new alert is added to the group, up to 24 hours. + TimeWindow *float64 `json:"timeWindow,omitempty" tf:"time_window,omitempty"` + // The duration in minutes within which to automatically group incoming alerts. This setting applies only when type is set to time. To continue grouping alerts until the incident is resolved, set this value to 0. Timeout *float64 `json:"timeout,omitempty" tf:"timeout,omitempty"` } @@ -120,6 +123,9 @@ type ConfigObservation struct { // Alerts will be grouped together if the content of these fields match. This setting applies only when type is set to content_based. Fields []*string `json:"fields,omitempty" tf:"fields,omitempty"` + // The maximum amount of time allowed between Alerts. This setting applies only when type is set to intelligent or content_based. Value must be between 300 and 3600. Any Alerts arriving greater than time_window seconds apart will not be grouped together. This is a rolling time window and is counted from the most recently grouped alert. The window is extended every time a new alert is added to the group, up to 24 hours. + TimeWindow *float64 `json:"timeWindow,omitempty" tf:"time_window,omitempty"` + // The duration in minutes within which to automatically group incoming alerts. This setting applies only when type is set to time. To continue grouping alerts until the incident is resolved, set this value to 0. Timeout *float64 `json:"timeout,omitempty" tf:"timeout,omitempty"` } @@ -134,6 +140,10 @@ type ConfigParameters struct { // +kubebuilder:validation:Optional Fields []*string `json:"fields,omitempty" tf:"fields,omitempty"` + // The maximum amount of time allowed between Alerts. This setting applies only when type is set to intelligent or content_based. Value must be between 300 and 3600. Any Alerts arriving greater than time_window seconds apart will not be grouped together. This is a rolling time window and is counted from the most recently grouped alert. The window is extended every time a new alert is added to the group, up to 24 hours. + // +kubebuilder:validation:Optional + TimeWindow *float64 `json:"timeWindow,omitempty" tf:"time_window,omitempty"` + // The duration in minutes within which to automatically group incoming alerts. This setting applies only when type is set to time. To continue grouping alerts until the incident is resolved, set this value to 0. // +kubebuilder:validation:Optional Timeout *float64 `json:"timeout,omitempty" tf:"timeout,omitempty"` @@ -210,7 +220,7 @@ type IncidentUrgencyRuleParameters struct { // The type of incident urgency: constant or use_support_hours (when depending on specific support hours; see support_hours). // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + Type *string `json:"type" tf:"type,omitempty"` // The urgency: low Notify responders (does not escalate), high (follows escalation rules) or severity_based Set's the urgency of the incident based on the severity set by the triggering monitoring tool. // +kubebuilder:validation:Optional @@ -311,6 +321,18 @@ type ServiceInitParameters struct { // A human-friendly description of the service. Description *string `json:"description,omitempty" tf:"description,omitempty"` + // The escalation policy used by this service. + // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/escalation/v1alpha1.Policy + EscalationPolicy *string `json:"escalationPolicy,omitempty" tf:"escalation_policy,omitempty"` + + // Reference to a Policy in escalation to populate escalationPolicy. + // +kubebuilder:validation:Optional + EscalationPolicyRef *v1.Reference `json:"escalationPolicyRef,omitempty" tf:"-"` + + // Selector for a Policy in escalation to populate escalationPolicy. + // +kubebuilder:validation:Optional + EscalationPolicySelector *v1.Selector `json:"escalationPolicySelector,omitempty" tf:"-"` + IncidentUrgencyRule []IncidentUrgencyRuleInitParameters `json:"incidentUrgencyRule,omitempty" tf:"incident_urgency_rule,omitempty"` // The name of the service. @@ -515,9 +537,8 @@ type SupportHoursParameters struct { type ServiceSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ServiceParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -536,18 +557,19 @@ type ServiceStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Service is the Schema for the Services API. Creates and manages a service in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Service struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || has(self.initProvider.name)",message="name is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" Spec ServiceSpec `json:"spec"` Status ServiceStatus `json:"status,omitempty"` } diff --git a/apis/slack/v1alpha1/zz_generated_terraformed.go b/apis/slack/v1alpha1/zz_connection_terraformed.go similarity index 69% rename from apis/slack/v1alpha1/zz_generated_terraformed.go rename to apis/slack/v1alpha1/zz_connection_terraformed.go index cf1f2f3..df356be 100755 --- a/apis/slack/v1alpha1/zz_generated_terraformed.go +++ b/apis/slack/v1alpha1/zz_connection_terraformed.go @@ -7,10 +7,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Connection @@ -79,6 +80,36 @@ func (tr *Connection) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Connection +func (tr *Connection) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Connection using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Connection) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/slack/v1alpha1/zz_connection_types.go b/apis/slack/v1alpha1/zz_connection_types.go index b453f8d..0d69624 100755 --- a/apis/slack/v1alpha1/zz_connection_types.go +++ b/apis/slack/v1alpha1/zz_connection_types.go @@ -41,7 +41,7 @@ type ConfigParameters struct { // A list of strings to filter events by PagerDuty event type. "incident.triggered" is required. The follow event types are also possible: // +kubebuilder:validation:Optional - Events []*string `json:"events,omitempty" tf:"events,omitempty"` + Events []*string `json:"events" tf:"events,omitempty"` // Allows you to filter events by priority. Needs to be an array of PagerDuty priority IDs. Available through pagerduty_priority data source. // +kubebuilder:validation:Optional @@ -134,9 +134,8 @@ type ConnectionParameters struct { type ConnectionSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ConnectionParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -155,23 +154,24 @@ type ConnectionStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Connection is the Schema for the Connections API. Creates and manages a slack connection in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Connection struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.channelId) || has(self.initProvider.channelId)",message="channelId is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.config) || has(self.initProvider.config)",message="config is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.notificationType) || has(self.initProvider.notificationType)",message="notificationType is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.sourceId) || has(self.initProvider.sourceId)",message="sourceId is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.sourceType) || has(self.initProvider.sourceType)",message="sourceType is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.workspaceId) || has(self.initProvider.workspaceId)",message="workspaceId is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.channelId) || (has(self.initProvider) && has(self.initProvider.channelId))",message="spec.forProvider.channelId is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.config) || (has(self.initProvider) && has(self.initProvider.config))",message="spec.forProvider.config is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.notificationType) || (has(self.initProvider) && has(self.initProvider.notificationType))",message="spec.forProvider.notificationType is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.sourceId) || (has(self.initProvider) && has(self.initProvider.sourceId))",message="spec.forProvider.sourceId is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.sourceType) || (has(self.initProvider) && has(self.initProvider.sourceType))",message="spec.forProvider.sourceType is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.workspaceId) || (has(self.initProvider) && has(self.initProvider.workspaceId))",message="spec.forProvider.workspaceId is a required parameter" Spec ConnectionSpec `json:"spec"` Status ConnectionStatus `json:"status,omitempty"` } diff --git a/apis/slack/v1alpha1/zz_generated.conversion_hubs.go b/apis/slack/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..05a7396 --- /dev/null +++ b/apis/slack/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,10 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Connection) Hub() {} diff --git a/apis/slack/v1alpha1/zz_generated.deepcopy.go b/apis/slack/v1alpha1/zz_generated.deepcopy.go index e205a90..d7c3e5c 100644 --- a/apis/slack/v1alpha1/zz_generated.deepcopy.go +++ b/apis/slack/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. diff --git a/apis/slack/v1alpha1/zz_generated.managed.go b/apis/slack/v1alpha1/zz_generated.managed.go index c462c04..f7e4ec9 100644 --- a/apis/slack/v1alpha1/zz_generated.managed.go +++ b/apis/slack/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Connection) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Connection. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Connection) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Connection. func (mg *Connection) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Connection) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Connection. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Connection) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Connection. func (mg *Connection) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/tag/v1alpha1/zz_generated_terraformed.go b/apis/tag/v1alpha1/zz_assignment_terraformed.go similarity index 53% rename from apis/tag/v1alpha1/zz_generated_terraformed.go rename to apis/tag/v1alpha1/zz_assignment_terraformed.go index 7ca61b2..db21147 100755 --- a/apis/tag/v1alpha1/zz_generated_terraformed.go +++ b/apis/tag/v1alpha1/zz_assignment_terraformed.go @@ -7,96 +7,13 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) -// GetTerraformResourceType returns Terraform resource type for this Tag -func (mg *Tag) GetTerraformResourceType() string { - return "pagerduty_tag" -} - -// GetConnectionDetailsMapping for this Tag -func (tr *Tag) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this Tag -func (tr *Tag) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this Tag -func (tr *Tag) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this Tag -func (tr *Tag) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this Tag -func (tr *Tag) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this Tag -func (tr *Tag) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this Tag -func (tr *Tag) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this Tag using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *Tag) LateInitialize(attrs []byte) (bool, error) { - params := &TagParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Tag) GetTerraformSchemaVersion() int { - return 0 -} - // GetTerraformResourceType returns Terraform resource type for this Assignment func (mg *Assignment) GetTerraformResourceType() string { return "pagerduty_tag_assignment" @@ -163,6 +80,36 @@ func (tr *Assignment) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Assignment +func (tr *Assignment) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Assignment using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Assignment) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/tag/v1alpha1/zz_assignment_types.go b/apis/tag/v1alpha1/zz_assignment_types.go index ea30795..dbbbd91 100755 --- a/apis/tag/v1alpha1/zz_assignment_types.go +++ b/apis/tag/v1alpha1/zz_assignment_types.go @@ -59,9 +59,8 @@ type AssignmentParameters struct { type AssignmentSpec struct { v1.ResourceSpec `json:",inline"` ForProvider AssignmentParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -80,20 +79,21 @@ type AssignmentStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Assignment is the Schema for the Assignments API. Creates and manages a tag assignment in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Assignment struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.entityId) || has(self.initProvider.entityId)",message="entityId is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.entityType) || has(self.initProvider.entityType)",message="entityType is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.tagId) || has(self.initProvider.tagId)",message="tagId is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.entityId) || (has(self.initProvider) && has(self.initProvider.entityId))",message="spec.forProvider.entityId is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.entityType) || (has(self.initProvider) && has(self.initProvider.entityType))",message="spec.forProvider.entityType is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.tagId) || (has(self.initProvider) && has(self.initProvider.tagId))",message="spec.forProvider.tagId is a required parameter" Spec AssignmentSpec `json:"spec"` Status AssignmentStatus `json:"status,omitempty"` } diff --git a/apis/tag/v1alpha1/zz_generated.conversion_hubs.go b/apis/tag/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..7782267 --- /dev/null +++ b/apis/tag/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,13 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Tag) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *Assignment) Hub() {} diff --git a/apis/tag/v1alpha1/zz_generated.deepcopy.go b/apis/tag/v1alpha1/zz_generated.deepcopy.go index a269445..7b34e12 100644 --- a/apis/tag/v1alpha1/zz_generated.deepcopy.go +++ b/apis/tag/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. diff --git a/apis/tag/v1alpha1/zz_generated.managed.go b/apis/tag/v1alpha1/zz_generated.managed.go index 53bb871..a991548 100644 --- a/apis/tag/v1alpha1/zz_generated.managed.go +++ b/apis/tag/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Assignment) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Assignment. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Assignment) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Assignment. func (mg *Assignment) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Assignment) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Assignment. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Assignment) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Assignment. func (mg *Assignment) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -103,14 +87,6 @@ func (mg *Tag) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Tag. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Tag) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Tag. func (mg *Tag) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -141,14 +117,6 @@ func (mg *Tag) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Tag. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Tag) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Tag. func (mg *Tag) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/tag/v1alpha1/zz_tag_terraformed.go b/apis/tag/v1alpha1/zz_tag_terraformed.go new file mode 100755 index 0000000..c2b31bc --- /dev/null +++ b/apis/tag/v1alpha1/zz_tag_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Tag +func (mg *Tag) GetTerraformResourceType() string { + return "pagerduty_tag" +} + +// GetConnectionDetailsMapping for this Tag +func (tr *Tag) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Tag +func (tr *Tag) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Tag +func (tr *Tag) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Tag +func (tr *Tag) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Tag +func (tr *Tag) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Tag +func (tr *Tag) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Tag +func (tr *Tag) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Tag +func (tr *Tag) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Tag using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Tag) LateInitialize(attrs []byte) (bool, error) { + params := &TagParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Tag) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/tag/v1alpha1/zz_tag_types.go b/apis/tag/v1alpha1/zz_tag_types.go index f0a37ed..e60ca02 100755 --- a/apis/tag/v1alpha1/zz_tag_types.go +++ b/apis/tag/v1alpha1/zz_tag_types.go @@ -45,9 +45,8 @@ type TagParameters struct { type TagSpec struct { v1.ResourceSpec `json:",inline"` ForProvider TagParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -66,18 +65,19 @@ type TagStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Tag is the Schema for the Tags API. Creates and manages a tag in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Tag struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.label) || has(self.initProvider.label)",message="label is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.label) || (has(self.initProvider) && has(self.initProvider.label))",message="spec.forProvider.label is a required parameter" Spec TagSpec `json:"spec"` Status TagStatus `json:"status,omitempty"` } diff --git a/apis/team/v1alpha1/zz_generated.conversion_hubs.go b/apis/team/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..52354ef --- /dev/null +++ b/apis/team/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,13 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Team) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *Membership) Hub() {} diff --git a/apis/team/v1alpha1/zz_generated.deepcopy.go b/apis/team/v1alpha1/zz_generated.deepcopy.go index 5d0ee6e..ab1a1ee 100644 --- a/apis/team/v1alpha1/zz_generated.deepcopy.go +++ b/apis/team/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -49,6 +48,36 @@ func (in *MembershipInitParameters) DeepCopyInto(out *MembershipInitParameters) *out = new(string) **out = **in } + if in.TeamID != nil { + in, out := &in.TeamID, &out.TeamID + *out = new(string) + **out = **in + } + if in.TeamIDRef != nil { + in, out := &in.TeamIDRef, &out.TeamIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.TeamIDSelector != nil { + in, out := &in.TeamIDSelector, &out.TeamIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.UserID != nil { + in, out := &in.UserID, &out.UserID + *out = new(string) + **out = **in + } + if in.UserIDRef != nil { + in, out := &in.UserIDRef, &out.UserIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.UserIDSelector != nil { + in, out := &in.UserIDSelector, &out.UserIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MembershipInitParameters. @@ -243,6 +272,11 @@ func (in *Team) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TeamInitParameters) DeepCopyInto(out *TeamInitParameters) { *out = *in + if in.DefaultRole != nil { + in, out := &in.DefaultRole, &out.DefaultRole + *out = new(string) + **out = **in + } if in.Description != nil { in, out := &in.Description, &out.Description *out = new(string) @@ -305,6 +339,11 @@ func (in *TeamList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TeamObservation) DeepCopyInto(out *TeamObservation) { *out = *in + if in.DefaultRole != nil { + in, out := &in.DefaultRole, &out.DefaultRole + *out = new(string) + **out = **in + } if in.Description != nil { in, out := &in.Description, &out.Description *out = new(string) @@ -345,6 +384,11 @@ func (in *TeamObservation) DeepCopy() *TeamObservation { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TeamParameters) DeepCopyInto(out *TeamParameters) { *out = *in + if in.DefaultRole != nil { + in, out := &in.DefaultRole, &out.DefaultRole + *out = new(string) + **out = **in + } if in.Description != nil { in, out := &in.Description, &out.Description *out = new(string) diff --git a/apis/team/v1alpha1/zz_generated.managed.go b/apis/team/v1alpha1/zz_generated.managed.go index 163e6c0..1d1489d 100644 --- a/apis/team/v1alpha1/zz_generated.managed.go +++ b/apis/team/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Membership) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Membership. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Membership) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Membership. func (mg *Membership) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Membership) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Membership. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Membership) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Membership. func (mg *Membership) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -103,14 +87,6 @@ func (mg *Team) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Team. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Team) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Team. func (mg *Team) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -141,14 +117,6 @@ func (mg *Team) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Team. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Team) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Team. func (mg *Team) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/team/v1alpha1/zz_generated.resolvers.go b/apis/team/v1alpha1/zz_generated.resolvers.go index 276a6d2..21bb43b 100644 --- a/apis/team/v1alpha1/zz_generated.resolvers.go +++ b/apis/team/v1alpha1/zz_generated.resolvers.go @@ -52,5 +52,37 @@ func (mg *Membership) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.UserID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserIDRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.TeamID), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.TeamIDRef, + Selector: mg.Spec.InitProvider.TeamIDSelector, + To: reference.To{ + List: &TeamList{}, + Managed: &Team{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.TeamID") + } + mg.Spec.InitProvider.TeamID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.TeamIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.UserID), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.UserIDRef, + Selector: mg.Spec.InitProvider.UserIDSelector, + To: reference.To{ + List: &v1alpha1.UserList{}, + Managed: &v1alpha1.User{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.UserID") + } + mg.Spec.InitProvider.UserID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.UserIDRef = rsp.ResolvedReference + return nil } diff --git a/apis/team/v1alpha1/zz_generated_terraformed.go b/apis/team/v1alpha1/zz_membership_terraformed.go similarity index 53% rename from apis/team/v1alpha1/zz_generated_terraformed.go rename to apis/team/v1alpha1/zz_membership_terraformed.go index dd7124a..fcb7d1c 100755 --- a/apis/team/v1alpha1/zz_generated_terraformed.go +++ b/apis/team/v1alpha1/zz_membership_terraformed.go @@ -7,96 +7,13 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) -// GetTerraformResourceType returns Terraform resource type for this Team -func (mg *Team) GetTerraformResourceType() string { - return "pagerduty_team" -} - -// GetConnectionDetailsMapping for this Team -func (tr *Team) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this Team -func (tr *Team) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this Team -func (tr *Team) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this Team -func (tr *Team) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this Team -func (tr *Team) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this Team -func (tr *Team) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this Team -func (tr *Team) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this Team using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *Team) LateInitialize(attrs []byte) (bool, error) { - params := &TeamParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Team) GetTerraformSchemaVersion() int { - return 0 -} - // GetTerraformResourceType returns Terraform resource type for this Membership func (mg *Membership) GetTerraformResourceType() string { return "pagerduty_team_membership" @@ -163,6 +80,36 @@ func (tr *Membership) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Membership +func (tr *Membership) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Membership using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Membership) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/team/v1alpha1/zz_membership_types.go b/apis/team/v1alpha1/zz_membership_types.go index 7c41428..3354f6e 100755 --- a/apis/team/v1alpha1/zz_membership_types.go +++ b/apis/team/v1alpha1/zz_membership_types.go @@ -18,6 +18,30 @@ type MembershipInitParameters struct { // The role of the user in the team. One of observer, responder, or manager. Defaults to manager. // These roles match up to user roles in the following ways: Role *string `json:"role,omitempty" tf:"role,omitempty"` + + // The ID of the team in which the user will belong. + // +crossplane:generate:reference:type=Team + TeamID *string `json:"teamId,omitempty" tf:"team_id,omitempty"` + + // Reference to a Team to populate teamId. + // +kubebuilder:validation:Optional + TeamIDRef *v1.Reference `json:"teamIdRef,omitempty" tf:"-"` + + // Selector for a Team to populate teamId. + // +kubebuilder:validation:Optional + TeamIDSelector *v1.Selector `json:"teamIdSelector,omitempty" tf:"-"` + + // The ID of the user to add to the team. + // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/user/v1alpha1.User + UserID *string `json:"userId,omitempty" tf:"user_id,omitempty"` + + // Reference to a User in user to populate userId. + // +kubebuilder:validation:Optional + UserIDRef *v1.Reference `json:"userIdRef,omitempty" tf:"-"` + + // Selector for a User in user to populate userId. + // +kubebuilder:validation:Optional + UserIDSelector *v1.Selector `json:"userIdSelector,omitempty" tf:"-"` } type MembershipObservation struct { @@ -72,9 +96,8 @@ type MembershipParameters struct { type MembershipSpec struct { v1.ResourceSpec `json:",inline"` ForProvider MembershipParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -93,13 +116,14 @@ type MembershipStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Membership is the Schema for the Memberships API. Creates and manages a team membership in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Membership struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/team/v1alpha1/zz_team_terraformed.go b/apis/team/v1alpha1/zz_team_terraformed.go new file mode 100755 index 0000000..9bd1641 --- /dev/null +++ b/apis/team/v1alpha1/zz_team_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Team +func (mg *Team) GetTerraformResourceType() string { + return "pagerduty_team" +} + +// GetConnectionDetailsMapping for this Team +func (tr *Team) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Team +func (tr *Team) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Team +func (tr *Team) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Team +func (tr *Team) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Team +func (tr *Team) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Team +func (tr *Team) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Team +func (tr *Team) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Team +func (tr *Team) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Team using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Team) LateInitialize(attrs []byte) (bool, error) { + params := &TeamParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Team) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/team/v1alpha1/zz_team_types.go b/apis/team/v1alpha1/zz_team_types.go index 528ff06..8eea279 100755 --- a/apis/team/v1alpha1/zz_team_types.go +++ b/apis/team/v1alpha1/zz_team_types.go @@ -15,6 +15,9 @@ import ( type TeamInitParameters struct { + // The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager"). + DefaultRole *string `json:"defaultRole,omitempty" tf:"default_role,omitempty"` + // A human-friendly description of the team. Description *string `json:"description,omitempty" tf:"description,omitempty"` @@ -27,6 +30,9 @@ type TeamInitParameters struct { type TeamObservation struct { + // The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager"). + DefaultRole *string `json:"defaultRole,omitempty" tf:"default_role,omitempty"` + // A human-friendly description of the team. Description *string `json:"description,omitempty" tf:"description,omitempty"` @@ -45,6 +51,10 @@ type TeamObservation struct { type TeamParameters struct { + // The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager"). + // +kubebuilder:validation:Optional + DefaultRole *string `json:"defaultRole,omitempty" tf:"default_role,omitempty"` + // A human-friendly description of the team. // +kubebuilder:validation:Optional Description *string `json:"description,omitempty" tf:"description,omitempty"` @@ -62,9 +72,8 @@ type TeamParameters struct { type TeamSpec struct { v1.ResourceSpec `json:",inline"` ForProvider TeamParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -83,18 +92,19 @@ type TeamStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Team is the Schema for the Teams API. Creates and manages a team in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Team struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || has(self.initProvider.name)",message="name is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" Spec TeamSpec `json:"spec"` Status TeamStatus `json:"status,omitempty"` } diff --git a/apis/user/v1alpha1/zz_contactmethod_terraformed.go b/apis/user/v1alpha1/zz_contactmethod_terraformed.go new file mode 100755 index 0000000..12c4ec6 --- /dev/null +++ b/apis/user/v1alpha1/zz_contactmethod_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this ContactMethod +func (mg *ContactMethod) GetTerraformResourceType() string { + return "pagerduty_user_contact_method" +} + +// GetConnectionDetailsMapping for this ContactMethod +func (tr *ContactMethod) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this ContactMethod +func (tr *ContactMethod) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this ContactMethod +func (tr *ContactMethod) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this ContactMethod +func (tr *ContactMethod) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this ContactMethod +func (tr *ContactMethod) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this ContactMethod +func (tr *ContactMethod) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this ContactMethod +func (tr *ContactMethod) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ContactMethod +func (tr *ContactMethod) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this ContactMethod using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *ContactMethod) LateInitialize(attrs []byte) (bool, error) { + params := &ContactMethodParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *ContactMethod) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/user/v1alpha1/zz_contactmethod_types.go b/apis/user/v1alpha1/zz_contactmethod_types.go index 1e027bd..0f2d639 100755 --- a/apis/user/v1alpha1/zz_contactmethod_types.go +++ b/apis/user/v1alpha1/zz_contactmethod_types.go @@ -29,6 +29,18 @@ type ContactMethodInitParameters struct { // The contact method type. May be (email_contact_method, phone_contact_method, sms_contact_method, push_notification_contact_method). Type *string `json:"type,omitempty" tf:"type,omitempty"` + + // The ID of the user. + // +crossplane:generate:reference:type=User + UserID *string `json:"userId,omitempty" tf:"user_id,omitempty"` + + // Reference to a User to populate userId. + // +kubebuilder:validation:Optional + UserIDRef *v1.Reference `json:"userIdRef,omitempty" tf:"-"` + + // Selector for a User to populate userId. + // +kubebuilder:validation:Optional + UserIDSelector *v1.Selector `json:"userIdSelector,omitempty" tf:"-"` } type ContactMethodObservation struct { @@ -101,9 +113,8 @@ type ContactMethodParameters struct { type ContactMethodSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ContactMethodParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -122,20 +133,21 @@ type ContactMethodStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // ContactMethod is the Schema for the ContactMethods API. Creates and manages contact methods for a user in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type ContactMethod struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.address) || has(self.initProvider.address)",message="address is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.label) || has(self.initProvider.label)",message="label is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.type) || has(self.initProvider.type)",message="type is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.address) || (has(self.initProvider) && has(self.initProvider.address))",message="spec.forProvider.address is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.label) || (has(self.initProvider) && has(self.initProvider.label))",message="spec.forProvider.label is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.type) || (has(self.initProvider) && has(self.initProvider.type))",message="spec.forProvider.type is a required parameter" Spec ContactMethodSpec `json:"spec"` Status ContactMethodStatus `json:"status,omitempty"` } diff --git a/apis/user/v1alpha1/zz_generated.conversion_hubs.go b/apis/user/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..bf2c7f3 --- /dev/null +++ b/apis/user/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,16 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *User) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *ContactMethod) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *NotificationRule) Hub() {} diff --git a/apis/user/v1alpha1/zz_generated.deepcopy.go b/apis/user/v1alpha1/zz_generated.deepcopy.go index df2fb54..99c78a6 100644 --- a/apis/user/v1alpha1/zz_generated.deepcopy.go +++ b/apis/user/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -69,6 +68,21 @@ func (in *ContactMethodInitParameters) DeepCopyInto(out *ContactMethodInitParame *out = new(string) **out = **in } + if in.UserID != nil { + in, out := &in.UserID, &out.UserID + *out = new(string) + **out = **in + } + if in.UserIDRef != nil { + in, out := &in.UserIDRef, &out.UserIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.UserIDSelector != nil { + in, out := &in.UserIDSelector, &out.UserIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContactMethodInitParameters. @@ -301,7 +315,8 @@ func (in *NotificationRuleInitParameters) DeepCopyInto(out *NotificationRuleInit if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -318,6 +333,21 @@ func (in *NotificationRuleInitParameters) DeepCopyInto(out *NotificationRuleInit *out = new(string) **out = **in } + if in.UserID != nil { + in, out := &in.UserID, &out.UserID + *out = new(string) + **out = **in + } + if in.UserIDRef != nil { + in, out := &in.UserIDRef, &out.UserIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.UserIDSelector != nil { + in, out := &in.UserIDSelector, &out.UserIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationRuleInitParameters. @@ -373,7 +403,8 @@ func (in *NotificationRuleObservation) DeepCopyInto(out *NotificationRuleObserva if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } @@ -423,7 +454,8 @@ func (in *NotificationRuleParameters) DeepCopyInto(out *NotificationRuleParamete if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(string) **out = **in } diff --git a/apis/user/v1alpha1/zz_generated.managed.go b/apis/user/v1alpha1/zz_generated.managed.go index 117be49..5664870 100644 --- a/apis/user/v1alpha1/zz_generated.managed.go +++ b/apis/user/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *ContactMethod) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ContactMethod. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ContactMethod) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ContactMethod. func (mg *ContactMethod) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *ContactMethod) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ContactMethod. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ContactMethod) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ContactMethod. func (mg *ContactMethod) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -103,14 +87,6 @@ func (mg *NotificationRule) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this NotificationRule. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *NotificationRule) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this NotificationRule. func (mg *NotificationRule) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -141,14 +117,6 @@ func (mg *NotificationRule) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this NotificationRule. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *NotificationRule) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this NotificationRule. func (mg *NotificationRule) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -179,14 +147,6 @@ func (mg *User) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this User. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *User) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this User. func (mg *User) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -217,14 +177,6 @@ func (mg *User) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this User. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *User) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this User. func (mg *User) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/user/v1alpha1/zz_generated.resolvers.go b/apis/user/v1alpha1/zz_generated.resolvers.go index 1069d7e..30823ee 100644 --- a/apis/user/v1alpha1/zz_generated.resolvers.go +++ b/apis/user/v1alpha1/zz_generated.resolvers.go @@ -35,6 +35,22 @@ func (mg *ContactMethod) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.UserID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserIDRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.UserID), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.UserIDRef, + Selector: mg.Spec.InitProvider.UserIDSelector, + To: reference.To{ + List: &UserList{}, + Managed: &User{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.UserID") + } + mg.Spec.InitProvider.UserID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.UserIDRef = rsp.ResolvedReference + return nil } @@ -61,5 +77,21 @@ func (mg *NotificationRule) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.UserID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserIDRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.UserID), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.UserIDRef, + Selector: mg.Spec.InitProvider.UserIDSelector, + To: reference.To{ + List: &UserList{}, + Managed: &User{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.UserID") + } + mg.Spec.InitProvider.UserID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.UserIDRef = rsp.ResolvedReference + return nil } diff --git a/apis/user/v1alpha1/zz_generated_terraformed.go b/apis/user/v1alpha1/zz_generated_terraformed.go deleted file mode 100755 index 3eb29d4..0000000 --- a/apis/user/v1alpha1/zz_generated_terraformed.go +++ /dev/null @@ -1,266 +0,0 @@ -/* -Copyright 2022 Upbound Inc. -*/ - -// Code generated by upjet. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/pkg/errors" - - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" -) - -// GetTerraformResourceType returns Terraform resource type for this User -func (mg *User) GetTerraformResourceType() string { - return "pagerduty_user" -} - -// GetConnectionDetailsMapping for this User -func (tr *User) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this User -func (tr *User) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this User -func (tr *User) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this User -func (tr *User) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this User -func (tr *User) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this User -func (tr *User) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this User -func (tr *User) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this User using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *User) LateInitialize(attrs []byte) (bool, error) { - params := &UserParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *User) GetTerraformSchemaVersion() int { - return 0 -} - -// GetTerraformResourceType returns Terraform resource type for this ContactMethod -func (mg *ContactMethod) GetTerraformResourceType() string { - return "pagerduty_user_contact_method" -} - -// GetConnectionDetailsMapping for this ContactMethod -func (tr *ContactMethod) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this ContactMethod -func (tr *ContactMethod) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this ContactMethod -func (tr *ContactMethod) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this ContactMethod -func (tr *ContactMethod) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this ContactMethod -func (tr *ContactMethod) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this ContactMethod -func (tr *ContactMethod) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this ContactMethod -func (tr *ContactMethod) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this ContactMethod using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *ContactMethod) LateInitialize(attrs []byte) (bool, error) { - params := &ContactMethodParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *ContactMethod) GetTerraformSchemaVersion() int { - return 0 -} - -// GetTerraformResourceType returns Terraform resource type for this NotificationRule -func (mg *NotificationRule) GetTerraformResourceType() string { - return "pagerduty_user_notification_rule" -} - -// GetConnectionDetailsMapping for this NotificationRule -func (tr *NotificationRule) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this NotificationRule -func (tr *NotificationRule) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this NotificationRule -func (tr *NotificationRule) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this NotificationRule -func (tr *NotificationRule) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this NotificationRule -func (tr *NotificationRule) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this NotificationRule -func (tr *NotificationRule) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this NotificationRule -func (tr *NotificationRule) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this NotificationRule using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *NotificationRule) LateInitialize(attrs []byte) (bool, error) { - params := &NotificationRuleParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *NotificationRule) GetTerraformSchemaVersion() int { - return 0 -} diff --git a/apis/user/v1alpha1/zz_notificationrule_terraformed.go b/apis/user/v1alpha1/zz_notificationrule_terraformed.go new file mode 100755 index 0000000..31b301b --- /dev/null +++ b/apis/user/v1alpha1/zz_notificationrule_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this NotificationRule +func (mg *NotificationRule) GetTerraformResourceType() string { + return "pagerduty_user_notification_rule" +} + +// GetConnectionDetailsMapping for this NotificationRule +func (tr *NotificationRule) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this NotificationRule +func (tr *NotificationRule) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this NotificationRule +func (tr *NotificationRule) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this NotificationRule +func (tr *NotificationRule) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this NotificationRule +func (tr *NotificationRule) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this NotificationRule +func (tr *NotificationRule) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this NotificationRule +func (tr *NotificationRule) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this NotificationRule +func (tr *NotificationRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this NotificationRule using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *NotificationRule) LateInitialize(attrs []byte) (bool, error) { + params := &NotificationRuleParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *NotificationRule) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/user/v1alpha1/zz_notificationrule_types.go b/apis/user/v1alpha1/zz_notificationrule_types.go index 7d54e85..71be54e 100755 --- a/apis/user/v1alpha1/zz_notificationrule_types.go +++ b/apis/user/v1alpha1/zz_notificationrule_types.go @@ -16,6 +16,7 @@ import ( type NotificationRuleInitParameters struct { // A contact method block, configured as a block described below. + // +mapType=granular ContactMethod map[string]*string `json:"contactMethod,omitempty" tf:"contact_method,omitempty"` // The delay before firing the rule, in minutes. @@ -23,11 +24,24 @@ type NotificationRuleInitParameters struct { // Which incident urgency this rule is used for. Account must have the urgencies ability to have a low urgency notification rule. Can be high or low. Urgency *string `json:"urgency,omitempty" tf:"urgency,omitempty"` + + // The ID of the user. + // +crossplane:generate:reference:type=User + UserID *string `json:"userId,omitempty" tf:"user_id,omitempty"` + + // Reference to a User to populate userId. + // +kubebuilder:validation:Optional + UserIDRef *v1.Reference `json:"userIdRef,omitempty" tf:"-"` + + // Selector for a User to populate userId. + // +kubebuilder:validation:Optional + UserIDSelector *v1.Selector `json:"userIdSelector,omitempty" tf:"-"` } type NotificationRuleObservation struct { // A contact method block, configured as a block described below. + // +mapType=granular ContactMethod map[string]*string `json:"contactMethod,omitempty" tf:"contact_method,omitempty"` // The id of the referenced contact method. @@ -47,6 +61,7 @@ type NotificationRuleParameters struct { // A contact method block, configured as a block described below. // +kubebuilder:validation:Optional + // +mapType=granular ContactMethod map[string]*string `json:"contactMethod,omitempty" tf:"contact_method,omitempty"` // The delay before firing the rule, in minutes. @@ -75,9 +90,8 @@ type NotificationRuleParameters struct { type NotificationRuleSpec struct { v1.ResourceSpec `json:",inline"` ForProvider NotificationRuleParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -96,20 +110,21 @@ type NotificationRuleStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // NotificationRule is the Schema for the NotificationRules API. Creates and manages notification rules for a user in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type NotificationRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.contactMethod) || has(self.initProvider.contactMethod)",message="contactMethod is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startDelayInMinutes) || has(self.initProvider.startDelayInMinutes)",message="startDelayInMinutes is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.urgency) || has(self.initProvider.urgency)",message="urgency is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.contactMethod) || (has(self.initProvider) && has(self.initProvider.contactMethod))",message="spec.forProvider.contactMethod is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startDelayInMinutes) || (has(self.initProvider) && has(self.initProvider.startDelayInMinutes))",message="spec.forProvider.startDelayInMinutes is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.urgency) || (has(self.initProvider) && has(self.initProvider.urgency))",message="spec.forProvider.urgency is a required parameter" Spec NotificationRuleSpec `json:"spec"` Status NotificationRuleStatus `json:"status,omitempty"` } diff --git a/apis/user/v1alpha1/zz_user_terraformed.go b/apis/user/v1alpha1/zz_user_terraformed.go new file mode 100755 index 0000000..d69c377 --- /dev/null +++ b/apis/user/v1alpha1/zz_user_terraformed.go @@ -0,0 +1,129 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this User +func (mg *User) GetTerraformResourceType() string { + return "pagerduty_user" +} + +// GetConnectionDetailsMapping for this User +func (tr *User) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this User +func (tr *User) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this User +func (tr *User) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this User +func (tr *User) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this User +func (tr *User) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this User +func (tr *User) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this User +func (tr *User) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this User +func (tr *User) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this User using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *User) LateInitialize(attrs []byte) (bool, error) { + params := &UserParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *User) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/user/v1alpha1/zz_user_types.go b/apis/user/v1alpha1/zz_user_types.go index fe29178..6a24106 100755 --- a/apis/user/v1alpha1/zz_user_types.go +++ b/apis/user/v1alpha1/zz_user_types.go @@ -78,6 +78,7 @@ type UserObservation struct { Role *string `json:"role,omitempty" tf:"role,omitempty"` // A list of teams the user should belong to. Please use pagerduty_team_membership instead. + // +listType=set Teams []*string `json:"teams,omitempty" tf:"teams,omitempty"` // The time zone of the user. Default is account default timezone. @@ -124,9 +125,8 @@ type UserParameters struct { type UserSpec struct { v1.ResourceSpec `json:",inline"` ForProvider UserParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -145,19 +145,20 @@ type UserStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // User is the Schema for the Users API. Creates and manages a user in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type User struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.email) || has(self.initProvider.email)",message="email is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || has(self.initProvider.name)",message="name is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.email) || (has(self.initProvider) && has(self.initProvider.email))",message="spec.forProvider.email is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" Spec UserSpec `json:"spec"` Status UserStatus `json:"status,omitempty"` } diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 9d284ba..86f2d29 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. diff --git a/apis/v1beta1/zz_generated.deepcopy.go b/apis/v1beta1/zz_generated.deepcopy.go index ae71405..09df2c1 100644 --- a/apis/v1beta1/zz_generated.deepcopy.go +++ b/apis/v1beta1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. diff --git a/apis/webhook/v1alpha1/zz_generated.conversion_hubs.go b/apis/webhook/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..cacd59f --- /dev/null +++ b/apis/webhook/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,10 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Subscription) Hub() {} diff --git a/apis/webhook/v1alpha1/zz_generated.deepcopy.go b/apis/webhook/v1alpha1/zz_generated.deepcopy.go index 6d6beeb..7f56e26 100644 --- a/apis/webhook/v1alpha1/zz_generated.deepcopy.go +++ b/apis/webhook/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. diff --git a/apis/webhook/v1alpha1/zz_generated.managed.go b/apis/webhook/v1alpha1/zz_generated.managed.go index 317429c..b3642ec 100644 --- a/apis/webhook/v1alpha1/zz_generated.managed.go +++ b/apis/webhook/v1alpha1/zz_generated.managed.go @@ -27,14 +27,6 @@ func (mg *Subscription) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Subscription. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Subscription) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Subscription. func (mg *Subscription) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -65,14 +57,6 @@ func (mg *Subscription) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Subscription. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Subscription) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Subscription. func (mg *Subscription) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/webhook/v1alpha1/zz_generated_terraformed.go b/apis/webhook/v1alpha1/zz_subscription_terraformed.go similarity index 70% rename from apis/webhook/v1alpha1/zz_generated_terraformed.go rename to apis/webhook/v1alpha1/zz_subscription_terraformed.go index be144bb..f7bb526 100755 --- a/apis/webhook/v1alpha1/zz_generated_terraformed.go +++ b/apis/webhook/v1alpha1/zz_subscription_terraformed.go @@ -7,10 +7,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Subscription @@ -79,6 +80,36 @@ func (tr *Subscription) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Subscription +func (tr *Subscription) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Subscription using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Subscription) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/webhook/v1alpha1/zz_subscription_types.go b/apis/webhook/v1alpha1/zz_subscription_types.go index 0ef29a6..a869468 100755 --- a/apis/webhook/v1alpha1/zz_subscription_types.go +++ b/apis/webhook/v1alpha1/zz_subscription_types.go @@ -28,10 +28,10 @@ type CustomHeaderObservation struct { type CustomHeaderParameters struct { // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` + Name *string `json:"name" tf:"name,omitempty"` // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty" tf:"value,omitempty"` + Value *string `json:"value" tf:"value,omitempty"` } type DeliveryMethodInitParameters struct { @@ -109,7 +109,7 @@ type FilterParameters struct { // The type indicating the schema of the object. The provider sets this as webhook_subscription, which is currently the only acceptable value. // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + Type *string `json:"type" tf:"type,omitempty"` } type SubscriptionInitParameters struct { @@ -188,9 +188,8 @@ type SubscriptionParameters struct { type SubscriptionSpec struct { v1.ResourceSpec `json:",inline"` ForProvider SubscriptionParameters `json:"forProvider"` - // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored - // unless the relevant Crossplane feature flag is enabled, and may be - // changed or removed without notice. + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception // of Identifier and other resource reference fields. The fields that are // in InitProvider are merged into ForProvider when the resource is created. @@ -209,20 +208,21 @@ type SubscriptionStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Subscription is the Schema for the Subscriptions API. Creates and manages a webhook subscription in PagerDuty. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} type Subscription struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.deliveryMethod) || has(self.initProvider.deliveryMethod)",message="deliveryMethod is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.events) || has(self.initProvider.events)",message="events is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.filter) || has(self.initProvider.filter)",message="filter is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.deliveryMethod) || (has(self.initProvider) && has(self.initProvider.deliveryMethod))",message="spec.forProvider.deliveryMethod is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.events) || (has(self.initProvider) && has(self.initProvider.events))",message="spec.forProvider.events is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.filter) || (has(self.initProvider) && has(self.initProvider.filter))",message="spec.forProvider.filter is a required parameter" Spec SubscriptionSpec `json:"spec"` Status SubscriptionStatus `json:"status,omitempty"` } diff --git a/build b/build index 0d8822d..75a9fe3 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit 0d8822d9deb275245b0500874fee9e5a2e37d814 +Subproject commit 75a9fe3ae6b6de82c5f7ddc6a267617940f16b83 diff --git a/cmd/generator/main.go b/cmd/generator/main.go index 0edc2c2..7f9a9ee 100644 --- a/cmd/generator/main.go +++ b/cmd/generator/main.go @@ -9,7 +9,7 @@ import ( "os" "path/filepath" - "github.com/upbound/upjet/pkg/pipeline" + "github.com/crossplane/upjet/pkg/pipeline" "github.com/crossplane-contrib/provider-pagerduty/config" ) diff --git a/cmd/provider/main.go b/cmd/provider/main.go index d4999bb..54c1556 100644 --- a/cmd/provider/main.go +++ b/cmd/provider/main.go @@ -13,19 +13,20 @@ import ( "time" xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + "github.com/crossplane/crossplane-runtime/pkg/certificates" xpcontroller "github.com/crossplane/crossplane-runtime/pkg/controller" "github.com/crossplane/crossplane-runtime/pkg/feature" "github.com/crossplane/crossplane-runtime/pkg/logging" "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/controller/handler" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/leaderelection/resourcelock" ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/log/zap" "github.com/crossplane-contrib/provider-pagerduty/apis" @@ -38,19 +39,20 @@ import ( func main() { var ( - app = kingpin.New(filepath.Base(os.Args[0]), "Terraform based Crossplane provider for PagerDuty").DefaultEnvars() - debug = app.Flag("debug", "Run with debug logging.").Short('d').Bool() - syncPeriod = app.Flag("sync", "Controller manager sync period such as 300ms, 1.5h, or 2h45m").Short('s').Default("1h").Duration() - pollInterval = app.Flag("poll", "Poll interval controls how often an individual resource should be checked for drift.").Default("10m").Duration() - leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool() - maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("10").Int() - nativeProviderSource = app.Flag("terraform-provider-source", "Terraform provider source.").Required().Envar("TERRAFORM_PROVIDER_SOURCE").String() - terraformVersion = app.Flag("terraform-version", "Terraform version.").Required().Envar("TERRAFORM_VERSION").String() - providerVersion = app.Flag("terraform-provider-version", "Terraform provider version.").Required().Envar("TERRAFORM_PROVIDER_VERSION").String() + app = kingpin.New(filepath.Base(os.Args[0]), "Terraform based Crossplane provider for PagerDuty").DefaultEnvars() + debug = app.Flag("debug", "Run with debug logging.").Short('d').Bool() + syncInterval = app.Flag("sync", "Sync interval controls how often all resources will be double checked for drift.").Short('s').Default("1h").Duration() + pollInterval = app.Flag("poll", "Poll interval controls how often an individual resource should be checked for drift.").Default("10m").Duration() + leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool() + terraformVersion = app.Flag("terraform-version", "Terraform version.").Required().Envar("TERRAFORM_VERSION").String() + providerSource = app.Flag("terraform-provider-source", "Terraform provider source.").Required().Envar("TERRAFORM_PROVIDER_SOURCE").String() + providerVersion = app.Flag("terraform-provider-version", "Terraform provider version.").Required().Envar("TERRAFORM_PROVIDER_VERSION").String() + maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may checked for drift from the desired state.").Default("10").Int() namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String() + essTLSCertsPath = app.Flag("ess-tls-cert-dir", "Path of ESS TLS certificates.").Envar("ESS_TLS_CERTS_DIR").String() enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool() - enableManagementPolicies = app.Flag("enable-management-policies", "Enable support for Management Policies.").Default("false").Envar("ENABLE_MANAGEMENT_POLICIES").Bool() + enableManagementPolicies = app.Flag("enable-management-policies", "Enable support for Management Policies.").Default("true").Envar("ENABLE_MANAGEMENT_POLICIES").Bool() ) kingpin.MustParse(app.Parse(os.Args[1:])) @@ -67,15 +69,20 @@ func main() { ctrl.SetLogger(zl) } - log.Debug("Starting", "sync-period", syncPeriod.String(), "poll-interval", pollInterval.String(), "max-reconcile-rate", *maxReconcileRate) + // currently, we configure the jitter to be the 5% of the poll interval + pollJitter := time.Duration(float64(*pollInterval) * 0.05) + log.Debug("Starting", "sync-interval", syncInterval.String(), + "poll-interval", pollInterval.String(), "poll-jitter", pollJitter, "max-reconcile-rate", *maxReconcileRate) cfg, err := ctrl.GetConfig() kingpin.FatalIfError(err, "Cannot get API server rest config") mgr, err := ctrl.NewManager(cfg, ctrl.Options{ - LeaderElection: *leaderElection, - LeaderElectionID: "crossplane-leader-election-provider-pagerduty", - SyncPeriod: syncPeriod, + LeaderElection: *leaderElection, + LeaderElectionID: "crossplane-leader-election-provider-pagerduty", + Cache: cache.Options{ + SyncPeriod: syncInterval, + }, LeaderElectionResourceLock: resourcelock.LeasesResourceLock, LeaseDuration: func() *time.Duration { d := 60 * time.Second; return &d }(), RenewDeadline: func() *time.Duration { d := 50 * time.Second; return &d }(), @@ -93,15 +100,29 @@ func main() { Features: featureFlags, }, Provider: config.GetProvider(), - SetupFn: clients.TerraformSetupBuilder(*terraformVersion, *nativeProviderSource, *providerVersion), + SetupFn: clients.TerraformSetupBuilder(*terraformVersion, *providerSource, *providerVersion), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithFeatures(featureFlags)), - EventHandler: handler.NewEventHandler(), + PollJitter: pollJitter, + } + + if *enableManagementPolicies { + o.Features.Enable(features.EnableBetaManagementPolicies) + log.Info("Beta feature enabled", "flag", features.EnableBetaManagementPolicies) } if *enableExternalSecretStores { o.SecretStoreConfigGVK = &v1alpha1.StoreConfigGroupVersionKind log.Info("Alpha feature enabled", "flag", features.EnableAlphaExternalSecretStores) + o.ESSOptions = &tjcontroller.ESSOptions{} + if *essTLSCertsPath != "" { + log.Info("ESS TLS certificates path is set. Loading mTLS configuration.") + tCfg, err := certificates.LoadMTLSConfig(filepath.Join(*essTLSCertsPath, "ca.crt"), filepath.Join(*essTLSCertsPath, "tls.crt"), filepath.Join(*essTLSCertsPath, "tls.key"), false) + kingpin.FatalIfError(err, "Cannot load ESS TLS config.") + + o.ESSOptions.TLSConfig = tCfg + } + // Ensure default store config exists. kingpin.FatalIfError(resource.Ignore(kerrors.IsAlreadyExists, mgr.GetClient().Create(context.Background(), &v1alpha1.StoreConfig{ ObjectMeta: metav1.ObjectMeta{ @@ -117,11 +138,6 @@ func main() { })), "cannot create default store config") } - if *enableManagementPolicies { - o.Features.Enable(features.EnableAlphaManagementPolicies) - log.Info("Alpha feature enabled", "flag", features.EnableAlphaManagementPolicies) - } - kingpin.FatalIfError(controller.Setup(mgr, o), "Cannot setup PagerDuty controllers") kingpin.FatalIfError(mgr.Start(ctrl.SetupSignalHandler()), "Cannot start controller manager") } diff --git a/config/addon/config.go b/config/addon/config.go index e67a43e..c261007 100644 --- a/config/addon/config.go +++ b/config/addon/config.go @@ -1,6 +1,6 @@ package addon -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/business/config.go b/config/business/config.go index bd93cbb..9aa6a03 100644 --- a/config/business/config.go +++ b/config/business/config.go @@ -1,6 +1,6 @@ package business -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/escalation/config.go b/config/escalation/config.go index afe945a..26dfe48 100644 --- a/config/escalation/config.go +++ b/config/escalation/config.go @@ -1,6 +1,6 @@ package slack -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/event/config.go b/config/event/config.go index 9963665..af0d661 100644 --- a/config/event/config.go +++ b/config/event/config.go @@ -1,6 +1,6 @@ package event -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/extensions/config.go b/config/extensions/config.go index 41c35a2..5ea1292 100644 --- a/config/extensions/config.go +++ b/config/extensions/config.go @@ -1,6 +1,6 @@ package extensions -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/external_name.go b/config/external_name.go index f453d5e..f9db42b 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -4,7 +4,7 @@ Copyright 2022 Upbound Inc. package config -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // ExternalNameConfigs contains all external name configurations for this // provider. diff --git a/config/maintenance/config.go b/config/maintenance/config.go index fd4bcb5..3e06733 100644 --- a/config/maintenance/config.go +++ b/config/maintenance/config.go @@ -1,6 +1,6 @@ package maintenance -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/provider-metadata.yaml b/config/provider-metadata.yaml index c247b62..56701c5 100644 --- a/config/provider-metadata.yaml +++ b/config/provider-metadata.yaml @@ -322,186 +322,6 @@ resources: subscriber_id: '- (Required) The ID of the subscriber entity.' subscriber_type: '- (Required) Type of subscriber entity in the subscriber assignment. Possible values can be user and team.' importStatements: [] - pagerduty_custom_field: - subCategory: "" - description: Creates and manages a custom field in PagerDuty. - name: pagerduty_custom_field - title: pagerduty_custom_field - examples: - - name: cs_impact - manifest: |- - { - "datatype": "string", - "name": "impact" - } - - name: sre_environment - manifest: |- - { - "datatype": "string", - "fixed_options": true, - "name": "environment" - } - argumentDocs: - datatype: argument has been renamed data_type to match the Public API for the Custom Fields on Incidents feature. - fixed_options: '- (Optional) True if the field can only accept values from a set of options.' - id: '- The ID of the field.' - multi_value: |- - and fixed_options arguments have been merged into a single argument - named field_type. - name: '- (Required) The name of the field.' - importStatements: [] - pagerduty_custom_field_option: - subCategory: "" - description: Creates and manages a custom field option in PagerDuty. - name: pagerduty_custom_field_option - title: pagerduty_custom_field_option - examples: - - name: dev_environment - manifest: |- - { - "datatype": "string", - "field": "${pagerduty_custom_field.sre_environment.id}", - "value": "dev" - } - references: - field: pagerduty_custom_field.sre_environment.id - dependencies: - pagerduty_custom_field.sre_environment: |- - { - "datatype": "string", - "fixed_options": true, - "name": "environment" - } - - name: stage_environment - manifest: |- - { - "datatype": "string", - "field": "${pagerduty_custom_field.sre_environment.id}", - "value": "stage" - } - references: - field: pagerduty_custom_field.sre_environment.id - dependencies: - pagerduty_custom_field.sre_environment: |- - { - "datatype": "string", - "fixed_options": true, - "name": "environment" - } - - name: prod_environment - manifest: |- - { - "datatype": "string", - "field": "${pagerduty_custom_field.sre_environment.id}", - "value": "prod" - } - references: - field: pagerduty_custom_field.sre_environment.id - dependencies: - pagerduty_custom_field.sre_environment: |- - { - "datatype": "string", - "fixed_options": true, - "name": "environment" - } - argumentDocs: - datatype: '- (Required) The datatype of the field option. Must be one of string, integer, float, boolean, datetime, or url.' - field: '- (Required) The ID of the field.' - id: '- The ID of the field option.' - value: '- (Required) The allowed value.' - importStatements: [] - pagerduty_custom_field_schema: - subCategory: "" - description: Creates and manages a custom field schema in PagerDuty. - name: pagerduty_custom_field_schema - title: pagerduty_custom_field_schema - examples: - - name: my_schema - manifest: |- - { - "description": "Fields used on incidents", - "title": "My Schema" - } - dependencies: - pagerduty_custom_field.cs_impact: |- - { - "datatype": "string", - "name": "impact" - } - argumentDocs: - description: '- (Optional) The description of the field schema.' - id: '- The ID of the field schema.' - title: '- (Required) The title of the field schema.' - importStatements: [] - pagerduty_custom_field_schema_assignment: - subCategory: "" - description: Creates and manages a custom field schema assignment in PagerDuty. - name: pagerduty_custom_field_schema_assignment - title: pagerduty_custom_field_schema_assignment - examples: - - name: assignment - manifest: |- - { - "schema": "${pagerduty_custom_field_schema.my_schema.id}", - "service": "${data.pagerduty_service.first_service.id}" - } - references: - schema: pagerduty_custom_field_schema.my_schema.id - service: data.pagerduty_service.first_service.id - dependencies: - pagerduty_custom_field.cs_impact: |- - { - "datatype": "string", - "name": "impact" - } - pagerduty_custom_field_schema.my_schema: |- - { - "description": "Fields used on incidents", - "title": "My Schema" - } - argumentDocs: - id: '- The ID of the field schema assignment.' - schema: '- (Required) The id of the field schema.' - service: '- (Required) The id of the service.' - importStatements: [] - pagerduty_custom_field_schema_field_configuration: - subCategory: "" - description: Creates and manages a custom field configuration in PagerDuty. - name: pagerduty_custom_field_schema_field_configuration - title: pagerduty_custom_field_schema_field_configuration - examples: - - name: first_field_configuration - manifest: |- - { - "default_value": "none", - "default_value_datatype": "string", - "field": "${pagerduty_custom_field.cs_impact.id}", - "required": true, - "schema": "${pagerduty_custom_field_schema.my_schema.id}" - } - references: - field: pagerduty_custom_field.cs_impact.id - schema: pagerduty_custom_field_schema.my_schema.id - dependencies: - pagerduty_custom_field.cs_impact: |- - { - "datatype": "string", - "name": "impact" - } - pagerduty_custom_field_schema.my_schema: |- - { - "description": "Fields used on incidents", - "title": "My Schema" - } - argumentDocs: - default_value: '- (Optional) The default value for the field.' - default_value_datatype: '- (Optional) The datatype of the default value.' - default_value_multi_value: '- (Optional) Whether or not the default value is multi-valued.' - field: '- (Required) The ID of the field.' - id: '- The ID of the field configuration.' - required: '- (Optional) True if the field is required' - schema: '- (Required) The ID of the schema.' - importStatements: [] pagerduty_escalation_policy: subCategory: "" description: Creates and manages an escalation policy in PagerDuty. @@ -553,13 +373,14 @@ resources: - (Optional) A human-friendly description of the escalation policy. If not set, a placeholder of "Managed by Terraform" will be set. escalation_delay_in_minutes: '- (Required) The number of minutes before an unacknowledged incident escalates away from this rule.' + escalation_rule_assignment_strategy: '- (Optional) The strategy used to assign the escalation rule to an incident. Documented below.' id: '- (Required) A target ID' name: '- (Required) The name of the escalation policy.' num_loops: '- (Optional) The number of times the escalation policy will repeat after reaching the end of its escalation.' rule: '- (Required) An Escalation rule block. Escalation rules documented below.' targets: '- (Required) A target block. Target blocks documented below.' teams: '- (Optional) Team associated with the policy (Only 1 team can be assigned to an Escalation Policy). Account must have the teams ability to use this parameter.' - type: '- (Optional) Can be user_reference or schedule_reference. Defaults to user_reference. For multiple users as example, repeat the target.' + type: '- (Optional) Can be round_robin or assign_to_everyone.' importStatements: [] pagerduty_event_orchestration: subCategory: "" @@ -699,6 +520,7 @@ resources: extraction: '- (Optional) Replace any CEF field or Custom Details object field using custom variables.' header: '- (Optional) Specify custom key/value pairs that''ll be sent with the webhook request as request headers.' id: '- (Required) The ID of this set of rules. Rules in other sets can route events into this set using the rule''s route_to property.' + incident_custom_field_update: '- (Optional) Assign a custom field to the resulting incident.' ip: 'and subnet with a template like: {{variables.ip}}/{{variables.subnet}}' key: '- (Required) Name to identify the header' label: '- (Optional) A description of this rule''s purpose.' @@ -719,7 +541,7 @@ resources: template: '- (Optional) A string that will be used to populate the target field. You can reference variables or event data within your template using double curly braces. For example:' type: '- (Required) Only regex is supported' url: '- (Required) The API endpoint where PagerDuty''s servers will send the webhook request.' - value: '- (Required) Value of this header' + value: '- (Required) The value to assign to this custom field' variable: '- (Optional) Populate variables from event payloads and use those variables in other event actions.' importStatements: [] pagerduty_event_orchestration_integration: @@ -884,6 +706,12 @@ resources: "actions": [ { "annotate": "Please use our P1 runbook: https://docs.test/p1-runbook", + "incident_custom_field_update": [ + { + "id": "${pagerduty_incident_custom_field.cs_impact.id}", + "value": "High Impact" + } + ], "priority": "${data.pagerduty_priority.p1.id}" } ], @@ -948,9 +776,10 @@ resources: } references: service: pagerduty_service.example.id + set.rule.actions.incident_custom_field_update.id: pagerduty_incident_custom_field.cs_impact.id set.rule.actions.priority: data.pagerduty_priority.p1.id dependencies: - pagerduty_escalation_policy.foo: |- + pagerduty_escalation_policy.example: |- { "name": "Engineering Escalation Policy", "num_loops": 2, @@ -960,12 +789,18 @@ resources: "target": [ { "id": "${pagerduty_user.example.id}", - "type": "user" + "type": "user_reference" } ] } ] } + pagerduty_incident_custom_field.cs_impact: |- + { + "data_type": "string", + "field_type": "single_value", + "name": "impact" + } pagerduty_service.example: |- { "acknowledgement_timeout": 600, @@ -978,13 +813,16 @@ resources: { "name": "Engineering" } + pagerduty_team_membership.foo: |- + { + "role": "manager", + "team_id": "${pagerduty_team.engineering.id}", + "user_id": "${pagerduty_user.example.id}" + } pagerduty_user.example: |- { "email": "125.greenholt.earline@graham.name", - "name": "Earline Greenholt", - "teams": [ - "${pagerduty_team.engineering.id}" - ] + "name": "Earline Greenholt" } argumentDocs: action_id: '- (Required) Id of the Process Automation action to be triggered.' @@ -1001,6 +839,7 @@ resources: extraction: '- (Optional) Replace any CEF field or Custom Details object field using custom variables.' header: '- (Optional) Specify custom key/value pairs that''ll be sent with the webhook request as request headers.' id: '- (Required) The ID of this set of rules. Rules in other sets can route events into this set using the rule''s route_to property.' + incident_custom_field_update: '- (Optional) Assign a custom field to the resulting incident.' ip: 'and subnet with a template like: {{variables.ip}}/{{variables.subnet}}' key: '- (Required) Name to identify the header' label: '- (Optional) A description of this rule''s purpose.' @@ -1023,7 +862,7 @@ resources: template: '- (Optional) A string that will be used to populate the target field. You can reference variables or event data within your template using double curly braces. For example:' type: '- (Required) Only regex is supported' url: '- (Required) The API endpoint where PagerDuty''s servers will send the webhook request.' - value: '- (Required) Value of this header' + value: '- (Required) The value to assign to this custom field' variable: '- (Optional) Populate variables from event payloads and use those variables in other event actions.' importStatements: [] pagerduty_event_orchestration_unrouted: @@ -1268,6 +1107,7 @@ resources: manifest: |- { "data_type": "string", + "display_name": "Customer Impact", "field_type": "single_value", "name": "impact" } @@ -1275,11 +1115,24 @@ resources: manifest: |- { "data_type": "string", + "display_name": "Environment", "field_type": "single_value_fixed", "name": "environment" } + - name: false_alarm + manifest: |- + { + "data_type": "boolean", + "default_value": "false", + "display_name": "False Alarm", + "field_type": "single_value", + "name": "false_alarm" + } argumentDocs: data_type: '- (Required) The data type of the field. Must be one of string, integer, float, boolean, datetime, or url.' + default_value: '- (Optional) The default value to set when new incidents are created. Always specified as a string.' + description: '- (Optional) The description of the field.' + display_name: '- (Required) The display name of the field.' field_type: '- (Required) The field type of the field. Must be one of single_value, single_value_fixed, multi_value, or multi_value_fixed.' id: '- The ID of the field.' name: '- (Required) The name of the field.' @@ -1303,6 +1156,7 @@ resources: pagerduty_incident_custom_field.sre_environment: |- { "data_type": "string", + "display_name": "Environment", "field_type": "single_value_fixed", "name": "environment" } @@ -1319,6 +1173,7 @@ resources: pagerduty_incident_custom_field.sre_environment: |- { "data_type": "string", + "display_name": "Environment", "field_type": "single_value_fixed", "name": "environment" } @@ -1335,6 +1190,7 @@ resources: pagerduty_incident_custom_field.sre_environment: |- { "data_type": "string", + "display_name": "Environment", "field_type": "single_value_fixed", "name": "environment" } @@ -1372,7 +1228,8 @@ resources: action: '- (Required) The action id for the workflow step, including the version. A list of actions available can be retrieved using the PagerDuty API.' description: '- (Optional) The description of the workflow.' id: '- The ID of the incident workflow.' - input: '- (Optional) The list of inputs for the workflow action.' + inline_steps_input: '- (Optional) The list of inputs that contain a series of inline steps for the workflow action.' + input: '- (Optional) The list of standard inputs for the workflow action.' name: '- (Required) The name of the workflow.' step: '- (Optional) The steps in the workflow.' team: '- (Optional) A team ID. If specified then workflow edit permissions will be scoped to members of this team.' @@ -1449,7 +1306,7 @@ resources: id: '- The ID of the incident workflow.' services: '- (Optional) A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger.' subscribed_to_all_services: '- (Required) Set to true if the trigger should be eligible for firing on all services. Only allowed to be true if the services list is not defined or empty.' - type: '- (Required) May be either manual or conditional.' + type: '- (Required) [Updating causes resource replacement] May be either manual or conditional.' workflow: '- (Required) The workflow ID for the workflow to trigger.' importStatements: [] pagerduty_maintenance_window: @@ -1977,6 +1834,7 @@ resources: name: '- (Required) The name of the service.' response_play: '- (Optional) The response play used by this service.' status: '- The status of the service.' + time_window: '- (Optional) The maximum amount of time allowed between Alerts. This setting applies only when type is set to intelligent or content_based. Value must be between 300 and 3600. Any Alerts arriving greater than time_window seconds apart will not be grouped together. This is a rolling time window and is counted from the most recently grouped alert. The window is extended every time a new alert is added to the group, up to 24 hours.' timeout: '- (Optional) The duration in minutes within which to automatically group incoming alerts. This setting applies only when type is set to time. To continue grouping alerts until the incident is resolved, set this value to 0.' to_urgency: '- The urgency to change to: low (does not escalate), or high (follows escalation rules).' type: '- The type of scheduled action. Currently, this must be set to urgency_change.' @@ -2256,7 +2114,6 @@ resources: - name: apiv2 manifest: |- { - "integration_key": "12345678910testtesttesttesttes", "name": "API V2", "service": "${pagerduty_service.example.id}", "type": "events_api_v2_inbound_integration" @@ -2543,7 +2400,7 @@ resources: html_url: '- URL at which the entity is uniquely displayed in the Web app.' id: '- The ID of the service integration.' integration_email: '- (Optional) This is the unique fully-qualified email address used for routing emails to this integration for processing.' - integration_key: '- (Optional) This is the unique key used to route events to this integration when received via the PagerDuty Events API.' + integration_key: '- (Optional) (Deprecated) This is the unique key used to route events to this integration when received via the PagerDuty Events API.' matcher: '- (Optional) Predicate value or valid regex.' name: '- (Optional) The name of the service integration.' pagerduty_vendor: data source to locate the appropriate vendor ID. @@ -2698,6 +2555,7 @@ resources: references: parent: pagerduty_team.parent.id argumentDocs: + default_role: '- (Optional) The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager").' description: |- - (Optional) A human-friendly description of the team. If not set, a placeholder of "Managed by Terraform" will be set. diff --git a/config/provider.go b/config/provider.go index add17fa..4acb856 100644 --- a/config/provider.go +++ b/config/provider.go @@ -8,7 +8,7 @@ import ( // Note(turkenh): we are importing this to embed provider schema document _ "embed" - ujconfig "github.com/upbound/upjet/pkg/config" + ujconfig "github.com/crossplane/upjet/pkg/config" addon "github.com/crossplane-contrib/provider-pagerduty/config/addon" business "github.com/crossplane-contrib/provider-pagerduty/config/business" diff --git a/config/response/config.go b/config/response/config.go index 90bb699..a9c53fc 100644 --- a/config/response/config.go +++ b/config/response/config.go @@ -1,6 +1,6 @@ package response -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/ruleset/config.go b/config/ruleset/config.go index e5e1335..6cccf5e 100644 --- a/config/ruleset/config.go +++ b/config/ruleset/config.go @@ -1,6 +1,6 @@ package ruleset -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/schedule/config.go b/config/schedule/config.go index c23e3f2..64bcec9 100644 --- a/config/schedule/config.go +++ b/config/schedule/config.go @@ -1,6 +1,6 @@ package schedule -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/schema.json b/config/schema.json index 0bc15c3..114fbb7 100644 --- a/config/schema.json +++ b/config/schema.json @@ -1 +1 @@ -{"format_version":"1.0","provider_schemas":{"registry.terraform.io/pagerduty/pagerduty":{"provider":{"version":0,"block":{"attributes":{"api_url_override":{"type":"string","description_kind":"plain","optional":true},"service_region":{"type":"string","description_kind":"plain","optional":true},"skip_credentials_validation":{"type":"bool","description_kind":"plain","optional":true},"token":{"type":"string","description_kind":"plain","required":true},"user_token":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"resource_schemas":{"pagerduty_addon":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"src":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_automation_actions_action":{"version":0,"block":{"attributes":{"action_classification":{"type":"string","description_kind":"plain","optional":true},"action_type":{"type":"string","description_kind":"plain","required":true},"creation_time":{"type":"string","description_kind":"plain","optional":true,"computed":true},"description":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"modify_time":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"runner_id":{"type":"string","description_kind":"plain","optional":true},"runner_type":{"type":"string","description_kind":"plain","optional":true,"computed":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"block_types":{"action_data_reference":{"nesting_mode":"list","block":{"attributes":{"invocation_command":{"type":"string","description_kind":"plain","optional":true},"process_automation_job_arguments":{"type":"string","description_kind":"plain","optional":true},"process_automation_job_id":{"type":"string","description_kind":"plain","optional":true},"process_automation_node_filter":{"type":"string","description_kind":"plain","optional":true},"script":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"}},"pagerduty_automation_actions_action_service_association":{"version":0,"block":{"attributes":{"action_id":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"service_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_automation_actions_action_team_association":{"version":0,"block":{"attributes":{"action_id":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"team_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_automation_actions_runner":{"version":0,"block":{"attributes":{"creation_time":{"type":"string","description_kind":"plain","computed":true},"description":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"last_seen":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"runbook_api_key":{"type":"string","description_kind":"plain","optional":true,"sensitive":true},"runbook_base_uri":{"type":"string","description_kind":"plain","optional":true},"runner_type":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_automation_actions_runner_team_association":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"runner_id":{"type":"string","description_kind":"plain","required":true},"team_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_business_service":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"point_of_contact":{"type":"string","description_kind":"plain","optional":true},"self":{"type":"string","description_kind":"plain","computed":true},"summary":{"type":"string","description_kind":"plain","computed":true},"team":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","deprecated":true,"optional":true}},"description_kind":"plain"}},"pagerduty_business_service_subscriber":{"version":0,"block":{"attributes":{"business_service_id":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"subscriber_id":{"type":"string","description_kind":"plain","required":true},"subscriber_type":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_custom_field":{"version":0,"block":{"attributes":{"datatype":{"type":"string","description_kind":"plain","required":true},"description":{"type":"string","description_kind":"plain","optional":true},"display_name":{"type":"string","description_kind":"plain","required":true},"fixed_options":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"multi_value":{"type":"bool","description_kind":"plain","optional":true},"name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain","deprecated":true}},"pagerduty_custom_field_option":{"version":0,"block":{"attributes":{"datatype":{"type":"string","description_kind":"plain","required":true},"field":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_custom_field_schema":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"title":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_custom_field_schema_assignment":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"schema":{"type":"string","description_kind":"plain","required":true},"service":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_custom_field_schema_field_configuration":{"version":0,"block":{"attributes":{"default_value":{"type":"string","description_kind":"plain","optional":true},"default_value_datatype":{"type":"string","description_kind":"plain","optional":true},"default_value_multi_value":{"type":"bool","description_kind":"plain","optional":true},"field":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"required":{"type":"bool","description_kind":"plain","optional":true},"schema":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_escalation_policy":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"num_loops":{"type":"number","description_kind":"plain","optional":true},"teams":{"type":["list","string"],"description_kind":"plain","optional":true}},"block_types":{"rule":{"nesting_mode":"list","block":{"attributes":{"escalation_delay_in_minutes":{"type":"number","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","computed":true}},"block_types":{"target":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}},"pagerduty_event_orchestration":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"routes":{"type":"number","description_kind":"plain","computed":true},"team":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"integration":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","computed":true},"parameters":{"type":["list",["object",{"routing_key":"string","type":"string"}]],"description_kind":"plain","computed":true}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_event_orchestration_global":{"version":0,"block":{"attributes":{"event_orchestration":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"block_types":{"catch_all":{"nesting_mode":"list","block":{"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"annotate":{"type":"string","description_kind":"plain","optional":true},"drop_event":{"type":"bool","description_kind":"plain","optional":true},"event_action":{"type":"string","description_kind":"plain","optional":true},"priority":{"type":"string","description_kind":"plain","optional":true},"route_to":{"type":"string","description_kind":"plain","optional":true},"severity":{"type":"string","description_kind":"plain","optional":true},"suppress":{"type":"bool","description_kind":"plain","optional":true},"suspend":{"type":"number","description_kind":"plain","optional":true}},"block_types":{"automation_action":{"nesting_mode":"list","block":{"attributes":{"auto_send":{"type":"bool","description_kind":"plain","optional":true},"name":{"type":"string","description_kind":"plain","required":true},"url":{"type":"string","description_kind":"plain","required":true}},"block_types":{"header":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"parameter":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"extraction":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","required":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"path":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"},"min_items":1,"max_items":1},"set":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true}},"block_types":{"rule":{"nesting_mode":"list","block":{"attributes":{"disabled":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"annotate":{"type":"string","description_kind":"plain","optional":true},"drop_event":{"type":"bool","description_kind":"plain","optional":true},"event_action":{"type":"string","description_kind":"plain","optional":true},"priority":{"type":"string","description_kind":"plain","optional":true},"route_to":{"type":"string","description_kind":"plain","optional":true},"severity":{"type":"string","description_kind":"plain","optional":true},"suppress":{"type":"bool","description_kind":"plain","optional":true},"suspend":{"type":"number","description_kind":"plain","optional":true}},"block_types":{"automation_action":{"nesting_mode":"list","block":{"attributes":{"auto_send":{"type":"bool","description_kind":"plain","optional":true},"name":{"type":"string","description_kind":"plain","required":true},"url":{"type":"string","description_kind":"plain","required":true}},"block_types":{"header":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"parameter":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"extraction":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","required":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"path":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1},"condition":{"nesting_mode":"list","block":{"attributes":{"expression":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}},"pagerduty_event_orchestration_integration":{"version":0,"block":{"attributes":{"event_orchestration":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","required":true},"parameters":{"type":["list",["object",{"routing_key":"string","type":"string"}]],"description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_event_orchestration_router":{"version":0,"block":{"attributes":{"event_orchestration":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"block_types":{"catch_all":{"nesting_mode":"list","block":{"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"route_to":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"},"min_items":1,"max_items":1},"set":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true}},"block_types":{"rule":{"nesting_mode":"list","block":{"attributes":{"disabled":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"route_to":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"min_items":1,"max_items":1},"condition":{"nesting_mode":"list","block":{"attributes":{"expression":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"}},"pagerduty_event_orchestration_service":{"version":0,"block":{"attributes":{"enable_event_orchestration_for_service":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"service":{"type":"string","description_kind":"plain","required":true}},"block_types":{"catch_all":{"nesting_mode":"list","block":{"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"annotate":{"type":"string","description_kind":"plain","optional":true},"event_action":{"type":"string","description_kind":"plain","optional":true},"priority":{"type":"string","description_kind":"plain","optional":true},"route_to":{"type":"string","description_kind":"plain","optional":true},"severity":{"type":"string","description_kind":"plain","optional":true},"suppress":{"type":"bool","description_kind":"plain","optional":true},"suspend":{"type":"number","description_kind":"plain","optional":true}},"block_types":{"automation_action":{"nesting_mode":"list","block":{"attributes":{"auto_send":{"type":"bool","description_kind":"plain","optional":true},"name":{"type":"string","description_kind":"plain","required":true},"url":{"type":"string","description_kind":"plain","required":true}},"block_types":{"header":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"parameter":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"extraction":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","required":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"pagerduty_automation_action":{"nesting_mode":"list","block":{"attributes":{"action_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"max_items":1},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"path":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"},"min_items":1,"max_items":1},"set":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true}},"block_types":{"rule":{"nesting_mode":"list","block":{"attributes":{"disabled":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"annotate":{"type":"string","description_kind":"plain","optional":true},"event_action":{"type":"string","description_kind":"plain","optional":true},"priority":{"type":"string","description_kind":"plain","optional":true},"route_to":{"type":"string","description_kind":"plain","optional":true},"severity":{"type":"string","description_kind":"plain","optional":true},"suppress":{"type":"bool","description_kind":"plain","optional":true},"suspend":{"type":"number","description_kind":"plain","optional":true}},"block_types":{"automation_action":{"nesting_mode":"list","block":{"attributes":{"auto_send":{"type":"bool","description_kind":"plain","optional":true},"name":{"type":"string","description_kind":"plain","required":true},"url":{"type":"string","description_kind":"plain","required":true}},"block_types":{"header":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"parameter":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"extraction":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","required":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"pagerduty_automation_action":{"nesting_mode":"list","block":{"attributes":{"action_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"max_items":1},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"path":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1},"condition":{"nesting_mode":"list","block":{"attributes":{"expression":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}},"pagerduty_event_orchestration_unrouted":{"version":0,"block":{"attributes":{"event_orchestration":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"block_types":{"catch_all":{"nesting_mode":"list","block":{"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"event_action":{"type":"string","description_kind":"plain","optional":true},"severity":{"type":"string","description_kind":"plain","optional":true},"suppress":{"type":"bool","description_kind":"plain","computed":true}},"block_types":{"extraction":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","required":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"path":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"},"min_items":1,"max_items":1},"set":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true}},"block_types":{"rule":{"nesting_mode":"list","block":{"attributes":{"disabled":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"event_action":{"type":"string","description_kind":"plain","optional":true},"route_to":{"type":"string","description_kind":"plain","optional":true},"severity":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"extraction":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","required":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"path":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1},"condition":{"nesting_mode":"list","block":{"attributes":{"expression":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}},"pagerduty_event_rule":{"version":0,"block":{"attributes":{"action_json":{"type":"string","description_kind":"plain","required":true},"advanced_condition_json":{"type":"string","description_kind":"plain","optional":true},"catch_all":{"type":"bool","description_kind":"plain","computed":true},"condition_json":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}},"pagerduty_extension":{"version":0,"block":{"attributes":{"config":{"type":"string","description_kind":"plain","optional":true},"endpoint_url":{"type":"string","description_kind":"plain","optional":true,"sensitive":true},"extension_objects":{"type":["set","string"],"description_kind":"plain","required":true},"extension_schema":{"type":"string","description_kind":"plain","required":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","optional":true,"computed":true},"summary":{"type":"string","description_kind":"plain","computed":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}},"pagerduty_extension_servicenow":{"version":0,"block":{"attributes":{"endpoint_url":{"type":"string","description_kind":"plain","optional":true,"sensitive":true},"extension_objects":{"type":["set","string"],"description_kind":"plain","required":true},"extension_schema":{"type":"string","description_kind":"plain","required":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","optional":true,"computed":true},"referer":{"type":"string","description_kind":"plain","required":true},"snow_password":{"type":"string","description_kind":"plain","required":true,"sensitive":true},"snow_user":{"type":"string","description_kind":"plain","required":true},"summary":{"type":"string","description_kind":"plain","optional":true,"computed":true},"sync_options":{"type":"string","description_kind":"plain","required":true},"target":{"type":"string","description_kind":"plain","required":true},"task_type":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}},"pagerduty_incident_custom_field":{"version":0,"block":{"attributes":{"data_type":{"type":"string","description_kind":"plain","required":true},"default_value":{"type":"string","description_kind":"plain","optional":true},"description":{"type":"string","description_kind":"plain","optional":true},"display_name":{"type":"string","description_kind":"plain","required":true},"field_type":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_incident_custom_field_option":{"version":0,"block":{"attributes":{"data_type":{"type":"string","description_kind":"plain","required":true},"field":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_incident_workflow":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"team":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"step":{"nesting_mode":"list","block":{"attributes":{"action":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"block_types":{"input":{"nesting_mode":"list","block":{"attributes":{"generated":{"type":"bool","description_kind":"plain","computed":true},"name":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_incident_workflow_trigger":{"version":0,"block":{"attributes":{"condition":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"services":{"type":["list","string"],"description_kind":"plain","optional":true},"subscribed_to_all_services":{"type":"bool","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"workflow":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_maintenance_window":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"end_time":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"services":{"type":["set","string"],"description_kind":"plain","required":true},"start_time":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_response_play":{"version":0,"block":{"attributes":{"conference_number":{"type":"string","description_kind":"plain","optional":true},"conference_url":{"type":"string","description_kind":"plain","optional":true},"description":{"type":"string","description_kind":"plain","optional":true},"from":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"responders_message":{"type":"string","description_kind":"plain","optional":true},"runnability":{"type":"string","description_kind":"plain","optional":true},"subscribers_message":{"type":"string","description_kind":"plain","optional":true},"team":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"responder":{"nesting_mode":"list","block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"escalation_rule":{"type":["list",["object",{"escalation_delay_in_minutes":"number","id":"string","target":["list",["object",{"id":"string","type":"string"}]]}]],"description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true},"name":{"type":"string","description_kind":"plain","optional":true},"num_loops":{"type":"number","description_kind":"plain","computed":true},"on_call_handoff_notifications":{"type":"string","description_kind":"plain","computed":true},"service":{"type":["list",["object",{"id":"string","type":"string"}]],"description_kind":"plain","computed":true},"team":{"type":["list",["object",{"id":"string","type":"string"}]],"description_kind":"plain","computed":true},"type":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"subscriber":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_ruleset":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"routing_keys":{"type":["list","string"],"description_kind":"plain","computed":true},"type":{"type":"string","description_kind":"plain","computed":true}},"block_types":{"team":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"max_items":1}},"description_kind":"plain"}},"pagerduty_ruleset_rule":{"version":0,"block":{"attributes":{"catch_all":{"type":"bool","description_kind":"plain","optional":true},"disabled":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"position":{"type":"number","description_kind":"plain","optional":true},"ruleset":{"type":"string","description_kind":"plain","required":true}},"block_types":{"actions":{"nesting_mode":"list","block":{"block_types":{"annotate":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"event_action":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"extractions":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","optional":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"priority":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"route":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"severity":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"suppress":{"nesting_mode":"list","block":{"attributes":{"threshold_time_amount":{"type":"number","description_kind":"plain","optional":true},"threshold_time_unit":{"type":"string","description_kind":"plain","optional":true},"threshold_value":{"type":"number","description_kind":"plain","optional":true},"value":{"type":"bool","description_kind":"plain","optional":true}},"description_kind":"plain"}},"suspend":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"number","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"conditions":{"nesting_mode":"list","block":{"attributes":{"operator":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"subconditions":{"nesting_mode":"list","block":{"attributes":{"operator":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"parameter":{"nesting_mode":"list","block":{"attributes":{"path":{"type":"string","description_kind":"plain","optional":true},"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"time_frame":{"nesting_mode":"list","block":{"block_types":{"active_between":{"nesting_mode":"list","block":{"attributes":{"end_time":{"type":"number","description_kind":"plain","optional":true},"start_time":{"type":"number","description_kind":"plain","optional":true}},"description_kind":"plain"}},"scheduled_weekly":{"nesting_mode":"list","block":{"attributes":{"duration":{"type":"number","description_kind":"plain","optional":true},"start_time":{"type":"number","description_kind":"plain","optional":true},"timezone":{"type":"string","description_kind":"plain","optional":true},"weekdays":{"type":["list","number"],"description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"parameters":{"nesting_mode":"list","block":{"attributes":{"path":{"type":"string","description_kind":"plain","optional":true},"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_schedule":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"final_schedule":{"type":["list",["object",{"name":"string","rendered_coverage_percentage":"string"}]],"description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","optional":true},"overflow":{"type":"bool","description_kind":"plain","optional":true},"teams":{"type":["list","string"],"description_kind":"plain","optional":true},"time_zone":{"type":"string","description_kind":"plain","required":true}},"block_types":{"layer":{"nesting_mode":"list","block":{"attributes":{"end":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","computed":true},"name":{"type":"string","description_kind":"plain","optional":true,"computed":true},"rendered_coverage_percentage":{"type":"string","description_kind":"plain","computed":true},"rotation_turn_length_seconds":{"type":"number","description_kind":"plain","required":true},"rotation_virtual_start":{"type":"string","description_kind":"plain","required":true},"start":{"type":"string","description_kind":"plain","required":true},"users":{"type":["list","string"],"description_kind":"plain","required":true}},"block_types":{"restriction":{"nesting_mode":"list","block":{"attributes":{"duration_seconds":{"type":"number","description_kind":"plain","required":true},"start_day_of_week":{"type":"number","description_kind":"plain","optional":true},"start_time_of_day":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}},"pagerduty_service":{"version":0,"block":{"attributes":{"acknowledgement_timeout":{"type":"string","description_kind":"plain","optional":true},"alert_creation":{"type":"string","description_kind":"plain","optional":true},"alert_grouping":{"type":"string","description_kind":"plain","deprecated":true,"optional":true,"computed":true},"alert_grouping_timeout":{"type":"string","description_kind":"plain","deprecated":true,"optional":true,"computed":true},"auto_resolve_timeout":{"type":"string","description_kind":"plain","optional":true},"created_at":{"type":"string","description_kind":"plain","computed":true},"description":{"type":"string","description_kind":"plain","optional":true},"escalation_policy":{"type":"string","description_kind":"plain","required":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"last_incident_timestamp":{"type":"string","description_kind":"plain","computed":true},"name":{"type":"string","description_kind":"plain","required":true},"response_play":{"type":"string","description_kind":"plain","optional":true,"computed":true},"status":{"type":"string","description_kind":"plain","computed":true},"type":{"type":"string","description_kind":"plain","computed":true}},"block_types":{"alert_grouping_parameters":{"nesting_mode":"list","block":{"attributes":{"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"config":{"nesting_mode":"list","block":{"attributes":{"aggregate":{"type":"string","description_kind":"plain","optional":true},"fields":{"type":["list","string"],"description_kind":"plain","optional":true},"timeout":{"type":"number","description_kind":"plain","optional":true}},"description_kind":"plain"},"max_items":1}},"description_kind":"plain"},"max_items":1},"auto_pause_notifications_parameters":{"nesting_mode":"list","block":{"attributes":{"enabled":{"type":"bool","description_kind":"plain","optional":true,"computed":true},"timeout":{"type":"number","description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"},"max_items":1},"incident_urgency_rule":{"nesting_mode":"list","block":{"attributes":{"type":{"type":"string","description_kind":"plain","required":true},"urgency":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"during_support_hours":{"nesting_mode":"list","block":{"attributes":{"type":{"type":"string","description_kind":"plain","optional":true},"urgency":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"},"max_items":1},"outside_support_hours":{"nesting_mode":"list","block":{"attributes":{"type":{"type":"string","description_kind":"plain","optional":true},"urgency":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"},"max_items":1}},"description_kind":"plain"},"max_items":1},"scheduled_actions":{"nesting_mode":"list","block":{"attributes":{"to_urgency":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"at":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"}},"support_hours":{"nesting_mode":"list","block":{"attributes":{"days_of_week":{"type":["list","number"],"description_kind":"plain","optional":true},"end_time":{"type":"string","description_kind":"plain","optional":true},"start_time":{"type":"string","description_kind":"plain","optional":true},"time_zone":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"},"max_items":1}},"description_kind":"plain"}},"pagerduty_service_dependency":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"block_types":{"dependency":{"nesting_mode":"list","block":{"attributes":{"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"dependent_service":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"min_items":1},"supporting_service":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"}},"pagerduty_service_event_rule":{"version":0,"block":{"attributes":{"disabled":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"position":{"type":"number","description_kind":"plain","optional":true},"service":{"type":"string","description_kind":"plain","required":true}},"block_types":{"actions":{"nesting_mode":"list","block":{"block_types":{"annotate":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"event_action":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"extractions":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","optional":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"priority":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"severity":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"suppress":{"nesting_mode":"list","block":{"attributes":{"threshold_time_amount":{"type":"number","description_kind":"plain","optional":true},"threshold_time_unit":{"type":"string","description_kind":"plain","optional":true},"threshold_value":{"type":"number","description_kind":"plain","optional":true},"value":{"type":"bool","description_kind":"plain","optional":true}},"description_kind":"plain"}},"suspend":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"number","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"conditions":{"nesting_mode":"list","block":{"attributes":{"operator":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"subconditions":{"nesting_mode":"list","block":{"attributes":{"operator":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"parameter":{"nesting_mode":"list","block":{"attributes":{"path":{"type":"string","description_kind":"plain","optional":true},"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"time_frame":{"nesting_mode":"list","block":{"block_types":{"active_between":{"nesting_mode":"list","block":{"attributes":{"end_time":{"type":"number","description_kind":"plain","optional":true},"start_time":{"type":"number","description_kind":"plain","optional":true}},"description_kind":"plain"}},"scheduled_weekly":{"nesting_mode":"list","block":{"attributes":{"duration":{"type":"number","description_kind":"plain","optional":true},"start_time":{"type":"number","description_kind":"plain","optional":true},"timezone":{"type":"string","description_kind":"plain","optional":true},"weekdays":{"type":["list","number"],"description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"parameters":{"nesting_mode":"list","block":{"attributes":{"path":{"type":"string","description_kind":"plain","optional":true},"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_service_integration":{"version":0,"block":{"attributes":{"email_filter_mode":{"type":"string","description_kind":"plain","optional":true,"computed":true},"email_incident_creation":{"type":"string","description_kind":"plain","optional":true,"computed":true},"email_parsing_fallback":{"type":"string","description_kind":"plain","optional":true,"computed":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"integration_email":{"type":"string","description_kind":"plain","optional":true,"computed":true},"integration_key":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","optional":true},"service":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true},"vendor":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"block_types":{"email_filter":{"nesting_mode":"list","block":{"attributes":{"body_mode":{"type":"string","description_kind":"plain","optional":true},"body_regex":{"type":"string","description_kind":"plain","optional":true},"from_email_mode":{"type":"string","description_kind":"plain","optional":true},"from_email_regex":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","computed":true},"subject_mode":{"type":"string","description_kind":"plain","optional":true},"subject_regex":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"email_parser":{"nesting_mode":"list","block":{"attributes":{"action":{"type":"string","description_kind":"plain","required":true},"id":{"type":"number","description_kind":"plain","computed":true}},"block_types":{"match_predicate":{"nesting_mode":"list","block":{"attributes":{"type":{"type":"string","description_kind":"plain","required":true}},"block_types":{"predicate":{"nesting_mode":"list","block":{"attributes":{"matcher":{"type":"string","description_kind":"plain","optional":true},"part":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","required":true}},"block_types":{"predicate":{"nesting_mode":"list","block":{"attributes":{"matcher":{"type":"string","description_kind":"plain","required":true},"part":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1},"value_extractor":{"nesting_mode":"list","block":{"attributes":{"ends_before":{"type":"string","description_kind":"plain","optional":true},"part":{"type":"string","description_kind":"plain","required":true},"regex":{"type":"string","description_kind":"plain","optional":true},"starts_after":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","required":true},"value_name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_slack_connection":{"version":0,"block":{"attributes":{"channel_id":{"type":"string","description_kind":"plain","required":true},"channel_name":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"notification_type":{"type":"string","description_kind":"plain","required":true},"source_id":{"type":"string","description_kind":"plain","required":true},"source_name":{"type":"string","description_kind":"plain","computed":true},"source_type":{"type":"string","description_kind":"plain","required":true},"workspace_id":{"type":"string","description_kind":"plain","required":true}},"block_types":{"config":{"nesting_mode":"list","block":{"attributes":{"events":{"type":["list","string"],"description_kind":"plain","required":true},"priorities":{"type":["list","string"],"description_kind":"plain","optional":true},"urgency":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}},"pagerduty_tag":{"version":0,"block":{"attributes":{"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"label":{"type":"string","description_kind":"plain","required":true},"summary":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_tag_assignment":{"version":0,"block":{"attributes":{"entity_id":{"type":"string","description_kind":"plain","required":true},"entity_type":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"tag_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_team":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"parent":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"pagerduty_team_membership":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"role":{"type":"string","description_kind":"plain","optional":true},"team_id":{"type":"string","description_kind":"plain","required":true},"user_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_user":{"version":0,"block":{"attributes":{"avatar_url":{"type":"string","description_kind":"plain","computed":true},"color":{"type":"string","description_kind":"plain","optional":true,"computed":true},"description":{"type":"string","description_kind":"plain","optional":true},"email":{"type":"string","description_kind":"plain","required":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"invitation_sent":{"type":"bool","description_kind":"plain","computed":true},"job_title":{"type":"string","description_kind":"plain","optional":true},"license":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"role":{"type":"string","description_kind":"plain","optional":true},"teams":{"type":["set","string"],"description_kind":"plain","deprecated":true,"optional":true,"computed":true},"time_zone":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}},"pagerduty_user_contact_method":{"version":0,"block":{"attributes":{"address":{"type":"string","description_kind":"plain","required":true},"blacklisted":{"type":"bool","description_kind":"plain","computed":true},"country_code":{"type":"number","description_kind":"plain","optional":true},"enabled":{"type":"bool","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"label":{"type":"string","description_kind":"plain","required":true},"send_short_email":{"type":"bool","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","required":true},"user_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_user_notification_rule":{"version":0,"block":{"attributes":{"contact_method":{"type":["map","string"],"description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"start_delay_in_minutes":{"type":"number","description_kind":"plain","required":true},"urgency":{"type":"string","description_kind":"plain","required":true},"user_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_webhook_subscription":{"version":0,"block":{"attributes":{"active":{"type":"bool","description_kind":"plain","optional":true,"computed":true},"description":{"type":"string","description_kind":"plain","optional":true},"events":{"type":["list","string"],"description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"delivery_method":{"nesting_mode":"list","block":{"attributes":{"temporarily_disabled":{"type":"bool","description_kind":"plain","optional":true,"computed":true},"type":{"type":"string","description_kind":"plain","optional":true},"url":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"custom_header":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1},"filter":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}}},"data_source_schemas":{"pagerduty_automation_actions_action":{"version":0,"block":{"attributes":{"action_classification":{"type":"string","description_kind":"plain","optional":true,"computed":true},"action_data_reference":{"type":["list",["object",{"invocation_command":"string","process_automation_job_arguments":"string","process_automation_job_id":"string","process_automation_node_filter":"string","script":"string"}]],"description_kind":"plain","computed":true},"action_type":{"type":"string","description_kind":"plain","computed":true},"creation_time":{"type":"string","description_kind":"plain","optional":true,"computed":true},"description":{"type":"string","description_kind":"plain","optional":true,"computed":true},"id":{"type":"string","description_kind":"plain","required":true},"modify_time":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","computed":true},"runner_id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"runner_type":{"type":"string","description_kind":"plain","optional":true,"computed":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}},"pagerduty_automation_actions_runner":{"version":0,"block":{"attributes":{"creation_time":{"type":"string","description_kind":"plain","computed":true},"description":{"type":"string","description_kind":"plain","optional":true,"computed":true},"id":{"type":"string","description_kind":"plain","required":true},"last_seen":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","computed":true},"runbook_base_uri":{"type":"string","description_kind":"plain","optional":true,"computed":true},"runner_type":{"type":"string","description_kind":"plain","computed":true},"type":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_business_service":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_custom_field":{"version":0,"block":{"attributes":{"datatype":{"type":"string","description_kind":"plain","computed":true},"description":{"type":"string","description_kind":"plain","computed":true},"display_name":{"type":"string","description_kind":"plain","computed":true},"fixed_options":{"type":"bool","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"multi_value":{"type":"bool","description_kind":"plain","computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain","deprecated":true}},"pagerduty_custom_field_schema":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"title":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain","deprecated":true}},"pagerduty_escalation_policy":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_event_orchestration":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"block_types":{"integration":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","computed":true},"parameters":{"type":["list",["object",{"routing_key":"string","type":"string"}]],"description_kind":"plain","computed":true}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_event_orchestration_integration":{"version":0,"block":{"attributes":{"event_orchestration":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true},"label":{"type":"string","description_kind":"plain","optional":true},"parameters":{"type":["list",["object",{"routing_key":"string","type":"string"}]],"description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_event_orchestrations":{"version":0,"block":{"attributes":{"event_orchestrations":{"type":["list",["object",{"id":"string","integration":["list",["object",{"id":"string","label":"string","parameters":["list",["object",{"routing_key":"string","type":"string"}]]}]],"name":"string"}]],"description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name_filter":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_extension_schema":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_incident_custom_field":{"version":0,"block":{"attributes":{"data_type":{"type":"string","description_kind":"plain","computed":true},"description":{"type":"string","description_kind":"plain","computed":true},"display_name":{"type":"string","description_kind":"plain","computed":true},"field_type":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_incident_workflow":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_license":{"version":0,"block":{"attributes":{"allocations_available":{"type":"number","description_kind":"plain","optional":true,"computed":true},"current_value":{"type":"number","description_kind":"plain","optional":true,"computed":true},"description":{"type":"string","description_kind":"plain","optional":true,"computed":true},"html_url":{"type":"string","description_kind":"plain","optional":true,"computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","optional":true,"computed":true},"role_group":{"type":"string","description_kind":"plain","optional":true,"computed":true},"self":{"type":"string","description_kind":"plain","optional":true,"computed":true},"summary":{"type":"string","description_kind":"plain","optional":true,"computed":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true},"valid_roles":{"type":["list","string"],"description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}},"pagerduty_licenses":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"licenses":{"nesting_mode":"list","block":{"attributes":{"allocations_available":{"type":"number","description_kind":"plain","optional":true,"computed":true},"current_value":{"type":"number","description_kind":"plain","optional":true,"computed":true},"description":{"type":"string","description_kind":"plain","optional":true,"computed":true},"html_url":{"type":"string","description_kind":"plain","optional":true,"computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","optional":true,"computed":true},"role_group":{"type":"string","description_kind":"plain","optional":true,"computed":true},"self":{"type":"string","description_kind":"plain","optional":true,"computed":true},"summary":{"type":"string","description_kind":"plain","optional":true,"computed":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true},"valid_roles":{"type":["list","string"],"description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_priority":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description":"The name of the priority to find in the PagerDuty API","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_ruleset":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"routing_keys":{"type":["list","string"],"description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_schedule":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_service":{"version":0,"block":{"attributes":{"acknowledgement_timeout":{"type":"number","description_kind":"plain","computed":true},"alert_creation":{"type":"string","description_kind":"plain","computed":true},"auto_resolve_timeout":{"type":"number","description_kind":"plain","computed":true},"description":{"type":"string","description_kind":"plain","computed":true},"escalation_policy":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"teams":{"type":["list",["object",{"id":"string","name":"string"}]],"description":"The set of teams associated with the service","description_kind":"plain","computed":true},"type":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_service_integration":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"integration_key":{"type":"string","description_kind":"plain","computed":true,"sensitive":true},"integration_summary":{"type":"string","description":"examples 'Amazon CloudWatch', 'New Relic","description_kind":"plain","required":true},"service_name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_tag":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"label":{"type":"string","description":"The label of the tag to find in the PagerDuty API","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_team":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description":"The name of the team to find in the PagerDuty API","description_kind":"plain","required":true},"parent":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"pagerduty_user":{"version":0,"block":{"attributes":{"email":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_user_contact_method":{"version":0,"block":{"attributes":{"address":{"type":"string","description_kind":"plain","computed":true},"blacklisted":{"type":"bool","description_kind":"plain","computed":true},"country_code":{"type":"number","description_kind":"plain","computed":true},"device_type":{"type":"string","description_kind":"plain","computed":true},"enabled":{"type":"bool","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"label":{"type":"string","description":"The name of the contact method to find in the PagerDuty API","description_kind":"plain","required":true},"send_short_email":{"type":"bool","description_kind":"plain","computed":true},"type":{"type":"string","description":"The type of the contact method","description_kind":"plain","required":true},"user_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_users":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"team_ids":{"type":["list","string"],"description_kind":"plain","optional":true},"users":{"type":["list",["object",{"email":"string","id":"string","name":"string"}]],"description":"List of users who are members of the team","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_vendor":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}}}}}} +{"format_version":"1.0","provider_schemas":{"registry.terraform.io/pagerduty/pagerduty":{"provider":{"version":0,"block":{"attributes":{"api_url_override":{"type":"string","description_kind":"plain","optional":true},"service_region":{"type":"string","description_kind":"plain","optional":true},"skip_credentials_validation":{"type":"bool","description_kind":"plain","optional":true},"token":{"type":"string","description_kind":"plain","optional":true},"user_token":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"use_app_oauth_scoped_token":{"nesting_mode":"list","block":{"attributes":{"pd_client_id":{"type":"string","description_kind":"plain","optional":true},"pd_client_secret":{"type":"string","description_kind":"plain","optional":true},"pd_subdomain":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"},"max_items":1}},"description_kind":"plain"}},"resource_schemas":{"pagerduty_addon":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"src":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_automation_actions_action":{"version":0,"block":{"attributes":{"action_classification":{"type":"string","description_kind":"plain","optional":true},"action_type":{"type":"string","description_kind":"plain","required":true},"creation_time":{"type":"string","description_kind":"plain","optional":true,"computed":true},"description":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"modify_time":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"runner_id":{"type":"string","description_kind":"plain","optional":true},"runner_type":{"type":"string","description_kind":"plain","optional":true,"computed":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"block_types":{"action_data_reference":{"nesting_mode":"list","block":{"attributes":{"invocation_command":{"type":"string","description_kind":"plain","optional":true},"process_automation_job_arguments":{"type":"string","description_kind":"plain","optional":true},"process_automation_job_id":{"type":"string","description_kind":"plain","optional":true},"process_automation_node_filter":{"type":"string","description_kind":"plain","optional":true},"script":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"}},"pagerduty_automation_actions_action_service_association":{"version":0,"block":{"attributes":{"action_id":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"service_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_automation_actions_action_team_association":{"version":0,"block":{"attributes":{"action_id":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"team_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_automation_actions_runner":{"version":0,"block":{"attributes":{"creation_time":{"type":"string","description_kind":"plain","computed":true},"description":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"last_seen":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"runbook_api_key":{"type":"string","description_kind":"plain","optional":true,"sensitive":true},"runbook_base_uri":{"type":"string","description_kind":"plain","optional":true},"runner_type":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_automation_actions_runner_team_association":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"runner_id":{"type":"string","description_kind":"plain","required":true},"team_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_business_service":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true,"computed":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","computed":true},"name":{"type":"string","description_kind":"plain","required":true},"point_of_contact":{"type":"string","description_kind":"plain","optional":true},"self":{"type":"string","description_kind":"plain","computed":true},"summary":{"type":"string","description_kind":"plain","computed":true},"team":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","deprecated":true,"optional":true,"computed":true}},"description_kind":"plain"}},"pagerduty_business_service_subscriber":{"version":0,"block":{"attributes":{"business_service_id":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"subscriber_id":{"type":"string","description_kind":"plain","required":true},"subscriber_type":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_escalation_policy":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"num_loops":{"type":"number","description_kind":"plain","optional":true},"teams":{"type":["list","string"],"description_kind":"plain","optional":true}},"block_types":{"rule":{"nesting_mode":"list","block":{"attributes":{"escalation_delay_in_minutes":{"type":"number","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","computed":true}},"block_types":{"escalation_rule_assignment_strategy":{"nesting_mode":"list","block":{"attributes":{"type":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"},"max_items":1},"target":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}},"pagerduty_event_orchestration":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"routes":{"type":"number","description_kind":"plain","computed":true},"team":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"integration":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","computed":true},"parameters":{"type":["list",["object",{"routing_key":"string","type":"string"}]],"description_kind":"plain","computed":true}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_event_orchestration_global":{"version":0,"block":{"attributes":{"event_orchestration":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"block_types":{"catch_all":{"nesting_mode":"list","block":{"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"annotate":{"type":"string","description_kind":"plain","optional":true},"drop_event":{"type":"bool","description_kind":"plain","optional":true},"event_action":{"type":"string","description_kind":"plain","optional":true},"priority":{"type":"string","description_kind":"plain","optional":true},"route_to":{"type":"string","description_kind":"plain","optional":true},"severity":{"type":"string","description_kind":"plain","optional":true},"suppress":{"type":"bool","description_kind":"plain","optional":true},"suspend":{"type":"number","description_kind":"plain","optional":true}},"block_types":{"automation_action":{"nesting_mode":"list","block":{"attributes":{"auto_send":{"type":"bool","description_kind":"plain","optional":true},"name":{"type":"string","description_kind":"plain","required":true},"url":{"type":"string","description_kind":"plain","required":true}},"block_types":{"header":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"parameter":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"extraction":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","required":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"incident_custom_field_update":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"path":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"},"min_items":1,"max_items":1},"set":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true}},"block_types":{"rule":{"nesting_mode":"list","block":{"attributes":{"disabled":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"annotate":{"type":"string","description_kind":"plain","optional":true},"drop_event":{"type":"bool","description_kind":"plain","optional":true},"event_action":{"type":"string","description_kind":"plain","optional":true},"priority":{"type":"string","description_kind":"plain","optional":true},"route_to":{"type":"string","description_kind":"plain","optional":true},"severity":{"type":"string","description_kind":"plain","optional":true},"suppress":{"type":"bool","description_kind":"plain","optional":true},"suspend":{"type":"number","description_kind":"plain","optional":true}},"block_types":{"automation_action":{"nesting_mode":"list","block":{"attributes":{"auto_send":{"type":"bool","description_kind":"plain","optional":true},"name":{"type":"string","description_kind":"plain","required":true},"url":{"type":"string","description_kind":"plain","required":true}},"block_types":{"header":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"parameter":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"extraction":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","required":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"incident_custom_field_update":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"path":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1},"condition":{"nesting_mode":"list","block":{"attributes":{"expression":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}},"pagerduty_event_orchestration_integration":{"version":0,"block":{"attributes":{"event_orchestration":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","required":true},"parameters":{"type":["list",["object",{"routing_key":"string","type":"string"}]],"description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_event_orchestration_router":{"version":0,"block":{"attributes":{"event_orchestration":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"block_types":{"catch_all":{"nesting_mode":"list","block":{"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"route_to":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"},"min_items":1,"max_items":1},"set":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true}},"block_types":{"rule":{"nesting_mode":"list","block":{"attributes":{"disabled":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"route_to":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"min_items":1,"max_items":1},"condition":{"nesting_mode":"list","block":{"attributes":{"expression":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"}},"pagerduty_event_orchestration_service":{"version":0,"block":{"attributes":{"enable_event_orchestration_for_service":{"type":"bool","description_kind":"plain","optional":true,"computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"service":{"type":"string","description_kind":"plain","required":true}},"block_types":{"catch_all":{"nesting_mode":"list","block":{"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"annotate":{"type":"string","description_kind":"plain","optional":true},"event_action":{"type":"string","description_kind":"plain","optional":true},"priority":{"type":"string","description_kind":"plain","optional":true},"route_to":{"type":"string","description_kind":"plain","optional":true},"severity":{"type":"string","description_kind":"plain","optional":true},"suppress":{"type":"bool","description_kind":"plain","optional":true},"suspend":{"type":"number","description_kind":"plain","optional":true}},"block_types":{"automation_action":{"nesting_mode":"list","block":{"attributes":{"auto_send":{"type":"bool","description_kind":"plain","optional":true},"name":{"type":"string","description_kind":"plain","required":true},"url":{"type":"string","description_kind":"plain","required":true}},"block_types":{"header":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"parameter":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"extraction":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","required":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"incident_custom_field_update":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_automation_action":{"nesting_mode":"list","block":{"attributes":{"action_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"max_items":1},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"path":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"},"min_items":1,"max_items":1},"set":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true}},"block_types":{"rule":{"nesting_mode":"list","block":{"attributes":{"disabled":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"annotate":{"type":"string","description_kind":"plain","optional":true},"event_action":{"type":"string","description_kind":"plain","optional":true},"priority":{"type":"string","description_kind":"plain","optional":true},"route_to":{"type":"string","description_kind":"plain","optional":true},"severity":{"type":"string","description_kind":"plain","optional":true},"suppress":{"type":"bool","description_kind":"plain","optional":true},"suspend":{"type":"number","description_kind":"plain","optional":true}},"block_types":{"automation_action":{"nesting_mode":"list","block":{"attributes":{"auto_send":{"type":"bool","description_kind":"plain","optional":true},"name":{"type":"string","description_kind":"plain","required":true},"url":{"type":"string","description_kind":"plain","required":true}},"block_types":{"header":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"parameter":{"nesting_mode":"list","block":{"attributes":{"key":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"extraction":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","required":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"incident_custom_field_update":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_automation_action":{"nesting_mode":"list","block":{"attributes":{"action_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"max_items":1},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"path":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1},"condition":{"nesting_mode":"list","block":{"attributes":{"expression":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}},"pagerduty_event_orchestration_unrouted":{"version":0,"block":{"attributes":{"event_orchestration":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"block_types":{"catch_all":{"nesting_mode":"list","block":{"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"event_action":{"type":"string","description_kind":"plain","optional":true},"severity":{"type":"string","description_kind":"plain","optional":true},"suppress":{"type":"bool","description_kind":"plain","computed":true}},"block_types":{"extraction":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","required":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"path":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"},"min_items":1,"max_items":1},"set":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true}},"block_types":{"rule":{"nesting_mode":"list","block":{"attributes":{"disabled":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"actions":{"nesting_mode":"list","block":{"attributes":{"event_action":{"type":"string","description_kind":"plain","optional":true},"route_to":{"type":"string","description_kind":"plain","optional":true},"severity":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"extraction":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","required":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"path":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1},"condition":{"nesting_mode":"list","block":{"attributes":{"expression":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}},"pagerduty_event_rule":{"version":0,"block":{"attributes":{"action_json":{"type":"string","description_kind":"plain","required":true},"advanced_condition_json":{"type":"string","description_kind":"plain","optional":true},"catch_all":{"type":"bool","description_kind":"plain","computed":true},"condition_json":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}},"pagerduty_extension":{"version":0,"block":{"attributes":{"config":{"type":"string","description_kind":"plain","optional":true},"endpoint_url":{"type":"string","description_kind":"plain","optional":true,"sensitive":true},"extension_objects":{"type":["set","string"],"description_kind":"plain","required":true},"extension_schema":{"type":"string","description_kind":"plain","required":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","optional":true,"computed":true},"summary":{"type":"string","description_kind":"plain","computed":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}},"pagerduty_extension_servicenow":{"version":0,"block":{"attributes":{"endpoint_url":{"type":"string","description_kind":"plain","optional":true,"sensitive":true},"extension_objects":{"type":["set","string"],"description_kind":"plain","required":true},"extension_schema":{"type":"string","description_kind":"plain","required":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","optional":true,"computed":true},"referer":{"type":"string","description_kind":"plain","required":true},"snow_password":{"type":"string","description_kind":"plain","required":true,"sensitive":true},"snow_user":{"type":"string","description_kind":"plain","required":true},"summary":{"type":"string","description_kind":"plain","optional":true,"computed":true},"sync_options":{"type":"string","description_kind":"plain","required":true},"target":{"type":"string","description_kind":"plain","required":true},"task_type":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}},"pagerduty_incident_custom_field":{"version":0,"block":{"attributes":{"data_type":{"type":"string","description_kind":"plain","required":true},"default_value":{"type":"string","description_kind":"plain","optional":true},"description":{"type":"string","description_kind":"plain","optional":true},"display_name":{"type":"string","description_kind":"plain","required":true},"field_type":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_incident_custom_field_option":{"version":0,"block":{"attributes":{"data_type":{"type":"string","description_kind":"plain","required":true},"field":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_incident_workflow":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"team":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"step":{"nesting_mode":"list","block":{"attributes":{"action":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"block_types":{"inline_steps_input":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true}},"block_types":{"step":{"nesting_mode":"list","block":{"attributes":{"action":{"type":"string","description_kind":"plain","required":true},"name":{"type":"string","description_kind":"plain","required":true}},"block_types":{"input":{"nesting_mode":"list","block":{"attributes":{"generated":{"type":"bool","description_kind":"plain","computed":true},"name":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"}},"input":{"nesting_mode":"list","block":{"attributes":{"generated":{"type":"bool","description_kind":"plain","computed":true},"name":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_incident_workflow_trigger":{"version":0,"block":{"attributes":{"condition":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"services":{"type":["list","string"],"description_kind":"plain","optional":true},"subscribed_to_all_services":{"type":"bool","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true},"workflow":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_maintenance_window":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"end_time":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"services":{"type":["set","string"],"description_kind":"plain","required":true},"start_time":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_response_play":{"version":0,"block":{"attributes":{"conference_number":{"type":"string","description_kind":"plain","optional":true},"conference_url":{"type":"string","description_kind":"plain","optional":true},"description":{"type":"string","description_kind":"plain","optional":true},"from":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"responders_message":{"type":"string","description_kind":"plain","optional":true},"runnability":{"type":"string","description_kind":"plain","optional":true},"subscribers_message":{"type":"string","description_kind":"plain","optional":true},"team":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"responder":{"nesting_mode":"list","block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"escalation_rule":{"type":["list",["object",{"escalation_delay_in_minutes":"number","id":"string","target":["list",["object",{"id":"string","type":"string"}]]}]],"description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true},"name":{"type":"string","description_kind":"plain","optional":true},"num_loops":{"type":"number","description_kind":"plain","computed":true},"on_call_handoff_notifications":{"type":"string","description_kind":"plain","computed":true},"service":{"type":["list",["object",{"id":"string","type":"string"}]],"description_kind":"plain","computed":true},"team":{"type":["list",["object",{"id":"string","type":"string"}]],"description_kind":"plain","computed":true},"type":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"subscriber":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_ruleset":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"routing_keys":{"type":["list","string"],"description_kind":"plain","computed":true},"type":{"type":"string","description_kind":"plain","computed":true}},"block_types":{"team":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"max_items":1}},"description_kind":"plain"}},"pagerduty_ruleset_rule":{"version":0,"block":{"attributes":{"catch_all":{"type":"bool","description_kind":"plain","optional":true},"disabled":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"position":{"type":"number","description_kind":"plain","optional":true},"ruleset":{"type":"string","description_kind":"plain","required":true}},"block_types":{"actions":{"nesting_mode":"list","block":{"block_types":{"annotate":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"event_action":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"extractions":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","optional":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"priority":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"route":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"severity":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"suppress":{"nesting_mode":"list","block":{"attributes":{"threshold_time_amount":{"type":"number","description_kind":"plain","optional":true},"threshold_time_unit":{"type":"string","description_kind":"plain","optional":true},"threshold_value":{"type":"number","description_kind":"plain","optional":true},"value":{"type":"bool","description_kind":"plain","optional":true}},"description_kind":"plain"}},"suspend":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"number","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"conditions":{"nesting_mode":"list","block":{"attributes":{"operator":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"subconditions":{"nesting_mode":"list","block":{"attributes":{"operator":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"parameter":{"nesting_mode":"list","block":{"attributes":{"path":{"type":"string","description_kind":"plain","optional":true},"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"time_frame":{"nesting_mode":"list","block":{"block_types":{"active_between":{"nesting_mode":"list","block":{"attributes":{"end_time":{"type":"number","description_kind":"plain","optional":true},"start_time":{"type":"number","description_kind":"plain","optional":true}},"description_kind":"plain"}},"scheduled_weekly":{"nesting_mode":"list","block":{"attributes":{"duration":{"type":"number","description_kind":"plain","optional":true},"start_time":{"type":"number","description_kind":"plain","optional":true},"timezone":{"type":"string","description_kind":"plain","optional":true},"weekdays":{"type":["list","number"],"description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"parameters":{"nesting_mode":"list","block":{"attributes":{"path":{"type":"string","description_kind":"plain","optional":true},"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_schedule":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","optional":true},"final_schedule":{"type":["list",["object",{"name":"string","rendered_coverage_percentage":"string"}]],"description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","optional":true},"overflow":{"type":"bool","description_kind":"plain","optional":true},"teams":{"type":["list","string"],"description_kind":"plain","optional":true},"time_zone":{"type":"string","description_kind":"plain","required":true}},"block_types":{"layer":{"nesting_mode":"list","block":{"attributes":{"end":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","computed":true},"name":{"type":"string","description_kind":"plain","optional":true,"computed":true},"rendered_coverage_percentage":{"type":"string","description_kind":"plain","computed":true},"rotation_turn_length_seconds":{"type":"number","description_kind":"plain","required":true},"rotation_virtual_start":{"type":"string","description_kind":"plain","required":true},"start":{"type":"string","description_kind":"plain","required":true},"users":{"type":["list","string"],"description_kind":"plain","required":true}},"block_types":{"restriction":{"nesting_mode":"list","block":{"attributes":{"duration_seconds":{"type":"number","description_kind":"plain","required":true},"start_day_of_week":{"type":"number","description_kind":"plain","optional":true},"start_time_of_day":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}},"pagerduty_service":{"version":0,"block":{"attributes":{"acknowledgement_timeout":{"type":"string","description_kind":"plain","optional":true},"alert_creation":{"type":"string","description_kind":"plain","optional":true},"alert_grouping":{"type":"string","description_kind":"plain","deprecated":true,"optional":true,"computed":true},"alert_grouping_timeout":{"type":"string","description_kind":"plain","deprecated":true,"optional":true,"computed":true},"auto_resolve_timeout":{"type":"string","description_kind":"plain","optional":true},"created_at":{"type":"string","description_kind":"plain","computed":true},"description":{"type":"string","description_kind":"plain","optional":true},"escalation_policy":{"type":"string","description_kind":"plain","required":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"last_incident_timestamp":{"type":"string","description_kind":"plain","computed":true},"name":{"type":"string","description_kind":"plain","required":true},"response_play":{"type":"string","description_kind":"plain","optional":true,"computed":true},"status":{"type":"string","description_kind":"plain","computed":true},"type":{"type":"string","description_kind":"plain","computed":true}},"block_types":{"alert_grouping_parameters":{"nesting_mode":"list","block":{"attributes":{"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"config":{"nesting_mode":"list","block":{"attributes":{"aggregate":{"type":"string","description_kind":"plain","optional":true},"fields":{"type":["list","string"],"description_kind":"plain","optional":true},"time_window":{"type":"number","description_kind":"plain","optional":true,"computed":true},"timeout":{"type":"number","description_kind":"plain","optional":true}},"description_kind":"plain"},"max_items":1}},"description_kind":"plain"},"max_items":1},"auto_pause_notifications_parameters":{"nesting_mode":"list","block":{"attributes":{"enabled":{"type":"bool","description_kind":"plain","optional":true,"computed":true},"timeout":{"type":"number","description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"},"max_items":1},"incident_urgency_rule":{"nesting_mode":"list","block":{"attributes":{"type":{"type":"string","description_kind":"plain","required":true},"urgency":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"during_support_hours":{"nesting_mode":"list","block":{"attributes":{"type":{"type":"string","description_kind":"plain","optional":true},"urgency":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"},"max_items":1},"outside_support_hours":{"nesting_mode":"list","block":{"attributes":{"type":{"type":"string","description_kind":"plain","optional":true},"urgency":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"},"max_items":1}},"description_kind":"plain"},"max_items":1},"scheduled_actions":{"nesting_mode":"list","block":{"attributes":{"to_urgency":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"at":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"}},"support_hours":{"nesting_mode":"list","block":{"attributes":{"days_of_week":{"type":["list","number"],"description_kind":"plain","optional":true},"end_time":{"type":"string","description_kind":"plain","optional":true},"start_time":{"type":"string","description_kind":"plain","optional":true},"time_zone":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"},"max_items":1}},"description_kind":"plain"}},"pagerduty_service_dependency":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"block_types":{"dependency":{"nesting_mode":"list","block":{"attributes":{"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"dependent_service":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"min_items":1},"supporting_service":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"},"min_items":1,"max_items":1}},"description_kind":"plain"}},"pagerduty_service_event_rule":{"version":0,"block":{"attributes":{"disabled":{"type":"bool","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"position":{"type":"number","description_kind":"plain","optional":true},"service":{"type":"string","description_kind":"plain","required":true}},"block_types":{"actions":{"nesting_mode":"list","block":{"block_types":{"annotate":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"event_action":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"extractions":{"nesting_mode":"list","block":{"attributes":{"regex":{"type":"string","description_kind":"plain","optional":true},"source":{"type":"string","description_kind":"plain","optional":true},"target":{"type":"string","description_kind":"plain","optional":true},"template":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"priority":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"severity":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"suppress":{"nesting_mode":"list","block":{"attributes":{"threshold_time_amount":{"type":"number","description_kind":"plain","optional":true},"threshold_time_unit":{"type":"string","description_kind":"plain","optional":true},"threshold_value":{"type":"number","description_kind":"plain","optional":true},"value":{"type":"bool","description_kind":"plain","optional":true}},"description_kind":"plain"}},"suspend":{"nesting_mode":"list","block":{"attributes":{"value":{"type":"number","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"conditions":{"nesting_mode":"list","block":{"attributes":{"operator":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"subconditions":{"nesting_mode":"list","block":{"attributes":{"operator":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"parameter":{"nesting_mode":"list","block":{"attributes":{"path":{"type":"string","description_kind":"plain","optional":true},"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"time_frame":{"nesting_mode":"list","block":{"block_types":{"active_between":{"nesting_mode":"list","block":{"attributes":{"end_time":{"type":"number","description_kind":"plain","optional":true},"start_time":{"type":"number","description_kind":"plain","optional":true}},"description_kind":"plain"}},"scheduled_weekly":{"nesting_mode":"list","block":{"attributes":{"duration":{"type":"number","description_kind":"plain","optional":true},"start_time":{"type":"number","description_kind":"plain","optional":true},"timezone":{"type":"string","description_kind":"plain","optional":true},"weekdays":{"type":["list","number"],"description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"},"max_items":1},"variable":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"parameters":{"nesting_mode":"list","block":{"attributes":{"path":{"type":"string","description_kind":"plain","optional":true},"value":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_service_integration":{"version":0,"block":{"attributes":{"email_filter_mode":{"type":"string","description_kind":"plain","optional":true,"computed":true},"email_incident_creation":{"type":"string","description_kind":"plain","optional":true,"computed":true},"email_parsing_fallback":{"type":"string","description_kind":"plain","optional":true,"computed":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"integration_email":{"type":"string","description_kind":"plain","optional":true,"computed":true},"integration_key":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","optional":true},"service":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true},"vendor":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"block_types":{"email_filter":{"nesting_mode":"list","block":{"attributes":{"body_mode":{"type":"string","description_kind":"plain","optional":true},"body_regex":{"type":"string","description_kind":"plain","optional":true},"from_email_mode":{"type":"string","description_kind":"plain","optional":true},"from_email_regex":{"type":"string","description_kind":"plain","optional":true},"id":{"type":"string","description_kind":"plain","computed":true},"subject_mode":{"type":"string","description_kind":"plain","optional":true},"subject_regex":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"email_parser":{"nesting_mode":"list","block":{"attributes":{"action":{"type":"string","description_kind":"plain","required":true},"id":{"type":"number","description_kind":"plain","computed":true}},"block_types":{"match_predicate":{"nesting_mode":"list","block":{"attributes":{"type":{"type":"string","description_kind":"plain","required":true}},"block_types":{"predicate":{"nesting_mode":"list","block":{"attributes":{"matcher":{"type":"string","description_kind":"plain","optional":true},"part":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","required":true}},"block_types":{"predicate":{"nesting_mode":"list","block":{"attributes":{"matcher":{"type":"string","description_kind":"plain","required":true},"part":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1,"max_items":1},"value_extractor":{"nesting_mode":"list","block":{"attributes":{"ends_before":{"type":"string","description_kind":"plain","optional":true},"part":{"type":"string","description_kind":"plain","required":true},"regex":{"type":"string","description_kind":"plain","optional":true},"starts_after":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","required":true},"value_name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_slack_connection":{"version":0,"block":{"attributes":{"channel_id":{"type":"string","description_kind":"plain","required":true},"channel_name":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"notification_type":{"type":"string","description_kind":"plain","required":true},"source_id":{"type":"string","description_kind":"plain","required":true},"source_name":{"type":"string","description_kind":"plain","computed":true},"source_type":{"type":"string","description_kind":"plain","required":true},"workspace_id":{"type":"string","description_kind":"plain","required":true}},"block_types":{"config":{"nesting_mode":"list","block":{"attributes":{"events":{"type":["list","string"],"description_kind":"plain","required":true},"priorities":{"type":["list","string"],"description_kind":"plain","optional":true},"urgency":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}},"pagerduty_tag":{"version":0,"block":{"attributes":{"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"label":{"type":"string","description_kind":"plain","required":true},"summary":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_tag_assignment":{"version":0,"block":{"attributes":{"entity_id":{"type":"string","description_kind":"plain","required":true},"entity_type":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"tag_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_team":{"version":0,"block":{"attributes":{"default_role":{"type":"string","description_kind":"plain","optional":true,"computed":true},"description":{"type":"string","description_kind":"plain","optional":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"parent":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"pagerduty_team_membership":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"role":{"type":"string","description_kind":"plain","optional":true},"team_id":{"type":"string","description_kind":"plain","required":true},"user_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_user":{"version":0,"block":{"attributes":{"avatar_url":{"type":"string","description_kind":"plain","computed":true},"color":{"type":"string","description_kind":"plain","optional":true,"computed":true},"description":{"type":"string","description_kind":"plain","optional":true},"email":{"type":"string","description_kind":"plain","required":true},"html_url":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"invitation_sent":{"type":"bool","description_kind":"plain","computed":true},"job_title":{"type":"string","description_kind":"plain","optional":true},"license":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"role":{"type":"string","description_kind":"plain","optional":true},"teams":{"type":["set","string"],"description_kind":"plain","deprecated":true,"optional":true,"computed":true},"time_zone":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}},"pagerduty_user_contact_method":{"version":0,"block":{"attributes":{"address":{"type":"string","description_kind":"plain","required":true},"blacklisted":{"type":"bool","description_kind":"plain","computed":true},"country_code":{"type":"number","description_kind":"plain","optional":true,"computed":true},"enabled":{"type":"bool","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"label":{"type":"string","description_kind":"plain","required":true},"send_short_email":{"type":"bool","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","required":true},"user_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_user_notification_rule":{"version":0,"block":{"attributes":{"contact_method":{"type":["map","string"],"description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"start_delay_in_minutes":{"type":"number","description_kind":"plain","required":true},"urgency":{"type":"string","description_kind":"plain","required":true},"user_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_webhook_subscription":{"version":0,"block":{"attributes":{"active":{"type":"bool","description_kind":"plain","optional":true,"computed":true},"description":{"type":"string","description_kind":"plain","optional":true},"events":{"type":["list","string"],"description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"type":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"delivery_method":{"nesting_mode":"list","block":{"attributes":{"temporarily_disabled":{"type":"bool","description_kind":"plain","optional":true,"computed":true},"type":{"type":"string","description_kind":"plain","optional":true},"url":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"custom_header":{"nesting_mode":"list","block":{"attributes":{"name":{"type":"string","description_kind":"plain","required":true},"value":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}}},"description_kind":"plain"},"min_items":1},"filter":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true},"type":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"},"min_items":1}},"description_kind":"plain"}}},"data_source_schemas":{"pagerduty_automation_actions_action":{"version":0,"block":{"attributes":{"action_classification":{"type":"string","description_kind":"plain","optional":true,"computed":true},"action_data_reference":{"type":["list",["object",{"invocation_command":"string","process_automation_job_arguments":"string","process_automation_job_id":"string","process_automation_node_filter":"string","script":"string"}]],"description_kind":"plain","computed":true},"action_type":{"type":"string","description_kind":"plain","computed":true},"creation_time":{"type":"string","description_kind":"plain","optional":true,"computed":true},"description":{"type":"string","description_kind":"plain","optional":true,"computed":true},"id":{"type":"string","description_kind":"plain","required":true},"modify_time":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","computed":true},"runner_id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"runner_type":{"type":"string","description_kind":"plain","optional":true,"computed":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}},"pagerduty_automation_actions_runner":{"version":0,"block":{"attributes":{"creation_time":{"type":"string","description_kind":"plain","computed":true},"description":{"type":"string","description_kind":"plain","optional":true,"computed":true},"id":{"type":"string","description_kind":"plain","required":true},"last_seen":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","computed":true},"runbook_base_uri":{"type":"string","description_kind":"plain","optional":true,"computed":true},"runner_type":{"type":"string","description_kind":"plain","computed":true},"type":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_business_service":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_escalation_policy":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_event_orchestration":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"block_types":{"integration":{"nesting_mode":"list","block":{"attributes":{"id":{"type":"string","description_kind":"plain","computed":true},"label":{"type":"string","description_kind":"plain","computed":true},"parameters":{"type":["list",["object",{"routing_key":"string","type":"string"}]],"description_kind":"plain","computed":true}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_event_orchestration_integration":{"version":0,"block":{"attributes":{"event_orchestration":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true},"label":{"type":"string","description_kind":"plain","optional":true},"parameters":{"type":["list",["object",{"routing_key":"string","type":"string"}]],"description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_event_orchestrations":{"version":0,"block":{"attributes":{"event_orchestrations":{"type":["list",["object",{"id":"string","integration":["list",["object",{"id":"string","label":"string","parameters":["list",["object",{"routing_key":"string","type":"string"}]]}]],"name":"string"}]],"description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name_filter":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_extension_schema":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_incident_custom_field":{"version":0,"block":{"attributes":{"data_type":{"type":"string","description_kind":"plain","computed":true},"description":{"type":"string","description_kind":"plain","computed":true},"display_name":{"type":"string","description_kind":"plain","computed":true},"field_type":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_incident_workflow":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_license":{"version":0,"block":{"attributes":{"allocations_available":{"type":"number","description_kind":"plain","optional":true,"computed":true},"current_value":{"type":"number","description_kind":"plain","optional":true,"computed":true},"description":{"type":"string","description_kind":"plain","optional":true,"computed":true},"html_url":{"type":"string","description_kind":"plain","optional":true,"computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","optional":true,"computed":true},"role_group":{"type":"string","description_kind":"plain","optional":true,"computed":true},"self":{"type":"string","description_kind":"plain","optional":true,"computed":true},"summary":{"type":"string","description_kind":"plain","optional":true,"computed":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true},"valid_roles":{"type":["list","string"],"description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}},"pagerduty_licenses":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true}},"block_types":{"licenses":{"nesting_mode":"list","block":{"attributes":{"allocations_available":{"type":"number","description_kind":"plain","optional":true,"computed":true},"current_value":{"type":"number","description_kind":"plain","optional":true,"computed":true},"description":{"type":"string","description_kind":"plain","optional":true,"computed":true},"html_url":{"type":"string","description_kind":"plain","optional":true,"computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","optional":true,"computed":true},"role_group":{"type":"string","description_kind":"plain","optional":true,"computed":true},"self":{"type":"string","description_kind":"plain","optional":true,"computed":true},"summary":{"type":"string","description_kind":"plain","optional":true,"computed":true},"type":{"type":"string","description_kind":"plain","optional":true,"computed":true},"valid_roles":{"type":["list","string"],"description_kind":"plain","optional":true,"computed":true}},"description_kind":"plain"}}},"description_kind":"plain"}},"pagerduty_priority":{"version":0,"block":{"attributes":{"description":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description":"The name of the priority to find in the PagerDuty API","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_ruleset":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"routing_keys":{"type":["list","string"],"description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_schedule":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_service":{"version":0,"block":{"attributes":{"acknowledgement_timeout":{"type":"number","description_kind":"plain","computed":true},"alert_creation":{"type":"string","description_kind":"plain","computed":true},"auto_resolve_timeout":{"type":"number","description_kind":"plain","computed":true},"description":{"type":"string","description_kind":"plain","computed":true},"escalation_policy":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"teams":{"type":["list",["object",{"id":"string","name":"string"}]],"description":"The set of teams associated with the service","description_kind":"plain","computed":true},"type":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_service_integration":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"integration_key":{"type":"string","description_kind":"plain","computed":true,"sensitive":true},"integration_summary":{"type":"string","description":"examples 'Amazon CloudWatch', 'New Relic","description_kind":"plain","required":true},"service_name":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_standards":{"version":0,"block":{"attributes":{"resource_type":{"type":"string","description_kind":"plain","optional":true},"standards":{"type":["list",["object",{"active":"bool","description":"string","exclusions":["list",["object",{"id":"string","type":"string"}]],"id":"string","inclusions":["list",["object",{"id":"string","type":"string"}]],"name":"string","resource_type":"string","type":"string"}]],"description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_standards_resource_scores":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","required":true},"resource_type":{"type":"string","description_kind":"plain","required":true},"score":{"type":["object",{"passing":"number","total":"number"}],"description_kind":"plain","computed":true},"standards":{"type":["list",["object",{"active":"bool","description":"string","id":"string","name":"string","pass":"bool","type":"string"}]],"description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_standards_resources_scores":{"version":0,"block":{"attributes":{"ids":{"type":["list","string"],"description_kind":"plain","required":true},"resource_type":{"type":"string","description_kind":"plain","required":true},"resources":{"type":["list",["object",{"resource_id":"string","resource_type":"string","score":["object",{"passing":"number","total":"number"}],"standards":["list",["object",{"active":"bool","description":"string","id":"string","name":"string","pass":"bool","type":"string"}]]}]],"description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_tag":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"label":{"type":"string","description":"The label of the tag to find in the PagerDuty API","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_team":{"version":0,"block":{"attributes":{"default_role":{"type":"string","description_kind":"plain","optional":true},"description":{"type":"string","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description":"The name of the team to find in the PagerDuty API","description_kind":"plain","required":true},"parent":{"type":"string","description_kind":"plain","optional":true}},"description_kind":"plain"}},"pagerduty_team_members":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"members":{"type":["list",["object",{"id":"string","role":"string","summary":"string","type":"string"}]],"description":"The set of team memberships associated with the team","description_kind":"plain","computed":true},"team_id":{"type":"string","description":"The ID of the team to find via the PagerDuty API","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_user":{"version":0,"block":{"attributes":{"email":{"type":"string","description_kind":"plain","required":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_user_contact_method":{"version":0,"block":{"attributes":{"address":{"type":"string","description_kind":"plain","computed":true},"blacklisted":{"type":"bool","description_kind":"plain","computed":true},"country_code":{"type":"number","description_kind":"plain","computed":true},"device_type":{"type":"string","description_kind":"plain","computed":true},"enabled":{"type":"bool","description_kind":"plain","computed":true},"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"label":{"type":"string","description":"The name of the contact method to find in the PagerDuty API","description_kind":"plain","required":true},"send_short_email":{"type":"bool","description_kind":"plain","computed":true},"type":{"type":"string","description":"The type of the contact method","description_kind":"plain","required":true},"user_id":{"type":"string","description_kind":"plain","required":true}},"description_kind":"plain"}},"pagerduty_users":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"team_ids":{"type":["list","string"],"description_kind":"plain","optional":true},"users":{"type":["list",["object",{"email":"string","id":"string","name":"string"}]],"description":"List of users who are members of the team","description_kind":"plain","computed":true}},"description_kind":"plain"}},"pagerduty_vendor":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"name":{"type":"string","description_kind":"plain","required":true},"type":{"type":"string","description_kind":"plain","computed":true}},"description_kind":"plain"}}}}}} diff --git a/config/service/config.go b/config/service/config.go index 35bd748..f3192ad 100644 --- a/config/service/config.go +++ b/config/service/config.go @@ -1,6 +1,6 @@ package slack -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/slack/config.go b/config/slack/config.go index a17e693..4723720 100644 --- a/config/slack/config.go +++ b/config/slack/config.go @@ -1,6 +1,6 @@ package slack -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/tag/config.go b/config/tag/config.go index 0c9bd7f..098fb4b 100644 --- a/config/tag/config.go +++ b/config/tag/config.go @@ -1,6 +1,6 @@ package tag -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/team/config.go b/config/team/config.go index 9b325a8..fe541d4 100644 --- a/config/team/config.go +++ b/config/team/config.go @@ -1,6 +1,6 @@ package user -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/user/config.go b/config/user/config.go index 9ff2aa2..08fa569 100644 --- a/config/user/config.go +++ b/config/user/config.go @@ -1,6 +1,6 @@ package user -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/config/webhook/config.go b/config/webhook/config.go index e7326f0..a7c8bd3 100644 --- a/config/webhook/config.go +++ b/config/webhook/config.go @@ -1,6 +1,6 @@ package webhook -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure configures individual resources by adding custom ResourceConfigurators. func Configure(p *config.Provider) { diff --git a/examples-generated/addon/addon.yaml b/examples-generated/addon/v1alpha1/addon.yaml similarity index 100% rename from examples-generated/addon/addon.yaml rename to examples-generated/addon/v1alpha1/addon.yaml diff --git a/examples-generated/business/service.yaml b/examples-generated/business/v1alpha1/service.yaml similarity index 100% rename from examples-generated/business/service.yaml rename to examples-generated/business/v1alpha1/service.yaml diff --git a/examples-generated/business/servicesubscriber.yaml b/examples-generated/business/v1alpha1/servicesubscriber.yaml similarity index 100% rename from examples-generated/business/servicesubscriber.yaml rename to examples-generated/business/v1alpha1/servicesubscriber.yaml diff --git a/examples-generated/escalation/policy.yaml b/examples-generated/escalation/v1alpha1/policy.yaml similarity index 100% rename from examples-generated/escalation/policy.yaml rename to examples-generated/escalation/v1alpha1/policy.yaml diff --git a/examples-generated/event/orchestration.yaml b/examples-generated/event/v1alpha1/orchestration.yaml similarity index 100% rename from examples-generated/event/orchestration.yaml rename to examples-generated/event/v1alpha1/orchestration.yaml diff --git a/examples-generated/event/orchestrationrouter.yaml b/examples-generated/event/v1alpha1/orchestrationrouter.yaml similarity index 100% rename from examples-generated/event/orchestrationrouter.yaml rename to examples-generated/event/v1alpha1/orchestrationrouter.yaml diff --git a/examples-generated/event/orchestrationservice.yaml b/examples-generated/event/v1alpha1/orchestrationservice.yaml similarity index 85% rename from examples-generated/event/orchestrationservice.yaml rename to examples-generated/event/v1alpha1/orchestrationservice.yaml index cd3ed2f..4372e89 100644 --- a/examples-generated/event/orchestrationservice.yaml +++ b/examples-generated/event/v1alpha1/orchestrationservice.yaml @@ -36,6 +36,9 @@ spec: rule: - actions: - annotate: 'Please use our P1 runbook: https://docs.test/p1-runbook' + incidentCustomFieldUpdate: + - id: ${pagerduty_incident_custom_field.cs_impact.id} + value: High Impact priority: ${data.pagerduty_priority.p1.id} condition: - expression: event.severity matches 'critical' @@ -72,8 +75,8 @@ metadata: annotations: meta.upbound.io/example-id: event/v1alpha1/orchestrationservice labels: - testing.upbound.io/example-name: foo - name: foo + testing.upbound.io/example-name: example + name: example spec: forProvider: name: Engineering Escalation Policy @@ -82,7 +85,7 @@ spec: - escalationDelayInMinutes: 10 target: - id: ${pagerduty_user.example.id} - type: user + type: user_reference --- @@ -120,6 +123,26 @@ spec: --- +apiVersion: team.pagerduty.crossplane.io/v1alpha1 +kind: Membership +metadata: + annotations: + meta.upbound.io/example-id: event/v1alpha1/orchestrationservice + labels: + testing.upbound.io/example-name: foo + name: foo +spec: + forProvider: + role: manager + teamIdSelector: + matchLabels: + testing.upbound.io/example-name: engineering + userIdSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + apiVersion: user.pagerduty.crossplane.io/v1alpha1 kind: User metadata: diff --git a/examples-generated/event/orchestrationunrouted.yaml b/examples-generated/event/v1alpha1/orchestrationunrouted.yaml similarity index 100% rename from examples-generated/event/orchestrationunrouted.yaml rename to examples-generated/event/v1alpha1/orchestrationunrouted.yaml diff --git a/examples-generated/extensions/extension.yaml b/examples-generated/extensions/v1alpha1/extension.yaml similarity index 100% rename from examples-generated/extensions/extension.yaml rename to examples-generated/extensions/v1alpha1/extension.yaml diff --git a/examples-generated/extensions/servicenow.yaml b/examples-generated/extensions/v1alpha1/servicenow.yaml similarity index 100% rename from examples-generated/extensions/servicenow.yaml rename to examples-generated/extensions/v1alpha1/servicenow.yaml diff --git a/examples-generated/maintenance/window.yaml b/examples-generated/maintenance/v1alpha1/window.yaml similarity index 100% rename from examples-generated/maintenance/window.yaml rename to examples-generated/maintenance/v1alpha1/window.yaml diff --git a/examples-generated/response/play.yaml b/examples-generated/response/v1alpha1/play.yaml similarity index 100% rename from examples-generated/response/play.yaml rename to examples-generated/response/v1alpha1/play.yaml diff --git a/examples-generated/ruleset/rule.yaml b/examples-generated/ruleset/v1alpha1/rule.yaml similarity index 100% rename from examples-generated/ruleset/rule.yaml rename to examples-generated/ruleset/v1alpha1/rule.yaml diff --git a/examples-generated/ruleset/ruleset.yaml b/examples-generated/ruleset/v1alpha1/ruleset.yaml similarity index 100% rename from examples-generated/ruleset/ruleset.yaml rename to examples-generated/ruleset/v1alpha1/ruleset.yaml diff --git a/examples-generated/schedule/schedule.yaml b/examples-generated/schedule/v1alpha1/schedule.yaml similarity index 100% rename from examples-generated/schedule/schedule.yaml rename to examples-generated/schedule/v1alpha1/schedule.yaml diff --git a/examples-generated/service/dependency.yaml b/examples-generated/service/v1alpha1/dependency.yaml similarity index 100% rename from examples-generated/service/dependency.yaml rename to examples-generated/service/v1alpha1/dependency.yaml diff --git a/examples-generated/service/eventrule.yaml b/examples-generated/service/v1alpha1/eventrule.yaml similarity index 100% rename from examples-generated/service/eventrule.yaml rename to examples-generated/service/v1alpha1/eventrule.yaml diff --git a/examples-generated/service/integration.yaml b/examples-generated/service/v1alpha1/integration.yaml similarity index 100% rename from examples-generated/service/integration.yaml rename to examples-generated/service/v1alpha1/integration.yaml diff --git a/examples-generated/service/service.yaml b/examples-generated/service/v1alpha1/service.yaml similarity index 100% rename from examples-generated/service/service.yaml rename to examples-generated/service/v1alpha1/service.yaml diff --git a/examples-generated/slack/connection.yaml b/examples-generated/slack/v1alpha1/connection.yaml similarity index 100% rename from examples-generated/slack/connection.yaml rename to examples-generated/slack/v1alpha1/connection.yaml diff --git a/examples-generated/tag/assignment.yaml b/examples-generated/tag/v1alpha1/assignment.yaml similarity index 100% rename from examples-generated/tag/assignment.yaml rename to examples-generated/tag/v1alpha1/assignment.yaml diff --git a/examples-generated/tag/tag.yaml b/examples-generated/tag/v1alpha1/tag.yaml similarity index 100% rename from examples-generated/tag/tag.yaml rename to examples-generated/tag/v1alpha1/tag.yaml diff --git a/examples-generated/team/membership.yaml b/examples-generated/team/v1alpha1/membership.yaml similarity index 100% rename from examples-generated/team/membership.yaml rename to examples-generated/team/v1alpha1/membership.yaml diff --git a/examples-generated/team/team.yaml b/examples-generated/team/v1alpha1/team.yaml similarity index 100% rename from examples-generated/team/team.yaml rename to examples-generated/team/v1alpha1/team.yaml diff --git a/examples-generated/user/contactmethod.yaml b/examples-generated/user/v1alpha1/contactmethod.yaml similarity index 100% rename from examples-generated/user/contactmethod.yaml rename to examples-generated/user/v1alpha1/contactmethod.yaml diff --git a/examples-generated/user/notificationrule.yaml b/examples-generated/user/v1alpha1/notificationrule.yaml similarity index 100% rename from examples-generated/user/notificationrule.yaml rename to examples-generated/user/v1alpha1/notificationrule.yaml diff --git a/examples-generated/user/user.yaml b/examples-generated/user/v1alpha1/user.yaml similarity index 100% rename from examples-generated/user/user.yaml rename to examples-generated/user/v1alpha1/user.yaml diff --git a/examples-generated/webhook/subscription.yaml b/examples-generated/webhook/v1alpha1/subscription.yaml similarity index 100% rename from examples-generated/webhook/subscription.yaml rename to examples-generated/webhook/v1alpha1/subscription.yaml diff --git a/go.mod b/go.mod index 97b38e1..54c5587 100644 --- a/go.mod +++ b/go.mod @@ -1,40 +1,39 @@ module github.com/crossplane-contrib/provider-pagerduty -go 1.19 +go 1.20 require ( - github.com/crossplane/crossplane-runtime v0.20.0 - github.com/crossplane/crossplane-tools v0.0.0-20230714144037-2684f4bc7638 + dario.cat/mergo v1.0.0 + github.com/crossplane/crossplane-runtime v1.15.1 + github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 + github.com/crossplane/upjet v1.2.3 github.com/pkg/errors v0.9.1 - github.com/upbound/upjet v0.10.0-rc.0.0.20230802121849-caa74d2aebf2 gopkg.in/alecthomas/kingpin.v2 v2.2.6 - k8s.io/apimachinery v0.27.3 - k8s.io/client-go v0.27.3 - sigs.k8s.io/controller-runtime v0.15.0 - sigs.k8s.io/controller-tools v0.12.1 + k8s.io/apimachinery v0.29.1 + k8s.io/client-go v0.29.1 + sigs.k8s.io/controller-runtime v0.17.0 + sigs.k8s.io/controller-tools v0.14.0 ) require ( - dario.cat/mergo v1.0.0 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/antchfx/htmlquery v1.2.4 // indirect github.com/antchfx/xpath v1.2.0 // indirect - github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect + github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v3 v3.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/dave/jennifer v1.4.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.10.2 // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/evanphx/json-patch v5.6.0+incompatible // indirect + github.com/evanphx/json-patch/v5 v5.8.0 // indirect github.com/fatih/camelcase v1.0.0 // indirect - github.com/fatih/color v1.15.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-jose/go-jose/v3 v3.0.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect - github.com/go-logr/zapr v1.2.4 // indirect + github.com/fatih/color v1.16.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect @@ -43,30 +42,25 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/gnostic v0.6.9 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/google/uuid v1.4.0 // indirect github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect - github.com/hashicorp/go-hclog v1.2.1 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-retryablehttp v0.7.1 // indirect - github.com/hashicorp/go-rootcerts v1.0.2 // indirect - github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect - github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect - github.com/hashicorp/go-sockaddr v1.0.2 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-plugin v1.5.1 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/hcl/v2 v2.14.1 // indirect + github.com/hashicorp/hcl/v2 v2.19.1 // indirect github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-json v0.14.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.14.0 // indirect - github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect - github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0 // indirect - github.com/hashicorp/vault/api v1.9.2 // indirect + github.com/hashicorp/terraform-json v0.17.1 // indirect + github.com/hashicorp/terraform-plugin-framework v1.4.1 // indirect + github.com/hashicorp/terraform-plugin-go v0.19.0 // indirect + github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect + github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0 // indirect + github.com/hashicorp/terraform-registry-address v0.2.2 // indirect + github.com/hashicorp/terraform-svchost v0.1.1 // indirect + github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect github.com/iancoleman/strcase v0.2.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -74,10 +68,9 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-ps v1.0.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect @@ -87,47 +80,47 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.0 // indirect - github.com/ryanuber/go-glob v1.0.0 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cobra v1.7.0 // indirect + github.com/oklog/run v1.0.0 // indirect + github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tmccombs/hcl2json v0.3.3 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect - github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect - github.com/vmihailenco/tagparser v0.1.1 // indirect + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/yuin/goldmark v1.4.13 // indirect - github.com/zclconf/go-cty v1.11.0 // indirect - go.uber.org/atomic v1.11.0 // indirect + github.com/zclconf/go-cty v1.14.1 // indirect + github.com/zclconf/go-cty-yaml v1.0.3 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.12.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect - golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.11.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.56.2 // indirect + go.uber.org/zap v1.26.0 // indirect + golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/term v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.17.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect + google.golang.org/grpc v1.61.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.27.3 // indirect - k8s.io/apiextensions-apiserver v0.27.3 // indirect - k8s.io/component-base v0.27.3 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect - k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect + k8s.io/api v0.29.1 // indirect + k8s.io/apiextensions-apiserver v0.29.1 // indirect + k8s.io/component-base v0.29.1 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index 79df5c5..818fac6 100644 --- a/go.sum +++ b/go.sum @@ -1,46 +1,5 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= @@ -53,78 +12,48 @@ github.com/antchfx/htmlquery v1.2.4 h1:qLteofCMe/KGovBI6SQgmou2QNyedFUW+pE+BpeZ4 github.com/antchfx/htmlquery v1.2.4/go.mod h1:2xO6iu3EVWs7R2JYqBbp8YzG50gj/ofqs5/0VZoDZLc= github.com/antchfx/xpath v1.2.0 h1:mbwv7co+x0RwgeGAOHdrKy89GvHaGvxxBtPK0uF9Zr8= github.com/antchfx/xpath v1.2.0/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= -github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= -github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= +github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/cenkalti/backoff/v3 v3.0.0 h1:ske+9nBpD9qZsTBoF41nW5L+AIuFBKMeze18XQ3eG1c= -github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/crossplane/crossplane-runtime v0.20.0 h1:MlPNrK6ELKLQdeHaIdKxQpZW2LSivSYXxHKVfU32auU= -github.com/crossplane/crossplane-runtime v0.20.0/go.mod h1:FuKIC8Mg8hE2gIAMyf2wCPkxkFPz+VnMQiYWBq1/p5A= -github.com/crossplane/crossplane-tools v0.0.0-20230714144037-2684f4bc7638 h1:NPbGG7jLyM+LbSMFQXilM70EOxbxk4z2CFvdSRtxc1s= -github.com/crossplane/crossplane-tools v0.0.0-20230714144037-2684f4bc7638/go.mod h1:+e4OaFlOcmr0JvINHl/yvEYBrZawzTgj6pQumOH1SS0= +github.com/crossplane/crossplane-runtime v1.15.1 h1:g1h75tNYOQT152IUNxs8ZgSsRFQKrZN9z69KefMujXs= +github.com/crossplane/crossplane-runtime v1.15.1/go.mod h1:kRcJjJQmBFrR2n/KhwL8wYS7xNfq3D8eK4JliEScOHI= +github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 h1:HigXs5tEQxWz0fcj8hzbU2UAZgEM7wPe0XRFOsrtF8Y= +github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79/go.mod h1:+e4OaFlOcmr0JvINHl/yvEYBrZawzTgj6pQumOH1SS0= +github.com/crossplane/upjet v1.2.3 h1:Vd/PgpBxBZiwsyOi1tAw3hz6UDgO1p7Q815rh0PjEsk= +github.com/crossplane/upjet v1.2.3/go.mod h1:0bHLtnejZ9bDeyXuBb9MSOQLvKo3+aoTeUBO8N0dGSA= github.com/dave/jennifer v1.4.1 h1:XyqG6cn5RQsTj3qlWQTKlRGAyrTcsk1kUmWdZBzRjDw= github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= -github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= +github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= -github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= -github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= @@ -139,152 +68,78 @@ github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/addlicense v0.0.0-20210428195630-6d92264d7170/go.mod h1:EMjYTRimagHs1FwlIqKyX3wAM0u3rA+McvlIIWmSamA= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 h1:n6vlPhxsA+BW/XsS5+uqi7GyzaLa5MH7qlSLBZtRdiA= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 h1:WzfWbQz/Ze8v6l++GGbGNFZnUShVpP/0xffCPLL+ax8= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw= -github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= -github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 h1:om4Al8Oy7kCm/B86rLCLah4Dt5Aa0Fr5rYBG60OzwHQ= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= -github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= +github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl/v2 v2.9.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= -github.com/hashicorp/hcl/v2 v2.14.1 h1:x0BpjfZ+CYdbiz+8yZTQ+gdLO7IXvOut7Da+XJayx34= -github.com/hashicorp/hcl/v2 v2.14.1/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= +github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= +github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e17dKDpqV7s= -github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM= -github.com/hashicorp/terraform-plugin-go v0.14.0 h1:ttnSlS8bz3ZPYbMb84DpcPhY4F5DsQtcAS7cHo8uvP4= -github.com/hashicorp/terraform-plugin-go v0.14.0/go.mod h1:2nNCBeRLaenyQEi78xrGrs9hMbulveqG/zDMQSvVJTE= -github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R+Y2BQ0sRZftGKQs= -github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0 h1:FtCLTiTcykdsURXPt/ku7fYXm3y19nbzbZcUxHx9RbI= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0/go.mod h1:80wf5oad1tW+oLnbXS4UTYmDCrl7BuN1Q+IA91X1a4Y= -github.com/hashicorp/vault/api v1.9.2 h1:YjkZLJ7K3inKgMZ0wzCU9OHqc+UqMQyXsPXnf3Cl2as= -github.com/hashicorp/vault/api v1.9.2/go.mod h1:jo5Y/ET+hNyz+JnKDt8XLAdKs+AM0G5W0Vp1IrFI8N8= +github.com/hashicorp/terraform-json v0.17.1 h1:eMfvh/uWggKmY7Pmb3T85u86E2EQg6EQHgyRwf3RkyA= +github.com/hashicorp/terraform-json v0.17.1/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o= +github.com/hashicorp/terraform-plugin-framework v1.4.1 h1:ZC29MoB3Nbov6axHdgPbMz7799pT5H8kIrM8YAsaVrs= +github.com/hashicorp/terraform-plugin-framework v1.4.1/go.mod h1:XC0hPcQbBvlbxwmjxuV/8sn8SbZRg4XwGMs22f+kqV0= +github.com/hashicorp/terraform-plugin-go v0.19.0 h1:BuZx/6Cp+lkmiG0cOBk6Zps0Cb2tmqQpDM3iAtnhDQU= +github.com/hashicorp/terraform-plugin-go v0.19.0/go.mod h1:EhRSkEPNoylLQntYsk5KrDHTZJh9HQoumZXbOGOXmec= +github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= +github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0 h1:X7vB6vn5tON2b49ILa4W7mFAsndeqJ7bZFOGbVO+0Cc= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0/go.mod h1:ydFcxbdj6klCqYEPkPvdvFKiNGKZLUs+896ODUXCyao= +github.com/hashicorp/terraform-registry-address v0.2.2 h1:lPQBg403El8PPicg/qONZJDC6YlgCVbWDtNmmZKtBno= +github.com/hashicorp/terraform-registry-address v0.2.2/go.mod h1:LtwNbCihUoUZ3RYriyS2wF/lGPB6gF9ICLRtuDk7hSo= +github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= +github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -296,33 +151,26 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= @@ -336,76 +184,60 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7 h1:CxRHKnh1YJXgNKxcos9rrKL6AcmOl1AS/fygmxFDzh4= github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7/go.mod h1:SAAdeMEiFXR8LcHffvIdiLI1w243DCH2DuHq7UrA5YQ= -github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k+Mg7cowZ8yv4Trqw9UsJby758= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= -github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= +github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY= +github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.10.0 h1:UkG7GPYkO4UZyLnyXjaWYcgOSONqwdBqFUT95ugmt6I= -github.com/prometheus/procfs v0.10.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= -github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ= github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w= -github.com/upbound/upjet v0.10.0-rc.0.0.20230802121849-caa74d2aebf2 h1:U+YG4DlUZcWQhxsdFPIpxHXvR2KwjEB+tTB/x3pDhI8= -github.com/upbound/upjet v0.10.0-rc.0.0.20230802121849-caa74d2aebf2/go.mod h1:2RXHgpIugCL/S/Use1QJAeVaev901RBeUByQh5gUtGk= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= @@ -413,416 +245,152 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty v1.8.1/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.11.0 h1:726SxLdi2SDnjY+BStqB9J1hNp4+2WlzyXLuimibIe0= -github.com/zclconf/go-cty v1.11.0/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= +github.com/zclconf/go-cty v1.14.1 h1:t9fyA35fwjjUMcmL5hLER+e/rEPqrbCK1/OSE4SI9KA= +github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +github.com/zclconf/go-cty-yaml v1.0.3 h1:og/eOQ7lvA/WWhHGFETVWNduJM7Rjsv2RRpx1sdFMLc= +github.com/zclconf/go-cty-yaml v1.0.3/go.mod h1:9YLUH4g7lOhVWqUbctnVlZ5KLpg7JAprQNgxSZ1Gyxs= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= -golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= -gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= +google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= +google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.27.3 h1:yR6oQXXnUEBWEWcvPWS0jQL575KoAboQPfJAuKNrw5Y= -k8s.io/api v0.27.3/go.mod h1:C4BNvZnQOF7JA/0Xed2S+aUyJSfTGkGFxLXz9MnpIpg= -k8s.io/apiextensions-apiserver v0.27.3 h1:xAwC1iYabi+TDfpRhxh4Eapl14Hs2OftM2DN5MpgKX4= -k8s.io/apiextensions-apiserver v0.27.3/go.mod h1:BH3wJ5NsB9XE1w+R6SSVpKmYNyIiyIz9xAmBl8Mb+84= -k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= -k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.27.3 h1:7dnEGHZEJld3lYwxvLl7WoehK6lAq7GvgjxpA3nv1E8= -k8s.io/client-go v0.27.3/go.mod h1:2MBEKuTo6V1lbKy3z1euEGnhPfGZLKTS9tiJ2xodM48= -k8s.io/component-base v0.27.3 h1:g078YmdcdTfrCE4fFobt7qmVXwS8J/3cI1XxRi/2+6k= -k8s.io/component-base v0.27.3/go.mod h1:JNiKYcGImpQ44iwSYs6dysxzR9SxIIgQalk4HaCNVUY= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 h1:OmK1d0WrkD3IPfkskvroRykOulHVHf0s0ZIFRjyt+UI= -k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515/go.mod h1:kzo02I3kQ4BTtEfVLaPbjvCkX97YqGve33wzlb3fofQ= -k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= -k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= -sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= -sigs.k8s.io/controller-tools v0.12.1 h1:GyQqxzH5wksa4n3YDIJdJJOopztR5VDM+7qsyg5yE4U= -sigs.k8s.io/controller-tools v0.12.1/go.mod h1:rXlpTfFHZMpZA8aGq9ejArgZiieHd+fkk/fTatY8A2M= +k8s.io/api v0.29.1 h1:DAjwWX/9YT7NQD4INu49ROJuZAAAP/Ijki48GUPzxqw= +k8s.io/api v0.29.1/go.mod h1:7Kl10vBRUXhnQQI8YR/R327zXC8eJ7887/+Ybta+RoQ= +k8s.io/apiextensions-apiserver v0.29.1 h1:S9xOtyk9M3Sk1tIpQMu9wXHm5O2MX6Y1kIpPMimZBZw= +k8s.io/apiextensions-apiserver v0.29.1/go.mod h1:zZECpujY5yTW58co8V2EQR4BD6A9pktVgHhvc0uLfeU= +k8s.io/apimachinery v0.29.1 h1:KY4/E6km/wLBguvCZv8cKTeOwwOBqFNjwJIdMkMbbRc= +k8s.io/apimachinery v0.29.1/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU= +k8s.io/client-go v0.29.1 h1:19B/+2NGEwnFLzt0uB5kNJnfTsbV8w6TgQRz9l7ti7A= +k8s.io/client-go v0.29.1/go.mod h1:TDG/psL9hdet0TI9mGyHJSgRkW3H9JZk2dNEUS7bRks= +k8s.io/component-base v0.29.1 h1:MUimqJPCRnnHsskTTjKD+IC1EHBbRCVyi37IoFBrkYw= +k8s.io/component-base v0.29.1/go.mod h1:fP9GFjxYrLERq1GcWWZAE3bqbNcDKDytn2srWuHTtKc= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.17.0 h1:fjJQf8Ukya+VjogLO6/bNX9HE6Y2xpsO5+fyS26ur/s= +sigs.k8s.io/controller-runtime v0.17.0/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= +sigs.k8s.io/controller-tools v0.14.0 h1:rnNoCC5wSXlrNoBKKzL70LNJKIQKEzT6lloG6/LF73A= +sigs.k8s.io/controller-tools v0.14.0/go.mod h1:TV7uOtNNnnR72SpzhStvPkoS/U5ir0nMudrkrC4M9Sc= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/internal/clients/pagerduty.go b/internal/clients/pagerduty.go index 229d9e9..e3eaeab 100644 --- a/internal/clients/pagerduty.go +++ b/internal/clients/pagerduty.go @@ -13,7 +13,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/upbound/upjet/pkg/terraform" + "github.com/crossplane/upjet/pkg/terraform" "github.com/crossplane-contrib/provider-pagerduty/apis/v1beta1" ) diff --git a/internal/controller/addon/addon/zz_controller.go b/internal/controller/addon/addon/zz_controller.go index 47c3db2..c3abc24 100755 --- a/internal/controller/addon/addon/zz_controller.go +++ b/internal/controller/addon/addon/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/addon/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Addon_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Addon_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Addon_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_addon"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_addon"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Addon + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Addon{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Addon") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Addon_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Addon{}, o.EventHandler). + Watches(&v1alpha1.Addon{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/business/service/zz_controller.go b/internal/controller/business/service/zz_controller.go index 4918ec4..22c4006 100755 --- a/internal/controller/business/service/zz_controller.go +++ b/internal/controller/business/service/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/business/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Service_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Service_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Service_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_business_service"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_business_service"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Service + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Service{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Service") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Service_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Service{}, o.EventHandler). + Watches(&v1alpha1.Service{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/business/servicesubscriber/zz_controller.go b/internal/controller/business/servicesubscriber/zz_controller.go index b12ddb0..275bee5 100755 --- a/internal/controller/business/servicesubscriber/zz_controller.go +++ b/internal/controller/business/servicesubscriber/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/business/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ServiceSubscriber_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ServiceSubscriber_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ServiceSubscriber_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_business_service_subscriber"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_business_service_subscriber"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.ServiceSubscriber + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.ServiceSubscriber{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.ServiceSubscriber") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ServiceSubscriber_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.ServiceSubscriber{}, o.EventHandler). + Watches(&v1alpha1.ServiceSubscriber{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/escalation/policy/zz_controller.go b/internal/controller/escalation/policy/zz_controller.go index b18283d..f2a5183 100755 --- a/internal/controller/escalation/policy/zz_controller.go +++ b/internal/controller/escalation/policy/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/escalation/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Policy_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Policy_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Policy_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_escalation_policy"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_escalation_policy"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Policy + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Policy{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Policy") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Policy_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Policy{}, o.EventHandler). + Watches(&v1alpha1.Policy{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/event/orchestration/zz_controller.go b/internal/controller/event/orchestration/zz_controller.go index 60895e3..b335d77 100755 --- a/internal/controller/event/orchestration/zz_controller.go +++ b/internal/controller/event/orchestration/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/event/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Orchestration_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Orchestration_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Orchestration_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_event_orchestration"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_event_orchestration"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Orchestration + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Orchestration{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Orchestration") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Orchestration_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Orchestration{}, o.EventHandler). + Watches(&v1alpha1.Orchestration{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/event/orchestrationrouter/zz_controller.go b/internal/controller/event/orchestrationrouter/zz_controller.go index 939f8db..3e04d17 100755 --- a/internal/controller/event/orchestrationrouter/zz_controller.go +++ b/internal/controller/event/orchestrationrouter/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/event/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.OrchestrationRouter_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.OrchestrationRouter_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.OrchestrationRouter_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_event_orchestration_router"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_event_orchestration_router"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.OrchestrationRouter + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.OrchestrationRouter{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.OrchestrationRouter") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.OrchestrationRouter_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.OrchestrationRouter{}, o.EventHandler). + Watches(&v1alpha1.OrchestrationRouter{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/event/orchestrationservice/zz_controller.go b/internal/controller/event/orchestrationservice/zz_controller.go index eccdd77..0227aec 100755 --- a/internal/controller/event/orchestrationservice/zz_controller.go +++ b/internal/controller/event/orchestrationservice/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/event/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.OrchestrationService_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.OrchestrationService_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.OrchestrationService_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_event_orchestration_service"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_event_orchestration_service"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.OrchestrationService + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.OrchestrationService{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.OrchestrationService") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.OrchestrationService_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.OrchestrationService{}, o.EventHandler). + Watches(&v1alpha1.OrchestrationService{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/event/orchestrationunrouted/zz_controller.go b/internal/controller/event/orchestrationunrouted/zz_controller.go index 12335a4..ac3e38c 100755 --- a/internal/controller/event/orchestrationunrouted/zz_controller.go +++ b/internal/controller/event/orchestrationunrouted/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/event/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.OrchestrationUnrouted_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.OrchestrationUnrouted_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.OrchestrationUnrouted_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_event_orchestration_unrouted"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_event_orchestration_unrouted"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.OrchestrationUnrouted + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.OrchestrationUnrouted{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.OrchestrationUnrouted") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.OrchestrationUnrouted_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.OrchestrationUnrouted{}, o.EventHandler). + Watches(&v1alpha1.OrchestrationUnrouted{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/extensions/extension/zz_controller.go b/internal/controller/extensions/extension/zz_controller.go index 67d839c..9149970 100755 --- a/internal/controller/extensions/extension/zz_controller.go +++ b/internal/controller/extensions/extension/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/extensions/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Extension_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Extension_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Extension_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_extension"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_extension"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Extension + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Extension{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Extension") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Extension_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Extension{}, o.EventHandler). + Watches(&v1alpha1.Extension{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/extensions/servicenow/zz_controller.go b/internal/controller/extensions/servicenow/zz_controller.go index 74eff2f..8bfad97 100755 --- a/internal/controller/extensions/servicenow/zz_controller.go +++ b/internal/controller/extensions/servicenow/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/extensions/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Servicenow_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Servicenow_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Servicenow_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_extension_servicenow"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_extension_servicenow"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Servicenow + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Servicenow{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Servicenow") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Servicenow_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Servicenow{}, o.EventHandler). + Watches(&v1alpha1.Servicenow{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/maintenance/window/zz_controller.go b/internal/controller/maintenance/window/zz_controller.go index 21d037d..9d2dd6f 100755 --- a/internal/controller/maintenance/window/zz_controller.go +++ b/internal/controller/maintenance/window/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/maintenance/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Window_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Window_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Window_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_maintenance_window"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_maintenance_window"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Window + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Window{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Window") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Window_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Window{}, o.EventHandler). + Watches(&v1alpha1.Window{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/providerconfig/config.go b/internal/controller/providerconfig/config.go index 9b2fe85..c5c4f29 100644 --- a/internal/controller/providerconfig/config.go +++ b/internal/controller/providerconfig/config.go @@ -10,7 +10,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/event" "github.com/crossplane/crossplane-runtime/pkg/reconciler/providerconfig" "github.com/crossplane/crossplane-runtime/pkg/resource" - "github.com/upbound/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane-contrib/provider-pagerduty/apis/v1beta1" ) diff --git a/internal/controller/response/play/zz_controller.go b/internal/controller/response/play/zz_controller.go index 5ecc50f..2287787 100755 --- a/internal/controller/response/play/zz_controller.go +++ b/internal/controller/response/play/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/response/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Play_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Play_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Play_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_response_play"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_response_play"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Play + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Play{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Play") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Play_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Play{}, o.EventHandler). + Watches(&v1alpha1.Play{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ruleset/rule/zz_controller.go b/internal/controller/ruleset/rule/zz_controller.go index 12c8065..fdcdcc2 100755 --- a/internal/controller/ruleset/rule/zz_controller.go +++ b/internal/controller/ruleset/rule/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/ruleset/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Rule_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Rule_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Rule_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_ruleset_rule"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_ruleset_rule"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Rule + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Rule{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Rule") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Rule_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Rule{}, o.EventHandler). + Watches(&v1alpha1.Rule{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ruleset/ruleset/zz_controller.go b/internal/controller/ruleset/ruleset/zz_controller.go index 31f5d1b..373324f 100755 --- a/internal/controller/ruleset/ruleset/zz_controller.go +++ b/internal/controller/ruleset/ruleset/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/ruleset/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Ruleset_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Ruleset_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Ruleset_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_ruleset"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_ruleset"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Ruleset + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Ruleset{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Ruleset") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Ruleset_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Ruleset{}, o.EventHandler). + Watches(&v1alpha1.Ruleset{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/schedule/schedule/zz_controller.go b/internal/controller/schedule/schedule/zz_controller.go index 65b630c..8825dc2 100755 --- a/internal/controller/schedule/schedule/zz_controller.go +++ b/internal/controller/schedule/schedule/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/schedule/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Schedule_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Schedule_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Schedule_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_schedule"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_schedule"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Schedule + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Schedule{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Schedule") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Schedule_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Schedule{}, o.EventHandler). + Watches(&v1alpha1.Schedule{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/service/dependency/zz_controller.go b/internal/controller/service/dependency/zz_controller.go index 97a873c..0f76ce3 100755 --- a/internal/controller/service/dependency/zz_controller.go +++ b/internal/controller/service/dependency/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/service/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Dependency_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Dependency_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Dependency_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_service_dependency"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_service_dependency"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Dependency + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Dependency{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Dependency") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Dependency_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Dependency{}, o.EventHandler). + Watches(&v1alpha1.Dependency{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/service/eventrule/zz_controller.go b/internal/controller/service/eventrule/zz_controller.go index f78d911..f93000b 100755 --- a/internal/controller/service/eventrule/zz_controller.go +++ b/internal/controller/service/eventrule/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/service/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.EventRule_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.EventRule_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.EventRule_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_service_event_rule"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_service_event_rule"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.EventRule + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.EventRule{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.EventRule") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.EventRule_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.EventRule{}, o.EventHandler). + Watches(&v1alpha1.EventRule{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/service/integration/zz_controller.go b/internal/controller/service/integration/zz_controller.go index 5b9b638..630fbce 100755 --- a/internal/controller/service/integration/zz_controller.go +++ b/internal/controller/service/integration/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/service/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Integration_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Integration_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Integration_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_service_integration"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_service_integration"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Integration + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Integration{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Integration") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Integration_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Integration{}, o.EventHandler). + Watches(&v1alpha1.Integration{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/service/service/zz_controller.go b/internal/controller/service/service/zz_controller.go index a519a42..1cae714 100755 --- a/internal/controller/service/service/zz_controller.go +++ b/internal/controller/service/service/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/service/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Service_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Service_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Service_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_service"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_service"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Service + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Service{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Service") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Service_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Service{}, o.EventHandler). + Watches(&v1alpha1.Service{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/slack/connection/zz_controller.go b/internal/controller/slack/connection/zz_controller.go index 2b64a8c..41e2444 100755 --- a/internal/controller/slack/connection/zz_controller.go +++ b/internal/controller/slack/connection/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/slack/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Connection_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Connection_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Connection_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_slack_connection"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_slack_connection"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Connection + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Connection{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Connection") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Connection_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Connection{}, o.EventHandler). + Watches(&v1alpha1.Connection{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/tag/assignment/zz_controller.go b/internal/controller/tag/assignment/zz_controller.go index 8590074..d047a0a 100755 --- a/internal/controller/tag/assignment/zz_controller.go +++ b/internal/controller/tag/assignment/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/tag/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Assignment_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Assignment_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Assignment_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_tag_assignment"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_tag_assignment"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Assignment + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Assignment{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Assignment") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Assignment_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Assignment{}, o.EventHandler). + Watches(&v1alpha1.Assignment{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/tag/tag/zz_controller.go b/internal/controller/tag/tag/zz_controller.go index 1ec008c..256cbb9 100755 --- a/internal/controller/tag/tag/zz_controller.go +++ b/internal/controller/tag/tag/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/tag/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Tag_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Tag_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Tag_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_tag"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_tag"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Tag + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Tag{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Tag") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Tag_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Tag{}, o.EventHandler). + Watches(&v1alpha1.Tag{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/team/membership/zz_controller.go b/internal/controller/team/membership/zz_controller.go index 22fbb61..f0fc9fd 100755 --- a/internal/controller/team/membership/zz_controller.go +++ b/internal/controller/team/membership/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/team/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Membership_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Membership_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Membership_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_team_membership"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_team_membership"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Membership + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Membership{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Membership") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Membership_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Membership{}, o.EventHandler). + Watches(&v1alpha1.Membership{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/team/team/zz_controller.go b/internal/controller/team/team/zz_controller.go index 8590f43..748bca6 100755 --- a/internal/controller/team/team/zz_controller.go +++ b/internal/controller/team/team/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/team/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Team_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Team_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Team_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_team"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_team"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Team + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Team{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Team") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Team_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Team{}, o.EventHandler). + Watches(&v1alpha1.Team{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/user/contactmethod/zz_controller.go b/internal/controller/user/contactmethod/zz_controller.go index 08664b4..12f1c6b 100755 --- a/internal/controller/user/contactmethod/zz_controller.go +++ b/internal/controller/user/contactmethod/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/user/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ContactMethod_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ContactMethod_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ContactMethod_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_user_contact_method"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_user_contact_method"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.ContactMethod + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.ContactMethod{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.ContactMethod") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ContactMethod_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.ContactMethod{}, o.EventHandler). + Watches(&v1alpha1.ContactMethod{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/user/notificationrule/zz_controller.go b/internal/controller/user/notificationrule/zz_controller.go index 8557151..846b9aa 100755 --- a/internal/controller/user/notificationrule/zz_controller.go +++ b/internal/controller/user/notificationrule/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/user/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.NotificationRule_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.NotificationRule_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.NotificationRule_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_user_notification_rule"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_user_notification_rule"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.NotificationRule + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.NotificationRule{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.NotificationRule") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.NotificationRule_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.NotificationRule{}, o.EventHandler). + Watches(&v1alpha1.NotificationRule{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/user/user/zz_controller.go b/internal/controller/user/user/zz_controller.go index d6c1bdf..3a5e371 100755 --- a/internal/controller/user/user/zz_controller.go +++ b/internal/controller/user/user/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/user/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.User_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.User_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.User_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_user"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_user"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.User + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.User{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.User") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.User_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.User{}, o.EventHandler). + Watches(&v1alpha1.User{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/webhook/subscription/zz_controller.go b/internal/controller/webhook/subscription/zz_controller.go index 4d10bc6..fee2e76 100755 --- a/internal/controller/webhook/subscription/zz_controller.go +++ b/internal/controller/webhook/subscription/zz_controller.go @@ -14,8 +14,10 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-pagerduty/apis/webhook/v1alpha1" @@ -30,9 +32,10 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.SecretStoreConfigGVK != nil { cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Subscription_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Subscription_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Subscription_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_webhook_subscription"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(o.EventHandler), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["pagerduty_webhook_subscription"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), @@ -43,15 +46,29 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), } - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Subscription + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Subscription{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Subscription") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Subscription_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). WithEventFilter(xpresource.DesiredStateChanged()). - Watches(&v1alpha1.Subscription{}, o.EventHandler). + Watches(&v1alpha1.Subscription{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index ada5cd9..4174cdb 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -1,13 +1,9 @@ -/* -Copyright 2021 Upbound Inc. -*/ - package controller import ( ctrl "sigs.k8s.io/controller-runtime" - "github.com/upbound/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller" addon "github.com/crossplane-contrib/provider-pagerduty/internal/controller/addon/addon" service "github.com/crossplane-contrib/provider-pagerduty/internal/controller/business/service" diff --git a/internal/features/features.go b/internal/features/features.go index de261ca..c969687 100644 --- a/internal/features/features.go +++ b/internal/features/features.go @@ -1,5 +1,5 @@ /* - Copyright 2022 Upbound Inc. + Copyright 2022 Upbound Inc */ package features @@ -13,8 +13,8 @@ const ( // https://github.com/crossplane/crossplane/blob/390ddd/design/design-doc-external-secret-stores.md EnableAlphaExternalSecretStores feature.Flag = "EnableAlphaExternalSecretStores" - // EnableAlphaManagementPolicies enables alpha support for + // EnableBetaManagementPolicies enables beta support for // Management Policies. See the below design for more details. // https://github.com/crossplane/crossplane/pull/3531 - EnableAlphaManagementPolicies feature.Flag = "EnableAlphaManagementPolicies" + EnableBetaManagementPolicies feature.Flag = "EnableBetaManagementPolicies" ) diff --git a/package/crds/addon.pagerduty.crossplane.io_addons.yaml b/package/crds/addon.pagerduty.crossplane.io_addons.yaml index 1051320..1dc2ec6 100644 --- a/package/crds/addon.pagerduty.crossplane.io_addons.yaml +++ b/package/crds/addon.pagerduty.crossplane.io_addons.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: addons.addon.pagerduty.crossplane.io spec: group: addon.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: add-on in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -76,17 +82,17 @@ spec: type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: name: description: The name of the add-on. @@ -99,20 +105,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -125,9 +132,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -137,57 +145,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -197,17 +169,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -217,21 +191,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -246,21 +220,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -271,14 +246,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -294,14 +270,14 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: name is a required parameter + - message: spec.forProvider.name is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.name) - || has(self.initProvider.name)' - - message: src is a required parameter + || (has(self.initProvider) && has(self.initProvider.name))' + - message: spec.forProvider.src is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.src) - || has(self.initProvider.src)' + || (has(self.initProvider) && has(self.initProvider.src))' status: description: AddonStatus defines the observed state of Addon. properties: @@ -324,13 +300,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -341,8 +319,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -351,6 +330,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/business.pagerduty.crossplane.io_services.yaml b/package/crds/business.pagerduty.crossplane.io_services.yaml index 058f946..472f781 100644 --- a/package/crds/business.pagerduty.crossplane.io_services.yaml +++ b/package/crds/business.pagerduty.crossplane.io_services.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: services.business.pagerduty.crossplane.io spec: group: business.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: a business service in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -90,21 +96,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -117,8 +123,9 @@ spec: description: Selector for a Team in team to populate team. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -131,21 +138,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -154,17 +161,17 @@ spec: type: object type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: description: description: A human-friendly description of the service. @@ -175,24 +182,102 @@ spec: pointOfContact: description: The owner of the business service. type: string + team: + description: ID of the team that owns the business service. + type: string + teamRef: + description: Reference to a Team in team to populate team. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + teamSelector: + description: Selector for a Team in team to populate team. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -205,45 +290,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -253,21 +303,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -277,17 +327,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -297,21 +349,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -326,21 +378,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -351,14 +404,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -374,10 +428,10 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: name is a required parameter + - message: spec.forProvider.name is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.name) - || has(self.initProvider.name)' + || (has(self.initProvider) && has(self.initProvider.name))' status: description: ServiceStatus defines the observed state of Service. properties: @@ -423,13 +477,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -440,8 +496,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -450,6 +507,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/business.pagerduty.crossplane.io_servicesubscribers.yaml b/package/crds/business.pagerduty.crossplane.io_servicesubscribers.yaml index df87e51..ba80fb5 100644 --- a/package/crds/business.pagerduty.crossplane.io_servicesubscribers.yaml +++ b/package/crds/business.pagerduty.crossplane.io_servicesubscribers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: servicesubscribers.business.pagerduty.crossplane.io spec: group: business.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: Creates and manages a business service subscriber in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -81,21 +87,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -108,8 +114,9 @@ spec: description: Selector for a Service to populate businessServiceId. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -122,21 +129,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -152,18 +159,95 @@ spec: type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: + businessServiceId: + description: The ID of the business service to subscribe to. + type: string + businessServiceIdRef: + description: Reference to a Service to populate businessServiceId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + businessServiceIdSelector: + description: Selector for a Service to populate businessServiceId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object subscriberId: description: The ID of the subscriber entity. type: string @@ -175,20 +259,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -201,45 +286,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -249,21 +299,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -273,17 +323,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -293,21 +345,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -322,21 +374,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -347,14 +400,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -370,14 +424,14 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: subscriberId is a required parameter + - message: spec.forProvider.subscriberId is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.subscriberId) - || has(self.initProvider.subscriberId)' - - message: subscriberType is a required parameter + || (has(self.initProvider) && has(self.initProvider.subscriberId))' + - message: spec.forProvider.subscriberType is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.subscriberType) - || has(self.initProvider.subscriberType)' + || (has(self.initProvider) && has(self.initProvider.subscriberType))' status: description: ServiceSubscriberStatus defines the observed state of ServiceSubscriber. properties: @@ -403,13 +457,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -420,8 +476,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -430,6 +487,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/escalation.pagerduty.crossplane.io_policies.yaml b/package/crds/escalation.pagerduty.crossplane.io_policies.yaml index b87fcc4..057f1f1 100644 --- a/package/crds/escalation.pagerduty.crossplane.io_policies.yaml +++ b/package/crds/escalation.pagerduty.crossplane.io_policies.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: policies.escalation.pagerduty.crossplane.io spec: group: escalation.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: an escalation policy in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -86,6 +92,16 @@ spec: description: The number of minutes before an unacknowledged incident escalates away from this rule. type: number + escalationRuleAssignmentStrategy: + description: The strategy used to assign the escalation + rule to an incident. Documented below. + items: + properties: + type: + description: Can be round_robin or assign_to_everyone. + type: string + type: object + type: array target: items: properties: @@ -93,9 +109,7 @@ spec: description: A target ID type: string type: - description: Can be user_reference or schedule_reference. - Defaults to user_reference. For multiple users as - example, repeat the target. + description: Can be round_robin or assign_to_everyone. type: string type: object type: array @@ -114,21 +128,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution - of this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which - will attempt to resolve the reference only when the - corresponding field is not present. Use 'Always' to - resolve the reference on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -142,8 +156,9 @@ spec: description: Selector for a list of Team in team to populate teams. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -156,21 +171,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -186,17 +201,17 @@ spec: type: array type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: description: description: A human-friendly description of the escalation policy. @@ -217,6 +232,16 @@ spec: description: The number of minutes before an unacknowledged incident escalates away from this rule. type: number + escalationRuleAssignmentStrategy: + description: The strategy used to assign the escalation + rule to an incident. Documented below. + items: + properties: + type: + description: Can be round_robin or assign_to_everyone. + type: string + type: object + type: array target: items: properties: @@ -224,32 +249,115 @@ spec: description: A target ID type: string type: - description: Can be user_reference or schedule_reference. - Defaults to user_reference. For multiple users as - example, repeat the target. + description: Can be round_robin or assign_to_everyone. type: string type: object type: array type: object type: array + teamRefs: + description: References to Team in team to populate teams. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + teamSelector: + description: Selector for a list of Team in team to populate teams. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + teams: + description: Team associated with the policy (Only 1 team can + be assigned to an Escalation Policy). Account must have the + teams ability to use this parameter. + items: + type: string + type: array type: object managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -262,45 +370,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -310,21 +383,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -334,17 +407,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -354,21 +429,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -383,21 +458,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -408,14 +484,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -431,14 +508,14 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: name is a required parameter + - message: spec.forProvider.name is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.name) - || has(self.initProvider.name)' - - message: rule is a required parameter + || (has(self.initProvider) && has(self.initProvider.name))' + - message: spec.forProvider.rule is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.rule) - || has(self.initProvider.rule)' + || (has(self.initProvider) && has(self.initProvider.rule))' status: description: PolicyStatus defines the observed state of Policy. properties: @@ -466,6 +543,16 @@ spec: description: The number of minutes before an unacknowledged incident escalates away from this rule. type: number + escalationRuleAssignmentStrategy: + description: The strategy used to assign the escalation + rule to an incident. Documented below. + items: + properties: + type: + description: Can be round_robin or assign_to_everyone. + type: string + type: object + type: array id: description: A target ID type: string @@ -476,9 +563,7 @@ spec: description: A target ID type: string type: - description: Can be user_reference or schedule_reference. - Defaults to user_reference. For multiple users as - example, repeat the target. + description: Can be round_robin or assign_to_everyone. type: string type: object type: array @@ -498,13 +583,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -515,8 +602,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -525,6 +613,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/event.pagerduty.crossplane.io_orchestrationrouters.yaml b/package/crds/event.pagerduty.crossplane.io_orchestrationrouters.yaml index 998e9ec..7a858be 100644 --- a/package/crds/event.pagerduty.crossplane.io_orchestrationrouters.yaml +++ b/package/crds/event.pagerduty.crossplane.io_orchestrationrouters.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: orchestrationrouters.event.pagerduty.crossplane.io spec: group: event.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: API. Creates and manages a Router for Global Event Orchestration in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -100,21 +106,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -127,8 +133,9 @@ spec: description: Selector for a Orchestration to populate eventOrchestration. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -141,21 +148,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -215,17 +222,17 @@ spec: type: array type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: catchAll: description: When none of the rules match an event, the event @@ -245,6 +252,84 @@ spec: type: array type: object type: array + eventOrchestration: + description: ID of the Event Orchestration to which the Router + belongs. + type: string + eventOrchestrationRef: + description: Reference to a Orchestration to populate eventOrchestration. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + eventOrchestrationSelector: + description: Selector for a Orchestration to populate eventOrchestration. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object set: description: The Router contains a single set of rules (the "start" set). @@ -300,20 +385,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -326,45 +412,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -374,21 +425,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -398,17 +449,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -418,21 +471,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -447,21 +500,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -472,14 +526,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -495,14 +550,14 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: catchAll is a required parameter + - message: spec.forProvider.catchAll is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.catchAll) - || has(self.initProvider.catchAll)' - - message: set is a required parameter + || (has(self.initProvider) && has(self.initProvider.catchAll))' + - message: spec.forProvider.set is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.set) - || has(self.initProvider.set)' + || (has(self.initProvider) && has(self.initProvider.set))' status: description: OrchestrationRouterStatus defines the observed state of OrchestrationRouter. properties: @@ -596,13 +651,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -613,8 +670,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -623,6 +681,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/event.pagerduty.crossplane.io_orchestrations.yaml b/package/crds/event.pagerduty.crossplane.io_orchestrations.yaml index 1f3c5f5..2aff3a5 100644 --- a/package/crds/event.pagerduty.crossplane.io_orchestrations.yaml +++ b/package/crds/event.pagerduty.crossplane.io_orchestrations.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: orchestrations.event.pagerduty.crossplane.io spec: group: event.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: and manages an Event Orchestration in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -93,21 +99,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -120,8 +126,9 @@ spec: description: Selector for a Team in team to populate team. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -134,21 +141,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -157,17 +164,17 @@ spec: type: object type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: description: description: A human-friendly description of the Event Orchestration. @@ -180,24 +187,103 @@ spec: name: description: Name of the Event Orchestration. type: string + team: + description: ID of the team that owns the Event Orchestration. + If none is specified, only admins have access. + type: string + teamRef: + description: Reference to a Team in team to populate team. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + teamSelector: + description: Selector for a Team in team to populate team. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -210,45 +296,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -258,21 +309,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -282,17 +333,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -302,21 +355,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -331,21 +384,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -356,14 +410,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -379,10 +434,10 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: name is a required parameter + - message: spec.forProvider.name is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.name) - || has(self.initProvider.name)' + || (has(self.initProvider) && has(self.initProvider.name))' status: description: OrchestrationStatus defines the observed state of Orchestration. properties: @@ -433,13 +488,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -450,8 +507,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -460,6 +518,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/event.pagerduty.crossplane.io_orchestrationservices.yaml b/package/crds/event.pagerduty.crossplane.io_orchestrationservices.yaml index 106a97d..ec79f2d 100644 --- a/package/crds/event.pagerduty.crossplane.io_orchestrationservices.yaml +++ b/package/crds/event.pagerduty.crossplane.io_orchestrationservices.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: orchestrationservices.event.pagerduty.crossplane.io spec: group: event.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: API. Creates and manages a Service Orchestration for a Service. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -105,7 +111,8 @@ spec: description: Name to identify the header type: string value: - description: Value of this header + description: The value to assign to this + custom field type: string type: object type: array @@ -122,7 +129,8 @@ spec: description: Name to identify the header type: string value: - description: Value of this header + description: The value to assign to this + custom field type: string type: object type: array @@ -174,6 +182,22 @@ spec: type: string type: object type: array + incidentCustomFieldUpdate: + description: Assign a custom field to the resulting + incident. + items: + properties: + id: + description: The ID of this set of rules. Rules + in other sets can route events into this set + using the rule's route_to property. + type: string + value: + description: The value to assign to this custom + field + type: string + type: object + type: array pagerdutyAutomationAction: description: Configure a Process Automation associated with the resulting incident. @@ -231,7 +255,8 @@ spec: description: Only regex is supported type: string value: - description: Value of this header + description: The value to assign to this custom + field type: string type: object type: array @@ -257,21 +282,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -284,8 +309,9 @@ spec: description: Selector for a Service in service to populate service. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -298,21 +324,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -372,7 +398,8 @@ spec: header type: string value: - description: Value of this header + description: The value to assign + to this custom field type: string type: object type: array @@ -390,7 +417,8 @@ spec: header type: string value: - description: Value of this header + description: The value to assign + to this custom field type: string type: object type: array @@ -445,6 +473,23 @@ spec: type: string type: object type: array + incidentCustomFieldUpdate: + description: Assign a custom field to the resulting + incident. + items: + properties: + id: + description: The ID of this set of rules. + Rules in other sets can route events + into this set using the rule's route_to + property. + type: string + value: + description: The value to assign to this + custom field + type: string + type: object + type: array pagerdutyAutomationAction: description: Configure a Process Automation associated with the resulting incident. @@ -505,7 +550,8 @@ spec: description: Only regex is supported type: string value: - description: Value of this header + description: The value to assign to this + custom field type: string type: object type: array @@ -537,17 +583,17 @@ spec: type: array type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: catchAll: description: the catch_all actions will be applied if an Event @@ -587,7 +633,8 @@ spec: description: Name to identify the header type: string value: - description: Value of this header + description: The value to assign to this + custom field type: string type: object type: array @@ -604,7 +651,8 @@ spec: description: Name to identify the header type: string value: - description: Value of this header + description: The value to assign to this + custom field type: string type: object type: array @@ -656,6 +704,22 @@ spec: type: string type: object type: array + incidentCustomFieldUpdate: + description: Assign a custom field to the resulting + incident. + items: + properties: + id: + description: The ID of this set of rules. Rules + in other sets can route events into this set + using the rule's route_to property. + type: string + value: + description: The value to assign to this custom + field + type: string + type: object + type: array pagerdutyAutomationAction: description: Configure a Process Automation associated with the resulting incident. @@ -713,7 +777,8 @@ spec: description: Only regex is supported type: string value: - description: Value of this header + description: The value to assign to this custom + field type: string type: object type: array @@ -724,6 +789,84 @@ spec: enableEventOrchestrationForService: description: Opt-in/out for switching the Service to Service Orchestrations. type: boolean + service: + description: ID of the Service to which this Service Orchestration + belongs to. + type: string + serviceRef: + description: Reference to a Service in service to populate service. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + serviceSelector: + description: Selector for a Service in service to populate service. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object set: description: A Service Orchestration must contain at least a "start" set, but can contain any number of additional sets that are @@ -777,7 +920,8 @@ spec: header type: string value: - description: Value of this header + description: The value to assign + to this custom field type: string type: object type: array @@ -795,7 +939,8 @@ spec: header type: string value: - description: Value of this header + description: The value to assign + to this custom field type: string type: object type: array @@ -850,6 +995,23 @@ spec: type: string type: object type: array + incidentCustomFieldUpdate: + description: Assign a custom field to the resulting + incident. + items: + properties: + id: + description: The ID of this set of rules. + Rules in other sets can route events + into this set using the rule's route_to + property. + type: string + value: + description: The value to assign to this + custom field + type: string + type: object + type: array pagerdutyAutomationAction: description: Configure a Process Automation associated with the resulting incident. @@ -910,7 +1072,8 @@ spec: description: Only regex is supported type: string value: - description: Value of this header + description: The value to assign to this + custom field type: string type: object type: array @@ -944,20 +1107,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -970,9 +1134,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -982,57 +1147,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -1042,17 +1171,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -1062,21 +1193,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -1091,21 +1222,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -1116,14 +1248,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -1139,14 +1272,14 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: catchAll is a required parameter + - message: spec.forProvider.catchAll is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.catchAll) - || has(self.initProvider.catchAll)' - - message: set is a required parameter + || (has(self.initProvider) && has(self.initProvider.catchAll))' + - message: spec.forProvider.set is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.set) - || has(self.initProvider.set)' + || (has(self.initProvider) && has(self.initProvider.set))' status: description: OrchestrationServiceStatus defines the observed state of OrchestrationService. @@ -1191,7 +1324,8 @@ spec: description: Name to identify the header type: string value: - description: Value of this header + description: The value to assign to this + custom field type: string type: object type: array @@ -1208,7 +1342,8 @@ spec: description: Name to identify the header type: string value: - description: Value of this header + description: The value to assign to this + custom field type: string type: object type: array @@ -1260,6 +1395,22 @@ spec: type: string type: object type: array + incidentCustomFieldUpdate: + description: Assign a custom field to the resulting + incident. + items: + properties: + id: + description: The ID of this set of rules. Rules + in other sets can route events into this set + using the rule's route_to property. + type: string + value: + description: The value to assign to this custom + field + type: string + type: object + type: array pagerdutyAutomationAction: description: Configure a Process Automation associated with the resulting incident. @@ -1317,7 +1468,8 @@ spec: description: Only regex is supported type: string value: - description: Value of this header + description: The value to assign to this custom + field type: string type: object type: array @@ -1389,7 +1541,8 @@ spec: header type: string value: - description: Value of this header + description: The value to assign + to this custom field type: string type: object type: array @@ -1407,7 +1560,8 @@ spec: header type: string value: - description: Value of this header + description: The value to assign + to this custom field type: string type: object type: array @@ -1462,6 +1616,23 @@ spec: type: string type: object type: array + incidentCustomFieldUpdate: + description: Assign a custom field to the resulting + incident. + items: + properties: + id: + description: The ID of this set of rules. + Rules in other sets can route events + into this set using the rule's route_to + property. + type: string + value: + description: The value to assign to this + custom field + type: string + type: object + type: array pagerdutyAutomationAction: description: Configure a Process Automation associated with the resulting incident. @@ -1522,7 +1693,8 @@ spec: description: Only regex is supported type: string value: - description: Value of this header + description: The value to assign to this + custom field type: string type: object type: array @@ -1564,13 +1736,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -1581,8 +1755,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -1591,6 +1766,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/event.pagerduty.crossplane.io_orchestrationunrouteds.yaml b/package/crds/event.pagerduty.crossplane.io_orchestrationunrouteds.yaml index e922b84..05579b3 100644 --- a/package/crds/event.pagerduty.crossplane.io_orchestrationunrouteds.yaml +++ b/package/crds/event.pagerduty.crossplane.io_orchestrationunrouteds.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: orchestrationunrouteds.event.pagerduty.crossplane.io spec: group: event.pagerduty.crossplane.io @@ -39,14 +39,19 @@ spec: in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -55,13 +60,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -169,21 +175,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -196,8 +202,9 @@ spec: description: Selector for a Orchestration to populate eventOrchestration. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -210,21 +217,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -364,17 +371,17 @@ spec: type: array type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: catchAll: description: the catch_all actions will be applied if an Event @@ -462,6 +469,84 @@ spec: type: array type: object type: array + eventOrchestration: + description: The Event Orchestration to which this Unrouted Orchestration + belongs to. + type: string + eventOrchestrationRef: + description: Reference to a Orchestration to populate eventOrchestration. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + eventOrchestrationSelector: + description: Selector for a Orchestration to populate eventOrchestration. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object set: description: An Unrouted Orchestration must contain at least a "start" set, but can contain any number of additional sets that @@ -597,20 +682,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -623,45 +709,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -671,21 +722,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -695,17 +746,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -715,21 +768,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -744,21 +797,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -769,14 +823,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -792,14 +847,14 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: catchAll is a required parameter + - message: spec.forProvider.catchAll is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.catchAll) - || has(self.initProvider.catchAll)' - - message: set is a required parameter + || (has(self.initProvider) && has(self.initProvider.catchAll))' + - message: spec.forProvider.set is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.set) - || has(self.initProvider.set)' + || (has(self.initProvider) && has(self.initProvider.set))' status: description: OrchestrationUnroutedStatus defines the observed state of OrchestrationUnrouted. @@ -1045,13 +1100,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -1062,8 +1119,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -1072,6 +1130,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/extensions.pagerduty.crossplane.io_extensions.yaml b/package/crds/extensions.pagerduty.crossplane.io_extensions.yaml index 76028d5..91b8d79 100644 --- a/package/crds/extensions.pagerduty.crossplane.io_extensions.yaml +++ b/package/crds/extensions.pagerduty.crossplane.io_extensions.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: extensions.extensions.pagerduty.crossplane.io spec: group: extensions.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: a service extension in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -72,11 +78,9 @@ spec: containing plain JSON-encoded data. type: string endpointUrlSecretRef: - description: 'The url of the extension. Note: The endpoint URL - is Optional API wise in most cases. But in some cases it is - a Required parameter. For example, pagerduty_extension_schema - named Generic V2 Webhook doesn''t accept pagerduty_extension - with no endpoint_url, but one with named Slack accepts.' + description: |- + The url of the extension. + Note: The endpoint URL is Optional API wise in most cases. But in some cases it is a Required parameter. For example, pagerduty_extension_schema named Generic V2 Webhook doesn't accept pagerduty_extension with no endpoint_url, but one with named Slack accepts. properties: key: description: The key to select. @@ -98,6 +102,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set extensionObjectsRefs: description: References to Service in service to populate extensionObjects. items: @@ -111,21 +116,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution - of this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which - will attempt to resolve the reference only when the - corresponding field is not present. Use 'Always' to - resolve the reference on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -140,8 +145,9 @@ spec: extensionObjects. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -154,21 +160,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -185,22 +191,107 @@ spec: type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: config: description: The configuration of the service extension as string containing plain JSON-encoded data. type: string + extensionObjects: + description: This is the objects for which the extension applies + (An array of service ids). + items: + type: string + type: array + x-kubernetes-list-type: set + extensionObjectsRefs: + description: References to Service in service to populate extensionObjects. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + extensionObjectsSelector: + description: Selector for a list of Service in service to populate + extensionObjects. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object extensionSchema: description: This is the schema for this extension. type: string @@ -213,20 +304,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -239,45 +331,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -287,21 +344,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -311,17 +368,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -331,21 +390,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -360,21 +419,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -385,14 +445,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -408,10 +469,10 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: extensionSchema is a required parameter + - message: spec.forProvider.extensionSchema is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.extensionSchema) - || has(self.initProvider.extensionSchema)' + || (has(self.initProvider) && has(self.initProvider.extensionSchema))' status: description: ExtensionStatus defines the observed state of Extension. properties: @@ -427,6 +488,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set extensionSchema: description: This is the schema for this extension. type: string @@ -456,13 +518,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -473,8 +537,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -483,6 +548,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/extensions.pagerduty.crossplane.io_servicenows.yaml b/package/crds/extensions.pagerduty.crossplane.io_servicenows.yaml index 2f4180b..7642b3c 100644 --- a/package/crds/extensions.pagerduty.crossplane.io_servicenows.yaml +++ b/package/crds/extensions.pagerduty.crossplane.io_servicenows.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: servicenows.extensions.pagerduty.crossplane.io spec: group: extensions.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: manages a ServiceNow service extension in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -91,6 +97,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set extensionSchema: description: This is the schema for this extension. type: string @@ -140,17 +147,17 @@ spec: type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: extensionObjects: description: This is the objects for which the extension applies @@ -158,6 +165,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set extensionSchema: description: This is the schema for this extension. type: string @@ -192,20 +200,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -218,9 +227,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -230,57 +240,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -290,17 +264,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -310,21 +286,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -339,21 +315,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -364,14 +341,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -387,37 +365,37 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: extensionObjects is a required parameter + - message: spec.forProvider.extensionObjects is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.extensionObjects) - || has(self.initProvider.extensionObjects)' - - message: extensionSchema is a required parameter + || (has(self.initProvider) && has(self.initProvider.extensionObjects))' + - message: spec.forProvider.extensionSchema is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.extensionSchema) - || has(self.initProvider.extensionSchema)' - - message: referer is a required parameter + || (has(self.initProvider) && has(self.initProvider.extensionSchema))' + - message: spec.forProvider.referer is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.referer) - || has(self.initProvider.referer)' - - message: snowPasswordSecretRef is a required parameter + || (has(self.initProvider) && has(self.initProvider.referer))' + - message: spec.forProvider.snowPasswordSecretRef is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.snowPasswordSecretRef)' - - message: snowUser is a required parameter + - message: spec.forProvider.snowUser is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.snowUser) - || has(self.initProvider.snowUser)' - - message: syncOptions is a required parameter + || (has(self.initProvider) && has(self.initProvider.snowUser))' + - message: spec.forProvider.syncOptions is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.syncOptions) - || has(self.initProvider.syncOptions)' - - message: target is a required parameter + || (has(self.initProvider) && has(self.initProvider.syncOptions))' + - message: spec.forProvider.target is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.target) - || has(self.initProvider.target)' - - message: taskType is a required parameter + || (has(self.initProvider) && has(self.initProvider.target))' + - message: spec.forProvider.taskType is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.taskType) - || has(self.initProvider.taskType)' + || (has(self.initProvider) && has(self.initProvider.taskType))' status: description: ServicenowStatus defines the observed state of Servicenow. properties: @@ -429,6 +407,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set extensionSchema: description: This is the schema for this extension. type: string @@ -473,13 +452,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -490,8 +471,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -500,6 +482,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/maintenance.pagerduty.crossplane.io_windows.yaml b/package/crds/maintenance.pagerduty.crossplane.io_windows.yaml index e860041..f762dea 100644 --- a/package/crds/maintenance.pagerduty.crossplane.io_windows.yaml +++ b/package/crds/maintenance.pagerduty.crossplane.io_windows.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: windows.maintenance.pagerduty.crossplane.io spec: group: maintenance.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: a maintenance window in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -88,21 +94,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution - of this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which - will attempt to resolve the reference only when the - corresponding field is not present. Use 'Always' to - resolve the reference on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -117,8 +123,9 @@ spec: services. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -131,21 +138,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -158,6 +165,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set startTime: description: The maintenance window's start time. This is when the services will stop creating incidents. If this date is in @@ -165,17 +173,17 @@ spec: type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: description: description: A description for the maintenance window. @@ -185,6 +193,91 @@ spec: services will start creating incidents again. This date must be in the future and after the start_time. type: string + serviceRefs: + description: References to Service in service to populate services. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + serviceSelector: + description: Selector for a list of Service in service to populate + services. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + services: + description: A list of service IDs to include in the maintenance + window. + items: + type: string + type: array + x-kubernetes-list-type: set startTime: description: The maintenance window's start time. This is when the services will stop creating incidents. If this date is in @@ -194,20 +287,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -220,45 +314,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -268,21 +327,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -292,17 +351,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -312,21 +373,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -341,21 +402,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -366,14 +428,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -389,14 +452,14 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: endTime is a required parameter + - message: spec.forProvider.endTime is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.endTime) - || has(self.initProvider.endTime)' - - message: startTime is a required parameter + || (has(self.initProvider) && has(self.initProvider.endTime))' + - message: spec.forProvider.startTime is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.startTime) - || has(self.initProvider.startTime)' + || (has(self.initProvider) && has(self.initProvider.startTime))' status: description: WindowStatus defines the observed state of Window. properties: @@ -419,6 +482,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set startTime: description: The maintenance window's start time. This is when the services will stop creating incidents. If this date is in @@ -431,13 +495,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -448,8 +514,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -458,6 +525,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/pagerduty.crossplane.io_providerconfigs.yaml b/package/crds/pagerduty.crossplane.io_providerconfigs.yaml index 68f2ff2..b038720 100644 --- a/package/crds/pagerduty.crossplane.io_providerconfigs.yaml +++ b/package/crds/pagerduty.crossplane.io_providerconfigs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: providerconfigs.pagerduty.crossplane.io spec: group: pagerduty.crossplane.io @@ -32,14 +32,19 @@ spec: description: A ProviderConfig configures a PagerDuty provider. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -50,8 +55,9 @@ spec: description: Credentials required to authenticate to this provider. properties: env: - description: Env is a reference to an environment variable that - contains credentials that must be used to connect to the provider. + description: |- + Env is a reference to an environment variable that contains credentials + that must be used to connect to the provider. properties: name: description: Name is the name of an environment variable. @@ -60,8 +66,9 @@ spec: - name type: object fs: - description: Fs is a reference to a filesystem location that contains - credentials that must be used to connect to the provider. + description: |- + Fs is a reference to a filesystem location that contains credentials that + must be used to connect to the provider. properties: path: description: Path is a filesystem path. @@ -70,8 +77,9 @@ spec: - path type: object secretRef: - description: A SecretRef is a reference to a secret key that contains - the credentials that must be used to connect to the provider. + description: |- + A SecretRef is a reference to a secret key that contains the credentials + that must be used to connect to the provider. properties: key: description: The key to select. @@ -111,13 +119,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -128,8 +138,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -138,6 +149,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map users: description: Users of this provider configuration. format: int64 diff --git a/package/crds/pagerduty.crossplane.io_providerconfigusages.yaml b/package/crds/pagerduty.crossplane.io_providerconfigusages.yaml index 70550cd..98ad55f 100644 --- a/package/crds/pagerduty.crossplane.io_providerconfigusages.yaml +++ b/package/crds/pagerduty.crossplane.io_providerconfigusages.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: providerconfigusages.pagerduty.crossplane.io spec: group: pagerduty.crossplane.io @@ -37,14 +37,19 @@ spec: description: A ProviderConfigUsage indicates that a resource is using a ProviderConfig. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -59,19 +64,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this reference - is required. The default is 'Required', which means the reconcile - will fail if the reference cannot be resolved. 'Optional' means - this reference will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should be resolved. - The default is 'IfNotPresent', which will attempt to resolve - the reference only when the corresponding field is not present. - Use 'Always' to resolve the reference on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent diff --git a/package/crds/pagerduty.crossplane.io_storeconfigs.yaml b/package/crds/pagerduty.crossplane.io_storeconfigs.yaml index 953e3b0..a0a997d 100644 --- a/package/crds/pagerduty.crossplane.io_storeconfigs.yaml +++ b/package/crds/pagerduty.crossplane.io_storeconfigs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: storeconfigs.pagerduty.crossplane.io spec: group: pagerduty.crossplane.io @@ -35,14 +35,19 @@ spec: details. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -50,24 +55,26 @@ spec: description: A StoreConfigSpec defines the desired state of a ProviderConfig. properties: defaultScope: - description: DefaultScope used for scoping secrets for "cluster-scoped" - resources. If store type is "Kubernetes", this would mean the default - namespace to store connection secrets for cluster scoped resources. + description: |- + DefaultScope used for scoping secrets for "cluster-scoped" resources. + If store type is "Kubernetes", this would mean the default namespace to + store connection secrets for cluster scoped resources. In case of "Vault", this would be used as the default parent path. Typically, should be set as Crossplane installation namespace. type: string kubernetes: - description: Kubernetes configures a Kubernetes secret store. If the - "type" is "Kubernetes" but no config provided, in cluster config + description: |- + Kubernetes configures a Kubernetes secret store. + If the "type" is "Kubernetes" but no config provided, in cluster config will be used. properties: auth: description: Credentials used to connect to the Kubernetes API. properties: env: - description: Env is a reference to an environment variable - that contains credentials that must be used to connect to - the provider. + description: |- + Env is a reference to an environment variable that contains credentials + that must be used to connect to the provider. properties: name: description: Name is the name of an environment variable. @@ -76,9 +83,9 @@ spec: - name type: object fs: - description: Fs is a reference to a filesystem location that - contains credentials that must be used to connect to the - provider. + description: |- + Fs is a reference to a filesystem location that contains credentials that + must be used to connect to the provider. properties: path: description: Path is a filesystem path. @@ -87,9 +94,9 @@ spec: - path type: object secretRef: - description: A SecretRef is a reference to a secret key that - contains the credentials that must be used to connect to - the provider. + description: |- + A SecretRef is a reference to a secret key that contains the credentials + that must be used to connect to the provider. properties: key: description: The key to select. @@ -145,154 +152,15 @@ spec: type: object type: default: Kubernetes - description: Type configures which secret store to be used. Only the - configuration block for this store will be used and others will - be ignored if provided. Default is Kubernetes. + description: |- + Type configures which secret store to be used. Only the configuration + block for this store will be used and others will be ignored if provided. + Default is Kubernetes. enum: - Kubernetes - Vault - Plugin type: string - vault: - description: 'Vault configures a Vault secret store. Deprecated: This - API is scheduled to be removed in a future release. Vault should - be used as a plugin going forward. See https://github.com/crossplane-contrib/ess-plugin-vault - for more information.' - properties: - auth: - description: Auth configures an authentication method for Vault. - properties: - method: - description: Method configures which auth method will be used. - type: string - token: - description: Token configures Token Auth for Vault. - properties: - env: - description: Env is a reference to an environment variable - that contains credentials that must be used to connect - to the provider. - properties: - name: - description: Name is the name of an environment variable. - type: string - required: - - name - type: object - fs: - description: Fs is a reference to a filesystem location - that contains credentials that must be used to connect - to the provider. - properties: - path: - description: Path is a filesystem path. - type: string - required: - - path - type: object - secretRef: - description: A SecretRef is a reference to a secret key - that contains the credentials that must be used to connect - to the provider. - properties: - key: - description: The key to select. - type: string - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - key - - name - - namespace - type: object - source: - description: Source of the credentials. - enum: - - None - - Secret - - Environment - - Filesystem - type: string - required: - - source - type: object - required: - - method - type: object - caBundle: - description: CABundle configures CA bundle for Vault Server. - properties: - env: - description: Env is a reference to an environment variable - that contains credentials that must be used to connect to - the provider. - properties: - name: - description: Name is the name of an environment variable. - type: string - required: - - name - type: object - fs: - description: Fs is a reference to a filesystem location that - contains credentials that must be used to connect to the - provider. - properties: - path: - description: Path is a filesystem path. - type: string - required: - - path - type: object - secretRef: - description: A SecretRef is a reference to a secret key that - contains the credentials that must be used to connect to - the provider. - properties: - key: - description: The key to select. - type: string - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - key - - name - - namespace - type: object - source: - description: Source of the credentials. - enum: - - None - - Secret - - Environment - - Filesystem - type: string - required: - - source - type: object - mountPath: - description: MountPath is the mount path of the KV secrets engine. - type: string - server: - description: Server is the url of the Vault server, e.g. "https://vault.acme.org" - type: string - version: - default: v2 - description: Version of the KV Secrets engine of Vault. https://www.vaultproject.io/docs/secrets/kv - type: string - required: - - auth - - mountPath - - server - type: object required: - defaultScope type: object @@ -305,13 +173,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -322,8 +192,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -332,6 +203,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/response.pagerduty.crossplane.io_plays.yaml b/package/crds/response.pagerduty.crossplane.io_plays.yaml index 07337d3..a9180e8 100644 --- a/package/crds/response.pagerduty.crossplane.io_plays.yaml +++ b/package/crds/response.pagerduty.crossplane.io_plays.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: plays.response.pagerduty.crossplane.io spec: group: response.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: play in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -149,17 +155,17 @@ spec: type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: conferenceNumber: description: The telephone number that will be set as the conference @@ -245,20 +251,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -271,9 +278,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -283,57 +291,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -343,17 +315,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -363,21 +337,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -392,21 +366,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -417,14 +392,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -440,14 +416,14 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: from is a required parameter + - message: spec.forProvider.from is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.from) - || has(self.initProvider.from)' - - message: name is a required parameter + || (has(self.initProvider) && has(self.initProvider.from))' + - message: spec.forProvider.name is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.name) - || has(self.initProvider.name)' + || (has(self.initProvider) && has(self.initProvider.name))' status: description: PlayStatus defines the observed state of Play. properties: @@ -608,13 +584,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -625,8 +603,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -635,6 +614,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/ruleset.pagerduty.crossplane.io_rules.yaml b/package/crds/ruleset.pagerduty.crossplane.io_rules.yaml index 22b7070..298af5e 100644 --- a/package/crds/ruleset.pagerduty.crossplane.io_rules.yaml +++ b/package/crds/ruleset.pagerduty.crossplane.io_rules.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: rules.ruleset.pagerduty.crossplane.io spec: group: ruleset.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: rule in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -261,21 +267,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -288,8 +294,9 @@ spec: description: Selector for a Ruleset in ruleset to populate ruleset. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -302,21 +309,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -424,17 +431,17 @@ spec: type: array type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: actions: description: Actions to apply to an event if the conditions match. @@ -616,6 +623,83 @@ spec: position: description: Position/index of the rule within the ruleset. type: number + ruleset: + description: The ID of the ruleset that the rule belongs to. + type: string + rulesetRef: + description: Reference to a Ruleset in ruleset to populate ruleset. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + rulesetSelector: + description: Selector for a Ruleset in ruleset to populate ruleset. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object timeFrame: description: Settings for scheduling the rule. items: @@ -719,20 +803,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -745,45 +830,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -793,21 +843,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -817,17 +867,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -837,21 +889,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -866,21 +918,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -891,14 +944,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -1210,13 +1264,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -1227,8 +1283,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -1237,6 +1294,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/ruleset.pagerduty.crossplane.io_rulesets.yaml b/package/crds/ruleset.pagerduty.crossplane.io_rulesets.yaml index b95a31f..325c175 100644 --- a/package/crds/ruleset.pagerduty.crossplane.io_rulesets.yaml +++ b/package/crds/ruleset.pagerduty.crossplane.io_rulesets.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: rulesets.ruleset.pagerduty.crossplane.io spec: group: ruleset.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: an ruleset in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -89,22 +95,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution - of this reference is required. The default is - 'Required', which means the reconcile will fail - if the reference cannot be resolved. 'Optional' - means this reference will be a no-op if it cannot - be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference - should be resolved. The default is 'IfNotPresent', - which will attempt to resolve the reference only - when the corresponding field is not present. Use - 'Always' to resolve the reference on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -117,9 +122,9 @@ spec: description: Selector for a Team in team to populate id. properties: matchControllerRef: - description: MatchControllerRef ensures an object with - the same controller reference as the selecting object - is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -132,22 +137,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution - of this reference is required. The default is - 'Required', which means the reconcile will fail - if the reference cannot be resolved. 'Optional' - means this reference will be a no-op if it cannot - be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference - should be resolved. The default is 'IfNotPresent', - which will attempt to resolve the reference only - when the corresponding field is not present. Use - 'Always' to resolve the reference on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -158,17 +162,17 @@ spec: type: array type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: name: description: Name of the ruleset. @@ -177,26 +181,105 @@ spec: description: Reference to the team that owns the ruleset. If none is specified, only admins have access. items: + properties: + id: + description: The ID of the ruleset. + type: string + idRef: + description: Reference to a Team in team to populate id. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + idSelector: + description: Selector for a Team in team to populate id. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object type: array type: object managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -209,45 +292,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -257,21 +305,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -281,17 +329,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -301,21 +351,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -330,21 +380,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -355,14 +406,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -378,10 +430,10 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: name is a required parameter + - message: spec.forProvider.name is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.name) - || has(self.initProvider.name)' + || (has(self.initProvider) && has(self.initProvider.name))' status: description: RulesetStatus defines the observed state of Ruleset. properties: @@ -418,13 +470,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -435,8 +489,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -445,6 +500,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/schedule.pagerduty.crossplane.io_schedules.yaml b/package/crds/schedule.pagerduty.crossplane.io_schedules.yaml index 5504950..f64eb7d 100644 --- a/package/crds/schedule.pagerduty.crossplane.io_schedules.yaml +++ b/package/crds/schedule.pagerduty.crossplane.io_schedules.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: schedules.schedule.pagerduty.crossplane.io spec: group: schedule.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: a schedule in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -125,23 +131,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution - of this reference is required. The default is - 'Required', which means the reconcile will fail - if the reference cannot be resolved. 'Optional' - means this reference will be a no-op if it cannot - be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference - should be resolved. The default is 'IfNotPresent', - which will attempt to resolve the reference - only when the corresponding field is not present. - Use 'Always' to resolve the reference on every - reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -156,9 +160,9 @@ spec: users. properties: matchControllerRef: - description: MatchControllerRef ensures an object with - the same controller reference as the selecting object - is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -171,22 +175,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution - of this reference is required. The default is - 'Required', which means the reconcile will fail - if the reference cannot be resolved. 'Optional' - means this reference will be a no-op if it cannot - be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference - should be resolved. The default is 'IfNotPresent', - which will attempt to resolve the reference only - when the corresponding field is not present. Use - 'Always' to resolve the reference on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -206,16 +209,10 @@ spec: description: The name of the schedule. type: string overflow: - description: 'Any on-call schedule entries that pass the date - range bounds will be truncated at the bounds, unless the parameter - overflow is passed. For instance, if your schedule is a rotation - that changes daily at midnight UTC, and your date range is from - 2011-06-01T10:00:00Z to 2011-06-01T14:00:00Z: If you don''t - pass the overflow=true parameter, you will get one schedule - entry returned with a start of 2011-06-01T10:00:00Z and end - of 2011-06-01T14:00:00Z. If you do pass the overflow parameter, - you will get one schedule entry returned with a start of 2011-06-01T00:00:00Z - and end of 2011-06-02T00:00:00Z.' + description: |- + Any on-call schedule entries that pass the date range bounds will be truncated at the bounds, unless the parameter overflow is passed. For instance, if your schedule is a rotation that changes daily at midnight UTC, and your date range is from 2011-06-01T10:00:00Z to 2011-06-01T14:00:00Z: + If you don't pass the overflow=true parameter, you will get one schedule entry returned with a start of 2011-06-01T10:00:00Z and end of 2011-06-01T14:00:00Z. + If you do pass the overflow parameter, you will get one schedule entry returned with a start of 2011-06-01T00:00:00Z and end of 2011-06-02T00:00:00Z. type: boolean teamRefs: description: References to Team in team to populate teams. @@ -230,21 +227,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution - of this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which - will attempt to resolve the reference only when the - corresponding field is not present. Use 'Always' to - resolve the reference on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -258,8 +255,9 @@ spec: description: Selector for a list of Team in team to populate teams. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -272,21 +270,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -303,17 +301,17 @@ spec: type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: description: description: The description of the schedule. @@ -360,23 +358,184 @@ spec: start: description: The start time of the schedule layer. type: string + userRefs: + description: References to User in user to populate users. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + userSelector: + description: Selector for a list of User in user to populate + users. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + users: + description: The ordered list of users on this layer. The + position of the user on the list determines their order + in the layer. + items: + type: string + type: array type: object type: array name: description: The name of the schedule. type: string overflow: - description: 'Any on-call schedule entries that pass the date - range bounds will be truncated at the bounds, unless the parameter - overflow is passed. For instance, if your schedule is a rotation - that changes daily at midnight UTC, and your date range is from - 2011-06-01T10:00:00Z to 2011-06-01T14:00:00Z: If you don''t - pass the overflow=true parameter, you will get one schedule - entry returned with a start of 2011-06-01T10:00:00Z and end - of 2011-06-01T14:00:00Z. If you do pass the overflow parameter, - you will get one schedule entry returned with a start of 2011-06-01T00:00:00Z - and end of 2011-06-02T00:00:00Z.' + description: |- + Any on-call schedule entries that pass the date range bounds will be truncated at the bounds, unless the parameter overflow is passed. For instance, if your schedule is a rotation that changes daily at midnight UTC, and your date range is from 2011-06-01T10:00:00Z to 2011-06-01T14:00:00Z: + If you don't pass the overflow=true parameter, you will get one schedule entry returned with a start of 2011-06-01T10:00:00Z and end of 2011-06-01T14:00:00Z. + If you do pass the overflow parameter, you will get one schedule entry returned with a start of 2011-06-01T00:00:00Z and end of 2011-06-02T00:00:00Z. type: boolean + teamRefs: + description: References to Team in team to populate teams. + items: + description: A Reference to a named object. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + type: array + teamSelector: + description: Selector for a list of Team in team to populate teams. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + teams: + description: Teams associated with the schedule. + items: + type: string + type: array timeZone: description: The time zone of the schedule (e.g. Europe/Berlin). type: string @@ -384,20 +543,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -410,45 +570,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -458,21 +583,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -482,17 +607,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -502,21 +629,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -531,21 +658,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -556,14 +684,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -579,14 +708,14 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: layer is a required parameter + - message: spec.forProvider.layer is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.layer) - || has(self.initProvider.layer)' - - message: timeZone is a required parameter + || (has(self.initProvider) && has(self.initProvider.layer))' + - message: spec.forProvider.timeZone is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.timeZone) - || has(self.initProvider.timeZone)' + || (has(self.initProvider) && has(self.initProvider.timeZone))' status: description: ScheduleStatus defines the observed state of Schedule. properties: @@ -668,16 +797,10 @@ spec: description: The name of the schedule. type: string overflow: - description: 'Any on-call schedule entries that pass the date - range bounds will be truncated at the bounds, unless the parameter - overflow is passed. For instance, if your schedule is a rotation - that changes daily at midnight UTC, and your date range is from - 2011-06-01T10:00:00Z to 2011-06-01T14:00:00Z: If you don''t - pass the overflow=true parameter, you will get one schedule - entry returned with a start of 2011-06-01T10:00:00Z and end - of 2011-06-01T14:00:00Z. If you do pass the overflow parameter, - you will get one schedule entry returned with a start of 2011-06-01T00:00:00Z - and end of 2011-06-02T00:00:00Z.' + description: |- + Any on-call schedule entries that pass the date range bounds will be truncated at the bounds, unless the parameter overflow is passed. For instance, if your schedule is a rotation that changes daily at midnight UTC, and your date range is from 2011-06-01T10:00:00Z to 2011-06-01T14:00:00Z: + If you don't pass the overflow=true parameter, you will get one schedule entry returned with a start of 2011-06-01T10:00:00Z and end of 2011-06-01T14:00:00Z. + If you do pass the overflow parameter, you will get one schedule entry returned with a start of 2011-06-01T00:00:00Z and end of 2011-06-02T00:00:00Z. type: boolean teams: description: Teams associated with the schedule. @@ -694,13 +817,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -711,8 +836,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -721,6 +847,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/service.pagerduty.crossplane.io_dependencies.yaml b/package/crds/service.pagerduty.crossplane.io_dependencies.yaml index 940105b..991e2cc 100644 --- a/package/crds/service.pagerduty.crossplane.io_dependencies.yaml +++ b/package/crds/service.pagerduty.crossplane.io_dependencies.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: dependencies.service.pagerduty.crossplane.io spec: group: service.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: manages a business service dependency in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -109,17 +115,17 @@ spec: type: array type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: dependency: description: The relationship between the supporting_service and @@ -165,20 +171,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -191,9 +198,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -203,57 +211,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -263,17 +235,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -283,21 +257,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -312,21 +286,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -337,14 +312,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -360,10 +336,10 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: dependency is a required parameter + - message: spec.forProvider.dependency is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.dependency) - || has(self.initProvider.dependency)' + || (has(self.initProvider) && has(self.initProvider.dependency))' status: description: DependencyStatus defines the observed state of Dependency. properties: @@ -419,13 +395,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -436,8 +414,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -446,6 +425,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/service.pagerduty.crossplane.io_eventrules.yaml b/package/crds/service.pagerduty.crossplane.io_eventrules.yaml index 37ad372..bcbf170 100644 --- a/package/crds/service.pagerduty.crossplane.io_eventrules.yaml +++ b/package/crds/service.pagerduty.crossplane.io_eventrules.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: eventrules.service.pagerduty.crossplane.io spec: group: service.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: a service event rule in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -245,21 +251,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -272,8 +278,9 @@ spec: description: Selector for a Service to populate service. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -286,21 +293,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -395,17 +402,17 @@ spec: type: array type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: actions: description: Actions to apply to an event if the conditions match. @@ -571,6 +578,83 @@ spec: position: description: Position/index of the rule within the service. type: number + service: + description: The ID of the service that the rule belongs to. + type: string + serviceRef: + description: Reference to a Service to populate service. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + serviceSelector: + description: Selector for a Service to populate service. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object timeFrame: description: Settings for scheduling the rule. items: @@ -661,20 +745,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -687,45 +772,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -735,21 +785,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -759,17 +809,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -779,21 +831,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -808,21 +860,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -833,14 +886,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -1123,13 +1177,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -1140,8 +1196,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -1150,6 +1207,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/service.pagerduty.crossplane.io_integrations.yaml b/package/crds/service.pagerduty.crossplane.io_integrations.yaml index 61a02a3..c7aa8f8 100644 --- a/package/crds/service.pagerduty.crossplane.io_integrations.yaml +++ b/package/crds/service.pagerduty.crossplane.io_integrations.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: integrations.service.pagerduty.crossplane.io spec: group: service.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: manages a service integration in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -128,36 +134,47 @@ spec: description: Can be subject, body or from_addresses. type: string type: - description: 'The service type. Can be: + description: |- + The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires - service alert_creation to be create_alerts_and_incidents), - generic_email_inbound_integration, generic_events_api_inbound_integration, - keynote_inbound_integration, nagios_inbound_integration, - pingdom_inbound_integrationor sql_monitor_inbound_integration.' + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string type: object type: array type: - description: 'The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires - service alert_creation to be create_alerts_and_incidents), - generic_email_inbound_integration, generic_events_api_inbound_integration, - keynote_inbound_integration, nagios_inbound_integration, - pingdom_inbound_integrationor sql_monitor_inbound_integration.' + description: |- + The service type. Can be: + aws_cloudwatch_inbound_integration, + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string type: object type: array type: - description: 'The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires service - alert_creation to be create_alerts_and_incidents), - generic_email_inbound_integration, generic_events_api_inbound_integration, - keynote_inbound_integration, nagios_inbound_integration, - pingdom_inbound_integrationor sql_monitor_inbound_integration.' + description: |- + The service type. Can be: + aws_cloudwatch_inbound_integration, + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string type: object type: array @@ -176,13 +193,17 @@ spec: startsAfter: type: string type: - description: 'The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires service - alert_creation to be create_alerts_and_incidents), - generic_email_inbound_integration, generic_events_api_inbound_integration, - keynote_inbound_integration, nagios_inbound_integration, - pingdom_inbound_integrationor sql_monitor_inbound_integration.' + description: |- + The service type. Can be: + aws_cloudwatch_inbound_integration, + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string valueName: description: First value extractor should have name @@ -201,8 +222,9 @@ spec: used for routing emails to this integration for processing. type: string integrationKey: - description: This is the unique key used to route events to this - integration when received via the PagerDuty Events API. + description: (Deprecated) This is the unique key used to route + events to this integration when received via the PagerDuty Events + API. type: string name: description: The name of the service integration. @@ -222,21 +244,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -249,8 +271,9 @@ spec: description: Selector for a Service to populate service. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -263,21 +286,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -285,29 +308,34 @@ spec: type: object type: object type: - description: 'The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires service alert_creation - to be create_alerts_and_incidents), generic_email_inbound_integration, - generic_events_api_inbound_integration, keynote_inbound_integration, - nagios_inbound_integration, pingdom_inbound_integrationor sql_monitor_inbound_integration.' + description: |- + The service type. Can be: + aws_cloudwatch_inbound_integration, + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string vendor: description: field instead. type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: emailFilter: items: @@ -370,36 +398,47 @@ spec: description: Can be subject, body or from_addresses. type: string type: - description: 'The service type. Can be: + description: |- + The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires - service alert_creation to be create_alerts_and_incidents), - generic_email_inbound_integration, generic_events_api_inbound_integration, - keynote_inbound_integration, nagios_inbound_integration, - pingdom_inbound_integrationor sql_monitor_inbound_integration.' + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string type: object type: array type: - description: 'The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires - service alert_creation to be create_alerts_and_incidents), - generic_email_inbound_integration, generic_events_api_inbound_integration, - keynote_inbound_integration, nagios_inbound_integration, - pingdom_inbound_integrationor sql_monitor_inbound_integration.' + description: |- + The service type. Can be: + aws_cloudwatch_inbound_integration, + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string type: object type: array type: - description: 'The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires service - alert_creation to be create_alerts_and_incidents), - generic_email_inbound_integration, generic_events_api_inbound_integration, - keynote_inbound_integration, nagios_inbound_integration, - pingdom_inbound_integrationor sql_monitor_inbound_integration.' + description: |- + The service type. Can be: + aws_cloudwatch_inbound_integration, + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string type: object type: array @@ -418,13 +457,17 @@ spec: startsAfter: type: string type: - description: 'The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires service - alert_creation to be create_alerts_and_incidents), - generic_email_inbound_integration, generic_events_api_inbound_integration, - keynote_inbound_integration, nagios_inbound_integration, - pingdom_inbound_integrationor sql_monitor_inbound_integration.' + description: |- + The service type. Can be: + aws_cloudwatch_inbound_integration, + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string valueName: description: First value extractor should have name @@ -443,19 +486,103 @@ spec: used for routing emails to this integration for processing. type: string integrationKey: - description: This is the unique key used to route events to this - integration when received via the PagerDuty Events API. + description: (Deprecated) This is the unique key used to route + events to this integration when received via the PagerDuty Events + API. type: string name: description: The name of the service integration. type: string + service: + description: The ID of the service the integration should belong + to. + type: string + serviceRef: + description: Reference to a Service to populate service. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + serviceSelector: + description: Selector for a Service to populate service. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: - description: 'The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires service alert_creation - to be create_alerts_and_incidents), generic_email_inbound_integration, - generic_events_api_inbound_integration, keynote_inbound_integration, - nagios_inbound_integration, pingdom_inbound_integrationor sql_monitor_inbound_integration.' + description: |- + The service type. Can be: + aws_cloudwatch_inbound_integration, + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string vendor: description: field instead. @@ -464,20 +591,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -490,45 +618,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -538,21 +631,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -562,17 +655,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -582,21 +677,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -611,21 +706,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -636,14 +732,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -730,36 +827,47 @@ spec: description: Can be subject, body or from_addresses. type: string type: - description: 'The service type. Can be: + description: |- + The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires - service alert_creation to be create_alerts_and_incidents), - generic_email_inbound_integration, generic_events_api_inbound_integration, - keynote_inbound_integration, nagios_inbound_integration, - pingdom_inbound_integrationor sql_monitor_inbound_integration.' + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string type: object type: array type: - description: 'The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires - service alert_creation to be create_alerts_and_incidents), - generic_email_inbound_integration, generic_events_api_inbound_integration, - keynote_inbound_integration, nagios_inbound_integration, - pingdom_inbound_integrationor sql_monitor_inbound_integration.' + description: |- + The service type. Can be: + aws_cloudwatch_inbound_integration, + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string type: object type: array type: - description: 'The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires service - alert_creation to be create_alerts_and_incidents), - generic_email_inbound_integration, generic_events_api_inbound_integration, - keynote_inbound_integration, nagios_inbound_integration, - pingdom_inbound_integrationor sql_monitor_inbound_integration.' + description: |- + The service type. Can be: + aws_cloudwatch_inbound_integration, + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string type: object type: array @@ -778,13 +886,17 @@ spec: startsAfter: type: string type: - description: 'The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires service - alert_creation to be create_alerts_and_incidents), - generic_email_inbound_integration, generic_events_api_inbound_integration, - keynote_inbound_integration, nagios_inbound_integration, - pingdom_inbound_integrationor sql_monitor_inbound_integration.' + description: |- + The service type. Can be: + aws_cloudwatch_inbound_integration, + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string valueName: description: First value extractor should have name @@ -810,8 +922,9 @@ spec: used for routing emails to this integration for processing. type: string integrationKey: - description: This is the unique key used to route events to this - integration when received via the PagerDuty Events API. + description: (Deprecated) This is the unique key used to route + events to this integration when received via the PagerDuty Events + API. type: string name: description: The name of the service integration. @@ -821,12 +934,17 @@ spec: to. type: string type: - description: 'The service type. Can be: aws_cloudwatch_inbound_integration, - cloudkick_inbound_integration, event_transformer_api_inbound_integration, - events_api_v2_inbound_integration (requires service alert_creation - to be create_alerts_and_incidents), generic_email_inbound_integration, - generic_events_api_inbound_integration, keynote_inbound_integration, - nagios_inbound_integration, pingdom_inbound_integrationor sql_monitor_inbound_integration.' + description: |- + The service type. Can be: + aws_cloudwatch_inbound_integration, + cloudkick_inbound_integration, + event_transformer_api_inbound_integration, + events_api_v2_inbound_integration (requires service alert_creation to be create_alerts_and_incidents), + generic_email_inbound_integration, + generic_events_api_inbound_integration, + keynote_inbound_integration, + nagios_inbound_integration, + pingdom_inbound_integrationor sql_monitor_inbound_integration. type: string vendor: description: field instead. @@ -838,13 +956,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -855,8 +975,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -865,6 +986,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/service.pagerduty.crossplane.io_services.yaml b/package/crds/service.pagerduty.crossplane.io_services.yaml index a62c761..af5fb09 100644 --- a/package/crds/service.pagerduty.crossplane.io_services.yaml +++ b/package/crds/service.pagerduty.crossplane.io_services.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: services.service.pagerduty.crossplane.io spec: group: service.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: a service in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -121,6 +127,17 @@ spec: items: type: string type: array + timeWindow: + description: The maximum amount of time allowed between + Alerts. This setting applies only when type is set + to intelligent or content_based. Value must be between + 300 and 3600. Any Alerts arriving greater than time_window + seconds apart will not be grouped together. This + is a rolling time window and is counted from the + most recently grouped alert. The window is extended + every time a new alert is added to the group, up + to 24 hours. + type: number timeout: description: The duration in minutes within which to automatically group incoming alerts. This setting @@ -186,21 +203,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -213,8 +230,9 @@ spec: description: Selector for a Policy in escalation to populate escalationPolicy. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -227,21 +245,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -331,8 +349,9 @@ spec: items: properties: daysOfWeek: - description: Array of days of week as integers. 1 to 7, - 1 being Monday and 7 being Sunday. + description: |- + Array of days of week as integers. 1 to 7, 1 being + Monday and 7 being Sunday. items: type: number type: array @@ -352,17 +371,17 @@ spec: type: array type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: acknowledgementTimeout: description: Time in seconds that an incident changes to the Triggered @@ -418,6 +437,17 @@ spec: items: type: string type: array + timeWindow: + description: The maximum amount of time allowed between + Alerts. This setting applies only when type is set + to intelligent or content_based. Value must be between + 300 and 3600. Any Alerts arriving greater than time_window + seconds apart will not be grouped together. This + is a rolling time window and is counted from the + most recently grouped alert. The window is extended + every time a new alert is added to the group, up + to 24 hours. + type: number timeout: description: The duration in minutes within which to automatically group incoming alerts. This setting @@ -469,6 +499,83 @@ spec: description: description: A human-friendly description of the service. type: string + escalationPolicy: + description: The escalation policy used by this service. + type: string + escalationPolicyRef: + description: Reference to a Policy in escalation to populate escalationPolicy. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + escalationPolicySelector: + description: Selector for a Policy in escalation to populate escalationPolicy. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object incidentUrgencyRule: items: properties: @@ -552,8 +659,9 @@ spec: items: properties: daysOfWeek: - description: Array of days of week as integers. 1 to 7, - 1 being Monday and 7 being Sunday. + description: |- + Array of days of week as integers. 1 to 7, 1 being + Monday and 7 being Sunday. items: type: number type: array @@ -575,20 +683,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -601,9 +710,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -613,57 +723,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -673,17 +747,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -693,21 +769,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -722,21 +798,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -747,14 +824,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -770,10 +848,10 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: name is a required parameter + - message: spec.forProvider.name is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.name) - || has(self.initProvider.name)' + || (has(self.initProvider) && has(self.initProvider.name))' status: description: ServiceStatus defines the observed state of Service. properties: @@ -833,6 +911,17 @@ spec: items: type: string type: array + timeWindow: + description: The maximum amount of time allowed between + Alerts. This setting applies only when type is set + to intelligent or content_based. Value must be between + 300 and 3600. Any Alerts arriving greater than time_window + seconds apart will not be grouped together. This + is a rolling time window and is counted from the + most recently grouped alert. The window is extended + every time a new alert is added to the group, up + to 24 hours. + type: number timeout: description: The duration in minutes within which to automatically group incoming alerts. This setting @@ -986,8 +1075,9 @@ spec: items: properties: daysOfWeek: - description: Array of days of week as integers. 1 to 7, - 1 being Monday and 7 being Sunday. + description: |- + Array of days of week as integers. 1 to 7, 1 being + Monday and 7 being Sunday. items: type: number type: array @@ -1016,13 +1106,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -1033,8 +1125,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -1043,6 +1136,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/slack.pagerduty.crossplane.io_connections.yaml b/package/crds/slack.pagerduty.crossplane.io_connections.yaml index d48bbac..ea14f70 100644 --- a/package/crds/slack.pagerduty.crossplane.io_connections.yaml +++ b/package/crds/slack.pagerduty.crossplane.io_connections.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: connections.slack.pagerduty.crossplane.io spec: group: slack.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: manages a slack connection in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -113,17 +119,17 @@ spec: type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: channelId: description: The ID of a Slack channel in the workspace. @@ -173,20 +179,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -199,9 +206,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -211,57 +219,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -271,17 +243,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -291,21 +265,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -320,21 +294,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -345,14 +320,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -368,30 +344,30 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: channelId is a required parameter + - message: spec.forProvider.channelId is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.channelId) - || has(self.initProvider.channelId)' - - message: config is a required parameter + || (has(self.initProvider) && has(self.initProvider.channelId))' + - message: spec.forProvider.config is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.config) - || has(self.initProvider.config)' - - message: notificationType is a required parameter + || (has(self.initProvider) && has(self.initProvider.config))' + - message: spec.forProvider.notificationType is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.notificationType) - || has(self.initProvider.notificationType)' - - message: sourceId is a required parameter + || (has(self.initProvider) && has(self.initProvider.notificationType))' + - message: spec.forProvider.sourceId is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.sourceId) - || has(self.initProvider.sourceId)' - - message: sourceType is a required parameter + || (has(self.initProvider) && has(self.initProvider.sourceId))' + - message: spec.forProvider.sourceType is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.sourceType) - || has(self.initProvider.sourceType)' - - message: workspaceId is a required parameter + || (has(self.initProvider) && has(self.initProvider.sourceType))' + - message: spec.forProvider.workspaceId is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.workspaceId) - || has(self.initProvider.workspaceId)' + || (has(self.initProvider) && has(self.initProvider.workspaceId))' status: description: ConnectionStatus defines the observed state of Connection. properties: @@ -457,13 +433,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -474,8 +452,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -484,6 +463,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/tag.pagerduty.crossplane.io_assignments.yaml b/package/crds/tag.pagerduty.crossplane.io_assignments.yaml index 1b84bf7..9634452 100644 --- a/package/crds/tag.pagerduty.crossplane.io_assignments.yaml +++ b/package/crds/tag.pagerduty.crossplane.io_assignments.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: assignments.tag.pagerduty.crossplane.io spec: group: tag.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: manages a tag assignment in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -79,17 +85,17 @@ spec: type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: entityId: description: The ID of the entity. @@ -105,20 +111,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -131,9 +138,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -143,57 +151,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -203,17 +175,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -223,21 +197,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -252,21 +226,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -277,14 +252,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -300,18 +276,18 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: entityId is a required parameter + - message: spec.forProvider.entityId is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.entityId) - || has(self.initProvider.entityId)' - - message: entityType is a required parameter + || (has(self.initProvider) && has(self.initProvider.entityId))' + - message: spec.forProvider.entityType is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.entityType) - || has(self.initProvider.entityType)' - - message: tagId is a required parameter + || (has(self.initProvider) && has(self.initProvider.entityType))' + - message: spec.forProvider.tagId is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.tagId) - || has(self.initProvider.tagId)' + || (has(self.initProvider) && has(self.initProvider.tagId))' status: description: AssignmentStatus defines the observed state of Assignment. properties: @@ -337,13 +313,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -354,8 +332,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -364,6 +343,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/tag.pagerduty.crossplane.io_tags.yaml b/package/crds/tag.pagerduty.crossplane.io_tags.yaml index 8bcbdf4..35044db 100644 --- a/package/crds/tag.pagerduty.crossplane.io_tags.yaml +++ b/package/crds/tag.pagerduty.crossplane.io_tags.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: tags.tag.pagerduty.crossplane.io spec: group: tag.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -72,17 +78,17 @@ spec: type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: label: description: The label of the tag. @@ -91,20 +97,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -117,9 +124,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -129,57 +137,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -189,17 +161,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -209,21 +183,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -238,21 +212,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -263,14 +238,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -286,10 +262,10 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: label is a required parameter + - message: spec.forProvider.label is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.label) - || has(self.initProvider.label)' + || (has(self.initProvider) && has(self.initProvider.label))' status: description: TagStatus defines the observed state of Tag. properties: @@ -319,13 +295,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -336,8 +314,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -346,6 +325,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/team.pagerduty.crossplane.io_memberships.yaml b/package/crds/team.pagerduty.crossplane.io_memberships.yaml index a9189be..7ed0b3e 100644 --- a/package/crds/team.pagerduty.crossplane.io_memberships.yaml +++ b/package/crds/team.pagerduty.crossplane.io_memberships.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: memberships.team.pagerduty.crossplane.io spec: group: team.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: manages a team membership in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -68,9 +74,9 @@ spec: forProvider: properties: role: - description: 'The role of the user in the team. One of observer, - responder, or manager. Defaults to manager. These roles match - up to user roles in the following ways:' + description: |- + The role of the user in the team. One of observer, responder, or manager. Defaults to manager. + These roles match up to user roles in the following ways: type: string teamId: description: The ID of the team in which the user will belong. @@ -86,21 +92,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -113,8 +119,9 @@ spec: description: Selector for a Team to populate teamId. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -127,21 +134,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -162,21 +169,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -189,8 +196,9 @@ spec: description: Selector for a User in user to populate userId. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -203,21 +211,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -226,41 +234,196 @@ spec: type: object type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: role: - description: 'The role of the user in the team. One of observer, - responder, or manager. Defaults to manager. These roles match - up to user roles in the following ways:' + description: |- + The role of the user in the team. One of observer, responder, or manager. Defaults to manager. + These roles match up to user roles in the following ways: type: string + teamId: + description: The ID of the team in which the user will belong. + type: string + teamIdRef: + description: Reference to a Team to populate teamId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + teamIdSelector: + description: Selector for a Team to populate teamId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + userId: + description: The ID of the user to add to the team. + type: string + userIdRef: + description: Reference to a User in user to populate userId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + userIdSelector: + description: Selector for a User in user to populate userId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -273,45 +436,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -321,21 +449,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -345,17 +473,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -365,21 +495,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -394,21 +524,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -419,14 +550,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -449,9 +581,9 @@ spec: id: type: string role: - description: 'The role of the user in the team. One of observer, - responder, or manager. Defaults to manager. These roles match - up to user roles in the following ways:' + description: |- + The role of the user in the team. One of observer, responder, or manager. Defaults to manager. + These roles match up to user roles in the following ways: type: string teamId: description: The ID of the team in which the user will belong. @@ -466,13 +598,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -483,8 +617,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -493,6 +628,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/team.pagerduty.crossplane.io_teams.yaml b/package/crds/team.pagerduty.crossplane.io_teams.yaml index 915ed71..1b5d4b2 100644 --- a/package/crds/team.pagerduty.crossplane.io_teams.yaml +++ b/package/crds/team.pagerduty.crossplane.io_teams.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: teams.team.pagerduty.crossplane.io spec: group: team.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,19 +59,25 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete type: string forProvider: properties: + defaultRole: + description: The team is private if the value is "none", or public + if it is "manager" (the default permissions for a non-member + of the team are either "none", or their base role up until "manager"). + type: string description: description: A human-friendly description of the team. type: string @@ -80,18 +91,23 @@ spec: type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: + defaultRole: + description: The team is private if the value is "none", or public + if it is "manager" (the default permissions for a non-member + of the team are either "none", or their base role up until "manager"). + type: string description: description: A human-friendly description of the team. type: string @@ -107,20 +123,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -133,9 +150,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -145,57 +163,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -205,17 +187,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -225,21 +209,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -254,21 +238,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -279,14 +264,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -302,15 +288,20 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: name is a required parameter + - message: spec.forProvider.name is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.name) - || has(self.initProvider.name)' + || (has(self.initProvider) && has(self.initProvider.name))' status: description: TeamStatus defines the observed state of Team. properties: atProvider: properties: + defaultRole: + description: The team is private if the value is "none", or public + if it is "manager" (the default permissions for a non-member + of the team are either "none", or their base role up until "manager"). + type: string description: description: A human-friendly description of the team. type: string @@ -336,13 +327,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -353,8 +346,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -363,6 +357,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/user.pagerduty.crossplane.io_contactmethods.yaml b/package/crds/user.pagerduty.crossplane.io_contactmethods.yaml index 6095423..77b568c 100644 --- a/package/crds/user.pagerduty.crossplane.io_contactmethods.yaml +++ b/package/crds/user.pagerduty.crossplane.io_contactmethods.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: contactmethods.user.pagerduty.crossplane.io spec: group: user.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: and manages contact methods for a user in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -100,21 +106,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -127,8 +133,9 @@ spec: description: Selector for a User to populate userId. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -141,21 +148,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -164,17 +171,17 @@ spec: type: object type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: address: description: 'The "address" to deliver to: email, phone number, @@ -195,24 +202,102 @@ spec: description: The contact method type. May be (email_contact_method, phone_contact_method, sms_contact_method, push_notification_contact_method). type: string + userId: + description: The ID of the user. + type: string + userIdRef: + description: Reference to a User to populate userId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + userIdSelector: + description: Selector for a User to populate userId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -225,45 +310,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -273,21 +323,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -297,17 +347,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -317,21 +369,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -346,21 +398,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -371,14 +424,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -394,18 +448,18 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: address is a required parameter + - message: spec.forProvider.address is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.address) - || has(self.initProvider.address)' - - message: label is a required parameter + || (has(self.initProvider) && has(self.initProvider.address))' + - message: spec.forProvider.label is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.label) - || has(self.initProvider.label)' - - message: type is a required parameter + || (has(self.initProvider) && has(self.initProvider.label))' + - message: spec.forProvider.type is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.type) - || has(self.initProvider.type)' + || (has(self.initProvider) && has(self.initProvider.type))' status: description: ContactMethodStatus defines the observed state of ContactMethod. properties: @@ -450,13 +504,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -467,8 +523,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -477,6 +534,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/user.pagerduty.crossplane.io_notificationrules.yaml b/package/crds/user.pagerduty.crossplane.io_notificationrules.yaml index bf822fd..ba8bb8f 100644 --- a/package/crds/user.pagerduty.crossplane.io_notificationrules.yaml +++ b/package/crds/user.pagerduty.crossplane.io_notificationrules.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: notificationrules.user.pagerduty.crossplane.io spec: group: user.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: Creates and manages notification rules for a user in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -73,6 +79,7 @@ spec: description: A contact method block, configured as a block described below. type: object + x-kubernetes-map-type: granular startDelayInMinutes: description: The delay before firing the rule, in minutes. type: number @@ -95,21 +102,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -122,8 +129,9 @@ spec: description: Selector for a User to populate userId. properties: matchControllerRef: - description: MatchControllerRef ensures an object with the - same controller reference as the selecting object is selected. + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. type: boolean matchLabels: additionalProperties: @@ -136,21 +144,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -159,17 +167,17 @@ spec: type: object type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: contactMethod: additionalProperties: @@ -177,6 +185,7 @@ spec: description: A contact method block, configured as a block described below. type: object + x-kubernetes-map-type: granular startDelayInMinutes: description: The delay before firing the rule, in minutes. type: number @@ -185,24 +194,102 @@ spec: must have the urgencies ability to have a low urgency notification rule. Can be high or low. type: string + userId: + description: The ID of the user. + type: string + userIdRef: + description: Reference to a User to populate userId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + userIdSelector: + description: Selector for a User to populate userId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -215,45 +302,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -263,21 +315,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -287,17 +339,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -307,21 +361,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -336,21 +390,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -361,14 +416,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -384,18 +440,18 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: contactMethod is a required parameter + - message: spec.forProvider.contactMethod is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.contactMethod) - || has(self.initProvider.contactMethod)' - - message: startDelayInMinutes is a required parameter + || (has(self.initProvider) && has(self.initProvider.contactMethod))' + - message: spec.forProvider.startDelayInMinutes is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.startDelayInMinutes) - || has(self.initProvider.startDelayInMinutes)' - - message: urgency is a required parameter + || (has(self.initProvider) && has(self.initProvider.startDelayInMinutes))' + - message: spec.forProvider.urgency is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.urgency) - || has(self.initProvider.urgency)' + || (has(self.initProvider) && has(self.initProvider.urgency))' status: description: NotificationRuleStatus defines the observed state of NotificationRule. properties: @@ -407,6 +463,7 @@ spec: description: A contact method block, configured as a block described below. type: object + x-kubernetes-map-type: granular id: description: The id of the referenced contact method. type: string @@ -428,13 +485,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -445,8 +504,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -455,6 +515,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/user.pagerduty.crossplane.io_users.yaml b/package/crds/user.pagerduty.crossplane.io_users.yaml index 60a8c6e..d97a712 100644 --- a/package/crds/user.pagerduty.crossplane.io_users.yaml +++ b/package/crds/user.pagerduty.crossplane.io_users.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: users.user.pagerduty.crossplane.io spec: group: user.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -96,9 +102,9 @@ spec: description: The name of the user. type: string role: - description: 'The user role. Can be admin, limited_user, observer, - owner, read_only_user, read_only_limited_user, restricted_access, - or user. Notes:' + description: |- + The user role. Can be admin, limited_user, observer, owner, read_only_user, read_only_limited_user, restricted_access, or user. + Notes: type: string timeZone: description: The time zone of the user. Default is account default @@ -106,17 +112,17 @@ spec: type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: color: description: The schedule color for the user. Valid options are @@ -147,9 +153,9 @@ spec: description: The name of the user. type: string role: - description: 'The user role. Can be admin, limited_user, observer, - owner, read_only_user, read_only_limited_user, restricted_access, - or user. Notes:' + description: |- + The user role. Can be admin, limited_user, observer, owner, read_only_user, read_only_limited_user, restricted_access, or user. + Notes: type: string timeZone: description: The time zone of the user. Default is account default @@ -159,20 +165,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -185,9 +192,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -197,57 +205,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -257,17 +229,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -277,21 +251,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -306,21 +280,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -331,14 +306,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -354,14 +330,14 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: email is a required parameter + - message: spec.forProvider.email is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.email) - || has(self.initProvider.email)' - - message: name is a required parameter + || (has(self.initProvider) && has(self.initProvider.email))' + - message: spec.forProvider.name is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.name) - || has(self.initProvider.name)' + || (has(self.initProvider) && has(self.initProvider.name))' status: description: UserStatus defines the observed state of User. properties: @@ -409,9 +385,9 @@ spec: description: The name of the user. type: string role: - description: 'The user role. Can be admin, limited_user, observer, - owner, read_only_user, read_only_limited_user, restricted_access, - or user. Notes:' + description: |- + The user role. Can be admin, limited_user, observer, owner, read_only_user, read_only_limited_user, restricted_access, or user. + Notes: type: string teams: description: A list of teams the user should belong to. Please @@ -419,6 +395,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set timeZone: description: The time zone of the user. Default is account default timezone. @@ -430,13 +407,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -447,8 +426,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -457,6 +437,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec diff --git a/package/crds/webhook.pagerduty.crossplane.io_subscriptions.yaml b/package/crds/webhook.pagerduty.crossplane.io_subscriptions.yaml index 924d9d4..a71c307 100644 --- a/package/crds/webhook.pagerduty.crossplane.io_subscriptions.yaml +++ b/package/crds/webhook.pagerduty.crossplane.io_subscriptions.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: subscriptions.webhook.pagerduty.crossplane.io spec: group: webhook.pagerduty.crossplane.io @@ -38,14 +38,19 @@ spec: and manages a webhook subscription in PagerDuty. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -54,13 +59,14 @@ spec: properties: deletionPolicy: default: Delete - description: 'DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. This field is planned to be deprecated - in favor of the ManagementPolicies field in a future release. Currently, - both could be set independently and non-default values would be - honored if the feature flag is enabled. See the design doc for more - information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 enum: - Orphan - Delete @@ -136,17 +142,17 @@ spec: type: string type: object initProvider: - description: THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. InitProvider - holds the same fields as ForProvider, with the exception of Identifier - and other resource reference fields. The fields that are in InitProvider - are merged into ForProvider when the resource is created. The same - fields are also added to the terraform ignore_changes hook, to avoid - updating them after creation. This is useful for fields that are - required on creation, but we do not desire to update them after - creation, for example because of an external controller is managing - them, like an autoscaler. + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. properties: active: description: Determines whether the subscription will produce @@ -219,20 +225,21 @@ spec: managementPolicies: default: - '*' - description: 'THIS IS AN ALPHA FIELD. Do not use it in production. - It is not honored unless the relevant Crossplane feature flag is - enabled, and may be changed or removed without notice. ManagementPolicies - specify the array of actions Crossplane is allowed to take on the - managed and external resources. This field is planned to replace - the DeletionPolicy field in a future release. Currently, both could - be set independently and non-default values would be honored if - the feature flag is enabled. If both are custom, the DeletionPolicy - field will be ignored. See the design doc for more information: - https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 - and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: - description: A ManagementAction represents an action that the Crossplane - controllers can take on an external resource. + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. enum: - Observe - Create @@ -245,9 +252,10 @@ spec: providerConfigRef: default: name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. properties: name: description: Name of the referenced object. @@ -257,57 +265,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -317,17 +289,19 @@ spec: - name type: object publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. properties: configRef: default: name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. properties: name: description: Name of the referenced object. @@ -337,21 +311,21 @@ spec: properties: resolution: default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. enum: - Required - Optional type: string resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. enum: - Always - IfNotPresent @@ -366,21 +340,22 @@ spec: annotations: additionalProperties: type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. type: object labels: additionalProperties: type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. type: object type: - description: Type is the SecretType for the connection secret. + description: |- + Type is the SecretType for the connection secret. - Only valid for Kubernetes Secret Stores. type: string type: object @@ -391,14 +366,15 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. properties: name: description: Name of the secret. @@ -414,18 +390,18 @@ spec: - forProvider type: object x-kubernetes-validations: - - message: deliveryMethod is a required parameter + - message: spec.forProvider.deliveryMethod is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.deliveryMethod) - || has(self.initProvider.deliveryMethod)' - - message: events is a required parameter + || (has(self.initProvider) && has(self.initProvider.deliveryMethod))' + - message: spec.forProvider.events is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.events) - || has(self.initProvider.events)' - - message: filter is a required parameter + || (has(self.initProvider) && has(self.initProvider.events))' + - message: spec.forProvider.filter is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.filter) - || has(self.initProvider.filter)' + || (has(self.initProvider) && has(self.initProvider.filter))' status: description: SubscriptionStatus defines the observed state of Subscription. properties: @@ -509,13 +485,15 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. type: string reason: description: A Reason for this condition's last transition from @@ -526,8 +504,9 @@ spec: False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. type: string required: - lastTransitionTime @@ -536,6 +515,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec