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

refactor: migrate resource_lacework_integration_docker_hub to use v2 api #378

Merged
merged 6 commits into from
Sep 29, 2022

Conversation

dmurray-lacework
Copy link
Collaborator

@dmurray-lacework dmurray-lacework commented Sep 22, 2022

Signed-off-by: Darren Murray darren.murray@lacework.net

Issue:
https://lacework.atlassian.net/browse/ALLY-1136

Description:
migrate resource_lacework_integration_docker_hub to use v2 api

Signed-off-by: Darren Murray <darren.murray@lacework.net>
@dmurray-lacework dmurray-lacework changed the base branch from main to v1 September 28, 2022 13:42
Signed-off-by: Darren Murray <darren.murray@lacework.net>
Signed-off-by: Darren Murray <darren.murray@lacework.net>
Signed-off-by: Darren Murray <darren.murray@lacework.net>
lacework/resource_lacework_integration_docker_hub.go Outdated Show resolved Hide resolved
lacework/resource_lacework_integration_docker_hub.go Outdated Show resolved Hide resolved
lacework/resource_lacework_integration_docker_hub.go Outdated Show resolved Hide resolved
lacework/resource_lacework_integration_docker_hub.go Outdated Show resolved Hide resolved
lacework/resource_lacework_integration_docker_hub.go Outdated Show resolved Hide resolved
Signed-off-by: Darren Murray <darren.murray@lacework.net>
Signed-off-by: Darren Murray <darren.murray@lacework.net>
@dmurray-lacework dmurray-lacework merged commit 771f0a1 into v1 Sep 29, 2022
@dmurray-lacework dmurray-lacework deleted the dmurray-lacework/ALLY-1136 branch September 29, 2022 11:34
dmurray-lacework added a commit that referenced this pull request Nov 2, 2022
…api (#378)

* refactor: migrate resource_lacework_integration_docker_hub to use v2 api
afiune pushed a commit that referenced this pull request Nov 8, 2022
…api (#378)

* refactor: migrate resource_lacework_integration_docker_hub to use v2 api
@dmurray-lacework dmurray-lacework mentioned this pull request Nov 8, 2022
This was referenced Nov 8, 2022
api.DockerhubData{
LimitByTag: castAttributeToStringSlice(d, "limit_by_tags"),
LimitByRep: castAttributeToStringSlice(d, "limit_by_repositories"),
LimitByLabel: castAttributeToArrayKeyMapOfStrings(d, "limit_by_labels"),
Copy link
Contributor

@afiune afiune Nov 23, 2022

Choose a reason for hiding this comment

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

Why did we use this function? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

The Schema for this field is:

                "limitByLabel": {
                  "default": [],
                  "description": "When sending a request, if you do not want to assess all images in this registry, specify `key:value` pairs so that only images with matching label `key:value` pairs will be assessed. To change which images you want to assess, update this field so the change is captured during the next polling period. Supported field input: `key:value`. If you specify tag and label limits, they function as an AND. When included in a response, returns a list of labels that will be used to assess images.",
                  "items": {
                    "example": [
                      {
                        "key1": "value1"
                      },
                      {
                        "key2": "value2"
                      }
                    ],
                    "type": "object"
                  },
                  "title": "Limit by Label(s) (optional)",
                  "type": "array"
                },

@lacework-releng lacework-releng mentioned this pull request Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants