Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: retry mechanism for all cloud resources #81

Merged
merged 8 commits into from
Mar 8, 2021

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Mar 4, 2021

User Story

As a Lacework & Terraform user,
I need to have stable and predictable executions,
So that I don't break my production deployments.

Description

Users that have integrated our Terraform templates and providers into their CI/CD process are experiencing a number of API issues that are breaking their deployment processes/pipelines. We think that, when we introduce APIv2 into our Terraform provider, we will fix these issues but we cannot wait until this work is done in a couple of sprints, we need to have a solution sooner rather than later.

Proposal Solution

We will implement a retry mechanism that will default to 5 tries with incremental intervals in between. This parameter will be configurable so that if a user wants to try 10 times or more, they can configure it.

Acceptance Criteria

All cloud account resources should have implement this new retry mechanism, the resources we will implement it to are:

  • lacework_integration_aws_cfg
  • lacework_integration_aws_ct
  • lacework_integration_azure_al
  • lacework_integration_azure_cfg
  • lacework_integration_gcp_at
  • lacework_integration_gcp_cfg

afiune added 2 commits March 4, 2021 10:59
Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
@afiune afiune changed the title Afiune/ally 358/retries feat: retry mechanism for all cloud resources Mar 4, 2021
@afiune afiune self-assigned this Mar 4, 2021
@afiune afiune added the feat New feature or request label Mar 4, 2021
Copy link
Contributor

@scottford-lw scottford-lw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -29,6 +29,7 @@ The following arguments are supported:
* `name` - (Required) The AWS Config integration name.
* `credentials` - (Required) The credentials needed by the integration. See [Credentials](#credentials) below for details.
* `enabled` - (Optional) The state of the external integration. Defaults to `true`.
* `retries` - (Optional) The number of attempts to create the external integration. Defaults to `5`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottford-lw @dmurray-lacework is this a good text for the new argument?

@@ -34,6 +35,11 @@ func resourceLaceworkIntegrationAwsCfg() *schema.Resource {
Optional: true,
Default: true,
},
"retries": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottford-lw @dmurray-lacework Should this be max_retries instead? 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, i think that better describes this parameters function.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max_retries seems to be more the common nomenclature. At least from a quick search.
https://registry.terraform.io/providers/hashicorp/aws/latest/docs#max_retries

Not a sticking point for me and happy for this to go with either. But I do prefer max_retries

afiune added 6 commits March 8, 2021 08:18
Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
@dmurray-lacework dmurray-lacework merged commit 61893af into master Mar 8, 2021
@dmurray-lacework dmurray-lacework deleted the afiune/ALLY-358/retries branch March 8, 2021 19:32
@dmurray-lacework dmurray-lacework mentioned this pull request Mar 8, 2021
dmurray-lacework pushed a commit that referenced this pull request May 27, 2021
* feat: retry mechanism for all cloud resources

Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants