diff --git a/config/external_name.go b/config/external_name.go index d4912bc..575ab01 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -8,6 +8,7 @@ import ( "context" "github.com/crossplane/upjet/pkg/config" + "github.com/google/uuid" ) // ExternalNameConfigs contains all external name configurations for this @@ -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 } diff --git a/examples/datadog/v1alpha1/serviceaccount.yaml b/examples/datadog/v1alpha1/serviceaccount.yaml index 1bfcbf1..cd56614 100644 --- a/examples/datadog/v1alpha1/serviceaccount.yaml +++ b/examples/datadog/v1alpha1/serviceaccount.yaml @@ -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" diff --git a/examples/datadog/v1alpha1/serviceaccountapplicationkey.yaml b/examples/datadog/v1alpha1/serviceaccountapplicationkey.yaml index 20fb4ed..cbb1aac 100644 --- a/examples/datadog/v1alpha1/serviceaccountapplicationkey.yaml +++ b/examples/datadog/v1alpha1/serviceaccountapplicationkey.yaml @@ -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" diff --git a/examples/datadog/v1alpha1/webhookcustomvariable.yaml b/examples/datadog/v1alpha1/webhookcustomvariable.yaml index d123838..5ef741b 100644 --- a/examples/datadog/v1alpha1/webhookcustomvariable.yaml +++ b/examples/datadog/v1alpha1/webhookcustomvariable.yaml @@ -8,7 +8,7 @@ metadata: name: foo spec: forProvider: - isSecret: false + isSecret: true name: foo valueSecretRef: key: info diff --git a/examples/integration/v1alpha1/aws.yaml b/examples/integration/v1alpha1/aws.yaml index 39a6df4..765d33a 100644 --- a/examples/integration/v1alpha1/aws.yaml +++ b/examples/integration/v1alpha1/aws.yaml @@ -8,7 +8,7 @@ metadata: name: sandbox spec: forProvider: - accountId: "1234567890" + accountId: "INSERT 10 Digit Account ID" accountSpecificNamespaceRules: auto_scaling: false opsworks: false diff --git a/examples/integration/v1alpha1/awseventbridge.yaml b/examples/integration/v1alpha1/awseventbridge.yaml index 0d5904a..b6d70df 100644 --- a/examples/integration/v1alpha1/awseventbridge.yaml +++ b/examples/integration/v1alpha1/awseventbridge.yaml @@ -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 diff --git a/examples/integration/v1alpha1/awslambdaarn.yaml b/examples/integration/v1alpha1/awslambdaarn.yaml index 10ca2a6..5b57cdc 100644 --- a/examples/integration/v1alpha1/awslambdaarn.yaml +++ b/examples/integration/v1alpha1/awslambdaarn.yaml @@ -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 diff --git a/examples/integration/v1alpha1/awslogcollection.yaml b/examples/integration/v1alpha1/awslogcollection.yaml index 35cd7be..a434c83 100644 --- a/examples/integration/v1alpha1/awslogcollection.yaml +++ b/examples/integration/v1alpha1/awslogcollection.yaml @@ -8,6 +8,6 @@ metadata: name: main spec: forProvider: - accountId: "1234567890" + accountId: "INSERT 10 Digit Account ID" services: - lambda diff --git a/examples/integration/v1alpha1/awstagfilter.yaml b/examples/integration/v1alpha1/awstagfilter.yaml index c13514b..e4fc5c0 100644 --- a/examples/integration/v1alpha1/awstagfilter.yaml +++ b/examples/integration/v1alpha1/awstagfilter.yaml @@ -8,6 +8,6 @@ metadata: name: foo spec: forProvider: - accountId: "123456789010" + accountId: "INSERT 10 Digit Account ID" namespace: sqs tagFilterStr: key:value diff --git a/go.mod b/go.mod index e5b7332..9b63080 100644 --- a/go.mod +++ b/go.mod @@ -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 @@ -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