Commit 8baf090
authored
Follow up to aws-controllers-k8s/runtime#79
This patch modifies the code-generator to generate a `Region` function
so that a resource can also satisfy the `Identifiers` interface. This
the patch also extends the `setStatusDefaults` so that it correctly
populates the `status.ResourceMetadata.Region` with the aws region in
which it is created/managed
Description of changes:
- Add `Region()` method to resourceIdentifiers template.
- Modifies `setStatusDefaults` to be able to set the a default region.
- Update `runtime_test.go`
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
1 parent 49bcb4d commit 8baf090
File tree
3 files changed
+17
-0
lines changed- pkg/generate/ack
- templates/pkg/resource
3 files changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
185 | 188 | | |
186 | 189 | | |
187 | 190 | | |
| |||
0 commit comments