Skip to content

Commit

Permalink
tested and updated AWS integration examples
Browse files Browse the repository at this point in the history
  • Loading branch information
humoflife committed Feb 29, 2024
1 parent b8d051e commit 72f3d6d
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 16 deletions.
5 changes: 3 additions & 2 deletions config/external_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"context"

"github.com/crossplane/upjet/pkg/config"
"github.com/google/uuid"
)

// ExternalNameConfigs contains all external name configurations for this
Expand Down Expand Up @@ -114,8 +115,8 @@ func datadogExternalNameWithInjectedUUID() config.ExternalName {
e := config.IdentifierFromProvider
e.GetIDFn = func(_ context.Context, externalName string, _ map[string]any, _ map[string]any) (string, error) {
if len(externalName) == 0 {
// Some temporary id's need to be numeric
return "00000000-0000-0000-0000-000000000000", nil
// Some temporary id's need to be in UUID format
return uuid.New().String(), nil
}
return externalName, nil
}
Expand Down
8 changes: 4 additions & 4 deletions examples/datadog/v1alpha1/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ metadata:
annotations:
meta.upbound.io/example-id: datadog/v1alpha1/serviceaccount
labels:
testing.upbound.io/example-name: bar
name: bar
testing.upbound.io/example-name: foobar
name: foobar
spec:
forProvider:
email: new@example.com
email: foobar@example.com
roles:
- "06f9c9e6-d4d5-11ee-9dda-da7ad0900002"
- "a151c436-d6aa-11ee-b30b-da7ad0900002"
4 changes: 2 additions & 2 deletions examples/datadog/v1alpha1/serviceaccountapplicationkey.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ metadata:
name: sa-app-key-foo
spec:
forProvider:
name: "8aa8bdba-9d8f-4d79-a46a-721d20f57729"
serviceAccountId: "1ccab214-d4d5-11ee-ad00-fa5472b5b50d"
name: "49c01124-f56f-43e6-9ae2-f89fe9b7a02e"
serviceAccountId: "0b760839-139d-4c99-8309-5a152dfa81b0"
2 changes: 1 addition & 1 deletion examples/datadog/v1alpha1/webhookcustomvariable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
name: foo
spec:
forProvider:
isSecret: false
isSecret: true
name: foo
valueSecretRef:
key: info
Expand Down
2 changes: 1 addition & 1 deletion examples/integration/v1alpha1/aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
name: sandbox
spec:
forProvider:
accountId: "1234567890"
accountId: "INSERT 10 Digit Account ID"
accountSpecificNamespaceRules:
auto_scaling: false
opsworks: false
Expand Down
2 changes: 1 addition & 1 deletion examples/integration/v1alpha1/awseventbridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
name: foo
spec:
forProvider:
accountId: "123456789012"
accountId: "INSERT 10 Digit Account ID"
createEventBus: true
eventGeneratorName: app-alerts
region: us-east-1
4 changes: 2 additions & 2 deletions examples/integration/v1alpha1/awslambdaarn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ metadata:
name: main-collector
spec:
forProvider:
accountId: "1234567890"
lambdaArn: arn:aws:lambda:us-east-1:1234567890:function:datadog-forwarder-Forwarder
accountId: "INSERT 10 Digit Account ID"
lambdaArn: arn:aws:lambda:us-east-1:INSERT 10 Digit Account ID:function:datadog-forwarder-Forwarder
2 changes: 1 addition & 1 deletion examples/integration/v1alpha1/awslogcollection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ metadata:
name: main
spec:
forProvider:
accountId: "1234567890"
accountId: "INSERT 10 Digit Account ID"
services:
- lambda
2 changes: 1 addition & 1 deletion examples/integration/v1alpha1/awstagfilter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ metadata:
name: foo
spec:
forProvider:
accountId: "123456789010"
accountId: "INSERT 10 Digit Account ID"
namespace: sqs
tagFilterStr: key:value
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ require (
github.com/crossplane/crossplane-runtime v1.14.0-rc.0.0.20231011070344-cc691421c2e5
github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79
github.com/crossplane/upjet v1.2.0
github.com/google/uuid v1.3.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0
github.com/pkg/errors v0.9.1
gopkg.in/alecthomas/kingpin.v2 v2.2.6
Expand Down Expand Up @@ -45,7 +46,6 @@ require (
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-plugin v1.5.1 // indirect
Expand Down

0 comments on commit 72f3d6d

Please sign in to comment.