Skip to content

Commit

Permalink
Merge pull request #771 from haarchri/ebs-volume
Browse files Browse the repository at this point in the history
Implements EC2 Volume
  • Loading branch information
haarchri authored Dec 14, 2021
2 parents f538f93 + 7a5cfcb commit 30a832f
Show file tree
Hide file tree
Showing 15 changed files with 3,805 additions and 39 deletions.
55 changes: 54 additions & 1 deletion apis/ec2/v1alpha1/custom_types.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,62 @@
/*
Copyright 2021 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
import (
xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)

// +kubebuilder:storageversion

// CustomVolumeParameters contains the additional fields for VolumeParameters.
type CustomVolumeParameters struct {
// The identifier of the AWS Key Management Service (AWS KMS) customer master
// key (CMK) to use for Amazon EBS encryption. If this parameter is not specified,
// your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted
// state must be true.
//
// You can specify the CMK using any of the following:
//
// * Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
//
// * Key alias. For example, alias/ExampleAlias.
//
// * Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
//
// * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
//
// AWS authenticates the CMK asynchronously. Therefore, if you specify an ID,
// alias, or ARN that is not valid, the action can appear to complete, but eventually
// fails.
// +optional
// +crossplane:generate:reference:type=github.com/crossplane/provider-aws/apis/kms/v1alpha1.Key
// +crossplane:generate:reference:refFieldName=KMSKeyIDRef
// +crossplane:generate:reference:selectorFieldName=KMSKeyIDSelector
KMSKeyID *string `json:"kmsKeyId,omitempty"`

// KMSKeyIDRef is a reference to a KMS Key used to set KMSKeyID.
// +optional
KMSKeyIDRef *xpv1.Reference `json:"kmsKeyIdRef,omitempty"`

// KMSKeyIDSelector selects a reference to a KMS Key used to set KMSKeyID.
// +optional
KMSKeyIDSelector *xpv1.Selector `json:"kmsKeyIdSelector,omitempty"`
}

// CustomVPCPeeringConnectionParameters are custom parameters for VPCPeeringConnection
type CustomVPCPeeringConnectionParameters struct {
// The ID of the requester VPC. You must specify this parameter in the request.
Expand Down
11 changes: 9 additions & 2 deletions apis/ec2/v1alpha1/generator-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ ignore:
- VpnConnectionRoute
- VpnConnection
- VpnGateway
- Volume
shape_names:
- Instance
field_paths:
Expand All @@ -71,4 +70,12 @@ ignore:
- CreateVpcPeeringConnectionInput.PeerVPCID
- DeleteVpcPeeringConnectionInput.PeerVPCID
- RejectVpcPeeringConnectionInput.PeerVPCID
- AcceptVpcPeeringConnectionInput.PeerVPCID
- AcceptVpcPeeringConnectionInput.PeerVPCID
- CreateVolumeInput.DryRun
- CreateVolumeInput.KmsKeyId
resources:
Volume:
exceptions:
errors:
404:
code: InvalidVolume.NotFound
4 changes: 2 additions & 2 deletions apis/ec2/v1alpha1/referencers.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ package v1alpha1
import (
"context"

"github.com/crossplane/provider-aws/apis/ec2/v1beta1"

"github.com/crossplane/crossplane-runtime/pkg/reference"
"github.com/pkg/errors"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/crossplane/provider-aws/apis/ec2/v1beta1"
)

// ResolveReferences of this VPCPeeringConnection
Expand Down
Loading

0 comments on commit 30a832f

Please sign in to comment.