-
Notifications
You must be signed in to change notification settings - Fork 267
Handling of AWS resource dependencies #27
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
Comments
Hi @marcindulak! Great question. My gut instinct on this answer is to eventually (not for MVP #22) support AWS CloudFormation as an explicit resource type (CRD) [1]. We would have an ASO service controller that communicated with the CloudFormation APIs. The [1] I emphasize explicit here because the original ASO wrapped all resources in a call to CloudFormation implicitly. For example, if you went to create an S3 bucket, the original ASO would create a CloudFormation stack with an S3 bucket in it. I want to move away from this implicit/hidden CloudFormation usage and move to a model where the user deliberately says "these resources should be treated as a single unit" by creating a CloudFormationStack CR. |
We solved this problem in https://github.com/crossplane/stack-aws (which addresses similar problems to the Service Operator) using what we call "Custom Resource References. The custom resources defined by stack-aws are high fidelity representations of the AWS APIs; so our When you write a Crossplane apiVersion: database.aws.crossplaneio/v1beta1
kind: RDSInstance
metadata:
name: verycoolinstance
spec:
forProvider:
# Many omitted fields...
vpcSecurityGroupIds:
- sg-12345678 # The name of a security group in the AWS API However if you instead wanted to refer to a apiVersion: database.aws.crossplaneio/v1beta1
kind: RDSInstance
metadata:
name: verycoolinstance
spec:
forProvider:
# Many omitted fields...
vpcSecurityGroupIdRefs:
- name: mycoolsubnetgroup # The name of a SecurityGroup in the Kubernetes API We'll then use the "ref" field ( |
Issues go stale after 90d of inactivity. |
/remove-lifecycle stale |
This work is being tracked in this issue. #545 |
The ideal resources that fit the k8s model do not depend on the order in which they are created (e.g. a backend component should wait until database is ready etc.), however some AWS resources depend on the creation order. Cloudformation has various mechanisms to handle dependencies like
Outputs
,Fn::ImportValue
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/walkthrough-crossstackref.html orDependsOn
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.htmlHow dependencies between AWS resources will be handled by ASO?
The text was updated successfully, but these errors were encountered: