github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/provider.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 aws 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // The provider type for the aws package. By default, resources use package-wide configuration 15 // settings, however an explicit `Provider` instance may be created and passed during resource 16 // construction to achieve fine-grained programmatic control over provider settings. See the 17 // [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information. 18 type Provider struct { 19 pulumi.ProviderResourceState 20 21 // The access key for API operations. You can retrieve this from the 'Security & Credentials' section of the AWS console. 22 AccessKey pulumi.StringPtrOutput `pulumi:"accessKey"` 23 // File containing custom root and intermediate certificates. Can also be configured using the `AWS_CA_BUNDLE` environment 24 // variable. (Setting `ca_bundle` in the shared config file is not supported.) 25 CustomCaBundle pulumi.StringPtrOutput `pulumi:"customCaBundle"` 26 // Address of the EC2 metadata service endpoint to use. Can also be configured using the 27 // `AWS_EC2_METADATA_SERVICE_ENDPOINT` environment variable. 28 Ec2MetadataServiceEndpoint pulumi.StringPtrOutput `pulumi:"ec2MetadataServiceEndpoint"` 29 // Protocol to use with EC2 metadata service endpoint.Valid values are `IPv4` and `IPv6`. Can also be configured using the 30 // `AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE` environment variable. 31 Ec2MetadataServiceEndpointMode pulumi.StringPtrOutput `pulumi:"ec2MetadataServiceEndpointMode"` 32 // URL of a proxy to use for HTTP requests when accessing the AWS API. Can also be set using the `HTTP_PROXY` or 33 // `http_proxy` environment variables. 34 HttpProxy pulumi.StringPtrOutput `pulumi:"httpProxy"` 35 // URL of a proxy to use for HTTPS requests when accessing the AWS API. Can also be set using the `HTTPS_PROXY` or 36 // `https_proxy` environment variables. 37 HttpsProxy pulumi.StringPtrOutput `pulumi:"httpsProxy"` 38 // Comma-separated list of hosts that should not use HTTP or HTTPS proxies. Can also be set using the `NO_PROXY` or 39 // `no_proxy` environment variables. 40 NoProxy pulumi.StringPtrOutput `pulumi:"noProxy"` 41 // The profile for API operations. If not set, the default profile created with `aws configure` will be used. 42 Profile pulumi.StringPtrOutput `pulumi:"profile"` 43 // The region where AWS operations will take place. Examples are us-east-1, us-west-2, etc. 44 Region pulumi.StringPtrOutput `pulumi:"region"` 45 // Specifies how retries are attempted. Valid values are `standard` and `adaptive`. Can also be configured using the 46 // `AWS_RETRY_MODE` environment variable. 47 RetryMode pulumi.StringPtrOutput `pulumi:"retryMode"` 48 // Specifies whether S3 API calls in the `us-east-1` region use the legacy global endpoint or a regional endpoint. Valid 49 // values are `legacy` or `regional`. Can also be configured using the `AWS_S3_US_EAST_1_REGIONAL_ENDPOINT` environment 50 // variable or the `s3_us_east_1_regional_endpoint` shared config file parameter 51 S3UsEast1RegionalEndpoint pulumi.StringPtrOutput `pulumi:"s3UsEast1RegionalEndpoint"` 52 // The secret key for API operations. You can retrieve this from the 'Security & Credentials' section of the AWS console. 53 SecretKey pulumi.StringPtrOutput `pulumi:"secretKey"` 54 // The region where AWS STS operations will take place. Examples are us-east-1 and us-west-2. 55 StsRegion pulumi.StringPtrOutput `pulumi:"stsRegion"` 56 // session token. A session token is only required if you are using temporary security credentials. 57 Token pulumi.StringPtrOutput `pulumi:"token"` 58 } 59 60 // NewProvider registers a new resource with the given unique name, arguments, and options. 61 func NewProvider(ctx *pulumi.Context, 62 name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error) { 63 if args == nil { 64 args = &ProviderArgs{} 65 } 66 67 if args.Region == nil { 68 if d := internal.GetEnvOrDefault(nil, nil, "AWS_REGION", "AWS_DEFAULT_REGION"); d != nil { 69 args.Region = pulumi.StringPtr(d.(string)) 70 } 71 } 72 if args.SkipCredentialsValidation == nil { 73 args.SkipCredentialsValidation = pulumi.BoolPtr(false) 74 } 75 if args.SkipMetadataApiCheck == nil { 76 args.SkipMetadataApiCheck = pulumi.BoolPtr(true) 77 } 78 if args.SkipRegionValidation == nil { 79 args.SkipRegionValidation = pulumi.BoolPtr(true) 80 } 81 opts = internal.PkgResourceDefaultOpts(opts) 82 var resource Provider 83 err := ctx.RegisterResource("pulumi:providers:aws", name, args, &resource, opts...) 84 if err != nil { 85 return nil, err 86 } 87 return &resource, nil 88 } 89 90 type providerArgs struct { 91 // The access key for API operations. You can retrieve this from the 'Security & Credentials' section of the AWS console. 92 AccessKey *string `pulumi:"accessKey"` 93 AllowedAccountIds []string `pulumi:"allowedAccountIds"` 94 AssumeRole *ProviderAssumeRole `pulumi:"assumeRole"` 95 AssumeRoleWithWebIdentity *ProviderAssumeRoleWithWebIdentity `pulumi:"assumeRoleWithWebIdentity"` 96 // File containing custom root and intermediate certificates. Can also be configured using the `AWS_CA_BUNDLE` environment 97 // variable. (Setting `ca_bundle` in the shared config file is not supported.) 98 CustomCaBundle *string `pulumi:"customCaBundle"` 99 // Configuration block with settings to default resource tags across all resources. 100 DefaultTags *ProviderDefaultTags `pulumi:"defaultTags"` 101 // Address of the EC2 metadata service endpoint to use. Can also be configured using the 102 // `AWS_EC2_METADATA_SERVICE_ENDPOINT` environment variable. 103 Ec2MetadataServiceEndpoint *string `pulumi:"ec2MetadataServiceEndpoint"` 104 // Protocol to use with EC2 metadata service endpoint.Valid values are `IPv4` and `IPv6`. Can also be configured using the 105 // `AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE` environment variable. 106 Ec2MetadataServiceEndpointMode *string `pulumi:"ec2MetadataServiceEndpointMode"` 107 Endpoints []ProviderEndpoint `pulumi:"endpoints"` 108 ForbiddenAccountIds []string `pulumi:"forbiddenAccountIds"` 109 // URL of a proxy to use for HTTP requests when accessing the AWS API. Can also be set using the `HTTP_PROXY` or 110 // `http_proxy` environment variables. 111 HttpProxy *string `pulumi:"httpProxy"` 112 // URL of a proxy to use for HTTPS requests when accessing the AWS API. Can also be set using the `HTTPS_PROXY` or 113 // `https_proxy` environment variables. 114 HttpsProxy *string `pulumi:"httpsProxy"` 115 // Configuration block with settings to ignore resource tags across all resources. 116 IgnoreTags *ProviderIgnoreTags `pulumi:"ignoreTags"` 117 // Explicitly allow the provider to perform "insecure" SSL requests. If omitted, default value is `false` 118 Insecure *bool `pulumi:"insecure"` 119 // The maximum number of times an AWS API request is being executed. If the API request still fails, an error is thrown. 120 MaxRetries *int `pulumi:"maxRetries"` 121 // Comma-separated list of hosts that should not use HTTP or HTTPS proxies. Can also be set using the `NO_PROXY` or 122 // `no_proxy` environment variables. 123 NoProxy *string `pulumi:"noProxy"` 124 // The profile for API operations. If not set, the default profile created with `aws configure` will be used. 125 Profile *string `pulumi:"profile"` 126 // The region where AWS operations will take place. Examples are us-east-1, us-west-2, etc. 127 Region *string `pulumi:"region"` 128 // Specifies how retries are attempted. Valid values are `standard` and `adaptive`. Can also be configured using the 129 // `AWS_RETRY_MODE` environment variable. 130 RetryMode *string `pulumi:"retryMode"` 131 // Specifies whether S3 API calls in the `us-east-1` region use the legacy global endpoint or a regional endpoint. Valid 132 // values are `legacy` or `regional`. Can also be configured using the `AWS_S3_US_EAST_1_REGIONAL_ENDPOINT` environment 133 // variable or the `s3_us_east_1_regional_endpoint` shared config file parameter 134 S3UsEast1RegionalEndpoint *string `pulumi:"s3UsEast1RegionalEndpoint"` 135 // Set this to true to enable the request to use path-style addressing, i.e., https://s3.amazonaws.com/BUCKET/KEY. By 136 // default, the S3 client will use virtual hosted bucket addressing when possible (https://BUCKET.s3.amazonaws.com/KEY). 137 // Specific to the Amazon S3 service. 138 S3UsePathStyle *bool `pulumi:"s3UsePathStyle"` 139 // The secret key for API operations. You can retrieve this from the 'Security & Credentials' section of the AWS console. 140 SecretKey *string `pulumi:"secretKey"` 141 // List of paths to shared config files. If not set, defaults to [~/.aws/config]. 142 SharedConfigFiles []string `pulumi:"sharedConfigFiles"` 143 // List of paths to shared credentials files. If not set, defaults to [~/.aws/credentials]. 144 SharedCredentialsFiles []string `pulumi:"sharedCredentialsFiles"` 145 // Skip the credentials validation via STS API. Used for AWS API implementations that do not have STS 146 // available/implemented. 147 SkipCredentialsValidation *bool `pulumi:"skipCredentialsValidation"` 148 // Skip the AWS Metadata API check. Used for AWS API implementations that do not have a metadata api endpoint. 149 SkipMetadataApiCheck *bool `pulumi:"skipMetadataApiCheck"` 150 // Skip static validation of region name. Used by users of alternative AWS-like APIs or users w/ access to regions that are 151 // not public (yet). 152 SkipRegionValidation *bool `pulumi:"skipRegionValidation"` 153 // Skip requesting the account ID. Used for AWS API implementations that do not have IAM/STS API and/or metadata API. 154 SkipRequestingAccountId *bool `pulumi:"skipRequestingAccountId"` 155 // The region where AWS STS operations will take place. Examples are us-east-1 and us-west-2. 156 StsRegion *string `pulumi:"stsRegion"` 157 // session token. A session token is only required if you are using temporary security credentials. 158 Token *string `pulumi:"token"` 159 // The capacity of the AWS SDK's token bucket rate limiter. 160 TokenBucketRateLimiterCapacity *int `pulumi:"tokenBucketRateLimiterCapacity"` 161 // Resolve an endpoint with DualStack capability 162 UseDualstackEndpoint *bool `pulumi:"useDualstackEndpoint"` 163 // Resolve an endpoint with FIPS capability 164 UseFipsEndpoint *bool `pulumi:"useFipsEndpoint"` 165 } 166 167 // The set of arguments for constructing a Provider resource. 168 type ProviderArgs struct { 169 // The access key for API operations. You can retrieve this from the 'Security & Credentials' section of the AWS console. 170 AccessKey pulumi.StringPtrInput 171 AllowedAccountIds pulumi.StringArrayInput 172 AssumeRole ProviderAssumeRolePtrInput 173 AssumeRoleWithWebIdentity ProviderAssumeRoleWithWebIdentityPtrInput 174 // File containing custom root and intermediate certificates. Can also be configured using the `AWS_CA_BUNDLE` environment 175 // variable. (Setting `ca_bundle` in the shared config file is not supported.) 176 CustomCaBundle pulumi.StringPtrInput 177 // Configuration block with settings to default resource tags across all resources. 178 DefaultTags ProviderDefaultTagsPtrInput 179 // Address of the EC2 metadata service endpoint to use. Can also be configured using the 180 // `AWS_EC2_METADATA_SERVICE_ENDPOINT` environment variable. 181 Ec2MetadataServiceEndpoint pulumi.StringPtrInput 182 // Protocol to use with EC2 metadata service endpoint.Valid values are `IPv4` and `IPv6`. Can also be configured using the 183 // `AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE` environment variable. 184 Ec2MetadataServiceEndpointMode pulumi.StringPtrInput 185 Endpoints ProviderEndpointArrayInput 186 ForbiddenAccountIds pulumi.StringArrayInput 187 // URL of a proxy to use for HTTP requests when accessing the AWS API. Can also be set using the `HTTP_PROXY` or 188 // `http_proxy` environment variables. 189 HttpProxy pulumi.StringPtrInput 190 // URL of a proxy to use for HTTPS requests when accessing the AWS API. Can also be set using the `HTTPS_PROXY` or 191 // `https_proxy` environment variables. 192 HttpsProxy pulumi.StringPtrInput 193 // Configuration block with settings to ignore resource tags across all resources. 194 IgnoreTags ProviderIgnoreTagsPtrInput 195 // Explicitly allow the provider to perform "insecure" SSL requests. If omitted, default value is `false` 196 Insecure pulumi.BoolPtrInput 197 // The maximum number of times an AWS API request is being executed. If the API request still fails, an error is thrown. 198 MaxRetries pulumi.IntPtrInput 199 // Comma-separated list of hosts that should not use HTTP or HTTPS proxies. Can also be set using the `NO_PROXY` or 200 // `no_proxy` environment variables. 201 NoProxy pulumi.StringPtrInput 202 // The profile for API operations. If not set, the default profile created with `aws configure` will be used. 203 Profile pulumi.StringPtrInput 204 // The region where AWS operations will take place. Examples are us-east-1, us-west-2, etc. 205 Region pulumi.StringPtrInput 206 // Specifies how retries are attempted. Valid values are `standard` and `adaptive`. Can also be configured using the 207 // `AWS_RETRY_MODE` environment variable. 208 RetryMode pulumi.StringPtrInput 209 // Specifies whether S3 API calls in the `us-east-1` region use the legacy global endpoint or a regional endpoint. Valid 210 // values are `legacy` or `regional`. Can also be configured using the `AWS_S3_US_EAST_1_REGIONAL_ENDPOINT` environment 211 // variable or the `s3_us_east_1_regional_endpoint` shared config file parameter 212 S3UsEast1RegionalEndpoint pulumi.StringPtrInput 213 // Set this to true to enable the request to use path-style addressing, i.e., https://s3.amazonaws.com/BUCKET/KEY. By 214 // default, the S3 client will use virtual hosted bucket addressing when possible (https://BUCKET.s3.amazonaws.com/KEY). 215 // Specific to the Amazon S3 service. 216 S3UsePathStyle pulumi.BoolPtrInput 217 // The secret key for API operations. You can retrieve this from the 'Security & Credentials' section of the AWS console. 218 SecretKey pulumi.StringPtrInput 219 // List of paths to shared config files. If not set, defaults to [~/.aws/config]. 220 SharedConfigFiles pulumi.StringArrayInput 221 // List of paths to shared credentials files. If not set, defaults to [~/.aws/credentials]. 222 SharedCredentialsFiles pulumi.StringArrayInput 223 // Skip the credentials validation via STS API. Used for AWS API implementations that do not have STS 224 // available/implemented. 225 SkipCredentialsValidation pulumi.BoolPtrInput 226 // Skip the AWS Metadata API check. Used for AWS API implementations that do not have a metadata api endpoint. 227 SkipMetadataApiCheck pulumi.BoolPtrInput 228 // Skip static validation of region name. Used by users of alternative AWS-like APIs or users w/ access to regions that are 229 // not public (yet). 230 SkipRegionValidation pulumi.BoolPtrInput 231 // Skip requesting the account ID. Used for AWS API implementations that do not have IAM/STS API and/or metadata API. 232 SkipRequestingAccountId pulumi.BoolPtrInput 233 // The region where AWS STS operations will take place. Examples are us-east-1 and us-west-2. 234 StsRegion pulumi.StringPtrInput 235 // session token. A session token is only required if you are using temporary security credentials. 236 Token pulumi.StringPtrInput 237 // The capacity of the AWS SDK's token bucket rate limiter. 238 TokenBucketRateLimiterCapacity pulumi.IntPtrInput 239 // Resolve an endpoint with DualStack capability 240 UseDualstackEndpoint pulumi.BoolPtrInput 241 // Resolve an endpoint with FIPS capability 242 UseFipsEndpoint pulumi.BoolPtrInput 243 } 244 245 func (ProviderArgs) ElementType() reflect.Type { 246 return reflect.TypeOf((*providerArgs)(nil)).Elem() 247 } 248 249 type ProviderInput interface { 250 pulumi.Input 251 252 ToProviderOutput() ProviderOutput 253 ToProviderOutputWithContext(ctx context.Context) ProviderOutput 254 } 255 256 func (*Provider) ElementType() reflect.Type { 257 return reflect.TypeOf((**Provider)(nil)).Elem() 258 } 259 260 func (i *Provider) ToProviderOutput() ProviderOutput { 261 return i.ToProviderOutputWithContext(context.Background()) 262 } 263 264 func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput { 265 return pulumi.ToOutputWithContext(ctx, i).(ProviderOutput) 266 } 267 268 type ProviderOutput struct{ *pulumi.OutputState } 269 270 func (ProviderOutput) ElementType() reflect.Type { 271 return reflect.TypeOf((**Provider)(nil)).Elem() 272 } 273 274 func (o ProviderOutput) ToProviderOutput() ProviderOutput { 275 return o 276 } 277 278 func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput { 279 return o 280 } 281 282 // The access key for API operations. You can retrieve this from the 'Security & Credentials' section of the AWS console. 283 func (o ProviderOutput) AccessKey() pulumi.StringPtrOutput { 284 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.AccessKey }).(pulumi.StringPtrOutput) 285 } 286 287 // File containing custom root and intermediate certificates. Can also be configured using the `AWS_CA_BUNDLE` environment 288 // variable. (Setting `ca_bundle` in the shared config file is not supported.) 289 func (o ProviderOutput) CustomCaBundle() pulumi.StringPtrOutput { 290 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.CustomCaBundle }).(pulumi.StringPtrOutput) 291 } 292 293 // Address of the EC2 metadata service endpoint to use. Can also be configured using the 294 // `AWS_EC2_METADATA_SERVICE_ENDPOINT` environment variable. 295 func (o ProviderOutput) Ec2MetadataServiceEndpoint() pulumi.StringPtrOutput { 296 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Ec2MetadataServiceEndpoint }).(pulumi.StringPtrOutput) 297 } 298 299 // Protocol to use with EC2 metadata service endpoint.Valid values are `IPv4` and `IPv6`. Can also be configured using the 300 // `AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE` environment variable. 301 func (o ProviderOutput) Ec2MetadataServiceEndpointMode() pulumi.StringPtrOutput { 302 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Ec2MetadataServiceEndpointMode }).(pulumi.StringPtrOutput) 303 } 304 305 // URL of a proxy to use for HTTP requests when accessing the AWS API. Can also be set using the `HTTP_PROXY` or 306 // `http_proxy` environment variables. 307 func (o ProviderOutput) HttpProxy() pulumi.StringPtrOutput { 308 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.HttpProxy }).(pulumi.StringPtrOutput) 309 } 310 311 // URL of a proxy to use for HTTPS requests when accessing the AWS API. Can also be set using the `HTTPS_PROXY` or 312 // `https_proxy` environment variables. 313 func (o ProviderOutput) HttpsProxy() pulumi.StringPtrOutput { 314 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.HttpsProxy }).(pulumi.StringPtrOutput) 315 } 316 317 // Comma-separated list of hosts that should not use HTTP or HTTPS proxies. Can also be set using the `NO_PROXY` or 318 // `no_proxy` environment variables. 319 func (o ProviderOutput) NoProxy() pulumi.StringPtrOutput { 320 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.NoProxy }).(pulumi.StringPtrOutput) 321 } 322 323 // The profile for API operations. If not set, the default profile created with `aws configure` will be used. 324 func (o ProviderOutput) Profile() pulumi.StringPtrOutput { 325 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Profile }).(pulumi.StringPtrOutput) 326 } 327 328 // The region where AWS operations will take place. Examples are us-east-1, us-west-2, etc. 329 func (o ProviderOutput) Region() pulumi.StringPtrOutput { 330 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Region }).(pulumi.StringPtrOutput) 331 } 332 333 // Specifies how retries are attempted. Valid values are `standard` and `adaptive`. Can also be configured using the 334 // `AWS_RETRY_MODE` environment variable. 335 func (o ProviderOutput) RetryMode() pulumi.StringPtrOutput { 336 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.RetryMode }).(pulumi.StringPtrOutput) 337 } 338 339 // Specifies whether S3 API calls in the `us-east-1` region use the legacy global endpoint or a regional endpoint. Valid 340 // values are `legacy` or `regional`. Can also be configured using the `AWS_S3_US_EAST_1_REGIONAL_ENDPOINT` environment 341 // variable or the `s3_us_east_1_regional_endpoint` shared config file parameter 342 func (o ProviderOutput) S3UsEast1RegionalEndpoint() pulumi.StringPtrOutput { 343 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.S3UsEast1RegionalEndpoint }).(pulumi.StringPtrOutput) 344 } 345 346 // The secret key for API operations. You can retrieve this from the 'Security & Credentials' section of the AWS console. 347 func (o ProviderOutput) SecretKey() pulumi.StringPtrOutput { 348 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.SecretKey }).(pulumi.StringPtrOutput) 349 } 350 351 // The region where AWS STS operations will take place. Examples are us-east-1 and us-west-2. 352 func (o ProviderOutput) StsRegion() pulumi.StringPtrOutput { 353 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.StsRegion }).(pulumi.StringPtrOutput) 354 } 355 356 // session token. A session token is only required if you are using temporary security credentials. 357 func (o ProviderOutput) Token() pulumi.StringPtrOutput { 358 return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Token }).(pulumi.StringPtrOutput) 359 } 360 361 func init() { 362 pulumi.RegisterInputType(reflect.TypeOf((*ProviderInput)(nil)).Elem(), &Provider{}) 363 pulumi.RegisterOutputType(ProviderOutput{}) 364 }