Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Targets/Bindings Partition Dependent #382

Open
brcourt opened this issue Jun 14, 2022 · 0 comments
Open

Make Targets/Bindings Partition Dependent #382

brcourt opened this issue Jun 14, 2022 · 0 comments
Labels

Comments

@brcourt
Copy link
Collaborator

brcourt commented Jun 14, 2022

Make Targets/Bindings Partition Dependent

Currently, a target is comprised of an accountId and region. To better support multiple partitions, it would be beneficial to include partitionId in the makeup of a target.

Challenges

  1. OrganizationBindings bindings do not support a partition property. We would need to add this, and probably set default to be commercial partition only. This would be required for enumTemplateTargets() and enumTargets and enumGenericTargets.
  2. In persisted-state, would need to add partitionId in ICfnTarget, IBinding, and IGenericTarget
  3. When loading state fails and a generic template is used, how does this affect the lack of partition information? Assuming OrganizationBinding includes partition property and defaults to commercial only, would it work without issue?
  4. Would need to dynamically pass IsPartition property on org-tasks-provider/cfn-task-provider/plugins methods based on target rather than through --is-partition command flag.
  5. Rather than include a partitionId property on a target/binding, which already has a physicalId property, we would need to create all new targets/bindings with a partitionId property. This becomes a problem when parsing targets/bindings based on logicalId, because there will be duplicate mappings. Perhaps creating a nested mapping based on partition would be appropriate? This would completely change the schema of the state file.
  6. Making such an update might require a migration. Should probably include a tool to transition templates. This may also mean creating a new template version and additional template parsing and state parsing methods.
  7. We would need to change the MirrorInPartition property in the root org resource. Perhaps we get rid of this property in favor of identical partition properties on organization resources.

Benefits

  • If we can get partitions supported as a first class citizen in OrganizationBindings, continuing multi-partition support should be much easier.
  • It should make it easier to move away from the --is-partition flag and perform tasks across both partitions at the same time.
  • We could remove the many duplicate partition checks in the org-tasks-provider/cfn-task-provider/plugins and clean up that monstrosity.
  • Support for partition other than GovCloud, such as China, the secret GovCloud partitions, and future partitions would be inherently supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants