Skip to content

Commit

Permalink
Make EnvironmentEc2.cloud9 and SecretRotation.secretsmanager uptestable
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Bush <[email protected]>
  • Loading branch information
mbbush committed Apr 23, 2024
1 parent d70b14f commit aca95c9
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 17 deletions.
1 change: 1 addition & 0 deletions examples/cloud9/v1beta1/environmentec2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
name: example
spec:
forProvider:
imageId: amazonlinux-2023-x86_64
instanceType: t2.micro
name: example-env
region: us-west-1
70 changes: 53 additions & 17 deletions examples/secretsmanager/v1beta1/secretrotation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,20 @@ kind: SecretRotation
metadata:
annotations:
meta.upbound.io/example-id: secretsmanager/v1beta1/secretrotation
upjet.upbound.io/manual-intervention: "The lambda.Function resource that is dependent on this resource requires manual intervention."
labels:
testing.upbound.io/example-name: example
name: example
testing.upbound.io/example-name: secretrotation
name: example-secretrotation
spec:
forProvider:
region: us-east-1
rotationLambdaArnSelector:
matchLabels:
testing.upbound.io/example-name: example
testing.upbound.io/example-name: secretrotation
rotationRules:
- automaticallyAfterDays: 30
secretIdSelector:
matchLabels:
testing.upbound.io/example-name: example
testing.upbound.io/example-name: secretrotation

---

Expand All @@ -31,7 +30,7 @@ metadata:
annotations:
meta.upbound.io/example-id: secretsmanager/v1beta1/secretrotation
labels:
testing.upbound.io/example-name: example
testing.upbound.io/example-name: secretrotation
name: example-secretrotation
spec:
forProvider:
Expand All @@ -41,7 +40,7 @@ spec:
statementId: AllowExecutionFromSecretsManager
functionNameSelector:
matchLabels:
testing.upbound.io/example-name: example
testing.upbound.io/example-name: secretrotation

---

Expand All @@ -51,7 +50,7 @@ metadata:
annotations:
meta.upbound.io/example-id: secretsmanager/v1beta1/secretrotation
labels:
testing.upbound.io/example-name: example
testing.upbound.io/example-name: secretrotation
name: example-secretrotation
spec:
forProvider:
Expand All @@ -65,22 +64,24 @@ kind: Function
metadata:
annotations:
meta.upbound.io/example-id: secretsmanager/v1beta1/secretrotation
upjet.upbound.io/manual-intervention: "This resource needs a s3.Bucket resource containing the hello-python.zip file."
labels:
testing.upbound.io/example-name: example
testing.upbound.io/example-name: secretrotation
name: example-secretrotation
spec:
forProvider:
region: us-east-1
environment:
- variables:
foo: bar
s3Bucket: upbound-provider-test-data
s3Key: hello-python.zip
handler: index.py
roleRef:
name: sample-role
runtime: python3.9
s3BucketSelector:
matchLabels:
testing.upbound.io/example-name: secretrotation
s3Key: lambda.zip
handler: handler
roleSelector:
matchLabels:
testing.upbound.io/example-name: secretrotation
runtime: nodejs18.x

---

Expand All @@ -90,7 +91,7 @@ metadata:
annotations:
meta.upbound.io/example-id: secretsmanager/v1beta1/secretrotation
labels:
testing.upbound.io/example-name: example
testing.upbound.io/example-name: secretrotation
name: sample-role
spec:
forProvider:
Expand All @@ -108,3 +109,38 @@ spec:
}
]
}
---
apiVersion: s3.aws.upbound.io/v1beta1
kind: Bucket
metadata:
annotations:
meta.upbound.io/example-id: secretsmanager/v1beta1/secretrotation
crossplane.io/external-name: ${Rand.RFC1123Subdomain}
labels:
testing.upbound.io/example-name: secretrotation
name: example-secretrotation
spec:
forProvider:
region: us-east-1

---
apiVersion: s3.aws.upbound.io/v1beta1
kind: Object
metadata:
annotations:
meta.upbound.io/example-id: secretsmanager/v1beta1/secretrotation
uptest.upbound.io/disable-import: "true"
labels:
testing.upbound.io/example-name: secretrotation
name: example-secretrotation
spec:
forProvider:
region: us-east-1
bucketSelector:
matchLabels:
testing.upbound.io/example-name: secretrotation
# A zip file for a "hello world" javascript lambda
contentBase64: UEsDBBQAAAAIAFd7c1eDOfFtMAAAADEAAAAIABwAaW5kZXguanNVVAkAA7WZWmWrmVpldXgLAAEE6AMAAAToAwAAS60oyC8qKdbLSMxLyUktUrBV0NBUsLVTSM7PK87PSdXLyU/XUPfLB/FLUvNK1DUBUEsBAh4DFAAAAAgAV3tzV4M58W0wAAAAMQAAAAgAGAAAAAAAAQAAALSBAAAAAGluZGV4LmpzVVQFAAO1mVpldXgLAAEE6AMAAAToAwAAUEsFBgAAAAABAAEATgAAAHIAAAAAAA==
contentType: application/zip
key: lambda.zip

0 comments on commit aca95c9

Please sign in to comment.