provider-aws
provider-aws copied to clipboard
Support for CloudFormation Stack alpha quality (create/delete only)
Description of your changes
- Generated APIs and controller for cloudformation.Stack resource.
- CloudFormation Describe API returns "ValidationError" code when the Stack does not exist, hence the expection in generator-config.yaml.
- Update is not supported yet.
Fixes: #1457
I have:
- [x] Read and followed Crossplane's contribution process.
- [x] Run
make reviewable test
to ensure this PR is ready for review.
How has this code been tested
Try to manually create a stack resource:
cat > cf-stack.yaml <<EOF
apiVersion: cloudformation.aws.crossplane.io/v1alpha1
kind: Stack
metadata:
name: cloudformation-stack-test
spec:
forProvider:
stackName: cloudformation-stack-test
region: us-east-1
templateBody: |
{
"Resources": {
"VPC": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "10.2.0.0/16",
"EnableDnsSupport": true,
"EnableDnsHostnames": true,
"Tags": [
{
"Key": "Name",
"Value": {
"Fn::Join": [
"",
[
{
"Ref": "AWS::StackName"
},
"-VPC"
]
]
}
}
]
}
}
}
}
EOF
kubectl apply -f cf-stack.yaml
Then check that (1) the Stack is created on your AWS account and (2) the stack resource has synced:
kubectl get stacks
NAME READY SYNCED EXTERNAL-NAME
cloudformation-stack-test True True cloudformation-stack-test