Skip to content

Commit

Permalink
feat(cw): added loggroup
Browse files Browse the repository at this point in the history
Signed-off-by: haarchri <chhaar30@googlemail.com>
  • Loading branch information
haarchri committed Nov 16, 2021
1 parent 2d52c4f commit a25d604
Show file tree
Hide file tree
Showing 24 changed files with 1,972 additions and 137 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PROJECT_REPO := github.com/crossplane/$(PROJECT_NAME)
PLATFORMS ?= linux_amd64 linux_arm64

CODE_GENERATOR_COMMIT ?= cac5654b7bb64c8f754ad9af01799ef70d9541b6
GENERATED_SERVICES="apigatewayv2,cloudfront,dynamodb,efs,glue,kafka,kms,lambda,mq,rds,secretsmanager,servicediscovery,sfn,transfer"
GENERATED_SERVICES="apigatewayv2,cloudfront,cloudwatchlogs,dynamodb,efs,glue,kafka,kms,lambda,mq,rds,secretsmanager,servicediscovery,sfn,transfer"

# kind-related versions
KIND_VERSION ?= v0.11.1
Expand Down
2 changes: 2 additions & 0 deletions apis/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
cachev1alpha1 "github.com/crossplane/provider-aws/apis/cache/v1alpha1"
cachev1beta1 "github.com/crossplane/provider-aws/apis/cache/v1beta1"
cloudfrontv1alpha1 "github.com/crossplane/provider-aws/apis/cloudfront/v1alpha1"
cloudwatchlogsv1alpha1 "github.com/crossplane/provider-aws/apis/cloudwatchlogs/v1alpha1"
databasev1beta1 "github.com/crossplane/provider-aws/apis/database/v1beta1"
docdbv1alpha1 "github.com/crossplane/provider-aws/apis/docdb/v1alpha1"
dynamodbv1alpha1 "github.com/crossplane/provider-aws/apis/dynamodb/v1alpha1"
Expand Down Expand Up @@ -103,6 +104,7 @@ func init() {
transferv1alpha1.SchemeBuilder.AddToScheme,
gluev1alpha1.SchemeBuilder.AddToScheme,
mqv1alpha1.SchemeBuilder.AddToScheme,
cloudwatchlogsv1alpha1.SchemeBuilder.AddToScheme,
)
}

Expand Down
46 changes: 46 additions & 0 deletions apis/cloudwatchlogs/v1alpha1/custom_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
Copyright 2021 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import (
xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)

// CustomLogGroupParameters contains the additional fields for LogGroup.
type CustomLogGroupParameters struct {
// The number of days to retain the log events in the specified log group.
// If you select 0, the events in the log group are always retained and never expire.
// +kubebuilder:validation:Enum=0;1;3;5;7;14;30;60;90;120;150;180;365;400;545;731;1827;3653
// +optional
RetentionInDays *int64 `json:"retentionInDays,omitempty"`

// The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
// For more information, see Amazon Resource Names - AWS Key Management Service
// (AWS KMS) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms).
// +crossplane:generate:reference:type=github.com/crossplane/provider-aws/apis/kms/v1alpha1.Key
// +crossplane:generate:reference:refFieldName=KMSKeyIDRef
// +crossplane:generate:reference:selectorFieldName=KMSKeyIDSelector
KMSKeyID *string `json:"kmsKeyID,omitempty"`

// KMSKeyIDRef is a reference to a KMS Key used to set KMSKeyID.
// +optional
KMSKeyIDRef *xpv1.Reference `json:"kmsKeyIDRef,omitempty"`

// KMSKeyIDSelector selects a reference to a KMS Key used to set KMSKeyID.
// +optional
KMSKeyIDSelector *xpv1.Selector `json:"kmsKeyIDSelector,omitempty"`
}
6 changes: 6 additions & 0 deletions apis/cloudwatchlogs/v1alpha1/generator-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ignore:
resource_names:
- LogStream
- ExportTask
field_paths:
- CreateLogGroupInput.KmsKeyId
24 changes: 24 additions & 0 deletions apis/cloudwatchlogs/v1alpha1/zz_doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions apis/cloudwatchlogs/v1alpha1/zz_enums.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a25d604

Please sign in to comment.