The same is true for setting dummy access/secret keys in the provider config - though I’m not sure this translates as well to the contexts in which you actually need to use the AWS provider.
provider "aws" {
skip_credentials_validation = true
skip_metadata_api_check = true
skip_region_validation = true
skip_requesting_account_id = true
access_key = "foo"
secret_key = "bar"
}
resource "aws_s3_bucket" "disabled" {
count = 0
bucket = "hello-world"
}
In short, the provider expects to have some credential source to try (access key, profile, assume role block, etc.), even if eventually all validation of those credentials are skipped.