Skip to content

Commit

Permalink
Merge pull request #1034 from blakeromano/main
Browse files Browse the repository at this point in the history
Sagemaker Endpoint Resource
  • Loading branch information
turkenf authored Dec 26, 2023
2 parents 95376b5 + 8bce434 commit 2538b54
Show file tree
Hide file tree
Showing 16 changed files with 2,502 additions and 167 deletions.
353 changes: 353 additions & 0 deletions apis/sagemaker/v1beta1/zz_endpoint_types.go

Large diffs are not rendered by default.

1,157 changes: 996 additions & 161 deletions apis/sagemaker/v1beta1/zz_generated.deepcopy.go

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions apis/sagemaker/v1beta1/zz_generated.managed.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions apis/sagemaker/v1beta1/zz_generated.managedlist.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions apis/sagemaker/v1beta1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

114 changes: 114 additions & 0 deletions apis/sagemaker/v1beta1/zz_generated_terraformed.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions config/externalname.go
Original file line number Diff line number Diff line change
Expand Up @@ -2122,6 +2122,8 @@ var NoForkExternalNameConfigs = map[string]config.ExternalName{
"aws_sagemaker_workforce": config.ParameterAsIdentifier("workforce_name"),
// SageMaker Workteams can be imported using the workteam_name
"aws_sagemaker_workteam": config.ParameterAsIdentifier("workteam_name"),
// Endpoints can be imported using the name
"aws_sagemaker_endpoint": config.NameAsIdentifier,
// Endpoint configurations can be imported using the name
"aws_sagemaker_endpoint_configuration": config.NameAsIdentifier,
// SageMaker Code Images can be imported using the name
Expand Down
5 changes: 0 additions & 5 deletions config/externalnamenottested.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,6 @@ var ExternalNameNotTestedConfigs = map[string]config.ExternalName{

// sagemaker
//
// Endpoints can be imported using the name
"aws_sagemaker_endpoint": config.NameAsIdentifier,
// SageMaker Flow Definitions can be imported using the flow_definition_name
"aws_sagemaker_flow_definition": config.ParameterAsIdentifier("flow_definition_name"),
// SageMaker Human Task UIs can be imported using the human_task_ui_name
Expand Down Expand Up @@ -739,9 +737,6 @@ var ExternalNameNotTestedConfigs = map[string]config.ExternalName{
// SESv2 (Simple Email V2) Dedicated IP Assignment can be imported using the id, which is a comma-separated string made up of ip and destination_pool_name
"aws_sesv2_dedicated_ip_assignment": config.IdentifierFromProvider,

// ssoadmin
//

// transcribe
//
// Transcribe MedicalVocabulary can be imported using the vocabulary_name
Expand Down
2 changes: 1 addition & 1 deletion config/generated.lst

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions config/sagemaker/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ func Configure(p *config.Provider) {
p.AddResourceConfigurator("aws_sagemaker_device_fleet", func(r *config.Resource) {
r.Path = "devicefleet"
})
p.AddResourceConfigurator("aws_sagemaker_endpoint", func(r *config.Resource) {
r.References["endpoint_config_name"] = config.Reference{
TerraformName: "aws_sagemaker_endpoint_configuration",
}
r.UseAsync = true
})
}
16 changes: 16 additions & 0 deletions examples-generated/sagemaker/endpoint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: sagemaker.aws.upbound.io/v1beta1
kind: Endpoint
metadata:
annotations:
meta.upbound.io/example-id: sagemaker/v1beta1/endpoint
labels:
testing.upbound.io/example-name: e
name: e
spec:
forProvider:
endpointConfigNameSelector:
matchLabels:
testing.upbound.io/example-name: ec
region: us-west-1
tags:
Name: foo
99 changes: 99 additions & 0 deletions examples/sagemaker/endpoint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
apiVersion: sagemaker.aws.upbound.io/v1beta1
kind: Endpoint
metadata:
annotations:
meta.upbound.io/example-id: sagemaker/v1beta1/endpoint
upjet.upbound.io/manual-intervention: "This resource is skipping because the EndpointConfiguration resource on which this resource depends was skipped."
labels:
testing.upbound.io/example-name: e
name: e
spec:
forProvider:
endpointConfigNameSelector:
matchLabels:
testing.upbound.io/example-name: ec
region: us-east-1
tags:
Name: foo
---
apiVersion: sagemaker.aws.upbound.io/v1beta1
kind: EndpointConfiguration
metadata:
annotations:
meta.upbound.io/example-id: sagemaker/v1beta1/endpoint
upjet.upbound.io/manual-intervention: "It requires an image which can be create/deleted only using AWS CLI"
labels:
testing.upbound.io/example-name: ec
name: ec
spec:
forProvider:
productionVariants:
- initialInstanceCount: 1
instanceType: ml.t2.medium
modelNameSelector:
matchLabels:
testing.upbound.io/example-name: example
variantName: variant-1
region: us-east-1
tags:
Name: foo
---
apiVersion: sagemaker.aws.upbound.io/v1beta1
kind: Model
metadata:
annotations:
meta.upbound.io/example-id: sagemaker/v1beta1/endpoint
upjet.upbound.io/manual-intervention: "It requires an image which can be create/deleted only using AWS CLI"
labels:
testing.upbound.io/example-name: example
name: example
spec:
forProvider:
executionRoleArnSelector:
matchLabels:
testing.upbound.io/example-name: example
primaryContainer:
- image: ${data.aws_account_id}.dkr.ecr.us-east-1.amazonaws.com/sagemaker-scikit-learn:latest
region: us-east-1
---
apiVersion: iam.aws.upbound.io/v1beta1
kind: Role
metadata:
annotations:
meta.upbound.io/example-id: sagemaker/v1beta1/endpoint
upjet.upbound.io/manual-intervention: "It requires an image which can be create/deleted only using AWS CLI"
labels:
testing.upbound.io/example-name: example
name: example
spec:
forProvider:
assumeRolePolicy: |
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "sagemaker.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
---
apiVersion: iam.aws.upbound.io/v1beta1
kind: RolePolicyAttachment
metadata:
annotations:
meta.upbound.io/example-id: sagemaker/v1beta1/endpoint
upjet.upbound.io/manual-intervention: "It requires an image which can be create/deleted only using AWS CLI"
labels:
testing.upbound.io/example-name: example
name: example
spec:
forProvider:
policyArn: "arn:aws:iam::aws:policy/AmazonSageMakerFullAccess"
roleSelector:
matchLabels:
testing.upbound.io/example-name: example
Loading

0 comments on commit 2538b54

Please sign in to comment.