-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move GetProviderSchemaOptional
check to correct block
#33807
Conversation
A typo put the check for `GetProviderSchemaOptional` into the wrong `if` expression, and was missed partly because of the named return which we also remove here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🚀
Given this configuration with 19 provider instances:
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.14.0"
}
}
}
provider "aws" {
alias = "apnortheast1"
region = "ap-northeast-1"
}
data "aws_arn" "apnortheast1" {
provider = aws.apnortheast1
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "apnortheast2"
region = "ap-northeast-2"
}
data "aws_arn" "apnortheast2" {
provider = aws.apnortheast2
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "apnortheast3"
region = "ap-northeast-3"
}
data "aws_arn" "apnortheast3" {
provider = aws.apnortheast3
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "apsouth1"
region = "ap-south-1"
}
data "aws_arn" "apsouth1" {
provider = aws.apsouth1
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "apsoutheast1"
region = "ap-southeast-1"
}
data "aws_arn" "apsoutheast1" {
provider = aws.apsoutheast1
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "apsoutheast2"
region = "ap-southeast-2"
}
data "aws_arn" "apsoutheast2" {
provider = aws.apsoutheast2
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "cacentral1"
region = "ca-central-1"
}
data "aws_arn" "cacentral1" {
provider = aws.cacentral1
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "eucentral1"
region = "eu-central-1"
}
data "aws_arn" "eucentral1" {
provider = aws.eucentral1
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "eunorth1"
region = "eu-north-1"
}
data "aws_arn" "eunorth1" {
provider = aws.eunorth1
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "eusouth1"
region = "eu-south-1"
}
data "aws_arn" "eusouth1" {
provider = aws.eusouth1
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "euwest1"
region = "eu-west-1"
}
data "aws_arn" "euwest1" {
provider = aws.euwest1
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "euwest2"
region = "eu-west-2"
}
data "aws_arn" "euwest2" {
provider = aws.euwest2
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "euwest3"
region = "eu-west-3"
}
data "aws_arn" "euwest3" {
provider = aws.euwest3
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "mecentral1"
region = "me-central-1"
}
data "aws_arn" "mecentral1" {
provider = aws.mecentral1
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "saeast1"
region = "sa-east-1"
}
data "aws_arn" "saeast1" {
provider = aws.saeast1
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "useast1"
region = "us-east-1"
}
data "aws_arn" "useast1" {
provider = aws.useast1
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "useast2"
region = "us-east-2"
}
data "aws_arn" "useast2" {
provider = aws.useast2
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "uswest1"
region = "us-west-1"
}
data "aws_arn" "uswest1" {
provider = aws.uswest1
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
provider "aws" {
alias = "uswest2"
region = "us-west-2"
}
data "aws_arn" "uswest2" {
provider = aws.uswest2
arn = "arn:aws:us-east-1:123456789012:iam:user/test"
}
And switching between production versions and development versions (this PR for terraform
and a locally built hashicorp/aws
provider with all the provider-side bits for GetProviderSchemaOptional
enabled):
Terraform 1.5.6 and AWS Provider 5.14.0:
35.65 real 141.34 user 114.35 sys
1269710848 maximum resident set size
Terraform DEV and AWS Provider 5.14.0:
37.67 real 148.63 user 125.43 sys
1327726592 maximum resident set size
Terraform DEV and AWS Provider DEV:
37.96 real 116.76 user 185.14 sys
193249280 maximum resident set size
Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
A typo put the check for
GetProviderSchemaOptional
into the wrongif
expression, and was missed partly because of the named return which we also remove here. We were also waiting for end-to-end tests with a new provider, but should have updated the mock tests to cover this logic.