Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ci/.golangci5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ linters:
linters-settings:
usetesting:
os-setenv: true
context-background: false
context-todo: false

run:
timeout: 75m
4 changes: 1 addition & 3 deletions .ci/providerlint/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/hashicorp/terraform-provider-aws/ci/providerlint

go 1.23.0

toolchain go1.23.5
go 1.24.1

require (
github.com/bflad/tfproviderlint v0.31.0
Expand Down
4 changes: 2 additions & 2 deletions .ci/providerlint/passes/AWSAT001/testdata/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module testdata

go 1.23.0
go 1.24.1

toolchain go1.23.5
toolchain go1.24.1

require (
github.com/YakDriver/regexache v0.24.0
Expand Down
4 changes: 2 additions & 2 deletions .ci/providerlint/passes/AWSAT002/testdata/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module testdata

go 1.23
go 1.24.1

toolchain go1.23.5
toolchain go1.24.1
4 changes: 2 additions & 2 deletions .ci/providerlint/passes/AWSAT003/testdata/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module testdata

go 1.23
go 1.24.1

toolchain go1.23.5
toolchain go1.24.1
4 changes: 2 additions & 2 deletions .ci/providerlint/passes/AWSAT004/testdata/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module testdata

go 1.23.0
go 1.24.1

toolchain go1.23.5
toolchain go1.24.1

require github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1

Expand Down
4 changes: 2 additions & 2 deletions .ci/providerlint/passes/AWSAT005/testdata/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module testdata

go 1.23
go 1.24.1

toolchain go1.23.5
toolchain go1.24.1
4 changes: 2 additions & 2 deletions .ci/providerlint/passes/AWSAT006/testdata/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module testdata

go 1.23
go 1.24.1

toolchain go1.23.5
toolchain go1.24.1
4 changes: 2 additions & 2 deletions .ci/providerlint/passes/AWSR001/testdata/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module testdata

go 1.23
go 1.24.1

toolchain go1.23.5
toolchain go1.24.1
4 changes: 2 additions & 2 deletions .ci/providerlint/passes/AWSV001/testdata/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module testdata

go 1.23
go 1.24.1

toolchain go1.23.5
toolchain go1.24.1

require github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1

Expand Down
2 changes: 1 addition & 1 deletion .ci/tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/terraform-provider-aws/tools

go 1.23.5
go 1.24.1

require (
github.com/YakDriver/tfproviderdocs v0.17.0
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.23.5
1.24.1
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module github.com/hashicorp/terraform-provider-aws

go 1.23.5
go 1.24.1

// Disable post-quantum X25519MLKEM768 key exchange mechanism
// This causes errors with AWS Network Firewall
godebug tlsmlkem=0

require (
github.com/ProtonMail/go-crypto v1.1.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func main() {
log.SetFlags(0)

seed := int64(1) // Default rand seed
rand.Seed(seed)
r := rand.New(rand.NewSource(seed))
faker.Seed(seed)

documentFile, err := os.OpenFile("./test-fixtures/document_classifier/documents.csv", os.O_TRUNC|os.O_CREATE|os.O_WRONLY, 0600)
Expand All @@ -49,16 +49,16 @@ func main() {

for i := 0; i < 100; i++ {
name := faker.Name().Name()
doctype := doctypes[rand.Intn(len(doctypes))]
doctype := doctypes[r.Intn(len(doctypes))]

var line string
if doctype == "PHISHING" {
order := faker.RandomString(10)
phone := faker.PhoneNumber().PhoneNumber()
doc := phishingDocs[rand.Intn(len(phishingDocs))]
doc := phishingDocs[r.Intn(len(phishingDocs))]
line = fmt.Sprintf(doc, name, order, phone)
} else {
doc := spamDocs[rand.Intn(len(spamDocs))]
doc := spamDocs[r.Intn(len(spamDocs))]
product := faker.Commerce().ProductName()
company := faker.Company().Name()
line = fmt.Sprintf(doc, name, product, company)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func main() {
log.SetFlags(0)

seed := int64(1) // Default rand seed
rand.Seed(seed)
r := rand.New(rand.NewSource(seed))
faker.Seed(seed)

// documentFile, err := os.OpenFile("./test-fixtures/document_classifier_multilabel/documents.csv", os.O_TRUNC|os.O_CREATE|os.O_WRONLY, 0600)
Expand All @@ -54,10 +54,10 @@ func main() {
documentsWriter := csv.NewWriter(documentFile)

for i := 0; i < 100; i++ {
f := rand.Intn(2)
f := r.Intn(2)
var doctype string
if f == 0 {
doctype = doctypes[rand.Intn(len(doctypes))]
doctype = doctypes[r.Intn(len(doctypes))]
} else {
doctype = strings.Join(doctypes, defaultSeparator)
}
Expand All @@ -66,13 +66,13 @@ func main() {

var desc string
if doctype == "DRAMA" {
desc = dramaWords[rand.Intn(len(dramaWords))]
desc = dramaWords[r.Intn(len(dramaWords))]
} else if doctype == "COMEDY" {
desc = comedyWords[rand.Intn(len(comedyWords))]
desc = comedyWords[r.Intn(len(comedyWords))]
} else {
desc = fmt.Sprintf("%s and %s",
dramaWords[rand.Intn(len(dramaWords))],
comedyWords[rand.Intn(len(comedyWords))],
dramaWords[r.Intn(len(dramaWords))],
comedyWords[r.Intn(len(comedyWords))],
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func main() {
log.SetFlags(0)

seed := int64(1) // Default rand seed
rand.Seed(seed)
r := rand.New(rand.NewSource(seed))
faker.Seed(seed)

entitiesFile, err := os.OpenFile("./test-fixtures/entity_recognizer/entitylist.csv", os.O_TRUNC|os.O_CREATE|os.O_WRONLY, 0600)
Expand Down Expand Up @@ -73,13 +73,13 @@ func main() {

for i := 0; i < 1000; i++ {
name := faker.Name().Name()
entity := entities[rand.Intn(len(entities))]
entity := entities[r.Intn(len(entities))]

if _, err := fmt.Fprintf(entitiesFile, "%s,%s\n", name, entity); err != nil {
log.Fatalf("error writing to file %q: %s", "entitylist.csv", err)
}

sentence := sentences[rand.Intn(len(sentences))]
sentence := sentences[r.Intn(len(sentences))]
line := fmt.Sprintf(sentence, name, strings.ToLower(entity))
if _, err := fmt.Fprintln(documentFile, line); err != nil {
log.Fatalf("error writing to file %q: %s", "documents.txt", err)
Expand Down
2 changes: 1 addition & 1 deletion skaff/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/terraform-provider-aws/skaff

go 1.23.5
go 1.24.1

require (
github.com/YakDriver/regexache v0.24.0
Expand Down
2 changes: 1 addition & 1 deletion tools/literally/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/hashicorp/terraform-provider-aws/tools/literally

go 1.23.5
go 1.24.1
2 changes: 1 addition & 1 deletion tools/tfsdk2fw/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/terraform-provider-aws/tools/tfsdk2fw

go 1.23.5
go 1.24.1

require (
github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1
Expand Down
Loading