generated from cloudposse-terraform-components/template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
prettier
in READMEs (cloudposse/terraform-aws-components#998)
- Loading branch information
Showing
5 changed files
with
69 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,29 +5,32 @@ This component is responsible for provisioning Opsgenie teams and related servic | |
## Usage | ||
|
||
#### Pre-requisites | ||
You need an API Key stored in `/opsgenie/opsgenie_api_key` of SSM, this is configurable using the `ssm_parameter_name_format` and `ssm_path` variables. | ||
|
||
Opsgenie is now part of Atlassian, so you need to make sure you are creating | ||
an Opsgenie API Key, which looks like `abcdef12-3456-7890-abcd-ef0123456789` | ||
and not an Atlassian API key, which looks like | ||
You need an API Key stored in `/opsgenie/opsgenie_api_key` of SSM, this is configurable using the | ||
`ssm_parameter_name_format` and `ssm_path` variables. | ||
|
||
Opsgenie is now part of Atlassian, so you need to make sure you are creating an Opsgenie API Key, which looks like | ||
`abcdef12-3456-7890-abcd-ef0123456789` and not an Atlassian API key, which looks like | ||
|
||
```shell | ||
ATAfT3xFfGF0VFXAfl8EmQNPVv1Hlazp3wsJgTmM8Ph7iP-RtQyiEfw-fkDS2LvymlyUOOhc5XiSx46vQWnznCJolq-GMX4KzdvOSPhEWr-BF6LEkJQC4CSjDJv0N7d91-0gVekNmCD2kXY9haUHUSpO4H7X6QxyImUb9VmOKIWTbQi8rf4CF28=63CB21B9 | ||
``` | ||
|
||
Generate an API Key by going to Settings -> API key management on your Opsgenie | ||
control panel, which will have an address like `https://<your-org>.app.opsgenie.com/settings/api-key-management`, | ||
and click the "Add new API key" button. For more information, see the | ||
Generate an API Key by going to Settings -> API key management on your Opsgenie control panel, which will have an | ||
address like `https://<your-org>.app.opsgenie.com/settings/api-key-management`, and click the "Add new API key" button. | ||
For more information, see the | ||
[Opsgenie API key management documentation](https://support.atlassian.com/opsgenie/docs/api-key-management/). | ||
|
||
Once you have the key, you'll need to test it with a curl to verify that you are at least | ||
on a Standard plan with OpsGenie: | ||
Once you have the key, you'll need to test it with a curl to verify that you are at least on a Standard plan with | ||
OpsGenie: | ||
|
||
``` | ||
curl -X GET 'https://api.opsgenie.com/v2/account' \ | ||
--header "Authorization: GenieKey $API_KEY" | ||
``` | ||
|
||
The result should be something similar to below: | ||
|
||
``` | ||
{ | ||
"data": { | ||
|
@@ -39,17 +42,17 @@ The result should be something similar to below: | |
} | ||
``` | ||
|
||
If you see `Free` or `Essentials` in the plan, then you won't be able | ||
to use this component. You can see more details here: | ||
[OpsGenie pricing/features](https://www.atlassian.com/software/opsgenie/pricing#) | ||
If you see `Free` or `Essentials` in the plan, then you won't be able to use this component. You can see more details | ||
here: [OpsGenie pricing/features](https://www.atlassian.com/software/opsgenie/pricing#) | ||
|
||
#### Getting Started | ||
|
||
**Stack Level**: Global | ||
|
||
Here's an example snippet for how to use this component. | ||
|
||
This component should only be applied once as the resources it creates are regional, but it works with integrations. This is typically done via the auto or corp stack (e.g. `gbl-auto.yaml`). | ||
This component should only be applied once as the resources it creates are regional, but it works with integrations. | ||
This is typically done via the auto or corp stack (e.g. `gbl-auto.yaml`). | ||
|
||
```yaml | ||
# 9-5 Mon-Fri | ||
|
@@ -175,8 +178,8 @@ components: | |
notify_type: default | ||
delay: 60 | ||
recipients: | ||
- type: team | ||
name: otherteam | ||
- type: team | ||
name: otherteam | ||
|
||
yaep_escalation: | ||
enabled: true | ||
|
@@ -187,8 +190,8 @@ components: | |
notify_type: default | ||
delay: 90 | ||
recipients: | ||
- type: user | ||
name: [email protected] | ||
- type: user | ||
name: [email protected] | ||
|
||
schedule_escalation: | ||
enabled: true | ||
|
@@ -199,8 +202,8 @@ components: | |
notify_type: default | ||
delay: 30 | ||
recipients: | ||
- type: schedule | ||
name: secondary_on_call | ||
- type: schedule | ||
name: secondary_on_call | ||
``` | ||
The API keys relating to the Opsgenie Integrations are stored in SSM Parameter Store and can be accessed via chamber. | ||
|
@@ -210,13 +213,18 @@ AWS_PROFILE=foo chamber list opsgenie-team/<team> | |
``` | ||
|
||
### ClickOps Work | ||
- After deploying the opsgenie-team component the created team will have a schedule named after the team. This is purposely left to be clickOps’d so the UI can be used to set who is on call, as that is the usual way (not through code). Additionally, we do not want a re-apply of the Terraform to delete or shuffle who is planned to be on call, thus we left who is on-call on a schedule out of the component. | ||
|
||
- After deploying the opsgenie-team component the created team will have a schedule named after the team. This is | ||
purposely left to be clickOps’d so the UI can be used to set who is on call, as that is the usual way (not through | ||
code). Additionally, we do not want a re-apply of the Terraform to delete or shuffle who is planned to be on call, | ||
thus we left who is on-call on a schedule out of the component. | ||
|
||
## Known Issues | ||
|
||
### Different API Endpoints in Use | ||
|
||
The problem is there are 3 different api endpoints in use | ||
|
||
- `/webapp` - the most robust - only exposed to the UI (that we've seen) | ||
- `/v2/` - robust with some differences from `webapp` | ||
- `/v1/` - the oldest and furthest from the live UI. | ||
|
@@ -231,11 +239,11 @@ This module does not create users. Users must have already been created to be ad | |
|
||
### Cannot Add Stakeholders | ||
|
||
- Track the issue: https://github.com/opsgenie/terraform-provider-opsgenie/issues/278 | ||
- Track the issue: https://github.com/opsgenie/terraform-provider-opsgenie/issues/278 | ||
|
||
### No Resource to create Slack Integration | ||
|
||
- Track the issue: https://github.com/DataDog/terraform-provider-datadog/issues/67 | ||
- Track the issue: https://github.com/DataDog/terraform-provider-datadog/issues/67 | ||
|
||
### Out of Date Terraform Docs | ||
|
||
|
@@ -244,10 +252,12 @@ Another Problem is the terraform docs are not always up to date with the provide | |
The OpsGenie Provider uses a mix of `/v1` and `/v2`. This means there are many things you can only do from the UI. | ||
|
||
Listed below in no particular order | ||
- Incident Routing cannot add dependent services - in `v1` and `v2` a `service_incident_rule` object has `serviceId` as type string, in webapp this becomes `serviceIds` of type `list(string)` | ||
|
||
- Incident Routing cannot add dependent services - in `v1` and `v2` a `service_incident_rule` object has `serviceId` as | ||
type string, in webapp this becomes `serviceIds` of type `list(string)` | ||
- Opsgenie Provider appears to be inconsistent with how it uses `time_restriction`: | ||
- `restrictions` for type `weekday-and-time-of-day` | ||
- `restriction` for type `time-of-day` | ||
- `restrictions` for type `weekday-and-time-of-day` | ||
- `restriction` for type `time-of-day` | ||
|
||
Unfortunately none of this is in the terraform docs, and was found via errors and digging through source code. | ||
|
||
|
@@ -259,24 +269,27 @@ We recommend to use the human readable timezone such as `Europe/London`. | |
|
||
- Setting a schedule to a GMT-style timezone with offsets can cause inconsistent plans. | ||
|
||
Setting the timezone to `Etc/GMT+1` instead of `Europe/London`, will lead to permadrift as OpsGenie converts the GMT offsets to regional timezones at deploy-time. In the previous deploy, the GMT style get converted to `Atlantic/Cape_Verde`. | ||
Setting the timezone to `Etc/GMT+1` instead of `Europe/London`, will lead to permadrift as OpsGenie converts the GMT | ||
offsets to regional timezones at deploy-time. In the previous deploy, the GMT style get converted to | ||
`Atlantic/Cape_Verde`. | ||
|
||
```hcl | ||
# module.routing["london_schedule"].module.team_routing_rule[0].opsgenie_team_routing_rule.this[0] will be updated in-place | ||
~ resource "opsgenie_team_routing_rule" "this" { | ||
id = "4b4c4454-8ccf-41a9-b856-02bec6419ba7" | ||
name = "london_schedule" | ||
~ timezone = "Atlantic/Cape_Verde" -> "Etc/GMT+1" | ||
# (2 unchanged attributes hidden) | ||
``` | ||
```hcl | ||
# module.routing["london_schedule"].module.team_routing_rule[0].opsgenie_team_routing_rule.this[0] will be updated in-place | ||
~ resource "opsgenie_team_routing_rule" "this" { | ||
id = "4b4c4454-8ccf-41a9-b856-02bec6419ba7" | ||
name = "london_schedule" | ||
~ timezone = "Atlantic/Cape_Verde" -> "Etc/GMT+1" | ||
# (2 unchanged attributes hidden) | ||
``` | ||
|
||
Some GMT styles will not cause a timezone change on subsequent applies such as `Etc/GMT+8` for `Asia/Taipei`. | ||
Some GMT styles will not cause a timezone change on subsequent applies such as `Etc/GMT+8` for `Asia/Taipei`. | ||
|
||
- If the calendar date has crossed daylight savings time, the `Etc/GMT+` GMT style will need to be updated to reflect the correct timezone. | ||
- If the calendar date has crossed daylight savings time, the `Etc/GMT+` GMT style will need to be updated to reflect | ||
the correct timezone. | ||
|
||
Track the issue: https://github.com/opsgenie/terraform-provider-opsgenie/issues/258 | ||
|
||
<!-- prettier-ignore-start --> | ||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
## Requirements | ||
|
||
|
@@ -370,6 +383,7 @@ Track the issue: https://github.com/opsgenie/terraform-provider-opsgenie/issues/ | |
| <a name="output_team_members"></a> [team\_members](#output\_team\_members) | Team members | | ||
| <a name="output_team_name"></a> [team\_name](#output\_team\_name) | Team Name | | ||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
<!-- prettier-ignore-end --> | ||
|
||
## Related How-to Guides | ||
|
||
|
@@ -383,7 +397,8 @@ Track the issue: https://github.com/opsgenie/terraform-provider-opsgenie/issues/ | |
- [How to Implement Incident Management with OpsGenie](https://docs.cloudposse.com/reference-architecture/how-to-guides/tutorials/how-to-implement-incident-management-with-opsgenie) | ||
|
||
## References | ||
* [cloudposse/terraform-aws-components](https://github.com/cloudposse/terraform-aws-components/tree/main/modules/opsgenie-team) - Cloud Posse's upstream component | ||
|
||
- [cloudposse/terraform-aws-components](https://github.com/cloudposse/terraform-aws-components/tree/main/modules/opsgenie-team) - | ||
Cloud Posse's upstream component | ||
|
||
[<img src="https://cloudposse.com/logo-300x69.svg" height="32" align="right"/>](https://cpco.io/component) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters