You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add extra context to docs, for using name vs ARN in adopted resources (#1951)
- Update docs to give example for when to use `adoptedresource.spec.aws.nameOrId` vs `adoptedresource.spec.aws.arn`
- Add headers for each section of the spec, so they appear in the sidebar and are linkable
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Copy file name to clipboardExpand all lines: docs/content/docs/user-docs/adopted-resource.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,12 +39,21 @@ The full spec for the `AdoptedResource` CRD is located [in the API
39
39
reference][api-ref]. The spec contains two parts: the AWS resource reference and
40
40
the Kubernetes target.
41
41
42
+
### AWS Resource
43
+
42
44
The AWS resource reference requires the unique identifier for the object, either
43
45
as an ARN or as the name or ID of the object. Which of these is required depends
44
-
on the service and the particular resource. You can find which field is required
45
-
by finding the unique identifier field used by the `Describe*` or `List*` API
46
+
on the service and the particular resource.
47
+
You can find which field is required
48
+
by finding the unique identifier field used by the `Describe*`, `List*`, or `Get*` API
46
49
calls for that resource.
47
50
51
+
If we were adopting for an IAM Role, since the [IAM Get Role API][iamrole-get] call requires `RoleName`, you should set `.spec.aws.nameOrId` to the name of the role you would like to adopt.
52
+
53
+
If we were adopting for an IAM Policy, since the [IAM Get Policy API][iampolicy-get] call requires `PolicyArn`, you should set `.spec.aws.arn` to the ARN of the policy you would like to adopt.
54
+
55
+
### Kubernetes Target
56
+
48
57
The Kubernetes target requires the `group` and `kind` - these identify from
49
58
which service and resource you wish to adopt. For example, to adopt an S3
50
59
bucket, you would specify a `group` of `s3.services.k8s.aws` and a `kind` of
0 commit comments