Skip to content

Commit

Permalink
Merge pull request crossplane-contrib#943 from ulucinar/fix-metricfilter
Browse files Browse the repository at this point in the history
Fix MetricFilter.cloudwatchlogs external-name configuration
  • Loading branch information
ulucinar authored Nov 1, 2023
2 parents 95f4971 + 8588958 commit a0bfa26
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/externalname.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ var ExternalNameConfigs = map[string]config.ExternalName{
// Case4: Imported by using the API identifier, route identifier and route
// response identifier.
"aws_apigatewayv2_route_response": TemplatedStringAsIdentifierWithNoName("{{ .parameters.api_id }}/{{ .parameters.route_id }}/{{ .external_name }}"),
// Imported by using the API identifier and stage name.
"aws_apigatewayv2_stage": config.TemplatedStringAsIdentifier("name", "{{ .parameters.api_id }}/{{ .external_name }}"),
// Imported by the stage name.
"aws_apigatewayv2_stage": config.NameAsIdentifier,
// aws_apigatewayv2_vpc_link can be imported by using the VPC Link id
"aws_apigatewayv2_vpc_link": config.IdentifierFromProvider,

Expand Down Expand Up @@ -1029,8 +1029,8 @@ var ExternalNameConfigs = map[string]config.ExternalName{
//
// Cloudwatch Log Groups can be imported using the name
"aws_cloudwatch_log_group": config.NameAsIdentifier,
// CloudWatch Log Metric Filter can be imported using the log_group_name:name
"aws_cloudwatch_log_metric_filter": config.TemplatedStringAsIdentifier("name", "{{ .parameters.log_group_name }}:{{ .external_name }}"),
// CloudWatch Log Metric Filter can be imported using its name
"aws_cloudwatch_log_metric_filter": config.NameAsIdentifier,
// CloudWatch query definitions can be imported using the query definition ARN.
"aws_cloudwatch_query_definition": config.IdentifierFromProvider,
// Cloudwatch Log Stream can be imported using the stream's log_group_name and name
Expand Down
30 changes: 30 additions & 0 deletions examples/apigatewayv2/stage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: apigatewayv2.aws.upbound.io/v1beta1
kind: Stage
metadata:
name: example
annotations:
meta.upbound.io/example-id: apigatewayv2/v1beta1/stage
labels:
upjet.upbound.io/test-group: apigatewayv2-http
spec:
forProvider:
region: us-west-1
apiIdSelector:
matchLabels:
upjet.upbound.io/test-group: apigatewayv2-http

---

apiVersion: apigatewayv2.aws.upbound.io/v1beta1
kind: API
metadata:
name: auth-api
annotations:
meta.upbound.io/example-id: apigatewayv2/v1beta1/stage
labels:
upjet.upbound.io/test-group: apigatewayv2-http
spec:
forProvider:
region: us-west-1
name: test-http-api
protocolType: HTTP

0 comments on commit a0bfa26

Please sign in to comment.