Skip to content

Commit

Permalink
apigw warning cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
candonov committed Mar 25, 2024
1 parent 709c184 commit 98acd42
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 10 deletions.
4 changes: 4 additions & 0 deletions compositions/upbound-aws-provider/apigw/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ spec:
type: string
region:
type: string
tags:
additionalProperties:
type: string
type: object
required:
- region
type: object
Expand Down
53 changes: 43 additions & 10 deletions compositions/upbound-aws-provider/apigw/rest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,9 @@ spec:
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.deletionPolicy
toFieldPath: spec.deletionPolicy
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.providerConfigName
toFieldPath: spec.providerConfigRef.name
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true
- fromFieldPath: "metadata.name"
toFieldPath: "metadata.name"
resources:
Expand All @@ -48,6 +39,9 @@ spec:
patches:
- type: PatchSet
patchSetName: common-fields
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: metadata.name
Expand Down Expand Up @@ -88,6 +82,12 @@ spec:
type: Regexp
regexp:
match: \d{12,}
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true

- name: apigw-role
base:
Expand Down Expand Up @@ -129,6 +129,12 @@ spec:
- type: ToCompositeFieldPath
fromFieldPath: status.atProvider.id
toFieldPath: status.apigwRoleName
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true

- name: api-deployment
base:
Expand All @@ -142,6 +148,9 @@ spec:
patches:
- type: PatchSet
patchSetName: common-fields
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: metadata.name
Expand Down Expand Up @@ -184,6 +193,9 @@ spec:
patches:
- type: PatchSet
patchSetName: common-fields
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: metadata.name
Expand All @@ -205,6 +217,12 @@ spec:
- type: ToCompositeFieldPath
fromFieldPath: status.atProvider.stageName
toFieldPath: status.apigwStageName
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true

- name: api-access-logs-group
base:
Expand All @@ -217,6 +235,9 @@ spec:
patches:
- type: PatchSet
patchSetName: common-fields
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: metadata.name
Expand All @@ -230,6 +251,12 @@ spec:
- type: ToCompositeFieldPath
fromFieldPath: status.atProvider.arn
toFieldPath: status.apigwAccessLogsGroupArn
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true

- name: apigw-logging-account
base:
Expand All @@ -243,6 +270,9 @@ spec:
patches:
- type: PatchSet
patchSetName: common-fields
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: metadata.name
Expand Down Expand Up @@ -270,6 +300,9 @@ spec:
patches:
- type: PatchSet
patchSetName: common-fields
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: metadata.name
Expand All @@ -279,4 +312,4 @@ spec:
fmt: "%s-api-method-settings"
- type: FromCompositeFieldPath
fromFieldPath: spec.logLevel
toFieldPath: spec.forProvider.loggingLevel
toFieldPath: spec.forProvider.settings[0].loggingLevel

0 comments on commit 98acd42

Please sign in to comment.