Skip to content

Conversation

bbasata
Copy link
Collaborator

@bbasata bbasata commented Feb 11, 2025

Cross-ref #141

cc: @austinvalle


// ImportStateBlockConfig, if non-empty, supplies declarative import
// configuration. This is (?mutually exclusive of ImportStateID + ResourceName?).
ImportStateBlockConfig string
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we can generate config on our first try, then the usefulness of this is secondary.

type ImportStateKind byte

const (
TerraformImportCommand ImportStateKind = iota
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Naming is ... naming.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The thought is: we're expanding to 3 sub-modes of import testing. Make it explicit, not inferred.

TerraformImportCommand is what we do today & will be the compatibility default.


return testprovider.Resource{
CreateResponse: &resource.CreateResponse{
NewResourceIdentityData: tftypes.NewValue(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

New and shiny!

type ImportStateKind byte

const (
TerraformImportCommand ImportStateKind = iota
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
TerraformImportCommand ImportStateKind = iota
ImportCommandWithId ImportStateKind = iota

@bbasata bbasata changed the title What if ... ImportStateBlockConfig What if ... ImportBlockWithResourceIdentity Feb 18, 2025
@bbasata
Copy link
Collaborator Author

bbasata commented Mar 18, 2025

Closing in favor of #442.

@bbasata bbasata closed this Mar 18, 2025
@bbasata bbasata deleted the import-state-block-config branch March 18, 2025 20:42
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2025
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.

1 participant