github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/eks/identityProviderConfig.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package eks 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Manages an EKS Identity Provider Configuration. 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/eks" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // _, err := eks.NewIdentityProviderConfig(ctx, "example", &eks.IdentityProviderConfigArgs{ 33 // ClusterName: pulumi.Any(exampleAwsEksCluster.Name), 34 // Oidc: &eks.IdentityProviderConfigOidcArgs{ 35 // ClientId: pulumi.String("your client_id"), 36 // IdentityProviderConfigName: pulumi.String("example"), 37 // IssuerUrl: pulumi.String("your issuer_url"), 38 // }, 39 // }) 40 // if err != nil { 41 // return err 42 // } 43 // return nil 44 // }) 45 // } 46 // 47 // ``` 48 // <!--End PulumiCodeChooser --> 49 // 50 // ## Import 51 // 52 // Using `pulumi import`, import EKS Identity Provider Configurations using the `cluster_name` and `identity_provider_config_name` separated by a colon (`:`). For example: 53 // 54 // ```sh 55 // $ pulumi import aws:eks/identityProviderConfig:IdentityProviderConfig my_identity_provider_config my_cluster:my_identity_provider_config 56 // ``` 57 type IdentityProviderConfig struct { 58 pulumi.CustomResourceState 59 60 // Amazon Resource Name (ARN) of the EKS Identity Provider Configuration. 61 Arn pulumi.StringOutput `pulumi:"arn"` 62 // Name of the EKS Cluster. 63 ClusterName pulumi.StringOutput `pulumi:"clusterName"` 64 // Nested attribute containing [OpenID Connect](https://openid.net/connect/) identity provider information for the cluster. Detailed below. 65 Oidc IdentityProviderConfigOidcOutput `pulumi:"oidc"` 66 // Status of the EKS Identity Provider Configuration. 67 Status pulumi.StringOutput `pulumi:"status"` 68 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 69 Tags pulumi.StringMapOutput `pulumi:"tags"` 70 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 71 // 72 // Deprecated: Please use `tags` instead. 73 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 74 } 75 76 // NewIdentityProviderConfig registers a new resource with the given unique name, arguments, and options. 77 func NewIdentityProviderConfig(ctx *pulumi.Context, 78 name string, args *IdentityProviderConfigArgs, opts ...pulumi.ResourceOption) (*IdentityProviderConfig, error) { 79 if args == nil { 80 return nil, errors.New("missing one or more required arguments") 81 } 82 83 if args.ClusterName == nil { 84 return nil, errors.New("invalid value for required argument 'ClusterName'") 85 } 86 if args.Oidc == nil { 87 return nil, errors.New("invalid value for required argument 'Oidc'") 88 } 89 opts = internal.PkgResourceDefaultOpts(opts) 90 var resource IdentityProviderConfig 91 err := ctx.RegisterResource("aws:eks/identityProviderConfig:IdentityProviderConfig", name, args, &resource, opts...) 92 if err != nil { 93 return nil, err 94 } 95 return &resource, nil 96 } 97 98 // GetIdentityProviderConfig gets an existing IdentityProviderConfig resource's state with the given name, ID, and optional 99 // state properties that are used to uniquely qualify the lookup (nil if not required). 100 func GetIdentityProviderConfig(ctx *pulumi.Context, 101 name string, id pulumi.IDInput, state *IdentityProviderConfigState, opts ...pulumi.ResourceOption) (*IdentityProviderConfig, error) { 102 var resource IdentityProviderConfig 103 err := ctx.ReadResource("aws:eks/identityProviderConfig:IdentityProviderConfig", name, id, state, &resource, opts...) 104 if err != nil { 105 return nil, err 106 } 107 return &resource, nil 108 } 109 110 // Input properties used for looking up and filtering IdentityProviderConfig resources. 111 type identityProviderConfigState struct { 112 // Amazon Resource Name (ARN) of the EKS Identity Provider Configuration. 113 Arn *string `pulumi:"arn"` 114 // Name of the EKS Cluster. 115 ClusterName *string `pulumi:"clusterName"` 116 // Nested attribute containing [OpenID Connect](https://openid.net/connect/) identity provider information for the cluster. Detailed below. 117 Oidc *IdentityProviderConfigOidc `pulumi:"oidc"` 118 // Status of the EKS Identity Provider Configuration. 119 Status *string `pulumi:"status"` 120 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 121 Tags map[string]string `pulumi:"tags"` 122 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 123 // 124 // Deprecated: Please use `tags` instead. 125 TagsAll map[string]string `pulumi:"tagsAll"` 126 } 127 128 type IdentityProviderConfigState struct { 129 // Amazon Resource Name (ARN) of the EKS Identity Provider Configuration. 130 Arn pulumi.StringPtrInput 131 // Name of the EKS Cluster. 132 ClusterName pulumi.StringPtrInput 133 // Nested attribute containing [OpenID Connect](https://openid.net/connect/) identity provider information for the cluster. Detailed below. 134 Oidc IdentityProviderConfigOidcPtrInput 135 // Status of the EKS Identity Provider Configuration. 136 Status pulumi.StringPtrInput 137 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 138 Tags pulumi.StringMapInput 139 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 140 // 141 // Deprecated: Please use `tags` instead. 142 TagsAll pulumi.StringMapInput 143 } 144 145 func (IdentityProviderConfigState) ElementType() reflect.Type { 146 return reflect.TypeOf((*identityProviderConfigState)(nil)).Elem() 147 } 148 149 type identityProviderConfigArgs struct { 150 // Name of the EKS Cluster. 151 ClusterName string `pulumi:"clusterName"` 152 // Nested attribute containing [OpenID Connect](https://openid.net/connect/) identity provider information for the cluster. Detailed below. 153 Oidc IdentityProviderConfigOidc `pulumi:"oidc"` 154 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 155 Tags map[string]string `pulumi:"tags"` 156 } 157 158 // The set of arguments for constructing a IdentityProviderConfig resource. 159 type IdentityProviderConfigArgs struct { 160 // Name of the EKS Cluster. 161 ClusterName pulumi.StringInput 162 // Nested attribute containing [OpenID Connect](https://openid.net/connect/) identity provider information for the cluster. Detailed below. 163 Oidc IdentityProviderConfigOidcInput 164 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 165 Tags pulumi.StringMapInput 166 } 167 168 func (IdentityProviderConfigArgs) ElementType() reflect.Type { 169 return reflect.TypeOf((*identityProviderConfigArgs)(nil)).Elem() 170 } 171 172 type IdentityProviderConfigInput interface { 173 pulumi.Input 174 175 ToIdentityProviderConfigOutput() IdentityProviderConfigOutput 176 ToIdentityProviderConfigOutputWithContext(ctx context.Context) IdentityProviderConfigOutput 177 } 178 179 func (*IdentityProviderConfig) ElementType() reflect.Type { 180 return reflect.TypeOf((**IdentityProviderConfig)(nil)).Elem() 181 } 182 183 func (i *IdentityProviderConfig) ToIdentityProviderConfigOutput() IdentityProviderConfigOutput { 184 return i.ToIdentityProviderConfigOutputWithContext(context.Background()) 185 } 186 187 func (i *IdentityProviderConfig) ToIdentityProviderConfigOutputWithContext(ctx context.Context) IdentityProviderConfigOutput { 188 return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderConfigOutput) 189 } 190 191 // IdentityProviderConfigArrayInput is an input type that accepts IdentityProviderConfigArray and IdentityProviderConfigArrayOutput values. 192 // You can construct a concrete instance of `IdentityProviderConfigArrayInput` via: 193 // 194 // IdentityProviderConfigArray{ IdentityProviderConfigArgs{...} } 195 type IdentityProviderConfigArrayInput interface { 196 pulumi.Input 197 198 ToIdentityProviderConfigArrayOutput() IdentityProviderConfigArrayOutput 199 ToIdentityProviderConfigArrayOutputWithContext(context.Context) IdentityProviderConfigArrayOutput 200 } 201 202 type IdentityProviderConfigArray []IdentityProviderConfigInput 203 204 func (IdentityProviderConfigArray) ElementType() reflect.Type { 205 return reflect.TypeOf((*[]*IdentityProviderConfig)(nil)).Elem() 206 } 207 208 func (i IdentityProviderConfigArray) ToIdentityProviderConfigArrayOutput() IdentityProviderConfigArrayOutput { 209 return i.ToIdentityProviderConfigArrayOutputWithContext(context.Background()) 210 } 211 212 func (i IdentityProviderConfigArray) ToIdentityProviderConfigArrayOutputWithContext(ctx context.Context) IdentityProviderConfigArrayOutput { 213 return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderConfigArrayOutput) 214 } 215 216 // IdentityProviderConfigMapInput is an input type that accepts IdentityProviderConfigMap and IdentityProviderConfigMapOutput values. 217 // You can construct a concrete instance of `IdentityProviderConfigMapInput` via: 218 // 219 // IdentityProviderConfigMap{ "key": IdentityProviderConfigArgs{...} } 220 type IdentityProviderConfigMapInput interface { 221 pulumi.Input 222 223 ToIdentityProviderConfigMapOutput() IdentityProviderConfigMapOutput 224 ToIdentityProviderConfigMapOutputWithContext(context.Context) IdentityProviderConfigMapOutput 225 } 226 227 type IdentityProviderConfigMap map[string]IdentityProviderConfigInput 228 229 func (IdentityProviderConfigMap) ElementType() reflect.Type { 230 return reflect.TypeOf((*map[string]*IdentityProviderConfig)(nil)).Elem() 231 } 232 233 func (i IdentityProviderConfigMap) ToIdentityProviderConfigMapOutput() IdentityProviderConfigMapOutput { 234 return i.ToIdentityProviderConfigMapOutputWithContext(context.Background()) 235 } 236 237 func (i IdentityProviderConfigMap) ToIdentityProviderConfigMapOutputWithContext(ctx context.Context) IdentityProviderConfigMapOutput { 238 return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderConfigMapOutput) 239 } 240 241 type IdentityProviderConfigOutput struct{ *pulumi.OutputState } 242 243 func (IdentityProviderConfigOutput) ElementType() reflect.Type { 244 return reflect.TypeOf((**IdentityProviderConfig)(nil)).Elem() 245 } 246 247 func (o IdentityProviderConfigOutput) ToIdentityProviderConfigOutput() IdentityProviderConfigOutput { 248 return o 249 } 250 251 func (o IdentityProviderConfigOutput) ToIdentityProviderConfigOutputWithContext(ctx context.Context) IdentityProviderConfigOutput { 252 return o 253 } 254 255 // Amazon Resource Name (ARN) of the EKS Identity Provider Configuration. 256 func (o IdentityProviderConfigOutput) Arn() pulumi.StringOutput { 257 return o.ApplyT(func(v *IdentityProviderConfig) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 258 } 259 260 // Name of the EKS Cluster. 261 func (o IdentityProviderConfigOutput) ClusterName() pulumi.StringOutput { 262 return o.ApplyT(func(v *IdentityProviderConfig) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput) 263 } 264 265 // Nested attribute containing [OpenID Connect](https://openid.net/connect/) identity provider information for the cluster. Detailed below. 266 func (o IdentityProviderConfigOutput) Oidc() IdentityProviderConfigOidcOutput { 267 return o.ApplyT(func(v *IdentityProviderConfig) IdentityProviderConfigOidcOutput { return v.Oidc }).(IdentityProviderConfigOidcOutput) 268 } 269 270 // Status of the EKS Identity Provider Configuration. 271 func (o IdentityProviderConfigOutput) Status() pulumi.StringOutput { 272 return o.ApplyT(func(v *IdentityProviderConfig) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput) 273 } 274 275 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 276 func (o IdentityProviderConfigOutput) Tags() pulumi.StringMapOutput { 277 return o.ApplyT(func(v *IdentityProviderConfig) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 278 } 279 280 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 281 // 282 // Deprecated: Please use `tags` instead. 283 func (o IdentityProviderConfigOutput) TagsAll() pulumi.StringMapOutput { 284 return o.ApplyT(func(v *IdentityProviderConfig) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 285 } 286 287 type IdentityProviderConfigArrayOutput struct{ *pulumi.OutputState } 288 289 func (IdentityProviderConfigArrayOutput) ElementType() reflect.Type { 290 return reflect.TypeOf((*[]*IdentityProviderConfig)(nil)).Elem() 291 } 292 293 func (o IdentityProviderConfigArrayOutput) ToIdentityProviderConfigArrayOutput() IdentityProviderConfigArrayOutput { 294 return o 295 } 296 297 func (o IdentityProviderConfigArrayOutput) ToIdentityProviderConfigArrayOutputWithContext(ctx context.Context) IdentityProviderConfigArrayOutput { 298 return o 299 } 300 301 func (o IdentityProviderConfigArrayOutput) Index(i pulumi.IntInput) IdentityProviderConfigOutput { 302 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IdentityProviderConfig { 303 return vs[0].([]*IdentityProviderConfig)[vs[1].(int)] 304 }).(IdentityProviderConfigOutput) 305 } 306 307 type IdentityProviderConfigMapOutput struct{ *pulumi.OutputState } 308 309 func (IdentityProviderConfigMapOutput) ElementType() reflect.Type { 310 return reflect.TypeOf((*map[string]*IdentityProviderConfig)(nil)).Elem() 311 } 312 313 func (o IdentityProviderConfigMapOutput) ToIdentityProviderConfigMapOutput() IdentityProviderConfigMapOutput { 314 return o 315 } 316 317 func (o IdentityProviderConfigMapOutput) ToIdentityProviderConfigMapOutputWithContext(ctx context.Context) IdentityProviderConfigMapOutput { 318 return o 319 } 320 321 func (o IdentityProviderConfigMapOutput) MapIndex(k pulumi.StringInput) IdentityProviderConfigOutput { 322 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IdentityProviderConfig { 323 return vs[0].(map[string]*IdentityProviderConfig)[vs[1].(string)] 324 }).(IdentityProviderConfigOutput) 325 } 326 327 func init() { 328 pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderConfigInput)(nil)).Elem(), &IdentityProviderConfig{}) 329 pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderConfigArrayInput)(nil)).Elem(), IdentityProviderConfigArray{}) 330 pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderConfigMapInput)(nil)).Elem(), IdentityProviderConfigMap{}) 331 pulumi.RegisterOutputType(IdentityProviderConfigOutput{}) 332 pulumi.RegisterOutputType(IdentityProviderConfigArrayOutput{}) 333 pulumi.RegisterOutputType(IdentityProviderConfigMapOutput{}) 334 }