github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/certificates/v1alpha1/clusterTrustBundle.go (about) 1 // Code generated by pulumigen DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package v1alpha1 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors (root certificates). 16 // 17 // ClusterTrustBundle objects are considered to be readable by any authenticated user in the cluster, because they can be mounted by pods using the `clusterTrustBundle` projection. All service accounts have read access to ClusterTrustBundles by default. Users who only have namespace-level access to a cluster can read ClusterTrustBundles by impersonating a serviceaccount that they have access to. 18 // 19 // It can be optionally associated with a particular assigner, in which case it contains one valid set of trust anchors for that signer. Signers may have multiple associated ClusterTrustBundles; each is an independent set of trust anchors for that signer. Admission control is used to enforce that only users with permissions on the signer can create or modify the corresponding bundle. 20 type ClusterTrustBundle struct { 21 pulumi.CustomResourceState 22 23 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 24 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 25 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 26 Kind pulumi.StringPtrOutput `pulumi:"kind"` 27 // metadata contains the object metadata. 28 Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` 29 // spec contains the signer (if any) and trust anchors. 30 Spec ClusterTrustBundleSpecOutput `pulumi:"spec"` 31 } 32 33 // NewClusterTrustBundle registers a new resource with the given unique name, arguments, and options. 34 func NewClusterTrustBundle(ctx *pulumi.Context, 35 name string, args *ClusterTrustBundleArgs, opts ...pulumi.ResourceOption) (*ClusterTrustBundle, error) { 36 if args == nil { 37 return nil, errors.New("missing one or more required arguments") 38 } 39 40 if args.Spec == nil { 41 return nil, errors.New("invalid value for required argument 'Spec'") 42 } 43 args.ApiVersion = pulumi.StringPtr("certificates.k8s.io/v1alpha1") 44 args.Kind = pulumi.StringPtr("ClusterTrustBundle") 45 var resource ClusterTrustBundle 46 err := ctx.RegisterResource("kubernetes:certificates.k8s.io/v1alpha1:ClusterTrustBundle", name, args, &resource, opts...) 47 if err != nil { 48 return nil, err 49 } 50 return &resource, nil 51 } 52 53 // GetClusterTrustBundle gets an existing ClusterTrustBundle resource's state with the given name, ID, and optional 54 // state properties that are used to uniquely qualify the lookup (nil if not required). 55 func GetClusterTrustBundle(ctx *pulumi.Context, 56 name string, id pulumi.IDInput, state *ClusterTrustBundleState, opts ...pulumi.ResourceOption) (*ClusterTrustBundle, error) { 57 var resource ClusterTrustBundle 58 err := ctx.ReadResource("kubernetes:certificates.k8s.io/v1alpha1:ClusterTrustBundle", name, id, state, &resource, opts...) 59 if err != nil { 60 return nil, err 61 } 62 return &resource, nil 63 } 64 65 // Input properties used for looking up and filtering ClusterTrustBundle resources. 66 type clusterTrustBundleState struct { 67 } 68 69 type ClusterTrustBundleState struct { 70 } 71 72 func (ClusterTrustBundleState) ElementType() reflect.Type { 73 return reflect.TypeOf((*clusterTrustBundleState)(nil)).Elem() 74 } 75 76 type clusterTrustBundleArgs struct { 77 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 78 ApiVersion *string `pulumi:"apiVersion"` 79 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 80 Kind *string `pulumi:"kind"` 81 // metadata contains the object metadata. 82 Metadata *metav1.ObjectMeta `pulumi:"metadata"` 83 // spec contains the signer (if any) and trust anchors. 84 Spec ClusterTrustBundleSpec `pulumi:"spec"` 85 } 86 87 // The set of arguments for constructing a ClusterTrustBundle resource. 88 type ClusterTrustBundleArgs struct { 89 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 90 ApiVersion pulumi.StringPtrInput 91 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 92 Kind pulumi.StringPtrInput 93 // metadata contains the object metadata. 94 Metadata metav1.ObjectMetaPtrInput 95 // spec contains the signer (if any) and trust anchors. 96 Spec ClusterTrustBundleSpecInput 97 } 98 99 func (ClusterTrustBundleArgs) ElementType() reflect.Type { 100 return reflect.TypeOf((*clusterTrustBundleArgs)(nil)).Elem() 101 } 102 103 type ClusterTrustBundleInput interface { 104 pulumi.Input 105 106 ToClusterTrustBundleOutput() ClusterTrustBundleOutput 107 ToClusterTrustBundleOutputWithContext(ctx context.Context) ClusterTrustBundleOutput 108 } 109 110 func (*ClusterTrustBundle) ElementType() reflect.Type { 111 return reflect.TypeOf((**ClusterTrustBundle)(nil)).Elem() 112 } 113 114 func (i *ClusterTrustBundle) ToClusterTrustBundleOutput() ClusterTrustBundleOutput { 115 return i.ToClusterTrustBundleOutputWithContext(context.Background()) 116 } 117 118 func (i *ClusterTrustBundle) ToClusterTrustBundleOutputWithContext(ctx context.Context) ClusterTrustBundleOutput { 119 return pulumi.ToOutputWithContext(ctx, i).(ClusterTrustBundleOutput) 120 } 121 122 // ClusterTrustBundleArrayInput is an input type that accepts ClusterTrustBundleArray and ClusterTrustBundleArrayOutput values. 123 // You can construct a concrete instance of `ClusterTrustBundleArrayInput` via: 124 // 125 // ClusterTrustBundleArray{ ClusterTrustBundleArgs{...} } 126 type ClusterTrustBundleArrayInput interface { 127 pulumi.Input 128 129 ToClusterTrustBundleArrayOutput() ClusterTrustBundleArrayOutput 130 ToClusterTrustBundleArrayOutputWithContext(context.Context) ClusterTrustBundleArrayOutput 131 } 132 133 type ClusterTrustBundleArray []ClusterTrustBundleInput 134 135 func (ClusterTrustBundleArray) ElementType() reflect.Type { 136 return reflect.TypeOf((*[]*ClusterTrustBundle)(nil)).Elem() 137 } 138 139 func (i ClusterTrustBundleArray) ToClusterTrustBundleArrayOutput() ClusterTrustBundleArrayOutput { 140 return i.ToClusterTrustBundleArrayOutputWithContext(context.Background()) 141 } 142 143 func (i ClusterTrustBundleArray) ToClusterTrustBundleArrayOutputWithContext(ctx context.Context) ClusterTrustBundleArrayOutput { 144 return pulumi.ToOutputWithContext(ctx, i).(ClusterTrustBundleArrayOutput) 145 } 146 147 // ClusterTrustBundleMapInput is an input type that accepts ClusterTrustBundleMap and ClusterTrustBundleMapOutput values. 148 // You can construct a concrete instance of `ClusterTrustBundleMapInput` via: 149 // 150 // ClusterTrustBundleMap{ "key": ClusterTrustBundleArgs{...} } 151 type ClusterTrustBundleMapInput interface { 152 pulumi.Input 153 154 ToClusterTrustBundleMapOutput() ClusterTrustBundleMapOutput 155 ToClusterTrustBundleMapOutputWithContext(context.Context) ClusterTrustBundleMapOutput 156 } 157 158 type ClusterTrustBundleMap map[string]ClusterTrustBundleInput 159 160 func (ClusterTrustBundleMap) ElementType() reflect.Type { 161 return reflect.TypeOf((*map[string]*ClusterTrustBundle)(nil)).Elem() 162 } 163 164 func (i ClusterTrustBundleMap) ToClusterTrustBundleMapOutput() ClusterTrustBundleMapOutput { 165 return i.ToClusterTrustBundleMapOutputWithContext(context.Background()) 166 } 167 168 func (i ClusterTrustBundleMap) ToClusterTrustBundleMapOutputWithContext(ctx context.Context) ClusterTrustBundleMapOutput { 169 return pulumi.ToOutputWithContext(ctx, i).(ClusterTrustBundleMapOutput) 170 } 171 172 type ClusterTrustBundleOutput struct{ *pulumi.OutputState } 173 174 func (ClusterTrustBundleOutput) ElementType() reflect.Type { 175 return reflect.TypeOf((**ClusterTrustBundle)(nil)).Elem() 176 } 177 178 func (o ClusterTrustBundleOutput) ToClusterTrustBundleOutput() ClusterTrustBundleOutput { 179 return o 180 } 181 182 func (o ClusterTrustBundleOutput) ToClusterTrustBundleOutputWithContext(ctx context.Context) ClusterTrustBundleOutput { 183 return o 184 } 185 186 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 187 func (o ClusterTrustBundleOutput) ApiVersion() pulumi.StringPtrOutput { 188 return o.ApplyT(func(v *ClusterTrustBundle) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 189 } 190 191 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 192 func (o ClusterTrustBundleOutput) Kind() pulumi.StringPtrOutput { 193 return o.ApplyT(func(v *ClusterTrustBundle) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 194 } 195 196 // metadata contains the object metadata. 197 func (o ClusterTrustBundleOutput) Metadata() metav1.ObjectMetaPtrOutput { 198 return o.ApplyT(func(v *ClusterTrustBundle) metav1.ObjectMetaPtrOutput { return v.Metadata }).(metav1.ObjectMetaPtrOutput) 199 } 200 201 // spec contains the signer (if any) and trust anchors. 202 func (o ClusterTrustBundleOutput) Spec() ClusterTrustBundleSpecOutput { 203 return o.ApplyT(func(v *ClusterTrustBundle) ClusterTrustBundleSpecOutput { return v.Spec }).(ClusterTrustBundleSpecOutput) 204 } 205 206 type ClusterTrustBundleArrayOutput struct{ *pulumi.OutputState } 207 208 func (ClusterTrustBundleArrayOutput) ElementType() reflect.Type { 209 return reflect.TypeOf((*[]*ClusterTrustBundle)(nil)).Elem() 210 } 211 212 func (o ClusterTrustBundleArrayOutput) ToClusterTrustBundleArrayOutput() ClusterTrustBundleArrayOutput { 213 return o 214 } 215 216 func (o ClusterTrustBundleArrayOutput) ToClusterTrustBundleArrayOutputWithContext(ctx context.Context) ClusterTrustBundleArrayOutput { 217 return o 218 } 219 220 func (o ClusterTrustBundleArrayOutput) Index(i pulumi.IntInput) ClusterTrustBundleOutput { 221 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ClusterTrustBundle { 222 return vs[0].([]*ClusterTrustBundle)[vs[1].(int)] 223 }).(ClusterTrustBundleOutput) 224 } 225 226 type ClusterTrustBundleMapOutput struct{ *pulumi.OutputState } 227 228 func (ClusterTrustBundleMapOutput) ElementType() reflect.Type { 229 return reflect.TypeOf((*map[string]*ClusterTrustBundle)(nil)).Elem() 230 } 231 232 func (o ClusterTrustBundleMapOutput) ToClusterTrustBundleMapOutput() ClusterTrustBundleMapOutput { 233 return o 234 } 235 236 func (o ClusterTrustBundleMapOutput) ToClusterTrustBundleMapOutputWithContext(ctx context.Context) ClusterTrustBundleMapOutput { 237 return o 238 } 239 240 func (o ClusterTrustBundleMapOutput) MapIndex(k pulumi.StringInput) ClusterTrustBundleOutput { 241 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ClusterTrustBundle { 242 return vs[0].(map[string]*ClusterTrustBundle)[vs[1].(string)] 243 }).(ClusterTrustBundleOutput) 244 } 245 246 func init() { 247 pulumi.RegisterInputType(reflect.TypeOf((*ClusterTrustBundleInput)(nil)).Elem(), &ClusterTrustBundle{}) 248 pulumi.RegisterInputType(reflect.TypeOf((*ClusterTrustBundleArrayInput)(nil)).Elem(), ClusterTrustBundleArray{}) 249 pulumi.RegisterInputType(reflect.TypeOf((*ClusterTrustBundleMapInput)(nil)).Elem(), ClusterTrustBundleMap{}) 250 pulumi.RegisterOutputType(ClusterTrustBundleOutput{}) 251 pulumi.RegisterOutputType(ClusterTrustBundleArrayOutput{}) 252 pulumi.RegisterOutputType(ClusterTrustBundleMapOutput{}) 253 }