Documentation
¶
Index ¶
- Constants
- type EKS
- type EKSIface
- type IAM
- func (i *IAM) AddPermissionBoundary(ctx context.Context, req IAMRoleRequest) error
- func (i *IAM) AttachInlineRolePolicy(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
- func (i *IAM) AttachManagedRolePolicy(ctx context.Context, policyArn string, roleName string) error
- func (i *IAM) CreateOIDCProvider(ctx context.Context, url string, aud string, certThumpPrint string) error
- func (i *IAM) CreateRole(ctx context.Context, req IAMRoleRequest) (*iam.CreateRoleOutput, error)
- func (i *IAM) DeleteInlinePolicy(ctx context.Context, policyName string, roleName string) error
- func (i *IAM) DeleteRole(ctx context.Context, roleName string) error
- func (i *IAM) DetachRolePolicy(ctx context.Context, policyArn string, roleName string) error
- func (i *IAM) EnsureRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
- func (i *IAM) GetOrCreateRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
- func (i *IAM) GetRole(ctx context.Context, req IAMRoleRequest) (*iam.GetRoleOutput, error)
- func (i *IAM) GetRolePolicy(ctx context.Context, req IAMRoleRequest) (*string, error)
- func (i *IAM) TagRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
- func (i *IAM) UpdateRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
- func (i *IAM) VerifyTags(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
- type IAMIface
- type IAMRoleRequest
- type IAMRoleResponse
- type STS
- type STSIface
Constants ¶
const (
RoleExistsAlreadyForOtherNamespace = "Please choose a different name"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EKS ¶ added in v0.0.4
func (*EKS) DescribeCluster ¶ added in v0.0.4
func (e *EKS) DescribeCluster(ctx context.Context, clusterName string) (*eks.DescribeClusterOutput, error)
DescribeCluster function provides cluster info
type IAM ¶
func (*IAM) AddPermissionBoundary ¶
func (i *IAM) AddPermissionBoundary(ctx context.Context, req IAMRoleRequest) error
AddPermissionBoundary adds permission boundary to the existing roles
func (*IAM) AttachInlineRolePolicy ¶
func (i *IAM) AttachInlineRolePolicy(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
AttachInlineRolePolicy function attaches inline policy to the role
func (*IAM) AttachManagedRolePolicy ¶
AttachManagedRolePolicy function attaches managed policy to the role
func (*IAM) CreateOIDCProvider ¶ added in v0.0.4
func (i *IAM) CreateOIDCProvider(ctx context.Context, url string, aud string, certThumpPrint string) error
CreateOIDCProvider creates OIDC IDP provider with AWS IAM
func (*IAM) CreateRole ¶
func (i *IAM) CreateRole(ctx context.Context, req IAMRoleRequest) (*iam.CreateRoleOutput, error)
CreateRole will try to create an IAM Role, or return back Nil if it can not be created
func (*IAM) DeleteInlinePolicy ¶
DeleteInlinePolicy function deletes inline policy
func (*IAM) DeleteRole ¶
DeleteRole function deletes the role in the account
func (*IAM) DetachRolePolicy ¶
DetachRolePolicy detaches a policy from role
func (*IAM) EnsureRole ¶ added in v0.0.8
func (i *IAM) EnsureRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
EnsureRole ensures that a role exists, and that it has the appropriate configuration
func (*IAM) GetOrCreateRole ¶ added in v0.0.8
func (i *IAM) GetOrCreateRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
GetOrCreateRole will try to create a new IAM Role in AWS. If it exists already, it will use that role. In either case we return back an IAMRoleResponse{} object.
func (*IAM) GetRole ¶
func (i *IAM) GetRole(ctx context.Context, req IAMRoleRequest) (*iam.GetRoleOutput, error)
GetRole gets the role from aws iam
func (*IAM) GetRolePolicy ¶
GetRolePolicy gets the role from aws iam
func (*IAM) TagRole ¶
func (i *IAM) TagRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
TagRole tags role with appropriate tags
func (*IAM) UpdateRole ¶
func (i *IAM) UpdateRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
UpdateRole updates role
func (*IAM) VerifyTags ¶ added in v0.0.4
func (i *IAM) VerifyTags(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
VerifyTags function verifies the tags attached to the role
type IAMIface ¶
type IAMIface interface { CreateRole(ctx context.Context, req IAMRoleRequest) EnsureRole(ctx context.Context, req IAMRoleRequest) UpdateRole(ctx context.Context, req IAMRoleRequest) DeleteRole(ctx context.Context, roleName string) GetRole(ctx context.Context, roleName string) AttachInlineRolePolicy(ctx context.Context, req IAMRoleRequest) AddPermissionBoundary(ctx context.Context, req IAMRoleRequest) error GetRolePolicy(ctx context.Context, req IAMRoleRequest) bool }
IAMIface defines interface methods
type IAMRoleRequest ¶
type IAMRoleRequest struct { Name string PolicyName string Description string SessionDuration int64 TrustPolicy string PermissionPolicy string ManagedPermissionBoundaryPolicy string ManagedPolicies []string Tags map[string]string }
IAMRoleRequest struct
type IAMRoleResponse ¶
func NewIAMRoleResponseFromCreateRole ¶ added in v0.0.8
func NewIAMRoleResponseFromCreateRole(output iam.CreateRoleOutput) *IAMRoleResponse
func NewIAMRoleResponseFromGetRole ¶ added in v0.0.8
func NewIAMRoleResponseFromGetRole(output iam.GetRoleOutput) *IAMRoleResponse