Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Override ID operations #87

Merged
merged 5 commits into from
Nov 18, 2021
Merged

Override ID operations #87

merged 5 commits into from
Nov 18, 2021

Conversation

ulucinar
Copy link
Collaborator

@ulucinar ulucinar commented Nov 18, 2021

Description of your changes

This is a cherry pick of the last two commits of #84.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

…tes, management, network and postgresql groups

Signed-off-by: Muvaffak Onus <me@muvaf.com>
(cherry picked from commit 5a4434f)
…sources

Signed-off-by: Muvaffak Onus <me@muvaf.com>
(cherry picked from commit 9fed46b)
@ulucinar ulucinar changed the title Cherry pick PR#84: Override ID operations Override ID operations Nov 18, 2021
Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
@muvaf muvaf mentioned this pull request Nov 18, 2021
2 tasks
Copy link
Member

@muvaf muvaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking, thanks @ulucinar !

config/cosmosdb/config.go Show resolved Hide resolved
config/cosmosdb/config.go Show resolved Hide resolved
config/cosmosdb/config.go Show resolved Hide resolved
r.ExternalName = config.NameAsIdentifier
r.ExternalName.GetExternalNameFn = common.GetNameFromFullyQualifiedID
// /subscriptions/000-000/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/acc1/sqlDatabases/db1/containers/container1
r.ExternalName.GetIDFn = common.GetFullyQualifiedIDFn("Microsoft.DocumentDB",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure we don't want the group of this resource should be cosmosdb instead of documentdb?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure either. But I believe (though definitely not sure) that cosmodb is a better known name. Also the Terraform counterparts have this prefix.

@@ -32,6 +38,12 @@ func Configure(p *config.Provider) {
},
}
r.UseAsync = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these really need to be async? I know they have long timeouts in Terraform but almost 95% of resources in native providers are sync in the sense that once creation is completed, the resource is ready. Not a big deal though, we can always change it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not timed them. Not sure how long it takes to provision them. Maybe as we populate examples, we can have rough estimates and switch to synchronous mode for them. Async looks like a safer choice for me.

config/virtual/config.go Outdated Show resolved Hide resolved
- SqlContainer -> SQLContainer
- SqlDatabase  -> SQLDatabase
- SqlFunction  -> SQLFunction

- Move config/virtual into config/network

- Fix example manifests

- Use default external-name extractor for ResourceGroup references

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
@ulucinar
Copy link
Collaborator Author

Thank you @muvaf! Very much appreciated :)

@ulucinar ulucinar merged commit 6d73ccd into crossplane-contrib:main Nov 18, 2021
@ulucinar ulucinar deleted the id-ops branch November 18, 2021 22:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants