This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of your changes
Fixes crossplane-contrib/provider-jet-aws#136
This PR provides support for tagging convention for all providers in a generic way. By this implementation, custom initializers can be set.
A new configuration field,
Initializers
, was added. The type of this field is[]InitializerFn
:The field that is expected to be set has been implemented configurable on the basis of resource.
If the
Initializers
field is not set in the resource configuration, the initializers will not be generated in controllers inSetup
function.In three providers (aws, azure and gcp), a defaulting is not implemented for tag fields. Some statistics were collected to decide the topic:
AWS: 761 Generated Resource / 398 Resources has not "tags" field / 1 resource's "tags" field has different type (not map[string]*string)
Azure: 645 Generated Resource / 401 Resources has not "tags" field / 2 resources' "tags" field has different type (not map[string]*string)
Google: 436 Generated Resource / 376 Resources has not "labels" field / 2 resources' "labels" field has different type (not map[string]*string)
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
This PR was tested in provider-aws by using the S3-Bucket resource. Firstly, the commit id of this PR was used to consume the latest changes. And a custom
ExternalTagsFieldName
configuration was added for this resource. Then create, update and delete operations were successfully tested.